polyseq

Polyphonic, Polyrythmic, Polymetric sequencer main sequence object, holding track data. allows multiple tracks (polyphony), each track with different lengths (polymeter) and a different clock division (polyrhythm) the attributes, set the maximum number of steps etc, whilst the actual value used can be altered with polyseq/write, which can also be used to change the clock division. the clock input, is for the fastest subdivision required. polyseq/write can also be used for updating step values, and playback of sequences is done with polyseq/step and polyseq/read for simple setup , use polyseq/notectrl with polyseq/note see help patch for details
Author: Mark Harris
License: GPL
Github: tb/seq/polyseq/polyseq.axo

Inlets

bool32.rising clk

Outlets

None

Attributes

spinner maxTracks

spinner maxSteps

spinner numValues

Declaration
int32_t seqSteps_[attr_maxTracks];
int32_t seqClkDivs_[attr_maxTracks];
int32_t seqValue_[attr_maxTracks][attr_maxSteps][attr_numValues];
const int32_t maxSteps_ = attr_maxSteps;
const int32_t maxTracks_ = attr_maxTracks;
const int32_t numValues_ = attr_numValues;

bool clk_ = false;
bool clkTrig_ = false;
Init
memset(&seqValue_, 0, attr_maxTracks *attr_maxSteps *attr_numValues);
for (int i = 0; i < attr_maxTracks; i++) {
  seqClkDivs_[i] = 1;
  seqSteps_[i] = attr_maxSteps;
}
Control Rate
clkTrig_ = false;
if (inlet_clk) {
  if (!clk_) {
    clk_ = true;
    clkTrig_ = true;
  }
} else {
  clk_ = false;
}

Privacy

© 2024 Zrna Research