linkExt

Linked control, eg for controlling the volume of multiple channels on a mixer. The module has an internal array for 4 values which can be edited by the "control" knob. When a switch is on, the corresponding channel will have the change of the knob added to it's value. Thus, you can change multiple channels at the same time while keeping their relative differences (though it will saturate at 64).
Author: Remco van der Most
License: BSD
Github: sss/ctrl/linkExt.axo

Inlets

frac32 control

bool32 c1

bool32 c2

bool32 c3

bool32 c4

Outlets

frac32 1

frac32 2

frac32 3

frac32 4

Declaration
int32_t A[4];
int32_t prev;
Control Rate
int use[4];
use[0] = inlet_c1;
use[1] = inlet_c2;
use[2] = inlet_c3;
use[3] = inlet_c4;
int i;
int32_t diff = inlet_control - prev;
for (i = 0; i < 4; i++) {
  if (use[i] > 0) {
    A[i] = __USAT(A[i] + diff, 27);
  }
}
prev = inlet_control;
outlet_1 = A[0];
outlet_2 = A[1];
outlet_3 = A[2];
outlet_4 = A[3];

Privacy

© 2024 Zrna Research