Sequencer — live coded

In the spirit of TidalCycles and Sonic Pi: rhythms and melodies are vectors of data in Clojure. Edit the source, the grid and the drum machine update. Companion to the subtractive synth demo.

A 16-step, 4-track step sequencer. Three percussion tracks (kick / snare / hat) plus a melody line whose pitches come from the cljrs.music library — try changing the scale from :minor to :dorian or :pentatonic and watch the melody re-harmonize on the next bar. Web Audio handles sample-accurate scheduling; the cljrs runtime owns the score, and the entire grid below is rendered by cljrs.ui from the source.

Hold Alt (or Ctrl) and drag any number — try BPM — to scrub it live. Press Cmd/Ctrl+Enter to apply immediately. Click a cell to toggle; click Randomize melody to regenerate the melody from the current scale.

regenerate from current scale
melody voice:
sends:
0.9
0.2
0.2
2.0
0.375
0.4
kick
snare
hat
melody
C4
D#4
G4
G#4
C5
G4
D#4
C4
C4
D#4
G4
C5
D4
C5
G#4
G4

Click any cell to toggle. Pick a melody preset to re-voice the melody line. Reverb / delay sends live to the right.

stopped · — bpm

What's happening