DRUMSYN-2 is a fully browser-native, single-file percussion synthesizer and step sequencer. Built entirely in vanilla HTML, CSS and JavaScript — no frameworks, no server, no installs — it generates every drum sound from scratch in real-time using the Web Audio API. From classic 808/909 kicks and snares to FM synthesis, physical modelling of cymbals, and a full-featured multi-drum sampler, DRUMSYN-2 covers the entire rhythmic palette needed for electronic music production.
What is DRUMSYN-2?
DRUMSYN-2 is a self-contained drum synthesis workstation that runs entirely inside any modern web browser.
Open the single .html file and you have a fully operational drum machine — no install, no
backend, no network required after the initial font load.
DRUMSYN-2 v2.60 has evolved from a drum machine into a complete browser-native music workstation. It models 50+ distinct drum and synth voices, each with its own dedicated synthesis algorithm. The instrument palette now spans classic 808/909 percussion, 6-voice FM synthesis, a 20-slot sampler bank, a physical modeling resonator — and as of v2.60, six fully-programmable melodic synth engines: Pluck (Karplus-Strong), Pad (Supersaw), Lead, FM Bell, Synth Bass, and Chord.
A full multi-track DAW View & Song Mode (⊞ ARR) enables song-length arrangement with a piano-roll canvas, bar/beat ruler, loop regions, a velocity lane, and MIDI recording. A Plugin Loader allows external JS drum or synth engines to be dropped into slots and appear as fully-integrated DAW tracks. The ARM system turns any synth row into a live polyphonic instrument — arm it, play your MIDI keyboard, and chords sound at the correct pitch through the full master effects chain in real time.
All audio rendering happens via a custom offline PCM synthesis engine — the app synthesises
a Float32Array buffer each time a parameter changes, then plays it back through
AudioContext.createBufferSource(). This makes every waveform instantly previewable and
exportable as a lossless 16-bit stereo WAV file.
Drum Voice Library
Every voice has a unique synthesis algorithm. Below is the full catalogue. Version 2.60 adds a full DAW View & Song Mode, Plugin Loader, and 6 melodic synth engines (see changelog). Version 2.52 adds FM Cross-Modulation, Physical Modeling Resonator, Smart Sidechain, Markov pattern generation, Share URL, and Auto-Master export (see changelog). Version 2.4 added interface and workflow refinements. Version 2.35 previously added three new voices: Sub Bass (long-decay sub-oscillator optimised for low-end design), Pedal Hi-Hat (choked open-hat simulation), and Floor Tom (deep resonant tom with extended sub decay).
Math.tanh.Math.tanh drive. Parallel compression for density. Crack burst at transient.Math.sign(sin). Grit adds bitcrusher-style quantisation.DSP Techniques & Maths
Oscillator & Envelope Core
All synthesis runs offline in a synthesize() function that fills a Float32Array
sample-by-sample at 44100 Hz. Time t = i / SR drives every oscillator and envelope directly —
no AudioNode graph at synthesis time, giving full deterministic control and instant buffer availability.
env(t) = exp(−t / τ)
// τ = decayMs / 1000. All percussion envelopes use this model.
Frequency sweep (kick pitch):
f(t) = f₁ + (f₀ − f₁) · exp(−t · 20)
// f₀ = start freq, f₁ = end freq. Fast exponential brings pitch down quickly.
FM Synthesis (2-Operator)
The six FM voices implement a classic Yamaha DX7-style two-operator algorithm. Phase is accumulated
manually each sample, and the modulator output offsets the carrier phase — generating sidebands at
fcarrier ± n·fmod. A self-feedback register on the modulator (fbPrev)
adds buzziness at higher settings, emulating DX7 algorithm 7.
modPhase += 2π · f_mod / SR
modSig = sin(modPhase + fbPrev · fbAmt)
carPhase += 2π · f_car / SR
output = sin(carPhase + modSig · index(t))
FM Index decay:
index(t) = idxMax · exp(−t · idxDecRate)
// Rich metallic attack → clean sine body. Controls brightness evolution.
Saturation & Waveshaping
Overdrive and saturation use Math.tanh(x · drive) normalised by Math.tanh(drive)
for unit-gain at low drive settings — a standard soft-clip waveshaper. A dry/wet blend formula keeps
the clean signal present at low drive amounts.
s_sat = tanh(s · drive) / tanh(drive)
s_out = s · (1 − amt) + s_sat · amt
// amt ∈ [0,1] from knob. Progressive from clean to hard clip.
Hard-clip parallel comp:
sq = tanh(s · 6) · 0.12 // near-square wave
s_out = s · (1 − p) + sq · p
Multiband Compressor — Linkwitz-Riley Crossovers
The multiband compressor uses 4th-order Linkwitz-Riley crossover filters — two cascaded 2nd-order Butterworth biquads. The LP and HP at the same cutoff sum to a flat magnitude response (the LR condition). Three bands (low / mid / high) are compressed independently and summed.
y[n] = b₀·x[n] + b₁·x[n-1] + b₂·x[n-2] − a₁·y[n-1] − a₂·y[n-2]
LR-4 = two cascaded 2nd-order Butterworth sections.
// Applied twice (biquadCascade2). LP + HP sum = flat (LR condition).
Per-band gain computer:
tgt(n) = thresh + (|x[n]| − thresh) / ratio if |x[n]| > thresh
g = g + (tgt/g − g) · (|x|>g ? atk_coef : rel_coef)
Tape Wow & Flutter
The Tape Wow/Flutter effect uses two sinusoidal time-varying delays (0.7 Hz wow + 9.5 Hz flutter) to compute a fractional sample offset. Linear interpolation between adjacent samples reconstructs the time-stretched signal, simulating the pitch instability of a real tape machine.
si = i + offset(t) · SR
out[i] = buf[⌊si⌋] + (buf[⌊si⌋+1] − buf[⌊si⌋]) · frac(si)
Pitch Shifting (Catmull-Rom Interpolation)
Pitch shifting in the sampler and global pitch-shift effect uses Catmull-Rom Hermite 4-point interpolation. Unlike linear interpolation, Catmull-Rom is C1-continuous, significantly reducing aliasing artefacts on large pitch shifts.
a₁ = y₀ − 2.5y₁ + 2.0y₂ − 0.5y₃
a₂ = −0.5y₀ + 0.5y₂
a₃ = y₁
y(t) = ((a₀·t + a₁)·t + a₂)·t + a₃
Stereo Width (Constant-Power Pan)
Mono output is widened by a short delay on one channel. A constant-power panning law uses
cos(angle) and sin(angle), where angle maps pan to [0, π/2],
preserving perceived loudness at all pan positions.
L[i] = mono[i] · cos(angle) · √2
R[i] = mono[i−delaySamps] · sin(angle) · √2
Spectrum Analyser (DFT)
The spectrum analyser applies a Hann window to a 2048-sample slice of the rendered buffer, then computes magnitudes via a real DFT. Frequency bins are mapped to canvas X positions on a logarithmic scale for perceptually accurate display.
// Reduces spectral leakage from non-integer frequency bins. // Reduces spectral leakage from non-integer frequency bins. ### 2-Op FM Synthesis The six FM voices implement a classic Yamaha DX7-style two-operator algorithm. Phase is accumulated manually per sample, and the modulator output offsets the carrier phase — generating sidebands at f_carrier ± n·f_mod. A self-feedback register on the modulator adds buzz at higher settings. **2-Op FM:** modPhase += 2π · f_mod / SR modSig = sin(modPhase + fbPrev · fbAmt) carPhase += 2π · f_car / SR output = sin(carPhase + modSig · index(t)) **FM Index decay:** index(t) = idxMax · exp(−t · idxDecRate) ### Transient Shaper The transient shaper uses an envelope follower to separate attack transients from the sustain body. An attack coefficient and a sustain coefficient independently scale the transient peak and the sustain tail. A mix control blends the shaped signal with the dry input. ### Linkwitz-Riley Multiband Compressor The multiband compressor uses 4th-order Linkwitz-Riley crossover filters — two cascaded 2nd-order Butterworth biquads. Three bands (low / mid / high) are compressed independently with per-band threshold and gain. **LR-4 = two cascaded 2nd-order Butterworth sections.** y[n] = b₀·x[n] + b₁·x[n-1] + b₂·x[n-2] − a₁·y[n-1] − a₂·y[n-2] ### Master Limiter All voices route through a DynamicsCompressorNode configured as a brick-wall lookahead limiter: threshold −2 dBFS, ratio 20:1, attack 1 ms, release 50 ms. A −0.5 dB post-limiter safety gain prevents inter-voice clipping on dense patterns. ### Tape Wow & Flutter Two sinusoidal time-varying delays (0.7 Hz wow + 9.5 Hz flutter) compute a fractional sample offset. Linear interpolation reconstructs the time-stretched signal. si = i + offset(t) · SR out[i] = buf[⌊si⌋] + (buf[⌊si⌋+1] − buf[⌊si⌋]) · frac(si)
Log X mapping: x = (log₁₀(f) − log₁₀(fMin)) / (log₁₀(fMax) − log₁₀(fMin)) · W
Functions & Features
| Feature | Description |
|---|---|
| Step Sequencer | 16–32 step grid, BPM from 40–300. Per-row step-length, volume, pan, and mute. Beat-aligned playback with swing control. |
| Parameter Lock (P-Lock) | Per-step synthesis parameter overrides à la Elektron machines. P-locked steps synthesise their own buffer on-the-fly. Visual intensity badges on steps indicate lock count. |
| Macro Knobs | 4 assignable macro knobs. Right-click assigns to any synthesis parameter. Per-macro LFO (sine/triangle/square/saw/ramp) with rate and depth controls. |
| Preset System | Save/load named presets per drum voice. Tag-based search. Compare mode overlays two preset waveforms. A/B comparison slots for live switching. |
| Effects Chain | Drag-reorderable effects: Distortion, Saturator, EQ Filter, Bitcrusher, Compressor, Chorus, Delay, Reverb, Tremolo, Pitch Shift, Stereo Width. Multiband Compressor and Transient Shaper as addon chain. |
| Waveform Display | Real-time PCM waveform with zoom, selection In/Out points, playhead animation, drag-drop audio files (also drag directly onto sampler slot buttons in the left panel). Parameter impact preview overlays on knob hover. Two-row edit toolbar: ZOOM row + labelled EDIT groups (SEL · AMP · TIME · SMP). |
| Spectrum Analyser | Static DFT-based frequency display after each synthesis. Logarithmic frequency axis. Colour-coded per drum type. |
| Randomizer | One-click randomise all parameters. Lock individual knobs to exclude. Typo Mode keeps 1–2 params untouched for subtle variations. |
| MIDI I/O | Web MIDI API integration. MIDI learn per-knob (CC mapping). 24 PPQN MIDI clock output. MIDI note triggering mapped to General MIDI drum map. |
| Sequencer Ratchets | Per-step ratchet count (1–8 subdivisions) for machine-gun hi-hat rolls or micro-rhythms. |
| Sidechain | Per-step sidechain markers fire a trigger signal for visual indication or external routing. |
| Shuffle / Swing | Pattern templates (Amen Break, Trap, Bossa Nova, etc.). Swing percentage shifts even steps for groove. |
| Export — WAV | 16-bit stereo WAV at 44100 Hz. Batch export all drums at once. Start/End selection for sample slicing. |
| Export — MIDI Clip | Single-note MIDI file with correct tempo, velocity and note duration mapped from synthesis parameters. |
| Kit / Project Save | JSON-based kit (per-drum params + effects) and full project (all drums + sequencer + presets + macros) save/load. |
| FM Synthesis Engine | 6 FM voices (FM Kick, FM Snare, FM Metal, FM Bell, FM Perc, FM Bass) — 2-operator DX7-style with self-feedback and index-decay envelope. |
| 20-Slot Sampler Bank | Independent sample per slot. Each slot is its own sequencer row. WAV / AIFF / MP3 / OGG / FLAC / M4A. Per-slot pitch, start/end, loop, reverse. Drag audio files directly onto slot buttons in the left panel. Per-slot buffer and sample rate fully isolated — loading into any slot never affects other slots. |
| Macro Knobs + LFO | 4 assignable macro knobs. Right-click assigns to any parameter. Per-macro LFO (sine/triangle/square/sawtooth/ramp) with rate & depth. |
| Genre Drum Sets | 9 built-in genre presets (Synthwave, Goa, EBM, Hard Rock, Rock, Jazz, Hip-Hop, DnB…). User-saveable custom sets with JSON export/import. |
| Multiband Compressor | 3-band LR4 crossover compressor. Per-band threshold & gain. Addon chain alongside Transient Shaper. |
| Transient Shaper | Attack/sustain sculpting on any voice. Mix dry/wet. Applied post-effects chain. |
| Tape Wow & Flutter | 0.7 Hz wow + 9.5 Hz flutter via time-varying delay with linear interpolation. Toggle per voice. |
| Master Limiter Chain | Lookahead DynamicsCompressor: −2 dBFS, 20:1 ratio, 1 ms attack. Post-limiter −0.5 dB safety gain. Prevents inter-voice clipping. |
| Sequencer Oscilloscope | Live waveform display inside the sequencer panel — shows the currently playing drum in real-time. |
| MIDI Clock Output | 24 PPQN MIDI clock to external hardware. Toggle from header. |
| Undo Timeline | Visual dot-strip history navigator. Click any dot to jump to that state. Unlimited undo within session. |
| Sampler Edit Suite | Fade in/out, silence, crop, delete, gain +1/+3/−1/−3 dB, normalize, reverse — all with undo stack and In/Out selection. SMP toolbar group (cyan) visible only when a sampler slot is active. |
| GUI Zoom | 100–200% scaling via CSS transform. 7 zoom levels from the VIEW menu. |
| Parchment Theme | 10th built-in theme — warm cream/brown palette. 2 light themes total (Daylight, Parchment). |
| Theme System | 10 built-in themes (Default, Night City, Retro Wave, GOA, EBM, Industrial, Monochrome, Ocean, Daylight/Parchment). Full CSS custom property driven. |
| Undo / Redo | Full history timeline with visual dot navigation. Unlimited undo within session with compact timeline strip. |
| Menu Bar (FILE·EDIT·SEQUENCER·VIEW·SETTINGS) | Five-item dropdown menu bar. FILE: project/kit I/O, WAV/stems export. EDIT: undo/redo, randomize, copy/paste. SEQUENCER: play, BPM, swing, fills. VIEW: panel launchers, 10-theme colour-swatch grid, GUI zoom 100–200%. SETTINGS: MIDI clock, PANIC (audio+MIDI), reset all. |
| Transport Bar | Persistent bar above waveform: ▶ PLAY · ⟳ REGEN · ⚄ RAND · ⚄ FX · ↩ UNDO · ↪ REDO · A/B · ▦ SEQ · ⊞ ARR · filename · ⬇ WAV. Replaces old PANELS bar and action bar. |
| Collapsible Drum Groups | Left panel in 9 collapsible groups (Bass · Snare/Clap · Hi-Hats · Toms · Cymbals · Electronic · FAT/GOA/EBM · FM Synthesis · Samplers 1–20). Collapsed by default, state in localStorage. ⊟/⊞ COLLAPSE/EXPAND ALL buttons. |
| GUI Zoom | 100–200% GUI scaling via CSS transform: scale() on a wrapper element, preserving layout. |
| Keyboard Shortcuts | Full keyboard mapping for drum triggering (Q–M row), transport (Space), and panels (K, M, P, S, T, Z, H). Visual Hints overlay mode. |
| BPM & Genre Panels | Genre-preset BPM library with tap-tempo. Genre cards auto-load BPM and matching sequencer kick patterns. |
| Sequencer Row Customisation | Replace any sequencer row with a different drum voice via the instrument picker popup. Add extra rows beyond the default set. Custom layout saved in project files. |
| Trig Conditions | Per-step trigger conditions (e.g. every 2nd loop, random probability) shown as inline badges. Steps fire only when the condition is met. |
| Per-Step Nudge | Micro-timing offset per step (displayed as a badge). Push individual hits forward or backward in the grid for humanised groove. |
| Preset Favourites | Star any preset to mark it as a favourite. Toggle "Favourites Only" filter to narrow the preset list. Favourites persist across sessions via localStorage. |
| Preset Pack Export | Multi-select presets via checkboxes and export them as a single .json pack file. Import packs by drag-and-drop onto the preset or genre panel. |
| Preset Morph | A/B compare mode includes a morph slider — drag between two selected presets to continuously interpolate all numeric parameters and hear the result. |
| Preset Drum Filter | Drop-down in the preset panel filters the preset list by source drum voice, making it easy to browse only kicks or only snares. |
| BPM Click-to-Edit | Click the BPM display to enter an inline numeric input for precise tempo entry without the slider. |
| Delay BPM Sync | One-click sync of the delay time to musical subdivisions (whole, half, quarter, 8th, 16th note) derived from the current BPM. |
| MIDI Pitch Bend | Pitch bend wheel modulates the selected drum's base frequency in real-time (±2 semitones), re-synthesising on bend input. |
| MIDI Mod Wheel | CC1 (mod wheel) is hard-mapped to the decay parameter of the active voice unless overridden by a custom CC mapping. |
| MIDI Note Map Display | Visual table of MIDI note → drum mappings inside the MIDI panel. Switch between GM Standard layout and chromatic mapping with one click. |
| Kit Import | Companion to Kit Export — drag-drop or open a .drumsyn2kit.json file to restore all drum parameters and effects in one step. |
| DAW View / Song Mode | Multi-track DAW canvas with bar/beat ruler, piano-roll note editing, loop region (L/R markers), velocity lane, zoom, and full song-length playback. Access via ⊞ ARR in transport bar. |
| DAW Transport | Dedicated Play/Stop, Record, Metronome, BPM field, snap-to-grid selector, cursor position display, loop enable, zoom in/out. |
| DAW Track Labels | Per-row label column: Mute (M), ARM ⏺/○, Melodic Mode ♪/▪, row name in accent colour, colour picker dot. Synth rows show purple tint when is-synth class active. |
| Plugin Loader | Load external JS drum/synth engines into named slots. Plugins appear as DAW rows with full knob panel, effects chain, sequencer row integration, and +DAW button. |
| PLUCK Synth | Karplus-Strong physical model. Damping, brightness, stiffness, pluck position, stereo spread. Guitar, harp, koto, bell-pluck tones. |
| PAD Synth | Supersaw: 2–6 detuned oscillators + LP filter + resonance + chorus + ADSR. Trance pads, cinematic strings, ambient textures. |
| LEAD Synth | Saw↔Square morph, LP filter, resonance, tanh drive, glide. Classic synth leads, acid lines, arpeggiated melodies. |
| FM BELL Synth | 2-op FM + self-feedback + shimmer overtone. Metallic bells, marimba, DX7 tines, electric piano. |
| SYNTH BASS | Sub oscillator + detuned saw + LP sweep + tanh saturation. 808 sub bass, Moog basslines, deep electronic bass. |
| CHORD Synth | 3-voice stacked chord engine: major / minor / sus4 voicings, detune, LP filter. Instant rich chord pads from a single note trigger. |
| MIDI ARM & Live Play | Arm any synth DAW row. MIDI Note On fires the synth immediately at the correct pitch (midiToHz) and velocity through the master chain. Polyphonic — hold full chords. |
| Pitched MIDI Recording | With row armed + DAW REC active, every MIDI key records a note with pitch (0–127) and velocity into the DAW timeline for pitch-correct polyphonic playback. |
| Physical Modeling Resonator | New drum voice: 4 material modes (Wood/Metal/Skin/Glass), modal synthesis via biquad bandpass filter banks — up to 8 inharmonic resonant modes with per-mode decay, damping, brightness and strike transient. |
| FM Cross-Modulation (⊗ XMOD) | Cross-instrument 2-op FM — any drum's buffer phase-modulates the current drum's output. Controls: Mod Source, Depth, Ratio ×0.5–×8, Feedback. Toggle panel below waveform display. |
| Smart Sidechain (⊂DK) | Per-row duck-target button. SC source drum ducks all ⊂DK rows via configurable gain envelope. SC Settings: Duck Floor, Attack, Release. ⊃ AUTO-LINK routes Kick→Samplers+Bass in one click. ✕ CLEAR resets all links. |
| Markov Pattern Generator | 🎲 FILL and 🎲 GROOVE in the sequencer toolbar. Builds per-drum Markov transition matrix from existing pattern; generates last-4-step fill or full 16-step groove variation. Downbeats preserved at 70%. Fully undo-able. |
| 🧬 Mutate | ±2/5/15/30% micro-variation of all unlocked params. Preserves locked knobs. Humanises sounds without full randomise. Fully undo-able. |
| ✦ Auto-Master (FINISH) | One-click mastering chain: 30Hz HPF → 3-band LR4 Multiband Compressor → Stereo Width +15% → Soft Limiter −0.3 dBFS → Normalise to −1 dBFS → 16-bit stereo WAV as filename_mastered.wav. |
| 🔗 Share URL | Encodes kit state (params + grid + BPM) as Base64 in location.hash. One click copies shareable link. Auto-loads on open. No server needed, works from file://. ~2–5 KB encoded. |
| MIDI Pad Trigger + Per-Drum Learn | MIDI Note On plays drum immediately with velocity scaling. L (Learn) button on every seq row — click, hit a pad, note permanently maps to that drum. Mapped note name displayed inline. |
| Euclidean Rhythm Generator | Per-row Euclidean (Bjorklund) rhythm generator. Set pulse count and step count — pulses distributed as evenly as possible across the pattern grid. |
| Per-Drum Frequency Shifter | Single-sideband AM frequency shifter via Hilbert FIR. Shifts pitch without altering harmonic ratios. Creates inharmonic metallic tones. Per-drum toggle and Hz amount. |
| Granular Sampler Mode | Grain-based time-stretch on sampler buffers. Grain size, scatter, and pitch shift. Transforms percussive samples into textural pads or glitch effects. |
| CPU Load & Latency Meter | Live CPU bar in the sequencer header. Shows scheduler load % and audio latency in ms, updating every 4th tick. Colour-coded: green → amber → red. |
| Panel Pop-Out / Dock | Any floating panel can be popped out into a separate browser window or docked back inline. Ideal for multi-monitor setups. |
| MIDI Drag-to-DAW | Drag the 🎹 MIDI button directly into a DAW timeline to transfer the current pattern as a MIDI clip. |
| .drumsyn Binary Format | Compact binary project file: JSON manifest + raw PCM blobs. Saves/restores full session including sample audio. Much smaller than JSON/base64 export. |
Architecture & Technology
Single-File Design
The entire application lives in one .html file — CSS, JavaScript and markup are all
self-contained. The only external resources are Google Fonts (Orbitron, Share Tech Mono) and the
SortableJS library loaded dynamically on demand for effects-chain drag-and-drop reordering.
Web Audio API Usage Pattern
DRUMSYN-2 avoids building an AudioNode graph for synthesis. All DSP is computed into a
Float32Array using the JavaScript engine, then loaded into an AudioBuffer
and played via createBufferSource(). This gives sample-accurate previewability and makes
export trivial — the same buffer is written directly to WAV.
SVG Knob Rendering
Every rotary knob is drawn as an inline SVG element by the drawKnob(el, color) function.
SVG arcs use the A path command with computed start/end angles. Tick marks, value arcs,
min/mid/max labels and the needle pointer are all SVG primitives — no canvas, no images, no external UI library.
Responsive & Mobile
On narrow viewports (<768 px) the drum selector slides up from the bottom as a fixed panel.
Touch events on knobs are handled via touchstart/touchmove, with
double-tap detection opening a numeric input popup for precise value entry.
Interactive Drum Engine Demo
Click a drum sound below to hear a simplified version of the DRUMSYN-2 synthesis engine. The signal-flow diagram lights up showing the audio path, and the oscilloscope displays the live waveform being synthesised in real-time.
Inside the Sound Engine
Every drum hit in DRUMSYN-2 is synthesised sample-by-sample at 44,100 Hz using dedicated algorithms tuned to the physics and psychoacoustics of each instrument. No samples, no shortcuts — pure mathematics rendered into sound.
▶ KICK DRUM
A sinusoidal oscillator starts high and falls rapidly — mimicking a stretched bass drum membrane. The exponential pitch sweep gives instant punch rather than a linear mechanical drop.
// f₀=120 Hz start f₁=40 Hz end
env(t) = e−t / τ // τ = decay constant
out(t) = sin(2π ∫f(t)dt) · env(t)
▶ SNARE DRUM
White noise filtered through a biquad highpass removes low-frequency mud. The crisp broadband crack cuts through any mix.
H(z) = HPF @ 1200 Hz // biquad
env(t) = e−t / 0.08 // ~80 ms decay
out(t) = H(noise) · env(t)
▶ HI-HAT
Noise pushed through an aggressive 6 kHz highpass leaves only metallic shimmer. The 28 ms decay constant gives a tight, dry closed-hat click.
env(t) = 0.7 · e−t / 0.028
// τ = 28 ms — ultra-short
▶ FM SYNTHESIS ENGINE
6 FM voices use a 2-operator DX7-style algorithm. The modulator output offsets the carrier phase, generating sidebands at fc ± n·fm. A self-feedback register on the modulator adds buzz — emulating DX7 algorithm 7.
output = sin(carPhase + modSig · index(t))
index(t) = idxMax · e−t · idxDecRate
// Rich attack → clean sine body
▶ EXPONENTIAL ENVELOPES
All amplitude envelopes use exponential decay — matching the natural behaviour of physical resonators. Energy loss is proportional to remaining energy, producing an organically musical curve.
// at t=τ, amp = A/e ≈ 0.368·A
// at t=5τ, amp ≈ 0.007·A (−43 dB)
▶ MASTER LIMITER CHAIN
All voices route through a lookahead DynamicsCompressor configured as a brick-wall limiter, followed by a −0.5 dB safety gain. This prevents clipping when multiple loud drums hit simultaneously on dense patterns.
ratio: 20:1 // brick-wall
attack: 1 ms release: 50 ms
post-gain: 0.944 // −0.5 dB safety
Editor's Review
Summary
DRUMSYN-2 is a genuinely impressive piece of software engineering that challenges the assumption that serious audio tools require native applications or heavyweight frameworks. Delivering 30+ distinct drum voices, a full step sequencer with per-step parameter locking, a multiband compressor, FM synthesis, a sampler, and MIDI I/O — all from a single HTML file — is a remarkable technical achievement.
Sound Design
The synthesis algorithms are clearly the work of someone deeply familiar with classic drum machines. The kick voices — particularly FAT KICK and TRANCE KICK — produce convincing analogue-flavoured results that hold up in a mix. The FM voices stand out: the FM KICK's index-decay envelope generates exactly the kind of evolving metallic click that gives classic DX7-era kicks their distinctive character. The hi-hat and cymbal models, using inharmonic partial stacking, are surprisingly believable — covering everything from tight 808 hats to washy crash cymbals.
The saturation and drive implementations deserve special mention. Using normalised
tanh soft-clipping with a dry/wet blend is the correct approach — it produces harmonically
rich distortion without runaway gain, and the parallel compression blend on Fat Kick and EBM Snare
gives those voices an aggressive density that's hard to achieve in browser software.
DSP Engineering
The choice to perform all synthesis offline in a Float32Array loop rather than using
Web Audio's AudioWorklet is clever. It sidesteps latency and threading issues, makes export trivial,
and enables features like parameter impact preview — hovering a knob shows the waveform change before
committing — that would be much harder in a real-time node graph. The Linkwitz-Riley multiband
compressor implementation, with proper 4th-order biquad cascades, is notably sophisticated for a
JavaScript application. Catmull-Rom interpolation in the pitch shift and sampler prevents the metallic
aliasing artefacts that plague simpler implementations.
Feature Breadth
The feature list is staggering for a single-file tool: undo/redo, preset management with compare mode, A/B slots, per-step parameter locks (à la Elektron machines), macro knobs with LFO routing, MIDI learn, MIDI clock output, drag-reorderable effects chain, oscilloscope, spectrum analyser, tape wow/flutter, and full project save/load. Each feature is thoughtfully implemented — the P-Lock system, for example, correctly pre-renders locked-step buffers and invalidates them only when relevant global parameters change.
UI & User Experience
The visual design is polished and consistent — SVG rotary knobs generated entirely in JavaScript look and behave better than many commercial plugins. The theme system is a genuine quality-of-life feature; the GOA and EBM themes are particularly well-matched to their genre contexts. The Keyboard Hints overlay is a thoughtful touch for new users. The main ergonomic consideration is the density of the interface — mitigated in v2.52 by the new collapsible drum groups in the left panel (all 9 groups collapsed by default), the streamlined Transport Bar replacing the old action/panels bars, and the reorganised two-row waveform edit toolbar with clearly labelled groups.
Areas for Improvement
The main limitation is inherent to the offline-synthesis architecture: parameter changes trigger a full buffer re-render, making real-time hands-on tweaking during sequencer playback less fluid than a streaming DSP graph. A hybrid model — streaming for real-time knob feel, offline for export — would be a natural v3 direction. The sequencer also lacks pattern chaining for song arrangement, and polyrhythm across all lanes simultaneously shares one master clock. These are the only features separating DRUMSYN-2 v2.52 from a professional DAW-integrated drum machine. The FM engine and Macro LFO system bring the tool significantly closer to modular synthesis territory.
Verdict
DRUMSYN-2 v2.52 is the best browser-native drum synthesizer currently available — now with a cleaner menu-bar interface, 20-slot independent sampler bank, and collapsible drum groups — and it competes credibly with lightweight standalone drum machines in synthesis quality and workflow depth. For electronic music producers working in Psytrance, EBM, Industrial, Techno or Goa — the genres this tool is clearly optimised for — it is an invaluable sketchpad, sound design tool and sample generator. The fact that it requires nothing but a browser makes it uniquely portable. Highly recommended.