dialmatrix 4 16

demultiplexes data incoming on 4 inlets to 16 dials named in the format 'rowcolumn'. the 'rows' are wired to the inlets 'in0' to 'in3',the 'column' is defined by the inlet 's' (so for example 4 dials receiving from in2 have to be named '20' '21' '22' and '23')
Author: robert schirmer
License: who cares
Github: rbrt/old/dialmatrix 4 16.axo

Inlets

frac32 in0

frac32 in1

frac32 in2

frac32 in3

int32.positive s

Outlets

None

Declaration
int32_t prev0;
int32_t prev1;
int32_t prev2;
int32_t prev3;
Init
prev0 = 0;
prev1 = 0;
prev2 = 0;
prev3 = 0;
Control Rate
if ((inlet_s == 0) && (inlet_in0 != prev0)) {
  PExParameterChange(&parent->PExch[PARAM_INDEX_00_value], inlet_in0, 0xFFFD);
}

if ((inlet_s == 1) && (inlet_in0 != prev0)) {
  PExParameterChange(&parent->PExch[PARAM_INDEX_01_value], inlet_in0, 0xFFFD);
}

if ((inlet_s == 2) && (inlet_in0 != prev0)) {
  PExParameterChange(&parent->PExch[PARAM_INDEX_02_value], inlet_in0, 0xFFFD);
}

if ((inlet_s == 3) && (inlet_in0 != prev0)) {
  PExParameterChange(&parent->PExch[PARAM_INDEX_03_value], inlet_in0, 0xFFFD);
}

prev0 = inlet_in0;

if ((inlet_s == 0) && (inlet_in1 != prev1)) {
  PExParameterChange(&parent->PExch[PARAM_INDEX_10_value], inlet_in1, 0xFFFD);
}

if ((inlet_s == 1) && (inlet_in1 != prev1)) {
  PExParameterChange(&parent->PExch[PARAM_INDEX_11_value], inlet_in1, 0xFFFD);
}

if ((inlet_s == 2) && (inlet_in1 != prev1)) {
  PExParameterChange(&parent->PExch[PARAM_INDEX_12_value], inlet_in1, 0xFFFD);
}

if ((inlet_s == 3) && (inlet_in1 != prev1)) {
  PExParameterChange(&parent->PExch[PARAM_INDEX_13_value], inlet_in1, 0xFFFD);
}

prev1 = inlet_in1;

if ((inlet_s == 0) && (inlet_in2 != prev2)) {
  PExParameterChange(&parent->PExch[PARAM_INDEX_20_value], inlet_in2, 0xFFFD);
}

if ((inlet_s == 1) && (inlet_in2 != prev2)) {
  PExParameterChange(&parent->PExch[PARAM_INDEX_21_value], inlet_in2, 0xFFFD);
}

if ((inlet_s == 2) && (inlet_in2 != prev2)) {
  PExParameterChange(&parent->PExch[PARAM_INDEX_22_value], inlet_in2, 0xFFFD);
}

if ((inlet_s == 3) && (inlet_in2 != prev2)) {
  PExParameterChange(&parent->PExch[PARAM_INDEX_23_value], inlet_in2, 0xFFFD);
}

prev2 = inlet_in2;

if ((inlet_s == 0) && (inlet_in3 != prev3)) {
  PExParameterChange(&parent->PExch[PARAM_INDEX_30_value], inlet_in3, 0xFFFD);
}

if ((inlet_s == 1) && (inlet_in3 != prev3)) {
  PExParameterChange(&parent->PExch[PARAM_INDEX_31_value], inlet_in3, 0xFFFD);
}

if ((inlet_s == 2) && (inlet_in3 != prev3)) {
  PExParameterChange(&parent->PExch[PARAM_INDEX_32_value], inlet_in3, 0xFFFD);
}

if ((inlet_s == 3) && (inlet_in3 != prev3)) {
  PExParameterChange(&parent->PExch[PARAM_INDEX_33_value], inlet_in3, 0xFFFD);
}

prev3 = inlet_in3;

Privacy

© 2024 Zrna Research