Synth Framework — Documentation Index

Browser-based synthesiser framework built on the Web Audio API. Six synth engines, 18+ DSP modules, step sequencer, and MIDI player.

Architecture

Doc Covers
Overview Architecture, unified engine contract, module types, backward loop pattern, lifecycle
Engine initSynth() orchestrator, renderToBuffer(), factory lock support
Core Utilities SAMPLE_RATE, encodeWAV, adsrAmplitude, normalize, math helpers
Playback AudioContext lifecycle, playBuffer with VU meter, WAV download
Sequencer Step sequencer: strips, scheduler, effect chain, live audio, sidechain ducking, per-step Note tab with scale/key, modulation routing, legato mode
MIDI Player SMF parser, AudioContext-timed scheduling, incremental voice allocator

Synth Engines

All engines share the same buildLiveChain + trigger pattern with a unified backward loop. Details differ only in source creation and module params.

Engine Doc Description
Kick engines/kick Bass drum with FM body, multi-mode click (sine/noise/impulse/metallic), body resonance physical model, AD volume, velocity response, transient/sustain split, genre-targeted randomisation (9 genres), spectrogram
Snare engines/snare Snare drum with body osc with slam, buzz BPF with sweep, crack transient, rim shot, AD volume, velocity response, genre randomisation, spectrogram
Hihat engines/hihat Hi-hat with noise + metallic ring through BPF
BIA Clone engines/bia-clone Monophonic terrain synthesis (Basic/Bias/Bizarre)
Juno engines/juno Polyphonic Juno-inspired (DCO, VCF, Chorus)
Neuro engines/neuro Sub and neurofunk bass: dual osc with PWM, wavefolding, sync, FM; 8-type filter with variable slope; 9-target LFO; 3-band clarity; dynamics compressor with knee/makeup/sidechain; RMS/peak normalisation

Processor Modules (wired by backward loop)

Module Doc Used by Purpose
Filter All BiquadFilter (8 types, 12/24 dB slope)
EQ All 3-band shelving/peaking EQ (type source, skipped by loop)
Compressor modules/compressor All Dynamics compressor with knee, makeup gain, parallel mix, sidechain HPF
Limiter modules/limiter Juno Brickwall limiter (-6 dB, 20:1)
OTT BIA Multiband upward/downward compressor
Clarity modules/clarity All 3-band mud/mid/air reduction with listen/solo and SC HPF
Chorus modules/chorus Juno BBD stereo chorus (Mode I/II/I+II)

Post-Render Builtin Modules

Module Doc Used by Purpose
Normalize modules/normalize All Peak/RMS normalisation, DC removal, hard ceiling, with live meter

Visualisation Modules

Module Doc Used by Purpose
Spectrum modules/spectrum All Real-time frequency analyser with log-scale bars, peak hold, auto-scaling
Normalize Meter modules/normalize All Pre/after/gain dB meter for the normalise section

Source / Utility Modules

Module Doc Used by Purpose
Noise modules/noise All Cached noise buffer + createNoiseSource()
Pitch Kick Frequency ramp (pitch decay/envelope)
Volume All AD gain envelope node
Terrain BIA Wave terrain shaper network (Basic/Bias/Bizarre + decimation)
Tear BIA LFO modulating terrain crossfade/deci params
Osc Per-trigger oscillator bank (unused — built inline)
Sub Sub oscillator (unused — built inline)

Shared Infrastructure

Doc Covers
Distortion DistortionPipeline, curve types, chain builder, UI
Preset Manager Preset CRUD, localStorage, manifest.json, folder groups
UI Builder Module section cards, slider types, canvas drawing (waveform, envelopes), lock sync, section info popovers, param tooltips
Compressor Shared dynamics compressor module used by all engines
Normalize Shared post-render normalisation module with meter
Spectrum Shared real-time frequency analyser