led text

Author:
License: GPL
Github: rbrt/testing/led text.axo

Inlets

bool32 trig

int32 row

charptr32 text0

charptr32 text1

charptr32 text2

charptr32 text3

charptr32 text4

charptr32 text5

charptr32 text6

charptr32 text7

Outlets

None

Declaration
bool trig;
char text[68];
uint8_t data[77] = {240, 71, 127, 21};
bool doit;
Init
data[5] = 0;
data[6] = 69;
data[7] = 0;
data[76] = 247;
Control Rate
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;
}

Privacy

© 2024 Zrna Research