ALIEN_XS drum sequencer panel

OVERVIEW

what the drum synth is and how it sits in the chassis

The drum synthesizer is a fully integrated 8-channel sample sequencer that lives inside the main synth chassis. It runs at the same master tempo as the arpeggiator — the two clocks are one and the same — and mixes into the main output without passing through any of the synth-side FX. This keeps drums clean and punchy while leaving the synth's Cloud / Rings / RE-201 chain free to colour the synth voices only.

8 channels Up to 32 steps 85 built-in banks Swing + Shuffle Always plays with synth Clean FX-free drum bus

ENTERING DRUM MODE

the DRUM SYNTHESIZER toggle at the top of the chassis

A wide DRUM SYNTHESIZER button sits at the top-left of the chassis, just above the envelope / arpeggiator rail. Clicking it swaps the whole middle column over to the drum sequencer view:

Click the button again (now labeled EXIT DRUM SYNTH) to return to the full synth view. All drum parameters remain live and audible regardless of which view is on-screen.

Visual note: unlike the synth's bolted-on effect rails, the drum panel doesn't draw corner screws on its metal plate. It's a swap-in internal view of the chassis rather than a separate module, so the screws would read as redundant visual noise against the existing chassis screws.

SIGNAL ROUTING

drums bypass the synth FX chain

SYNTH VOICES → CLOUD → RINGS → RE-201 → drive + tanh → MASTER VOL
DRUM VOICES → DRUM MIX → (skip FX + drive) → MASTER VOL

The engine holds a dedicated drumScratch buffer (allocated once in prepare()) so the audio thread never touches the heap. Drums render into it each block, then get summed into the main buffer at the master stage with the DRUM MIX knob scaling them against the synth path. They deliberately skip the master tanh soft-clip so samples stay transient-accurate.

Why bypass the synth FX? Cloud / Rings / RE-201 are tuned for pitched synth voices. Running drums through them produces smeared transients and makes both the drum transients and the tape echo character harder to hear. A dedicated drum FX rail is on the roadmap — until then the DRUM MIX knob is the one thing governing how the drums sit against the synth.

STEP GRID

8 channels × up to 32 steps

The grid is the heart of the panel: 8 rows (one per sample slot) by the current STEPS value (defaults to 16). Each cell is a one-bit step trigger for that channel.

Editing

Playhead

While the transport is playing, the current column is washed in a faint ink tint and any lit cells on that column brighten slightly. A 30 Hz UI timer repaints just the grid rectangle so the playhead animation is smooth without redrawing the whole panel.

Internal storage

Each channel's 32 steps are stored as a uint32_t bitmask atomic (one bit per step). Cell on/off is a single atomic XOR from the UI thread; the audio thread reads the mask once per tick to decide which samples to fire. This is why the hard cap is 32 steps per channel.

LEFT COLUMN — BANK / KIT / LOAD / SAVE / SHUFFLE

the sample-bank controls

ControlRangeDefaultNotes
BANK 1 .. N (dropdown) 1 Selects which on-disk bank folder gets loaded into the 8 sample slots. The dropdown text is <N> - <display name>, reading the display name from each bank's info.txt file.
KIT Default Kit Default Kit Placeholder for user-saved kit variations within a bank. Reserved for future use.
LOAD button — Re-triggers loading the currently-selected bank from disk. Useful if you edited the bank on disk while the app was running.
SAVE button — Reserved for future user-kit saving (export current channel assignments + pattern).
SHUFFLE 0.0 → 1.0 0.0 Adds to the swing amount (see SWING below). In practice it's an alias for a second swing knob placed near the bank controls for quick access while browsing kits.

CHANNEL STRIP (M / S / VOLUME)

per-row controls on the right side of the grid

Each of the 8 channel rows has three controls on its right edge, all vertically centred on the row midline so they line up with their step-cell row on the left:

ControlBehaviour
M (Mute) Silences this channel. Works independently of solo.
S (Solo) If any channel is soloed, only soloed channels sound. Solo overrides mute. Toggle solos off to return to normal mute behaviour.
VOLUME (rotary) Per-channel gain, 0.0 → 1.5. Defaults to 0.85. Multiplied against the DRUM MIX knob and the master volume on the way out.

Sample / channel naming

The channel label column shows the name of the loaded sample (uppercased, minus extension). Falls back to defaults KICK / SNARE / CLAP / HAT CLOSED / HAT OPEN / TOM LOW / TOM MID / TOM HIGH if a slot has no sample. The numbered badge on the far-left is just a quick visual anchor — it always shows the slot index 1..8.

CLOCK COLUMN

BPM, tempo knob, SYNC SYNTH, SWING, DRUM MIX

ControlRangeDefaultNotes
BPM display numeric readout — Live numeric readout of the master BPM (same value as the arpeggiator's BPM display on the synth view). Updates at the UI refresh rate.
TEMPO knob 0 → 320 BPM 120 Writes to arpBpm — the arpeggiator and drum sequencer share this clock. Engine clamps to a safe operating range internally so the knob extremes don't glitch.
SYNC SYNTH OFF / ON OFF Phase-locks every synth LFO (voice LFO + all four Quad LFOs) to the master clock. See Modulation → Clock sync for the full musical-division table.
SWING 0.0 → 1.0 0.0 Offsets every odd-indexed step later by up to half its step-length, producing the classic shuffle-triplet feel. Stacks with SHUFFLE.
DRUM MIX 0.0 → 1.5 0.9 Post-FX drum bus master level. This is the only control setting how prominent the drums sit against the synth; a dedicated drum FX section is planned, but until then the knob governs the whole drum path.

OPTIONS COLUMN

time signature, steps, resolution, start step, transport

ControlRangeDefaultNotes
TIME SIG (num) 1 .. 12 4 Beats per bar. Cosmetic for now (no bar-accent UI yet), but saved with the preset so a future update can colour the grid on barlines.
TIME SIG (den) 1 / 2 / 4 / 8 / 16 / 32 4 Beat unit.
STEPS 8 / 12 / 16 / 24 / 32 16 Pattern length in steps. The grid re-paints with STEPS columns regardless of how wide the window is — cells grow/shrink to fill.
RESOLUTION 1/4 / 1/8 / 1/16 / 1/32 1/16 Step length as a note value. Each step consumes (60 / bpm) × (4 / resolution) seconds. At 120 BPM with 1/16 resolution, one step is 125 ms.
START STEP 1 .. STEPS 1 Which step the transport jumps to on PLAY. Use the < / > nudge buttons to change it. Great for pattern offsets / beat-slicing experiments.
STOP button — Halts the transport and resets the play position to START STEP. Kills any in-flight drum voices.
PLAY / PAUSE toggle PLAY Starts or pauses the sequencer. Label re-prints to match the current state. Starting from stopped aligns phase to the beat; starting from paused resumes where you left off.
REC toggle OFF Reserved for future live-input recording mode (capture MIDI-triggered drum hits into the pattern). The parameter is stored and serialised in presets.

SOUND BANKS

the on-disk layout and how the app finds it

Folder layout

Bundled banks ship under Source/SoundBanks/ALM022/ as part of the project tree. Each bank is a folder with 8 numbered slot subdirectories and an info.txt file:

SoundBanks/ALM022/
  Bank 1/
    info.txt           // single line: the display name
    1/Kick.wav
    2/Snare.wav
    3/Hat.wav
    ...
    8/Perc.wav
  Bank 2/
    info.txt
    1/...wav           // etc.
  ...
  Bank 85/

The project ships with 85 banks from the ALM022 (Salty Samples) collection. Each bank is a complete 8-sample kit — the slot-to-slot assignment is entirely up to the bank author, so most banks put kicks in slot 1 and hats somewhere around slots 3-5, but there is no enforced convention. The channel label column shows the actual sample filename each slot currently holds.

Path resolution at runtime

The bank root is located using the same search strategy as the documentation folder: the app walks a list of relative paths from the executable looking for SoundBanks/ALM022, plus a %USERPROFILE%/Documents/ALIEN_XS/SoundBanks/ALM022 fallback for installed distributions. If none match, the BANK dropdown shows (banks not found) and drums are silent until a bank can be located.

Loading

Sample files are read on the message thread via juce::AudioFormatManager (WAV / AIFF / FLAC all supported) into per-slot AudioBuffer<float> instances. A juce::SpinLock guards the handoff so the audio thread's process() does a non-blocking TryLock and skips the block cleanly (brief silence, never a crash) if the UI is mid-swap.

Mono banks are mirrored to both channels on load so they pan to centre without extra logic. Samples play at their file sample rate, scaled to the engine's sr via a simple linear interpolator. The bundled ALM022 samples are all 44.1 kHz, so there's no meaningful quality loss at typical 44.1 / 48 kHz outputs.

User banks (planned)

The Settings dialog will later expose a user-bank path so you can point the app at your own folders of kits. The same folder layout applies: <user root>/Bank <N>/info.txt + Bank <N>/<1..8>/<sample>.wav. Until that lands, drop extra kits into Source/SoundBanks/ALM022/ and restart the app.

TIMING ENGINE

how the step clock survives tempo jumps

Inside DrumMachine::process() the step clock is a self-healing phase accumulator:

  1. Compute samplesPerStep from the current BPM and RESOLUTION (clamped to ≥ 4 samples as a safety floor).
  2. If the user just ramped the tempo up and stepPhase is already past the new step length, drain all overdue ticks before rendering anything — bounded by a 1024-step guard so an extreme state can't spin forever.
  3. Each iteration of the render loop consumes at least 1 sample (chunk = max(1, floor(untilTick))) so the loop is guaranteed to terminate.
  4. After each chunk, drain any newly-crossed ticks (bounded to numSteps + 1).

The earlier version of this logic could freeze the audio thread if the user dragged the TEMPO slider while drums were playing (untilTick could evaluate to 0 forever). The current version has been smoke-tested from 20 to 320 BPM with the slider slammed continuously and never stalls.

PRESET CAPTURE

what gets saved + how to share drum patterns alone

In a full preset

Everything on the drum panel serialises under a DrumSeq node inside the full .alienxs preset XML:

DrumSeq
 ├─ drumPlaying / drumRecording / drumSync
 ├─ drumSteps / drumResolution
 ├─ drumTimeSigNum / drumTimeSigDen / drumStartStep
 ├─ drumShuffle / drumSwing
 ├─ drumBank / drumMasterLevel
 └─ DrumCh [index=0..7]
      ├─ mute / solo / volume
      └─ stepMask (int64 carrying the 32-bit step pattern)

The step pattern is serialised as a signed 64-bit integer because juce::var doesn't have a uint32_t constructor overload. Load is permissive: missing properties keep the current default, so older presets (no DrumSeq node) load cleanly and the drum panel reverts to factory defaults.

The bank sample audio itself is not embedded in presets — only the bank number. On load, the drum machine reloads whichever bank that number points to on disk. Share presets freely; anyone with the same app build will resolve the same bank.

As a drum-only preset

Options → Save Drum Preset As... writes a standalone .alienxsdrum file with just the DrumSeq subtree under a distinct AlienXSDrumPreset root. Loading one back via Options → Load Drum Preset... restores only the drum state — your synth patch is untouched, so you can audition many beats against the same sound design without any save/reload ceremony.

Two matching partial-reset menu items round it out:

See Presets for the full menu map, file format, and tree layouts.