Piano Roll

Author polyphonic note sequences in a piano roll editor.

What it does

Piano Roll is a tempo-synced note sequencer. A pattern of notes is drawn in a visual piano-roll editor and played back beat-for-beat against the project's BPM. Notes are held as four parallel lists, beat position, pitch, velocity and duration, one entry per note, so editing the pattern is editing those lists together.

Playback is polyphonic across four voices. Each note that turns on is assigned to the next free voice (first note on to voice 1, and so on), and each voice exposes its own note, velocity and gate outputs, enough to drive four independent synth voices, four particle emitters, or anything else taking a note-on/note-off stream.

When to use it

ParameterTypeDefault
triggerOneOf([Boolean, Number])
resetOneOf([Boolean, Number])
bpmNumber120
startsString""
pitchesString""
velocitiesString""
durationsString""
pattern_lengthNumber0
loop_modeString"Loop"
velocity_scaleNumber1
runBooleantrue

Gotchas

Notes live in four separate lists (starts, pitches, velocities, durations), matched up by position, so all four need the same number of entries. A start time without a matching pitch, velocity and duration will not play correctly.

Pattern Length at 0 derives the loop length from the notes. Raise it only to add trailing silence after the last note before the pattern repeats.

Only four voices are available. With more than four notes active at once, the newest active notes are still assigned voices in order, but there is no fifth voice to spill into. Keep patterns to four-note polyphony or fewer.

Trigger and Reset act on a rising edge only; holding either input high does nothing after the first tick. Trigger restarts playback from beat 0. Reset also clears all voice state, so use Reset to drop every gate immediately.

Worked example

  1. Add a Piano Roll. Open the piano-roll editor and draw a few notes. This fills in Starts, Pitches, Velocities and Durations.

  2. Set BPM to match the project tempo, and choose a Loop Mode (Loop, Once, or Ping-Pong).

  3. Wire Gate 1 and Note 1 into a synth voice's gate and pitch inputs to hear the pattern play back.

  4. Add more notes that overlap in time to hear Voice 2, Voice 3 and Voice 4 pick up the extra polyphony.

See also

Additive Synth · audio.wavetable · Envelope Follower · Numbers, signals & audio