pads

Receives Midi messages from 4 quneo midi controller pads (3 cc's per pad->pressure,X,Y) Also generates a slewed gate/mix when pad is pressed. (my own row start CC's: 23,35,47,59)
Author: Remco van der Most
License: BSD
Github: sss/quneo/pads.axo

Inlets

frac32 sets gate/mix slew rate

Outlets

frac32 slewed gate/mix output

frac32 pressure output

frac32 x position output

frac32 y position output

frac32 slewed gate/mix output

frac32 pressure output

frac32 x position output

frac32 y position output

frac32 slewed gate/mix output

frac32 pressure output

frac32 x position output

frac32 y position output

frac32 slewed gate/mix output

frac32 pressure output

frac32 x position output

frac32 y position output

Attributes

spinner sets midi channel

spinner sets first cc (from here, next 12 cc's will be used: 0,3,6,9=pressure. 1,4,7,10=X. 2,5,8,11=Y.)

Declaration
uint8_t value[12];
int32_t gate[4];
int32_t v27 = 1 << 27;
Control Rate
int32_t rate;
MTOF(inlet_rate, rate)
rate = rate >> 3;
for (int i = 0; i < 4; i++) {
  gate[i] = __USAT((value[i * 3] > 0 ? rate : -rate) + gate[i], 27);
}

outlet_1g = gate[0];
outlet_1p = value[0] << 20;
outlet_1x = value[1] << 20;
outlet_1y = value[2] << 20;

outlet_2g = gate[1];
outlet_2p = value[3] << 20;
outlet_2x = value[4] << 20;
outlet_2y = value[5] << 20;

outlet_3g = gate[2];
outlet_3p = value[6] << 20;
outlet_3x = value[7] << 20;
outlet_3y = value[8] << 20;

outlet_4g = gate[3];
outlet_4p = value[9] << 20;
outlet_4x = value[10] << 20;
outlet_4y = value[11] << 20;
Midi Handler
if ((status == attr_ch - 1 + MIDI_CONTROL_CHANGE) && (data1 >= attr_cc) &&
    (data1 < (attr_cc + 12))) {
  value[data1 - attr_cc] = data2;
}

Privacy

© 2024 Zrna Research