euclid

euclidian sequencer
Author: Remco van der Most
License: BSD
Github: sss/seq/euclid.axo

Inlets

int32 count

bool32 update

Outlets

bool32 out1

Parameters

int32 start1

int32 countmax

frac32.u.map step1

frac32.u.map ratio1

frac32.u.map steps

bool32.mom update

Displays

int32.label mainstep

int32.label ratioA

int32.label ratioB

int32.label stepsOn

int32.label maxcount

Declaration
int32_t array[1024];
int i;
int32_t prev;
int ttrig;
Control Rate
uint32_t step1c =
    ___SMMUL(param_step1 << 3, ((1 << param_countmax) - 1) << 2) + 1;
uint32_t step1a = ___SMMUL(param_ratio1 << 3, step1c << 2);
uint32_t step1b = step1c - step1a;
if (((param_update + inlet_update) > 0) && (!(ttrig == 1))) {
  ttrig = 1;
  for (i = 0; i < (1 << param_countmax); i++) {
    array[(((((((1 << param_countmax) - 1) - i) / 2) * step1b) +
            (((((1 << param_countmax) - 1) - i) + 1) / 2) * step1a) +
           param_start1) &
          ((1 << param_countmax) - 1)] =
        i > (((1 << param_countmax) - 1) -
             (___SMMUL(param_steps << 3, ((1 << param_countmax) - 1) << 2)))
            ? 1
            : 0;
  }
} else if (!((param_update + inlet_update) > 0)) {
  ttrig = 0;
}
outlet_out1 = array[(inlet_count) & ((1 << param_countmax) - 1)] &&
              (!(prev == inlet_count));
prev = inlet_count;
disp_stepsOn = ___SMMUL(param_steps << 3, ((1 << param_countmax)) << 2) + 1;
disp_mainstep = step1c;
disp_ratioA = step1a;
disp_ratioB = step1b;
disp_maxcount = 1 << param_countmax;

Privacy

© 2024 Zrna Research