Go Down

Topic: MIDI OUT as CC Messages (Read 885 times) previous topic - next topic


Hi guys

Right now I am working on using an arduino as a simple MIDI controller.

I was able to get the arduino to send out MIDI note number easily to a DAW (I am using Reaper). So i figured sending out CC messages would be simple

However I am not getting any respond from the DAW when assigning MIDI data. Could it be the way it is sending?

Here's an example of what I've written:

Code: [Select]

where 176= Channel 1 Mode, 14: unsigned , 76: value

The function is as so:


void ProcessMIDIOut(byte cmdtype, byte val1, byte val2)
 //bugging test purposes: to see what values the TX pin is sending out.
  if (cmdtype == PITCHBEND)
    Serial.write(0xE0 | (channel & 0xf));            //  control change command ***Error here:: "As of Arduino 1.0 the "BYTE" keyword is no longer supported. Please use Serial.write () instead
    Serial.write(val1 & 0x7f);                       //  pb MSB 0-127
    Serial.write(val2);                              //  pb LSB 0-15 - TODO
  else // All standard note and cc messages
    Serial.write(cmdtype | (output_channel & 0xf));  //  control change command
    Serial.write(val1);                           //  command
    Serial.write(val2 & 0x7f);                       //  val1 0-127

and yes, Serial is in the right MIDI baud.

I'm still new to the CC messages format


Does Reaper know what to do with a control number of 14? It's listed as undefined in the messages spec.


Where in your code do you set the values of output_channel and channel?

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131