midi_out

script that serves as an extra MIDI OUT port
Author: Johannes Taelman, Florian Bruenig
License: BSD
Github: hug/gpio/midi_out.axo

Inlets

int32 CC

frac32 Key

frac32 Velocity

frac32 CCValue

bool32 KeyTrigger

Outlets

None

Attributes

text script

Declaration
int32_t in1, in2, in3, in4, in5;
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
in1 = 0;
in2 = 0;
in3 = 0, in4 = 0, in5 = 0;
Thd = chThdCreateStatic(waThreadX, sizeof(waThreadX), NORMALPRIO, ThreadX,
                        (void *)this);
Control Rate
this->in1 = inlet_Key;
this->in2 = inlet_Velocity;
this->in3 = inlet_KeyTrigger;
this->in4 = inlet_CC;
this->in5 = inlet_CCValue;
Dispose
chThdTerminate(Thd);
chThdWait(Thd);

Privacy

© 2024 Zrna Research