Handling both Serial & USB #21
Replies: 3 comments 1 reply
-
[moved from Issues]
What do you mean with 'is connected'? ('if' connected?) The MIDI Serial protocol does not keep a connection status.
I believe this is the same as serial MIDI (audio cable 3.5mm jack is just a small serial MIDI connector) From what I understand you can create 1 instance for Serial MIDI and another for USB midi and attached call-backs to both (see the examples). Then send messages from your instrument to both Serial and USB. |
Beta Was this translation helpful? Give feedback.
-
Thanks! yeah, sending MIDI might be trivial, just call both send methods. However MIDI clock is a bit tricky. I guess I should register both callbacks (MIDI & Serial) and have some bool flag to switch between both. Same with the 3.5mm audio jack cable, which I meant that 5v pulse clock (24 beat per quarter) coming from Korg Volca series or Eurorack modules. It's a bit challenging as all examples on the internet either use USB or serial. 😅 |
Beta Was this translation helpful? Give feedback.
-
I don't really understand if the origin of this discussion was more about incoming MIDI, but actually, I'm having problems with the implementation of midi USB+DIN output, more specifically with CC messages. All examples that send any midi work for me, but none of them implement USB and DIN output simultaneously. Also, with my own code it works only with one or the other output method flawlessly but never both outputs together. I create the "DIN" instance like this:
And the USB instance like this (you can see I gave it cable#1, bcs at the beginning I was afraid #0 would interfere):
Mainly following this guess of yours, @lathoub, about creating separate instances and different sends for each (the call-backs I don't need them):
So what I get is my sparkFun pro micro (5v 16MHz) frozen and unresponsive at boot. EDIT (code added):
|
Beta Was this translation helpful? Give feedback.
-
Hi, I'm working in a MIDI instrument that I would like to support both serial & midi clock + messages, like any other industrial instrument.
I haven't seen any example on the whole internet, would you provide one?
Use cases:
Beta Was this translation helpful? Give feedback.
All reactions