MSC help

Hello, I am new to all of this so sorry if this is something incredibily stupid but I have looked all over to no avail.

I am working on a QLab controller which outputs either keyboard commands or MSC depending on a slide switch. I want to have the MSC go out via a 5 pin midi port but how do I get the SysEx to the serial port? I put the code from http://arduino.cc/en/Tutorial/Midi/for sending it out as filler for now.

Currently when I click verify I get this:
Keyboard_QLab_Controller_with_midi_option.cpp: In function ‘void loop()’:
Keyboard_QLab_Controller_with_midi_option:84: error: no matching function for call to 'MIDI_Class::sendSysEx(int, byte ()[5])’ ← Repeated for each instance
/Applications/Arduino.app/Contents/Resources/Java/libraries/MIDI/MIDI.h:150: note: candidates are: void MIDI_Class::sendSysEx(int, const byte
, bool) ← Repeated for each instance

Thank you!

#include <MIDI.h>

/*
 * QLab Controller
 * _______________
 * Use an Arduino Leonardo to control QLab through keyboard commands
 * and MSC through usb and DIN-5 respectively.
 *
 * Created 07-07-12
 * Author Soundslikesound
 *
 */

//Set pin name
const int midiOutPort = 1;        // MIDI out port
const int keyMsc = 2;             // Selector switch for keyboard or MSC control
const int goButton = 3;           // Go button
const int all_offButton = 4;      // Stop all cues without going to top of cuelist
const int prevButton = 5;         // Previous sequence and load
const int nextButton = 6;         // Next sequence and load
const int resetButton = 7;        // Stop all cues and go to top of cuelist and load cue
const int stopButton = 8;         // Pause all current cues in current cuelist
const int ledPin = 13;            // LED signal light for testing

void setup() {
  // Make pins: 0, 1, 2, 3, 4, 5, 6 inputs and turn on the 
  // pullup resistor so they go high unless
  // connected to ground:
  // Make pins: 7, 8 outputs
  pinMode(keyMsc, INPUT_PULLUP);
  pinMode(goButton, INPUT_PULLUP);
  pinMode(all_offButton, INPUT_PULLUP);
  pinMode(prevButton, INPUT_PULLUP);
  pinMode(nextButton, INPUT_PULLUP);
  pinMode(resetButton, INPUT_PULLUP);
  pinMode(stopButton, INPUT_PULLUP);
  pinMode(midiOutPort, OUTPUT);
  pinMode(ledPin, OUTPUT);
  
  if(digitalRead(keyMsc)==LOW){
    // Set keyboard mode
    Keyboard.begin();
  }
      else {
        // Set MIDI mode
        Serial.begin(31250);
      }
}

void loop() {
  // Check for keyboard or MSC
  if(digitalRead(keyMsc)==LOW){
      // If keyboard is selected
      
      // If the GO button is pressed
    if(digitalRead(goButton)==LOW){
      // Send Hex 'Space', 
      Keyboard.write(0x20);
      delay(100);
    }
      // If the STOP button is pressed
    if(digitalRead(all_offButton)==LOW){
      // Send Hex 'Escape',
      Keyboard.write(0x1B);
      delay(100);
    }
      // If the previous button is pressed
    if(digitalRead(prevButton)==LOW){
      // Send Hex 'Minus',
      Keyboard.write(0x2D);
      delay(100);
    }
      // If the next button is pressed
    if(digitalRead(nextButton)==LOW){
      // Send Hex 'Plus',
      Keyboard.write(0x2B);
      delay(100);
    }
    else{
      // If MSC is selected
      if(digitalRead(goButton)==LOW){
        // Send MSC for GO
        byte data[5] = {0x7F,0x7F,0x02,0x7F,0x01};
        MIDI.sendSysEx(5,&data);
        // What QLab sends in its MSC Q (F0 7F 7F 02 7F 01 F7);
        delay(100);
      }
      if(digitalRead(all_offButton)==LOW){
        // Send MSC for ALL_OFF
        byte data[5] = {0x7F,0x7F,0x02,0x7F,0x08};
        MIDI.sendSysEx(5,&data);
        // What QLab sends in its MSC Q (F0 7F 7F 02 7F 08 F7);
        delay(100);
      }
      if(digitalRead(prevButton)==LOW){
        // Send MSC code SEQUENCE_-
        byte data[5] = {0x7F,0x7F,0x02,0x7F,0x14};
        MIDI.sendSysEx(5,&data);
        // What QLab sends in its MSC Q (F0 7F 7F 02 7F 14 F7);
        delay(100);
      }
      if(digitalRead(nextButton)==LOW){
        // Send MSC code SQUENCE_+
        byte data[5] = {0x7F,0x7F,0x02,0x7F,0x13};
        MIDI.sendSysEx(5,&data);
        // What QLab sends in its MSC Q (F0 7F 7F 02 7F 13 F7);
        delay(100);
      }
      if(digitalRead(resetButton)==LOW){
        // Send MSC code for RESET
        byte data[5] = {0x7F,0x7F,0x02,0x7F,0x0A};
        MIDI.sendSysEx(5,&data);
        // What QLab sends in its MSC Q (F0 7F 7F 02 7F 0A F7);
        delay(100);
      }
      if(digitalRead(stopButton)==LOW){
        // Send MSC code for STOP
        byte data[5] = {0x7F,0x7F,0x02,0x7F,0x02};
        MIDI.sendSysEx(5,&data);
        // What QLab sends in its MSC Q (F0 7F 7F 02 7F 02 F7);
        delay(100);
      }
    }
  }
}
  void noteOn(int cmd, int pitch, int velocity) {
    digitalWrite(ledPin,HIGH);                         // Turn on LED
    Serial.write(cmd);
    Serial.write(pitch);
    Serial.write(velocity);
    digitalWrite(ledPin,LOW);                          // Turn off LED
}
        byte data[5] = {0x7F,0x7F,0x02,0x7F,0x01};
        MIDI.sendSysEx(5,&data);

The & means address of. Why are you trying to send the address of the array? Isn't it the data in the array that you want to send?

Yes, thank you, it is the data in the array I am trying to send. So remove & and I am sending the data in the array, okay. How do I need to modify the actual sending of the data now?

This is what I currently have.

}
  void noteOn(int cmd, int pitch, int velocity) {
    digitalWrite(ledPin,HIGH);                         // Turn on LED
    Serial.write(cmd);
    Serial.write(pitch);
    Serial.write(velocity);
    digitalWrite(ledPin,LOW);                          // Turn off LED
}

This is what I currently have.

which sends a note, not a SysEx. I have no idea how you correctly send a SysEx. Presumably, the MIDI method already knows how.

I have that there as filler for now, alright well thank you when some new supplies arrive I'll test it out and probably be back with more questions.

So I have my board now and the keyboard portion is working but the midi section is not. I am lost as to why it is not passing midi, any help is appreciated. Thank you.

#include <MIDI.h>

/*
 * QLab Controller
 * _______________
 * Use an Arduino Leonardo to control QLab through keyboard commands
 * and MSC through usb and DIN-5 respectively.
 *
 * Created 07-07-12
 * Soundslikesound
 *
 */

//Set pin name

const int midiOutPort = 1;        // MIDI out port
const int keyMsc = 2;             // Selector switch for keyboard or MSC control
const int goButton = 3;           // Go button
const int all_offButton = 4;      // Stop all cues without going to top of cuelist
const int prevButton = 5;         // Previous sequence and load
const int nextButton = 6;         // Next sequence and load
const int resetButton = 7;        // Stop all cues and go to top of cuelist and load cue
const int stopButton = 8;         // Pause all current cues in current cuelist
const int ledPin = 9;            // LED signal light for testing

void setup() {
  // Make pins: 0, 1, 2, 3, 4, 5, 6 inputs and turn on the 
  // pullup resistor so they go high unless
  // connected to ground:
  // Make pins: 1,9 outputs
  pinMode(keyMsc, INPUT_PULLUP);
  pinMode(goButton, INPUT_PULLUP);
  pinMode(all_offButton, INPUT_PULLUP);
  pinMode(prevButton, INPUT_PULLUP);
  pinMode(nextButton, INPUT_PULLUP);
  pinMode(resetButton, INPUT_PULLUP);
  pinMode(stopButton, INPUT_PULLUP);
  pinMode(midiOutPort, OUTPUT);
  pinMode(ledPin, OUTPUT);
  
  if(digitalRead(keyMsc)==LOW){
    // Set keyboard mode
    Serial.begin(9600);
    Keyboard.begin();
  }
      else {
        // Set MIDI mode
        Serial.begin(31250);
      }
}
void loop() {
  // Check for keyboard or MSC
  if(digitalRead(keyMsc)==LOW){
      // If keyboard is selected
      digitalWrite(ledPin, HIGH);
      // If the GO button is pressed
    if(digitalRead(goButton)==LOW){
      // Send Hex 'Space', 
      Keyboard.press(' ');
      Keyboard.releaseAll();
      delay(100);
    }
      // If the STOP button is pressed
    if(digitalRead(all_offButton)==LOW){
      // Send Hex 'Escape',
      Keyboard.press(0xB1);
      Keyboard.releaseAll();
      delay(100);
    }
      // If the previous button is pressed
    if(digitalRead(prevButton)==LOW){
      // Send Hex 'Minus',
      Keyboard.press(0x2D);
      Keyboard.releaseAll();
      delay(100);
    }
      // If the next button is pressed
    if(digitalRead(nextButton)==LOW){
      // Send Hex 'Plus',
      Keyboard.press(0x2B);
      Keyboard.releaseAll();
      delay(100);
    }
    else{
      digitalWrite(ledPin, LOW);
      // If MSC is selected
      if(digitalRead(goButton)==LOW){
        // Send MSC for GO
        byte data[5] = {0x7F,0x7F,0x02,0x7F,0x01};
        MIDI.sendSysEx(5,data);
        // What QLab sends in its MSC Q (F0 7F 7F 02 7F 01 F7);
        delay(100);
      }
      if(digitalRead(all_offButton)==LOW){
        // Send MSC for ALL_OFF
        byte data[5] = {0x7F,0x7F,0x02,0x7F,0x08};
        MIDI.sendSysEx(5,data);
        // What QLab sends in its MSC Q (F0 7F 7F 02 7F 08 F7);
        delay(100);
      }
      if(digitalRead(prevButton)==LOW){
        // Send MSC code SEQUENCE_-
        byte data[5] = {0x7F,0x7F,0x02,0x7F,0x14};
        MIDI.sendSysEx(5,data);
        // What QLab sends in its MSC Q (F0 7F 7F 02 7F 14 F7);
        delay(100);
      }
      if(digitalRead(nextButton)==LOW){
        // Send MSC code SQUENCE_+
        byte data[5] = {0x7F,0x7F,0x02,0x7F,0x13};
        MIDI.sendSysEx(5,data);
        // What QLab sends in its MSC Q (F0 7F 7F 02 7F 13 F7);
        delay(100);
      }
      if(digitalRead(resetButton)==LOW){
        // Send MSC code for RESET
        byte data[5] = {0x7F,0x7F,0x02,0x7F,0x0A};
        MIDI.sendSysEx(5,data);
        // What QLab sends in its MSC Q (F0 7F 7F 02 7F 0A F7);
        delay(100);
      }
      if(digitalRead(stopButton)==LOW){
        // Send MSC code for STOP
        byte data[5] = {0x7F,0x7F,0x02,0x7F,0x02};
        MIDI.sendSysEx(5,data);
        // What QLab sends in its MSC Q (F0 7F 7F 02 7F 02 F7);
        delay(100);
      }
    }
  }
}
  void sendSysEx(int length, const byte *const data, bool ArrayContainsBoundaries = false) {
    digitalWrite(ledPin,HIGH);                         // Turn on LED
    Serial.write(length);
    for(int index = 0; index < 5; ++index)
{
Serial.write(data[index]);
}
    Serial.write(ArrayContainsBoundaries);
  digitalWrite(ledPin,LOW);                          // Turn off LED
}