midiled

an object to forward midi from one device to another note: does not handle sysex or clock
Author: Mark Harris
License: GPL
Github: tb/midi/utils/midiled.axo

Inlets

None

Outlets

None

Attributes

combo input

Declaration
int flash_cnt = 0;
bool flash_state = false;
const int FLASH_LEN = 0x100;
Init
sysmon_disable_blinker();
palSetPadMode(LED2_PORT, LED2_PIN, PAL_MODE_OUTPUT_PUSHPULL);
flash_cnt = 0;
flash_state = false;
Control Rate
if (flash_cnt > 0)
  flash_cnt--;
bool fs = flash_cnt > 0;
if (fs != flash_state) {
  palWritePad(LED2_PORT, LED2_PIN, fs);
  flash_state = fs;
}
Midi Handler
if (attr_input) {
  flash_cnt = FLASH_LEN;
}

Privacy

© 2024 Zrna Research