Sketch that reads the MIDI input from the USB MIDI Interface and prints it to the Serial monitor, including the Mackie Control Universal note names.
This is useful to discover what kinds of messages your DAW is sending.
} else {
}
return false;
}
Serial << F(
"System Exclusive message: [") << se.
length <<
"] "
return false;
}
return false;
}
Serial <<
F(
"Real-Time: ") << hex << rt.
message << dec <<
F(
" on cable ")
return false;
}
void setup() {
Serial.begin(1000000);
sysExMessageCallback,
sysCommonMessageCallback,
realTimeMessageCallback);
}
void loop() {
}
The main header file that includes all Control-Surface header files.
Control_Surface_ & Control_Surface
A predefined instance of the Control Surface to use in the Arduino sketches.
MIDIMessageType
All possible MIDI status byte values (without channel).
@ NoteOn
Note On Channel Voice message (3B).
@ NoteOff
Note Off Channel Voice message (3B).
constexpr uint8_t getOneBased() const
Get the cable as an integer.
void setMIDIInputCallbacks(ChannelMessageCallback channelMessageCallback, SysExMessageCallback sysExMessageCallback, SysCommonMessageCallback sysCommonMessageCallback, RealTimeMessageCallback realTimeMessageCallback)
Set the MIDI input callbacks.
void begin()
Initialize the Control_Surface.
void loop()
Update all MIDI elements, send MIDI events and read MIDI input.
A class for MIDI interfaces sending MIDI messages over a USB MIDI connection.
FlashString_t getMCUNameFromNoteNumber(uint8_t note)
Convert a note number to the name of the corresponding Mackie Control Universal function.
MIDIMessageType getMessageType() const
Get the MIDI message type.
uint8_t data2
First MIDI data byte.
uint8_t header
MIDI status byte (message type and channel).
uint8_t getData1() const
Get the first data byte.
uint8_t data1
First MIDI data byte.
Cable cable
USB MIDI cable number;.
uint8_t getData2() const
Get the second data byte.
uint8_t getNumberOfDataBytes() const
Get the number of data bytes of this type of System Common message.
MIDIMessageType getMessageType() const
Get the MIDI message type.