Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Sequencers & clocks

Source of truth: the doc comments on each module struct in patches-modules/src/ define the canonical port names, parameter ranges, and behaviour. This page is kept in sync with those comments.

Clock — Tempo-locked trigger generator

Generates bar, beat, quaver, and semiquaver trigger pulses from a configurable BPM and time signature. All outputs are derived from a single beat-phase accumulator, so they are always phase-locked to each other.

Each output fires a one-sample pulse (1.0) at the relevant boundary and is 0.0 on all other samples.

Parameters

ParameterTypeDefaultDescription
bpmfloat120.0Tempo in beats per minute (1–300)
beats_per_barint4Number of beats per bar (1–16)
quavers_per_beatint2Subdivisions per beat: 2 = simple, 3 = compound (1–4)

Outputs

PortDescription
barFires once per bar
beatFires once per beat
quaverFires once per quaver (beats_per_bar × quavers_per_beat per bar)
semiquaverFires once per semiquaver (twice per quaver)

HostTransport — DAW transport readback

Exposes the host DAW’s transport state as CV signals. In standalone mode the player synthesises a static transport (tempo from --bpm, no playhead motion).

Outputs

PortKindDescription
playingmono1.0 while the host is playing, otherwise 0.0
tempomonoCurrent tempo in BPM
beatmonoPosition within the bar as fractional beats
barmonoBar index (integer-valued, increments at each bar boundary)
beat_triggertriggerFires once per beat boundary
bar_triggertriggerFires once per bar boundary
tsig_nummonoTime signature numerator
tsig_denommonoTime signature denominator

TempoSync — BPM + subdivision → milliseconds

Converts a tempo (in BPM) and a fixed musical subdivision into a duration in milliseconds. Drives delay_ms-style inputs on Delay, MsTicker, etc. for tempo-locked timing.

Parameters

NameTypeDefaultDescription
subdivisionenum1/4Subdivision: 1/1, 1/2, 1/4, 1/8, 1/16, 1/32, plus dotted (1/4d) and triplet (1/4t) variants

Inputs

PortKindDescription
bpmmonoTempo in BPM

Outputs

PortKindDescription
msmonoDuration of one subdivision in milliseconds

MsTicker — Millisecond-paced trigger

Fires a trigger every ms milliseconds with a corresponding gate.

Inputs

PortKindDescription
msmonoInter-trigger interval in milliseconds
resettriggerResets the internal phase to zero

Outputs

PortKindDescription
triggertriggerSub-sample trigger at each tick boundary
gatemonoHigh between trigger and next reset; useful as a duty signal

TriggerToSync / SyncToTrigger

A pair of converters between the two trigger encodings: legacy mono level pulses (≥ 0.5 high) and the sub-sample sync cable. Use when bridging modules that expect different encodings.

TriggerToSync — mono in → trigger out. SyncToTrigger — trigger in → mono out (rising-edge pulse).