diff --git a/light9/midifade/midifade.py b/light9/midifade/midifade.py --- a/light9/midifade/midifade.py +++ b/light9/midifade/midifade.py @@ -33,8 +33,17 @@ def onMessage(graph: SyncedGraph, ctx: U if md['type'] == 'active_sensing': return if m.is_cc(): - if md['control'] == 17: - setFader(graph, ctx, L9['show/dance2023/fadePage1f3'], md['value'] / 127) + if md['control'] == 81: setFader(graph, ctx, L9['show/dance2023/fadePage1f0'], md['value'] / 127) + if md['control'] == 82: setFader(graph, ctx, L9['show/dance2023/fadePage1f1'], md['value'] / 127) + if md['control'] == 83: setFader(graph, ctx, L9['show/dance2023/fadePage1f2'], md['value'] / 127) + if md['control'] == 84: setFader(graph, ctx, L9['show/dance2023/fadePage1f3'], md['value'] / 127) + if md['control'] == 85: setFader(graph, ctx, L9['show/dance2023/fadePage1f4'], md['value'] / 127) + if md['control'] == 86: setFader(graph, ctx, L9['show/dance2023/fadePage1f5'], md['value'] / 127) + if md['control'] == 87: setFader(graph, ctx, L9['show/dance2023/fadePage1f6'], md['value'] / 127) + if md['control'] == 88: setFader(graph, ctx, L9['show/dance2023/fadePage1f7'], md['value'] / 127) + else: + log.info(f'unhandled cc message {md}') + else: log.info(f'unhandled message {md}') @@ -66,8 +75,11 @@ async def main(): await asyncio.sleep(1 / MAX_SEND_RATE) asyncio.create_task(reader()) - - port = mido.open_input('Keystation:Keystation MIDI 1 20:0', callback=onMessageMidoThread) + log.info(f'{mido.get_input_names()}') + port = mido.open_input( + #'Keystation:Keystation MIDI 1 20:0', + 'BCF2000:BCF2000 MIDI 1 20:0', + callback=onMessageMidoThread) while True: await asyncio.sleep(1)