led master sdram

Author:
License: GPL
Github: rbrt/push/led master sdram.axo

Inlets

None

Outlets

None

Attributes

spinner thin

Declaration
uint8_t count;
uint8_t ROW;
uint8_t *array;
bool LOCKED;
Init
static uint8_t _array[attr_poly][316] __attribute__((section(".sdram")));
array = &_array[parent->polyIndex][0];

uint8_t init[8]{240, 71, 127, 21, 0, 0, 69, 0};
uint8_t offset[8] = {8, 17, 25, 34, 42, 51, 59, 68};
memset(&array[0], 32, 308);
memcpy(&array[308], offset, 8);
int i;
for (i = 0; i < 4; i++) {
  memcpy(&array[i * 77], init, 8);
  array[(i * 77) + 76] = 247;
  array[(i * 77) + 4] = i + 24;
}
Control Rate
if ((ROW && !count) && !MidiGetOutputBufferPending(MIDI_DEVICE_USB_HOST)) {
  MidiSendSysEx(MIDI_DEVICE_USB_HOST, 2, &array[(ROW - 1) * 77], 77);
  ROW = 0;
  count = attr_thin;
}
if (count)
  count--;

Privacy

© 2024 Zrna Research