Skip to content

Can you read on serial and send on usb? #336

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

You must be logged in to vote

Ah, indeed this filter/map thing only works for Thru on the same interface, but there's a way to Thru on another interface, by hacking the filter callback and sending from there:

bool everythingButNotes(const midi::Message<128>& message)
{
  const bool forward = message.type != midi::NoteOn && message.type != midi::NoteOff;
  if (forward)
  {
    usbMidi.send(message);
  }
  // Thru back to the Serial output
  return forward;
}

Replies: 3 comments 10 replies

Comment options

You must be logged in to vote
2 replies
@fapplin
Comment options

@franky47
Comment options

Comment options

You must be logged in to vote
8 replies
@fapplin
Comment options

@franky47
Comment options

@fapplin
Comment options

@franky47
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