AvailableMIDI & Modulation

Stepper

A 32-step Matrix, with ties, ratchets and a curve lane.

@maru shared this module so you can play it in your DAW, remix it or put it on your site.

What it does

A 32-step MIDI pattern sequencer in the mould of Reason's Matrix. It writes its own lines, with note, velocity, gate and curve lanes, per-step ties and ratchets, and 32 patterns in four banks, and plays them on its own clock. Pair it with an instrument to hear it.

The idea

An arpeggiator rearranges the notes you hold, and stops when you let go. Stepper is a generator: it plays its pattern whether or not a key is down. A held key can instead transpose the whole pattern, relative to C3, when Key follow is on.

Each step carries a pitch, a velocity (zero is a rest), a gate length, a tie to the next step, a curve value and a ratchet of one to eight quick repeats. The curve lane is sent as a MIDI CC of your choice, so it can sweep a filter or any other mapped control, and it only sends when the value changes.

Guide and controls

How it works.

The musical model is a pure core: given a pattern, a direction, a cursor and the globals, plain functions answer which step plays, at what pitch after transpose, octave, key-follow and quantize, at what velocity, and for how long. Those functions have no clock and no audio in them, which is what makes the walk shapes, the endpoint rules of the two pendulums, the downward snap of the scale mask and the reproducibility of the seeded walks checkable rather than a matter of listening.

Around that sits the house lookahead scheduler: a timer wakes every 25 ms, the sequencer emits every step whose onset falls inside the window, and each note is committed with an absolute AudioContext time. Because the time is computed rather than read off the timer, a stalled main thread delays the decision and cannot move the note. The window is widened to cover at least two and a half steps at slow resolutions, and that is not cosmetic: a tie cannot be resolved until the NEXT step is known, so one note-off is always held back, and the wider window is what guarantees it is committed while its time is still in the future.

A tie does not retrigger - its note-off is cancelled and re-armed one step later - but only into the same pitch. A sustained note cannot be bent, so a tie into a different note retriggers, which is Matrix's own behaviour rather than a shortcut. A ratchet is the opposite case: it divides the step into equal slices by integer division with the last slice absorbing the remainder, retriggers on each, and therefore ends any tie carried into it.

It hooks note handling rather than the audio graph, exactly as the rest of the family does, with one asymmetry: it only claims a keypress while Key Follow is on. Stepper does not need your hands, so swallowing keys with Key Follow off would make the page's keyboard look broken for no gain; instead the press falls through to whichever voice is mounted and you play over the pattern. It emits MIDI, not audio.

The compiled kernel is a sibling of the one behind Steps and Arpeggiator rather than an extension of it. midi-pattern-processor's four-lane transcript is pinned against a fixed 3066-byte state block and ABI 1; adding note, tie, curve and ratchet lanes and 32 pattern banks would change the state size, the configure signature and every pinned hash, which this repo only allows under an explicit reviewed version bump. So stepper-sequencer ships with its own ABI, its own profiles and its own goldens, and midi-pattern-processor is not touched.

What would you make with Stepper?

Describe what you want to make. Build it with the Studio agent.

Goes well with.

Prototype

A step sequencer and arpeggiator on one grid.

Building block

Walk held notes through a rhythmic pattern.

Prototype

A compact subtractive synth for learning the signal path.