-
Notifications
You must be signed in to change notification settings - Fork 2
umpMessageCreate
Andrew Mee edited this page Jun 17, 2024
·
1 revision
Please refer to the UMP and MIDI 2.0 Protocol version 1.1 on the meaning of each of these MIDI messages.
System Exclusive 7 messages return std::array<uint32_t, 2>
.
std::array<uint32_t, 2> mt3Sysex7(uint8_t umpGroup, uint8_t status, uint8_t numBytes, std::array<uint8_t, 6> sx);
It is up to the application to convert Sysex and generate the correct status in this function. Below is example code to output UMP Sysex from a complete array of SysEx bytes.
void sendOutSysex(uint8_t umpGroup, uint8_t *sysex, uint32_t length ){
std::array<uint8_t, 6> sx = {0,0,0,0,0,0};
uint8_t sxPos=0;
for (int i = 0; i < length; i++) {
sx[sxPos++]=sysex[i] & 0x7F;
if(sxPos == 6){
std::array<uint32_t, 2> ump = mt3Sysex7(umpGroup, i < 6 ? 1 : i==length-1 ? 3 : 2, 6, sx);
sendUMP(ump.data(),2);
sxPos=0;
}
}
if (sxPos) {
std::array<uint32_t, 2> ump = mt3Sysex7(umpGroup, length < 7 ? 0 : 3, sxPos, sx);
sendUMP(ump.data(),2);
}
}
All MIDI 2.0 Channel voice messages return std::array<uint32_t, 2>
.
std::array<uint32_t, 2> mt4NoteOn(uint8_t umpGroup, uint8_t channel, uint8_t noteNumber, uint16_t velocity, uint8_t attributeType, uint16_t attributeData);
std::array<uint32_t, 2> mt4NoteOff(uint8_t umpGroup, uint8_t channel, uint8_t noteNumber, uint16_t velocity, uint8_t attributeType, uint16_t attributeData);
std::array<uint32_t, 2> mt4CPolyPressure(uint8_t umpGroup, uint8_t channel, uint8_t noteNumber, uint32_t pressure);
std::array<uint32_t, 2> mt4RPN(uint8_t umpGroup, uint8_t channel,uint8_t bank, uint8_t index, uint32_t value);
std::array<uint32_t, 2> mt4NRPN(uint8_t umpGroup, uint8_t channel,uint8_t bank, uint8_t index, uint32_t value);
std::array<uint32_t, 2> mt4RelativeRPN(uint8_t umpGroup, uint8_t channel,uint8_t bank, uint8_t index, int32_t value);
std::array<uint32_t, 2> mt4RelativeNRPN(uint8_t umpGroup, uint8_t channel,uint8_t bank, uint8_t index, int32_t value);
std::array<uint32_t, 2> mt4ProgramChange(uint8_t umpGroup, uint8_t channel, uint8_t program, bool bankValid, uint8_t bank, uint8_t index);
MIDI 2.0 Channel voice messages return std::array<uint32_t, 4>
.
This section is in progress
UMP Stream messages return std::array<uint32_t, 4>
.