lifeXYread

Reads out a XY-coordinate of the "game of life" module and outputs a gate when both the input trigger and the coordinate are above zero (light/dark grey and black steps on game of life module) When using a toggle button, the gates can be (un)muted and act like a sustain if multiple steps in a row are above zero. Send a gate/trigger signal into the trigger input to add a rhythmic variation of the gate output or to create pulses instead of a sustained gate output.
Author: Remco van der Most
License: BSD
Github: sss/seq/lifeXYread.axo

Inlets

bool32 trig

int32 X

int32 Y

Outlets

bool32 gate

frac32 CV

Parameters

int32 X

int32 Y

frac32.s.map V1

frac32.s.map V2

frac32.s.map V3

frac32.s.map V4

Attributes

objref ref

Declaration
int i;
int j;
int gate;
int32_t V[4];
int v;
Control Rate
int X = param_X + inlet_X;
X = X & 15;
int Y = param_Y + inlet_Y;
Y = Y & 15;

int degate = 0;
if ((inlet_trig > 0) && (!gate)) {
  gate = 1;
  degate = 1;
} else if (inlet_trig == 0) {
  gate = 0;
}
V[0] = param_V1;
V[1] = param_V2;
V[2] = param_V3;
V[3] = param_V4;
outlet_gate = attr_ref.array[X][Y] > 0
                  ? (attr_ref.array[X][Y] > 1
                         ? (attr_ref.array[X][Y] > 2 ? inlet_trig - degate
                                                     : 1 - inlet_trig)
                         : 1)
                  : 0;

if (outlet_gate > 0) {
  v = attr_ref.array[X][Y];
}
outlet_CV = V[v];

Privacy

© 2024 Zrna Research