tempolock

tempolock · utility

Beat-tracking clock: a raw onset train in (e.g. SYNESTHESIA band trigger firing on every kick) -> tracked STEADY quarter-note clock out, never a passthrough of input edges. Inter-onset gaps are read as integer multiples of one base pulse (tolerance-window greatest-common-pulse), folded into a selectable BPM band by octave (60-120 / 90-180 / 120-240) with hysteresis toward the current lock, then a phase accumulator emits the clock with gentle PLL correction from onsets near predicted beats/half-beats. Silent from cold until the first lock; free-runs forever through input dropouts (locked gate drops after ~4 missed beats); bpm CV = tracked BPM / 300.

A beat-tracking clock: patch a messy, musical onset train in (SYNESTHESIA's per-band beat trigger firing on every kick is the canonical source) and TEMPOLOCK works out the underlying tempo and emits its OWN steady quarter-note clock at it — never a copy of the input edges. It exists because the rack's clock inputs (TIMELORDE's CLOCK IN, backdraft's delay clock) follow the gap between the last two edges, which is right for a clock cable and wrong for a beat: real kick patterns mix quarter and eighth gaps, so a follower flaps between double and single tempo (108 vs 216 on the owner's pattern). TEMPOLOCK instead treats the gaps between onsets as whole-number multiples of one underlying pulse, finds that pulse, folds it into your preferred BPM band by halving/doubling, and locks a phase accumulator to it — onsets near predicted beats or half-beats gently nudge the clock's phase (a PLL), onsets far off-grid are ignored, and the tempo follows gradual changes smoothly. Once locked it NEVER stops: if the input goes silent the clock free-runs at the last tempo (the whole rack may be synced to it) while LOCKED drops after about four missed beats, and it relocks cleanly when onsets return. From cold it is silent until the first confident lock — about four consistent intervals — so patching it in never injects a made-up tempo. Chain: SYNESTHESIA.band1_trig → TEMPOLOCK.in, TEMPOLOCK.clock → TIMELORDE.clock, and the whole rack syncs to the detected tempo.

the faceplate

tempolockingateclockgatebpmcvlockedgateaudiocvgatepitch
1 inputs · 3 outputs · 1 params

inputs

idcablewhat it does
ingateThe onset train to track — any gate/trigger (or pulsy CV/pitch) whose rising edges land on the music's beat grid: SYNESTHESIA's band triggers, a drum machine's accent out, an envelope follower's gate. Only rising edges are read. The gaps between them are treated as whole-number multiples of one base pulse, so the pattern does NOT need to be four-on-the-floor — kicks on quarters and eighths, with a beat skipped here and there, still lock. Onsets closer than ~70 ms apart are treated as one strike (detector double-fires), and a gap longer than ~3 s is treated as a dropout rather than a tempo.
gate / trigger; trigger — fires once per rising edge; also accepts: control voltage (CV), V/oct pitch CV

outputs

idcablewhat it does
clockgateThe tracked clock: steady quarter-note pulses (10 ms wide) at the detected tempo, generated by the module's own phase accumulator — the input edges are never passed through. Silent from cold until the first lock (the first pulse IS the lock announcement); after that it free-runs forever, straight through input dropouts, so everything synced to it keeps time. Patch into TIMELORDE's CLOCK IN to sync the whole rack, or any clock input that expects an even pulse.
gate / trigger; trigger — fires once per rising edge
bpmcvThe tracked tempo as a unipolar CV level: BPM divided by 300 (TIMELORDE's own bpm ceiling), so 108 BPM reads 0.36 and 1.0 would mean 300. Holds 0 until the first lock, then follows the tracked tempo smoothly — including while the clock is coasting through an input dropout. A telemetry level, not a pulse: patch it wherever a slowly-moving tempo-proportional CV is useful.
control voltage (CV)
lockedgateConfidence gate, level-semantic: HIGH while the tracker is confidently locked to the incoming onsets, LOW from cold and again after about four expected beats pass with nothing landing on the predicted grid (the clock itself keeps running — this jack is how you know it is coasting on memory rather than following live input). Goes HIGH again once returning onsets line back up.
gate / trigger; gate — acts while the level is high (reacts to both edges)

params

idlabelrangedefaultcurve
rangeBand0..2discrete

controls

controlwhat it does
BandBAND — the octave the detected tempo is folded into: 60-120, 90-180 (default) or 120-240 BPM. A pulse train cannot say which octave it means (eighth-note kicks at 108 measure identically to quarter-note kicks at 216), so the tracker halves/doubles the detected pulse until it lands in this band — the owner's mixed pattern reads 216 at the pulse level and folds to 108. Switching the band while locked re-folds the current tempo immediately; near a band edge the tracker prefers staying in the octave it is already locked to (hysteresis), so a tempo drifting across the boundary does not flip octaves mid-performance.

source

tempolock.ts on GitHub.

Generated from packages/web/src/lib/{audio,video}/module-registry.ts · repo