None
int32 o1
int32 o2
int32 o3
int32 o4
frac32.u.map.gain sets the amount of options the 4 slots can choose from
frac32.u.map.gain with high options count, you might need this knob to be able to reach all steps (eg. when using 8bit midi to control the knobs)
combo options
int32.label options
int32.label d1
int32.label d2
int32.label d3
int32.label d4
int i;
int T[13] = {1, 5, 15, 35, 70, 126, 210, 330, 495, 715, 1001, 1365, 1820};
int options;
int32_t q = attr_options;
uint8_t *c;
// int c[attr_options<<2];
static uint8_t _array[attr_options << 2] __attribute__((section(".sdram")));
c = &_array[0];
for (i = 0; i < 13; i++) {
if (T[i] == attr_options) {
options = i + 4;
}
}
for (i = 0; i < 4; i++) {
c[i] = i;
}
int j;
for (i = 1; i < q; i++) {
int k = i << 2;
for (j = 0; j < 4; j++) {
c[k + j] = c[k + j - 4];
}
c[k + 3] += 1;
while ((c[k + 3] >= options) || (c[k + 2] >= options - 1) ||
(c[k + 1] >= options - 2)) {
if (c[k + 3] >= options) {
c[k + 2] += 1;
c[k + 3] = c[k + 2] + 1;
}
if (c[k + 2] >= (options - 1)) {
c[k + 1] += 1;
c[k + 2] = c[k + 1] + 1;
c[k + 3] = c[k + 2] + 1;
}
if (c[k + 1] >= (options - 2)) {
c[k] += 1;
c[k + 1] = c[k + 0] + 1;
c[k + 2] = c[k + 1] + 1;
c[k + 3] = c[k + 2] + 1;
}
}
}
disp_options = q;
int pst =
___SMMUL(((q) << 1), __USAT((uint32_t)(param_fine >> 7) + param_select, 31))
<< 2;
outlet_o1 = disp_d1 = c[pst];
outlet_o2 = disp_d2 = c[pst + 1];
outlet_o3 = disp_d3 = c[pst + 2];
outlet_o4 = disp_d4 = c[pst + 3];