← All modules

@maru shared this module so you can build on it and use it in your DAW.

AvailableMIDI & Modulation

Stepper

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

About

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.

Controls

  • Run starts and stops the sequencer; Tempo runs from 20 to 300 BPM.
  • Resolution sets the step length, from 1/2 to 1/64, including triplet and dotted values. Shuffle delays every other step, MPC style.
  • Pattern picks one of 32 patterns, banks A to D with eight each, and Length sets how many of its 32 steps loop.
  • Chain plays a range of patterns one after another.
  • Direction: forward, reverse, pendulum, pendulum with repeated end steps, random, or a brownian walk that wanders one step at a time. Random and brownian follow a Seed, so the same seed plays the same walk.
  • Transpose, Octave range (1 to 5), Gate scale and Velocity scale reshape the whole pattern at once.
  • Key root and the scale lane quantize the notes into a key, from chromatic to major, minor, modes, pentatonics, blues and whole tone, so a written line can move into a new key without editing every step.
  • Curve CC and Curve bipolar set where the curve lane goes and whether it is centred.

Pattern contents are edited in the grid and saved with the module. The loop length and the 32 velocities of the selected pattern are also exposed as ordinary parameters, so they can be automated from a host.

Getting started

Stepper produces MIDI only: route it into an instrument. The first pattern is a rising minor-pentatonic line in A with a couple of ties and ratchets, so pressing Run plays something right away. Try changing Direction, then set a key and scale and watch the line fold into it. The other 31 patterns start empty and ready to fill.

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.