electro

sound

fx

1 echo
2 distortion
3 ring mod

compressor

drum 1 sidechain

randomise

mixer

elixir
HOW TO PLAY IT

Elixir by Johnny Hawk is an unofficial browser drum machine, not made or endorsed by Erica Synths. Its sound engine is a JavaScript port of the six drum voices and the FX bus of the Erica Synths LXR-02 firmware (erica-synths/lxr-desktop-app, GPL-3.0, commit a43cd4f), ported line by line; its output matches the original C code compiled for the Cortex-M7 sample for sample. The FX bus (distortion, ring mod, compressor, delay) is the firmware's too; the mixer, the three FX sends, crossfeed and the pattern generator are new. The generator's source kits include Hrtl's free LXR-02 DLC kits, used with credit, and any LXR kit file (.SND) can be opened. Source and licence (GPL-3.0): github.com/johnnyhawk02/johnnyhawk02.github.io/tree/main/elixir.

Crossfeed patches voices into each other: a cell sends the row's sound into the column's voice. Each column picks what it modulates: fm bends the pitch of that voice's main oscillator with the incoming audio (metallic, clangy, a voice into itself gives feedback FM), filter lets the incoming level open (positive) or close (negative) that voice's filter, ring multiplies the two sounds. Open and closed hat are one voice, so the matrix is 6 × 6. Crossfeed is an addition to the firmware's engine; with every cell at 0 the engine runs exactly as verified.

The mixer's level and pan are the voices' own VOLUME and PAN parameters, so they are saved with the kit. Each fader is its level meter, with a triangle beside it marking the level: drag the meter or the triangle for fine control (it moves less than the mouse; hold Shift for finer still) or scroll on it; the strip's name shows the level while it moves.

Save keeps everything as a preset in this browser under a two-word alien name: the sound (kit, crossfeed, FX and sends) and the song (pattern, perform dials, tempo, velocity, accent, master), and loading it brings all of that back. A red star by save means a randomise has changed things since the last save or load. ‹ and › step through the presets; untick bpm beside them to keep the current tempo when a preset loads (everything else still loads); while playing, a new preset comes in at the start of the next bar. Presets opens the preset manager: load, delete, and star favourites; export favourites downloads them as a file, and favourites sent in that way are built into the next release. Open .snd there loads an LXR kit file as the current sound, and export .snd downloads it as an LXR kit file (.SND, without the crossfeed, which the hardware doesn't have).

There are three effects, all the LXR-02's own FX-slot code run as sends: each mixer strip has three send dials left of its fader: echo, dist and ring. Every voice keeps its dry sound and each effect's output is fully wet. The echo's time is synced to the tempo: from 1/128 of a bar fully left to one bar fully right, gliding through the musical lengths (the readout names the nearest, with ≈ when it is between); randomise picks 1/2, 1/4, dotted 1/8, 1/8 or 1/16 (now and then 1/128) and puts it within 10 ms of it either way (at 120 bpm; the window scales with the tempo). Ticks round the time dial mark the musical lengths (long for straight notes, short for dotted and triplet); a drag catches on them, and the scroll wheel and arrow keys step from one to the next (Shift + arrow for fine steps). The FX section above the mixer sets all three: echo mode (normal or ping-pong), time, tone, feedback and width (100% is the firmware's own; 0% is mono; the firmware's ping-pong only bounces sound that reaches it off-centre, and most drums sit in the middle, so above 100% width pushes the echo's input to one side, and at 200% a centred drum bounces fully; on a normal echo, above 100% widens the echoes' stereo); distortion type (tube, fold or rat), drive, color, tone and volume; ring mod carrier wave and frequency. A kit that used distortion or ring mod in its FX slot loads those settings into that effect with a little of each routed voice sent to it. The sync, the sends, the extra buses and the larger delay buffer are additions to the firmware.

The master section sits after everything, in two cards, each with a power button: drum 1 sidechain ducks every other voice (before the FX bus) by up to the duck amount whenever drum 1 hits (tick fx to duck the echo, distortion and ring mod returns as well, so their tails pump with drum 1), and the compressor works on the whole mix like the LXR-02's FX-slot compressor; the needle meters show how far each is pulling down, in dB.

The red circle by play opens the recorder: pick free (records until you press stop, up to ten minutes) or a loop of 1 to 16 bars, which starts on the next bar (starting playback from bar 1 if it is stopped) and is cut to exactly that many bars at the tempo, with the echo carried in from before so it loops cleanly. Tick count-in for a bar of beeps first (a high beep then three lower boops, with the music turned down; from bar 1 if stopped), and the take starts on the bar after it. Pressing record closes the recorder; the red circle by play blinks while it waits or counts and pulses while it records. Choose 44.1 or 48 kHz, 16-bit (dithered) or 24-bit, and normalise (peak at −0.3 dB). Each take is listed with a player and a save .wav button; takes are kept until you reload the page.

The sound knobs on the pattern card are performance macros over all six voices at once: fm depth (the drums' FM amount and the cymbal and hat FM), decay (every amp decay), pitch (every voice's coarse tune, up to two octaves either way) and filter (every filter's cutoff). Each sits in the middle as the kit is; turning it pushes every voice's own value towards the top or the bottom, so the kit's differences stay. They change what the engine plays, not the kit: the sound tab still shows the kit's own values, and double-click sets a macro back to the middle. They are saved with presets.

Perform builds the pattern from the dials while it plays: Energy goes from empty through a sparse groove up to the full kit, Beat picks one of thirty-two grooves in the pattern's style, and Fills sets how often a fill plays (every 8, 4 or 2 bars) and how long and busy it is. Rush hands the other drums' hits to the snare as it goes up, slowly at first and more as it rises (the hats go faster and are gone by 80%; from 98% only the snare plays); the kick's downbeats keep going up to 90%, then only the first kick of each bar plays, and from 95% none. Above 75% it also rolls the snare on every step alongside the drums still playing, doubling to 32nds at 77.5%; above 80% the roll comes off the grid and speeds up smoothly as the dial moves, gliding from 32nds at 80% to 256ths at 100% (at fast tempos it tops out at about 170 hits a second), the roll swelling louder as it rises. Above 90% a high-pass filter comes in on the whole mix, its cutoff rising from 30 Hz at 90% to 1.5 kHz at 100% so the low end drains away into the build. The small set button above rush opens its settings, with these numbers as the defaults: where the roll starts, the 1/32 point where the free roll begins (the 32nd band starts halfway between the two), its top speed at 100% (1/64, 1/128 or 1/256), when the hats are gone, when only the snare is left, how long all four beat kicks and then only the first keep going, where the filter starts and its top cutoff, and how quickly the roll's speed and the filter glide after the dial (0 to 500 ms). The curves keep their shape and stretch to the new points; reset puts them back. Presets save the rush dial and these settings (the built-in ones load with rush at 0 and the defaults), and the last ones used are kept in this browser. The arrows by the pattern card's title switch the style: electro (the original five grooves plus eleven after classic records and styles: Clear, Al-Naafiysh, Egypt Egypt, Numbers, freestyle, ghettotech, Drexciya, Detroit, Hip Hop Be Bop, Pack Jam, Sharevari), techno (four on the floor, off-beat open hats, snare builds), broken beat (syncopated kicks under a snare on 2 and 4, fills in threes), IDM (lopsided kicks, hats in threes, a second bar that answers the first, stutter fills), breakcore (chopped amen breaks, ghost snares, stuttering snare rolls, a second bar that re-cuts the first) and user (patterns you save from the steps tab with Save as user; beat picks one, energy thins it out, fills adds electro fills; Save over and Delete change the one beat has picked). Presets save the style, and a preset in user style carries its pattern with it. Off on the pattern card's switch turns the patterns off: the sequencer keeps time but plays nothing, and MIDI note-ons from a keyboard or another sequencer play the voices instead (any channel, General MIDI drum notes, velocity sets the level; the card shows the note map and which MIDI inputs it hears; needs a browser with Web MIDI, such as Chrome or Edge).

The steps tab has its own grid of up to eight pages (bars) of 16 steps, played in turn: the page buttons pick the page to edit (one past the length adds pages, copied from the last), length sets how many play, and expand to 2, 4 or 8 bakes the trig conditions into that many pages, each step landing on the bars its condition plays, with the conditions cleared. User patterns and presets keep all the pages. The grid is separate from the perform tab's generated pattern. The perform / steps / off switch (on the pattern card and on the steps tab) picks which one plays, or neither: off hands the voices to MIDI in. Grab from perform copies the perform tab's pattern into the grid (only when pressed). Presets save both patterns and the switch.

Drag a slider up or down, click along it, scroll on it, or use the arrow keys. Double-click puts it back to the loaded kit's value; a red readout means it differs from the kit.

Randomise (sound tab) varies the selected voice around its current sound, up to the depth, and keeps it sounding like a drum; tick Wild to let every parameter use its full range. In the mixer, r by each name gives that voice a random sound from the bundled kits, varied by 10%, and a varies the voice's current sound by 10%; undo takes either back. The randomise card on the perform tab: kit gives each of the six drum voices a sound straight from a random bundled kit, and alter makes small variations of the current drum sounds (5%, so each stays recognisable); both leave the mixer, FX, crossfeed and pattern alone. Press R to randomise the selected voice; Shift-R randomises every voice at once, up to the depth. Everything builds a fresh sound from voices of the bundled kits (Hrtl's LXR-02 kits and twelve generated ones, which aren't listed as presets), varies each by 10%, and rolls new crossfeed, delay time, echo feedback (usually low, now and then high), beat, energy and fills, keeping the mixer levels; save keeps it.

Groove (on the pattern card, and on the steps tab) sets where each track's hits sit against the grid: straight; MPC-style swing 54, 58 or 62 (every second 16th late); triplet and shuffle; hat swing (only the hats swing); gallop; push-pull (kick and closed hat ahead of the beat, snare and open hat behind); laid back; rushed; and drunk (hats swung unevenly, kick and snare loose, after J Dilla). Depth sets how much of it plays, from 0% (straight) to 100%. The groove applies to the perform patterns and the steps grid alike, and is saved with presets. In the grid, Shift-click toggles an accent (bright step with a bar on top) and The trig buttons under the tools pick a bar condition (every bar; last bar of 2, 4 or 8; all but the last of 2, 4 or 8; first bar of 2, 4 or 8), and a click on a step then sets it (click again to take it off); Cmd-click (Ctrl-click on Windows) cycles through them all. 2, 4 and 8 play the step only on the last bar of every 2, 4 or 8 (where the fills go); ≠2, ≠4 and ≠8 play it on every bar but that one; 1/2, 1/4 and 1/8 only on the first bar of every 2, 4 or 8 (the bar after a fill, where the crash goes). Click a track name to edit that voice on the sound tab. Both hats share one voice, so the open hat chokes the closed one.

HOW THE PORT WAS CHECKED
176 Msamples compared, 6 voices and the FX bus
0samples that differ from the C
700random scenarios: kits, edits, triggers, FX settings, LFO and velocity modulation
−77 dBdifference to the -ffast-math firmware build, init kit

The reference is the firmware's own sound engine (Core/Src/Soundengine: voices, oscillators, filter, envelopes, LFOs, modulation, the parameter handler and the FX bus), cross-compiled for the Cortex-M7 FPU and run under qemu with a small harness. verify.mjs sends the same parameter edits and triggers to both and compares every 64-sample block. The STM32's hardware random number generator is replaced by the same xorshift on both sides.

The port is exact against the C as written. The shipped firmware is built with -O3 -ffast-math, which lets the compiler fuse and reorder float operations, so the hardware rounds slightly differently: with the init kit, the largest difference is 9 LSB. With extreme random settings, self-oscillating filters can drift further apart, because a one-LSB difference grows in the feedback loop.

The engine runs at the LXR's 44 140 Hz and is resampled to your sound card's rate in the browser.

SOURCE

  

recorder

length
format
start

rush settings

Saved with each preset.

presets

Star the ones you like. Export favourites downloads them as a file; send it over and they become built-in presets in the next release.

import open .snd

Faderfox PC4

The PC4's 24 knobs send CC 1–24, six rows of four. Drag a control from the right onto a knob, or click a control and then a knob. Double-click a knob to clear it. The mapping is kept in this browser.