intMidi

Integer control capable of midiCC control enter the midiCC (0-127), midiChannel(1-16) and maximum value(0-127) in the list entry like: 16, 1, 127
Author: Remco van der Most
License: BSD
Github: sss/ctrl/intMidi.axo

Inlets

None

Outlets

int32.positive midi CC value 0..127

Parameters

int32 value

Attributes

text list

Declaration
int32_t _value;
int32_t _cc;
int32_t _channel;
int32_t ntrig;
bool DO;
int list[3] = {attr_list};
Init
_cc = 0;
_channel = 1;
_value = 0;
ntrig = 0;
Control Rate
if (DO > 0) {
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_value], _value,
                     0xFFFD);
}
DO = 0;

if (param_value > list[2]) {
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_value], list[2],
                     0xFFFD);
}

outlet_value = param_value;
Midi Handler
if (((status & 0xF0) == list[1] - 1 + MIDI_CONTROL_CHANGE) &&
    (data1 == list[0])) {
  _value = data2 > list[2] ? list[2] : data2;
  DO = 1;
}

Privacy

© 2024 Zrna Research