linkCtrl

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/linkCtrl.axo

Inlets

None

Outlets

frac32 1

frac32 2

frac32 3

frac32 4

Parameters

bool32.tgl c1

bool32.tgl c2

bool32.tgl c3

bool32.tgl c4

frac32.u.map control

Declaration
int32_t A[4];
int32_t prev;
Control Rate
int use[4];
use[0] = param_c1;
use[1] = param_c2;
use[2] = param_c3;
use[3] = param_c4;
int i;
int32_t diff = param_control - prev;
for (i = 0; i < 4; i++) {
  if (use[i] > 0) {
    A[i] = __USAT(A[i] + diff, 27);
  }
}
prev = param_control;
outlet_1 = A[0];
outlet_2 = A[1];
outlet_3 = A[2];
outlet_4 = A[3];

Privacy

© 2024 Zrna Research