Skip to content

Regards using filtering capabilities #340

Closed Answered by franky47
fapplin asked this question in Q&A
Discussion options

You must be logged in to vote

You have several options, the first being what you describe. The filter should not change anything to messages you send yourself, it only acts on Thru.

There is an additional method that lets you transform an incoming message before sending it to Thru, where you could implement your logic (if you wish to send the Program Change on the output of the same interface where you received the NoteOn, that is):

bool forwardToMidiUSB(const midi::Message<128>& message)
{
  // Forward everything but note events to USB
  const bool forwardToUSB = message.type != midi::NoteOn && message.type != midi::NoteOff;
  // Forward only NoteOn for C#3, no NoteOff, and every other type of message
  bool forwardT…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@fapplin
Comment options

Answer selected by franky47
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants