TESeq

Turing Machine Random Looping Sequencer (note) with Euclidean Rhythm Sequencer (rhythm). https://musicthing.co.uk/random-sequencer-documentation/ https://en.wikipedia.org/wiki/Euclidean_rhythm
Author: Jérôme Burlando
License: BSD
Github: gao/seq/TESeq.axo

Inlets

bool32.rising trig

Outlets

int32 buffer (uint8_t)

frac32.bipolar note (-64..64)

bool32.pulse bang

Parameters

frac32.u.map random knob (turing sequencer)

int32 first hit index in measure (euclidean sequencer)

int32 length of the measure (euclidean sequencer)

int32 number of hits in the measure (euclidean sequencer)

Declaration
uint8_t ntrig;
uint8_t buffer;
uint8_t newbit;
uint8_t counter;
int32_t note;
int32_t buf;
int32_t o;
Init
ntrig = 0;
buffer = 1;
counter = 0;
buf = 0;
note = 0;
o = 0;
Control Rate
o = 0;

if (inlet_trig > 0 && !ntrig) {
  ntrig = 1;

  if ((GenerateRandomNumber() % 255) < (param_random >> 19)) {
    newbit = ~buffer & 0x1;
  } else {
    newbit = buffer & 0x1;
  }
  buffer = (buffer >> 1) | (newbit << 7);

  if ((((counter++ + param_rotation) * param_hits) % param_length) <
      param_hits) {
    buf = buffer;
    if (buf & 128)
      note = -((buf & 0x7F) << 20);
    else
      note = (buf << 20);
    o = 1;
  }
}

if (!(inlet_trig > 0))
  ntrig = 0;

outlet_note = note;
outlet_buffer = buf;
outlet_trig = o;

Privacy

© 2024 Zrna Research