I made an Arduino in, out and thru box that I am using with a foot pedal (potentiometer) and three switches to send CC messages. I would like to merge the midi input from my Roland keyboard with these CC messages and send them all thru the midi out. Does anyone have a simple code for Arduino to read the input and merge it with the hard coded output?
You need to parse the incoming MIDI command stream to be able to detect message boundaries and to insert the additional messages there.
Google lists https://github.com/FortySevenEffects/arduino_midi_library, which has a merge example. But in your own application, you would not have two MIDI ports, but would simply output additional messages on the existing port.
Clemens,
Thank you so much for the help! I took the Merge example and, after a few mistakes on my part, was able to read the keyboard input and send it right back out along with the CC messages.
Carl,
I am facing the same problem - can I have a look at your Arduino code? Or even explain roughly how you wired the IN & OUT?