Compare commits
3 commits
ad1c49c436
...
1c5ca4fdfd
Author | SHA1 | Date | |
---|---|---|---|
1c5ca4fdfd | |||
04413f58e1 | |||
77ef79433c |
1 changed files with 22 additions and 21 deletions
43
mixer.py
43
mixer.py
|
@ -12,11 +12,11 @@ class Mixer:
|
|||
def __init__(self, ip, port):
|
||||
self.sock = socket.create_connection((ip, port))
|
||||
|
||||
A_H_ID = [0x00, 0x00, 0x1A]
|
||||
ALLEN_HEATH_ID = [0x00, 0x00, 0x1A]
|
||||
QU_MIXER = [0x50, 0x11]
|
||||
MAJOR_MINOR = [0x01, 0x00]
|
||||
ALL_CALL_MIDI_CHANNEL = [0x7F]
|
||||
SYSEX_HEADER = A_H_ID + QU_MIXER + MAJOR_MINOR
|
||||
SYSEX_HEADER = ALLEN_HEATH_ID + QU_MIXER + MAJOR_MINOR
|
||||
SYSEX_ALL_CALL = SYSEX_HEADER + ALL_CALL_MIDI_CHANNEL
|
||||
|
||||
def recv(self):
|
||||
|
@ -117,7 +117,7 @@ class Mixer:
|
|||
|
||||
msg_bytes = bytes(a.bytes() + b.bytes() + c.bytes() + d.bytes())
|
||||
|
||||
print (' '.join(f"{b:02X}" for b in msg_bytes))
|
||||
print(' '.join(f"{b:02X}" for b in msg_bytes))
|
||||
self.sock.sendall(msg_bytes)
|
||||
|
||||
def shutdown(self):
|
||||
|
@ -161,29 +161,30 @@ def main():
|
|||
if args.command:
|
||||
print(f"Command: {args.command}")
|
||||
|
||||
if args.command == 'get_name_from_qu':
|
||||
mixer = Mixer(args.ip, MIXER_PORT)
|
||||
mixer.get_name_from_qu(0)
|
||||
match args.command:
|
||||
case 'get_name_from_qu':
|
||||
mixer = Mixer(args.ip, MIXER_PORT)
|
||||
mixer.get_name_from_qu(0)
|
||||
|
||||
if args.command == 'get_system_state':
|
||||
mixer = Mixer(args.ip, MIXER_PORT)
|
||||
mixer.get_system_state()
|
||||
case 'get_system_state':
|
||||
mixer = Mixer(args.ip, MIXER_PORT)
|
||||
mixer.get_system_state()
|
||||
|
||||
if args.command == 'shutdown':
|
||||
mixer = Mixer(args.ip, MIXER_PORT)
|
||||
mixer.shutdown()
|
||||
case 'shutdown':
|
||||
mixer = Mixer(args.ip, MIXER_PORT)
|
||||
mixer.shutdown()
|
||||
|
||||
if args.command == 'set_default_layer':
|
||||
mixer = Mixer(args.ip, MIXER_PORT)
|
||||
# mixer.set_layer()
|
||||
case 'set_default_layer':
|
||||
mixer = Mixer(args.ip, MIXER_PORT)
|
||||
mixer.scene_recall(0)
|
||||
|
||||
if args.command == 'watch':
|
||||
mixer = Mixer(args.ip, MIXER_PORT)
|
||||
mixer.watch()
|
||||
case 'watch':
|
||||
mixer = Mixer(args.ip, MIXER_PORT)
|
||||
mixer.watch()
|
||||
|
||||
if args.command == 'scene_recall':
|
||||
mixer = Mixer(args.ip, MIXER_PORT)
|
||||
mixer.scene_recall(0)
|
||||
case 'scene_recall':
|
||||
mixer = Mixer(args.ip, MIXER_PORT)
|
||||
mixer.scene_recall(0)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue