Skip to content

Instantly share code, notes, and snippets.

Last active Mar 17, 2019
What would you like to do?
FreePIE: Map MIDI notes to keyboard presses
36: Key.Q,
38: Key.W,
40: Key.E,
41: Key.R,
def update(midi):
data =
if data.status not in (MidiStatus.NoteOn, MidiStatus.NoteOff):
note, velocity = data.buffer
key = NOTE_TO_KEY.get(note)
if key is None:
pressed = data.status == MidiStatus.NoteOn
keyboard.setKey(key, pressed)
if starting:
midi[0].update += lambda: update(midi[0])

This comment has been minimized.

Copy link

@666noda 666noda commented Mar 17, 2019

After Pressing Midi, code worked once and then nothin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment