bool32 trig
int32 row
charptr32 text0
charptr32 text1
charptr32 text2
charptr32 text3
charptr32 text4
charptr32 text5
charptr32 text6
charptr32 text7
None
bool trig;
char text[68];
uint8_t data[77] = {240, 71, 127, 21};
bool doit;
data[5] = 0;
data[6] = 69;
data[7] = 0;
data[76] = 247;
if (inlet_trig && !trig)
trig = 1;
if (!inlet_trig)
trig = 0;
if (trig) {
data[4] = inlet_row + 24;
int i;
for (i = 0; i < 8; i++)
text[i] = inlet_text0[i];
for (i = 0; i < 8; i++)
text[i + 9] = inlet_text1[i];
for (i = 0; i < 8; i++)
text[i + 17] = inlet_text2[i];
for (i = 0; i < 8; i++)
text[i + 26] = inlet_text3[i];
for (i = 0; i < 8; i++)
text[i + 34] = inlet_text4[i];
for (i = 0; i < 8; i++)
text[i + 43] = inlet_text5[i];
for (i = 0; i < 8; i++)
text[i + 51] = inlet_text6[i];
for (i = 0; i < 8; i++)
text[i + 60] = inlet_text7[i];
for (i = 0; i < 68; i++)
data[i + 8] = text[i] ? text[i] : 32;
doit = 1;
}
if (doit && !MidiGetOutputBufferPending(MIDI_DEVICE_USB_HOST)) {
MidiSendSysEx(MIDI_DEVICE_USB_HOST, 2, data, 77);
doit = 0;
}