dialmatrix 8 16

demultiplexes data incoming on 8 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 8 dials receiving from in2 have to be named '20' '21' '22' '23' '24' '25' '26' and '27')
Author: robert schirmer
License: who cares
Github: rbrt/old/dialmatrix 8 16.axo

Inlets

frac32 in0

frac32 in1

frac32 in2

frac32 in3

frac32 in4

frac32 in5

frac32 in6

frac32 in7

int32.positive s

Outlets

None

Declaration
int32_t prev0;
int32_t prev1;
int32_t prev2;
int32_t prev3;
int32_t prev4;
int32_t prev5;
int32_t prev6;
int32_t prev7;
Init
prev0 = 0;
prev1 = 0;
prev2 = 0;
prev3 = 0;
prev4 = 0;
prev5 = 0;
prev6 = 0;
prev7 = 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);
}

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);
}

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);
}

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);
}

prev3 = inlet_in3;

if ((inlet_s == 0) && (inlet_in4 != prev4)) {
  PExParameterChange(&parent->PExch[PARAM_INDEX_40_value], inlet_in4, 0xFFFD);
}

if ((inlet_s == 1) && (inlet_in4 != prev4)) {
  PExParameterChange(&parent->PExch[PARAM_INDEX_41_value], inlet_in4, 0xFFFD);
}

prev4 = inlet_in4;

if ((inlet_s == 0) && (inlet_in5 != prev5)) {
  PExParameterChange(&parent->PExch[PARAM_INDEX_50_value], inlet_in5, 0xFFFD);
}

if ((inlet_s == 1) && (inlet_in5 != prev5)) {
  PExParameterChange(&parent->PExch[PARAM_INDEX_51_value], inlet_in5, 0xFFFD);
}

prev5 = inlet_in5;

if ((inlet_s == 0) && (inlet_in6 != prev6)) {
  PExParameterChange(&parent->PExch[PARAM_INDEX_60_value], inlet_in6, 0xFFFD);
}

if ((inlet_s == 1) && (inlet_in6 != prev6)) {
  PExParameterChange(&parent->PExch[PARAM_INDEX_61_value], inlet_in6, 0xFFFD);
}

prev6 = inlet_in6;

if ((inlet_s == 0) && (inlet_in7 != prev7)) {
  PExParameterChange(&parent->PExch[PARAM_INDEX_70_value], inlet_in7, 0xFFFD);
}

if ((inlet_s == 1) && (inlet_in7 != prev7)) {
  PExParameterChange(&parent->PExch[PARAM_INDEX_71_value], inlet_in7, 0xFFFD);
}

prev7 = inlet_in7;

Privacy

© 2024 Zrna Research