Pages: [1]   Go Down
Author Topic: MIDI OUT as CC Messages  (Read 405 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
ProcessMIDIOut(176,14,76);

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

The function is as so:

Quote
void ProcessMIDIOut(byte cmdtype, byte val1, byte val2)
{
  
 //bugging test purposes: to see what values the TX pin is sending out.
  SSerial.print("?x00?y2");
  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
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

bump
Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 19
Posts: 3114
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Nice, France
Offline Offline
Full Member
***
Karma: 11
Posts: 234
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: