sequencer tb303

TB303 type sequencer with glide Gate and Oct outlets. Gate input should be a 50% gate at inlet_in
Author: Philoop
License: BSD
Github: phi/seq/sequencer tb303.axo

Inlets

bool32 gateext

bool32 s

int32 in

int32 o

int32 g

Outlets

int32 chain out (in-16)

int32 output

int32 gate

bool32 g

bool32 slide

Parameters

int2x16 o

int2x16 g

bin16 s

Displays

int32.bar16 in

Declaration
int ntrig;
int latch;
int gate;
int slide;
Init
ntrig = 0;
latch = 0;
gate = 0;
slide = 0;
Control Rate
outlet_chain = inlet_in - 16;
disp_in = inlet_in;

if ((inlet_in >= 0) && (inlet_in < 16))
  outlet_oct = ((param_o >> (inlet_in * 2)) & 3) * 12;
else
  outlet_oct = inlet_o;

if ((inlet_in >= 0) && (inlet_in < 16))
  gate = ((param_g >> (inlet_in * 2)) & 3) * 21;
else
  gate = inlet_g;

if ((inlet_in >= 0) && (inlet_in < 16))
  slide = param_s & (1 << inlet_in);
else
  slide = inlet_s;

outlet_chain = inlet_in - 16;
// latch  slide
if ((slide > 0) && !ntrig) {
  latch = gate;
  ntrig = 1;
}
if (!(slide > 0))
  ntrig = 0;
outlet_gate = (slide) ? latch && gate : gate;

// when slide is on keep accent and sustaian gate when accent on
outlet_g = slide ? slide && gate : gate && inlet_gateext;

outlet_slide = slide;

Privacy

© 2024 Zrna Research