None
bool32.pulse up
bool32.pulse down
frac32.positive v
int8_t vel;
int32_t ntrig;
int inc;
int32_t out;
vel = 0;
ntrig = 0;
outlet_up = 0;
outlet_down = 0;
if (ntrig) {
inc = (vel << 21);
if (inc > 0)
outlet_up = 1;
if (inc < 0)
outlet_down = 1;
out = __SSAT((out + inc), 28);
if (out < 0)
out = 0;
}
outlet_v = out;
ntrig = 0;
if ((status & 0xF0) == MIDI_CONTROL_CHANGE) {
if (data1 == 14) {
if (data2 & 0x40)
vel = (128 - data2) * -1;
else
vel = data2;
ntrig = 1;
}
}