Replies: 1 comment 8 replies
-
That would be very easy to with the upcoming // Return `true` to let the message Thru, false to consume it:
bool everythingButNotes(const midi::Message& message)
{
return message.type != midi::NoteOn && message.type != midi::NoteOff;
}
// The usual callbacks to handle Note messages:
void onNoteOn(byte pitch, byte velocity, byte channel)
{
}
void onNoteOff(byte pitch, byte velocity, byte channel)
{
}
void setup()
{
MIDI.setThruFilter(everythingButNotes);
MIDI.setHandleNoteOn(onNoteOn);
MIDI.setHandleNoteOff(onNoteOff);
// ...
} I'm hoping to get it released sometime in September, watch this space! |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a micro-controller that I'm receiving MIDI on via a 5-DIN connector from my keyboard controller. I would like to handle only note on/note off and pass through all other messages to the software synth. Is there an easy way to do this or do I have handle all messages via callbacks? And, if I have to do callbacks can you give me an example of using callbacks in a class?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions