button_pot_led

moded script2 object from Johannes. Only for Euxoloti 1.2 with maple mini board connected to AXoloti PA2/3. It will receive midi messages on serial 2 port and routes each message to the internal midi section. Pots 1-8 = CC# 1-8 Buttons 1-4 = Note# 0-3 Don't forget to paste the script code from github.
Author: Paul
License: BSD
Github: euxo/1 2/midi/button_pot_led.axo

Inlets

frac32.positive led1

frac32.positive led2

frac32.positive led3

frac32.positive led4

Outlets

None

Attributes

text script

Declaration
int32_t led1, led2, led3, led4;
attr_script msg_t ThreadX2() {
  setup();
  while (!chThdShouldTerminate()) {
    loop();
    chThdSleepMilliseconds(1);
  }
  chThdExit((msg_t)0);
}
static msg_t ThreadX(void *arg) { ((attr_parent *)arg)->ThreadX2(); }
WORKING_AREA(waThreadX, 1024);
Thread *Thd;
Init
led1 = 0;
led2 = 0;
led3 = 0;
led4 = 0;
Thd = chThdCreateStatic(waThreadX, sizeof(waThreadX), NORMALPRIO, ThreadX,
                        (void *)this);
Control Rate
this->led1 = inlet_led1;
this->led2 = inlet_led2;
this->led3 = inlet_led3;
this->led4 = inlet_led4;
Dispose
chThdTerminate(Thd);
chThdWait(Thd);

Privacy

© 2024 Zrna Research