intMlist

midi controlled list selector in the list-edit: -enter the midiCC, midiChannel and amount of entries on the first line, seperated and ending with a comma ( , ) (if you put entries below each other you can easily read out the amount of entries, don't forget to subtract 1, because of the first line!) -enter the integers that you want to be selectable by midi in the lines below, each on their own line and ending with a comma: -maximum amount of values is 128. so, for CC16, midichannel 1 and 10 values: 16,1,10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Author: Remco van der most
License: BSD
Github: sss/ctrl/intMlist.axo

Inlets

None

Outlets

int32.positive midi CC value 0..127

int32 length

Parameters

int32 value

Attributes

text list

Declaration
int32_t _value;
int32_t _cc;
int32_t _channel;
int32_t ntrig;
bool DO;
int list[131] = {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] - 1) {
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_value],
                     list[2] - 1, 0xFFFD);
}

outlet_value = list[param_value + 3];
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