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.
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.
drums bypass the synth FX chain
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.
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.
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.
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.
the sample-bank controls
| Control | Range | Default | Notes |
|---|---|---|---|
| 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. |
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:
| Control | Behaviour |
|---|---|
| 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. |
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.
BPM, tempo knob, SYNC SYNTH, SWING, DRUM MIX
| Control | Range | Default | Notes |
|---|---|---|---|
| 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. |
time signature, steps, resolution, start step, transport
| Control | Range | Default | Notes |
|---|---|---|---|
| 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. |
the on-disk layout and how the app finds it
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.
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.
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 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.
how the step clock survives tempo jumps
Inside DrumMachine::process() the step clock is a
self-healing phase accumulator:
samplesPerStep from the current BPM and
RESOLUTION (clamped to ≥ 4 samples as a
safety floor).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.chunk = max(1, floor(untilTick))) so the
loop is guaranteed to terminate.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.
what gets saved + how to share drum patterns alone
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.
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.