Skip to content

Make midi_mappings also cover MIDI note-on events.#694

Open
dpwe wants to merge 3 commits intomainfrom
midi_note_on_mapping
Open

Make midi_mappings also cover MIDI note-on events.#694
dpwe wants to merge 3 commits intomainfrom
midi_note_on_mapping

Conversation

@dpwe
Copy link
Copy Markdown
Collaborator

@dpwe dpwe commented May 5, 2026

This takes the midi mapping structure built to automatically convert MIDI Control Change messages into wire commands, and extends it to work for MIDI note-on message. By default, MIDI note-on messages have the mapping -1,0,0,1,0,i%in%nl%v, meaning that any note is converted to a note-on command for the matching synth. But this command can be overridden e.g. amy.send(synth=1, midi_note_cmd='-1,0,0,1,0,i%in%nl%vZ-1,0,0,1,0,i2n%nl%v') would convert any MIDI note-on command on channel 1 to two internal note-ons, one to synth 1, and a simultaneous one to synth 2.

@dpwe
Copy link
Copy Markdown
Collaborator Author

dpwe commented May 5, 2026

WARNING: This modification removes the setting of e.note_source = NOTE_SOURCE_MIDI;. Whatever relied on this (I think, echoing midi in to midi out) will now be broken.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant