OVERVIEW

five-mode arpeggiator with internal clock

The arp captures incoming MIDI note-ons into a sorted-by-pitch held-note stack (up to 3 entries — Pro-One style), removes the captured events from the MIDI buffer, and emits its own timed note-on/off events at the selected rate and pattern. It sits in the signal chain between latch handling and the mono/poly synth routing, so both the latch feature and both voicing modes work transparently with it.

5 modes 3-note FIFO 16th-note resolution Tempo: 0 – 320 BPM Shared master clock

The tempo you set here is the same arpBpm that drives the drum sequencer and every sync-aware LFO when SYNC SYNTH is on. The drum panel shows the same BPM readout and its TEMPO slider writes to the same atomic.

PANEL LAYOUT

how the arpeggiator block is arranged on the env rail

The arp controls are laid out as a tidy three-row stack centred toward the right side of the envelope rail (just past the GLIDE knob):

  1. Mode buttons — 5 radio buttons (OFF / UP / U/D / DRN / GATE), 40x22 px each with a 2 px gap. Total row width is 208 px.
  2. BPM numeric display — a 110x32 px engraved readout centred beneath the buttons. Shows the live tempo (big number) with a tiny "BPM" caption.
  3. TEMPO slider — a linear horizontal slider the same width as the button row, centred under the display. Drag to set the master BPM from 0 to 320.

Everything in the block is horizontally centred against the button row so the display and slider line up cleanly. The engraved "ARPEGGIATOR" caption above uses the same math to stay centred above the buttons regardless of window size.

BPM range note: the slider reads out 0 to 320, but internally the engine clamps to a safe operating range (roughly 20 to 320 BPM) for the clock calculations. This is why dragging the slider all the way down to 0 still produces a stable, very slow click instead of a division-by-zero.

MODES

the 5 positions on the arp mode selector

ModeBehavior
OFF Bypass. MIDI note-ons/offs pass through to the mono/poly synth routing unchanged. Any notes the arp had sounding are released via internal note-offs.
UP Plays held notes low → high, one note per 16th-note tick, loops back to low after the top.
U/D Up-down bounce: low → high → low, with proper endpoint handling (no repeated top or bottom notes).
DRN (Drone) All held notes sound simultaneously and sustain indefinitely. No clock stepping. Releasing a mode change (to OFF or a stepping mode) releases the drone cleanly.
GATE All held notes retrigger on every 16th-note tick — rhythmic chord pulse.

PARAMETERS

ParamRangeDefaultNotes
MODE OFF / UP / U/D / DRN / GATE OFF Radio group to the right of the GLIDE knob.
BPM (TEMPO slider) 0 → 320 BPM 120 Master tempo. Linear horizontal slider under the BPM numeric display. Writes to arpBpm — the same atomic the drum sequencer and every sync-aware LFO read from. The clock runs at 16th- note resolution (bpm / 60 × 4 ticks/sec). The engine clamps to a safe internal operating range so slider extremes don't glitch.

HELD-NOTE STACK (ROLLING FIFO)

how the 3-note limit works

The arp keeps two synchronized views of its held notes:

When a new note-on arrives and the stack is already at 3 entries, the oldest entry (heldOrder[0]) is dropped from both arrays and the new note is inserted (sorted) into held[] and appended (newest) to heldOrder[]. This means you can play new notes while latched and the arp pattern keeps rotating through your most recent 3 notes.

// pseudo-code for the "full stack + new note" branch
if (numHeld >= kMaxNotes) {
    oldestNote = heldOrder[0];
    remove oldestNote from held[]
    shift heldOrder[] left by one
    --numHeld;
}
insert(new note into held[] keeping pitch order)
heldOrder[numHeld++] = newNote;

INTERACTIONS

With Latch

While LATCH is ON, note-offs are stripped from the MIDI buffer before the arp sees them, so the held stack never shrinks naturally — the arp keeps cycling through everything you pressed. The rolling FIFO is how you swap notes: after the stack is full, each new note you press pushes out the oldest.

When you toggle LATCH off, the engine calls arp.forceRelease() which empties the held stack, the sounding flags, and the step counter so no ghost notes re-trigger on the next clock tick.

With Mono mode

Arp-emitted note-ons feed through the same mono-mode note stack the keyboard would — so mono mode + arp gives you a single voice cycling with proper legato on consecutive steps, plus GLIDE applied between steps if set.

With Poly mode

Poly mode has 4 voices (voice stealing enabled). In UP / U-D modes only one note at a time is active so you rarely steal; in GATE mode the three held notes hit simultaneously on every tick, which spreads across 3 of the 4 voices cleanly.

Mode changes mid-play

Switching modes while notes are held or latched triggers a one-shot edge detector that emits note-offs for any currently-sounding arp notes. So you can freely flip between OFF / UP / U-D / DRN / GATE without stuck notes.