I'm using the midi library 3.2 for a midi controller and it is working very well. It is for changing CC values of a synth, but i want to play it on a keyboard, too. So I'm curious about mixing the Keyboard signals with the arduino MIDI messages somehow...
Well, I could go and buy an hardware merger, or maybe there is a way to listen to the incoming MIDI messages and send them inside my loop along with the internal MIDI messages?
This simplified part is working, I couldn't find any proper "AllTheIncomingMidiMessage" function in the library:
void loop() {
// Work with the input
sensorValue = analogRead(sensorPin) / 8;
// Send MIDI cc74 example on channel 1
if(sensorValue != sensorValue_old) { // only if value has changed
MIDI.send(ControlChange,74,sensorValue,1);
sensorValue_old = sensorValue; // compare and change if not the same
}
//Read and send all incoming MIDI messages
//MIDI.send(AllTheIncomingMidiMessageSomehow,1);
It would be great to get a hint!