Compare commits

..

No commits in common. "1c5ca4fdfdcc5d57742146e8d3f5a06801cdb446" and "ad1c49c436b6bd56e5295bca7e63474c22d75a9b" have entirely different histories.

View file

@ -12,11 +12,11 @@ class Mixer:
def __init__(self, ip, port):
self.sock = socket.create_connection((ip, port))
ALLEN_HEATH_ID = [0x00, 0x00, 0x1A]
A_H_ID = [0x00, 0x00, 0x1A]
QU_MIXER = [0x50, 0x11]
MAJOR_MINOR = [0x01, 0x00]
ALL_CALL_MIDI_CHANNEL = [0x7F]
SYSEX_HEADER = ALLEN_HEATH_ID + QU_MIXER + MAJOR_MINOR
SYSEX_HEADER = A_H_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,30 +161,29 @@ def main():
if args.command:
print(f"Command: {args.command}")
match args.command:
case 'get_name_from_qu':
mixer = Mixer(args.ip, MIXER_PORT)
mixer.get_name_from_qu(0)
if args.command == 'get_name_from_qu':
mixer = Mixer(args.ip, MIXER_PORT)
mixer.get_name_from_qu(0)
case 'get_system_state':
mixer = Mixer(args.ip, MIXER_PORT)
mixer.get_system_state()
if args.command == 'get_system_state':
mixer = Mixer(args.ip, MIXER_PORT)
mixer.get_system_state()
case 'shutdown':
mixer = Mixer(args.ip, MIXER_PORT)
mixer.shutdown()
if args.command == 'shutdown':
mixer = Mixer(args.ip, MIXER_PORT)
mixer.shutdown()
case 'set_default_layer':
mixer = Mixer(args.ip, MIXER_PORT)
mixer.scene_recall(0)
if args.command == 'set_default_layer':
mixer = Mixer(args.ip, MIXER_PORT)
# mixer.set_layer()
case 'watch':
mixer = Mixer(args.ip, MIXER_PORT)
mixer.watch()
if args.command == 'watch':
mixer = Mixer(args.ip, MIXER_PORT)
mixer.watch()
case 'scene_recall':
mixer = Mixer(args.ip, MIXER_PORT)
mixer.scene_recall(0)
if args.command == 'scene_recall':
mixer = Mixer(args.ip, MIXER_PORT)
mixer.scene_recall(0)
if __name__ == '__main__':
main()