Mercurial > code > home > repos > light9
changeset 2318:264e04dee006
try more faders
author | drewp@bigasterisk.com |
---|---|
date | Thu, 01 Jun 2023 14:17:58 -0700 |
parents | bea44be4df38 |
children | 5deeefdc6ee3 |
files | light9/midifade/midifade.py |
diffstat | 1 files changed, 16 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/light9/midifade/midifade.py Thu Jun 01 14:17:33 2023 -0700 +++ b/light9/midifade/midifade.py Thu Jun 01 14:17:58 2023 -0700 @@ -33,8 +33,17 @@ 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 @@ 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)