countCtrl

controller for the range counter modules
Author: Remco van der Most
License: BSD
Github: sss/patt/countCtrl.axo

Inlets

None

Outlets

int32.positive output

frac32 value

bool32.pulse change

Parameters

frac32.u.map select

frac32.s.map Change

Displays

bool32 PreStep

bool32 PreJump

bool32 PreChng

bool32 MidStep

bool32 MidJump

bool32 MidChng

bool32 PstStep

bool32 PstJump

bool32 PstChng

Declaration
int ptrig;
int32_t pval;
Init
ptrig = 0;
pval = 0;
Control Rate
int r = (param_select / 64 * 9) >> 21;

outlet_select = r;
outlet_value = param_Change;

if ((pval != param_Change) & (!ptrig)) {
  outlet_change = 1;
  pval = param_Change;
  ptrig = 1;
} else {
  ptrig = 0;
  outlet_change = 0;
}

disp_PreStep = (r == 0) ? 1 : 0;
disp_PreJump = (r == 1) ? 1 : 0;
disp_PreChng = (r == 2) ? 1 : 0;
disp_MidStep = (r == 3) ? 1 : 0;
disp_MidJump = (r == 4) ? 1 : 0;
disp_MidChng = (r == 5) ? 1 : 0;
disp_PstStep = (r == 6) ? 1 : 0;
disp_PstJump = (r == 7) ? 1 : 0;
disp_PstChng = (r == 8) ? 1 : 0;

Privacy

© 2024 Zrna Research