engines/bia-clone.js — SynthMono
The BIA Clone. Defined as a SynthEngine object with
10 modules. Models the Basimilus Iteritas Alter terrain
algorithms (Basic / Bias / Bizarre) with combined decimation + wavefolding
(Deci), noise injection, sub oscillator, internal Tear LFO, filter, distortion,
OTT multiband compressor, compressor, and AD volume envelope.
Modules
The modules array defines both the UI panels (order, labels, params) and the signal chain (processor order).
1. OSC (source)
| Param | Range | Default | Description |
|---|---|---|---|
waveform |
saw/triangle/sine | saw | Base oscillator waveform |
freq |
65–2000 Hz | 130.81 (C3) | Oscillator frequency |
The clean oscillator feeds into the terrain processing. Waveform choice significantly changes terrain character — sine gives soft harmonics, saw gives bright buzzy textures, triangle gives smooth folding in Bizarre mode.
2. Terrain (source)
| Param | Range | Default | Description |
|---|---|---|---|
harmonics |
0–1 | 0.3 | Morphs between three terrain algorithms |
deci |
0–1 | 0.15 | Combined decimation + wavefolding |
The terrain algorithm uses three parallel waveshaping paths, crossfaded based
on the harmonics value:
- Basic (harmonics 0–0.33): Sine multiplication —
sin(x·π·(1 + h·3))— generates harmonic overtones through waveshaping. Bright, clean, metallic. - Bias (harmonics ~0.5): Stepped S&H — quantises the waveform to N steps (16 down to 2). Gritty, noisy, digital.
- Bizarre (harmonics 0.66–1.0): Wavefolder — multiplies the signal by
1 + h·4and folds at ±1. Buzzy, chaotic, overdriven.
The crossfade is smooth — the three zones overlap so adjacent algorithms blend:
0 0.33 0.66 1.0
| Basic | Bias | Bizarre |
\ /\ /\ /
\_____/ \_____/ \_____/
3. Noise (source)
| Param | Range | Default | Description |
|---|---|---|---|
noiseMix |
0–1 | 0.3 | White noise level mixed after terrain |
Noise is injected after the terrain waveshapers and before the Deci stage. Unlike the BIA where noise is routed through the Bias waveshaper, this implementation mixes noise directly into the terrain sum — giving independent control and a different character.
4. Tear (source)
| Param | Range | Default | Description |
|---|---|---|---|
tearRate |
0.1–20 Hz | 3 | LFO rate |
tearToHarmonics |
0–1 | 0 | Amount of LFO → crossfade weight modulation |
tearToDeci |
0–1 | 0 | Amount of LFO → pre-Deci gain modulation |
Internal modulation LFO (sine wave) that modulates the terrain crossfade
gains and/or the pre-Deci input gain. The LFO adds ±depth·0.5 to the
modulated parameter, creating dynamic timbral wobble without changing the
waveshaper curves themselves.
5. Filter (processor)
| Param | Range | Default | Description |
|---|---|---|---|
filterCut |
50–20000 Hz | 20000 | Low-pass cutoff |
filterRes |
0–1 | 0 | Resonance (Q: 0.5–20) |
Simple cleanup low-pass filter after the Deci stage. At maximum cutoff the filter is bypassed.
6. Distortion
Standard multi-stage distortion card (same pattern as all other engines). 9 drive types, per-stage amount and drive controls.
7. Compressor (processor)
| Param | Range | Default | Description |
|---|---|---|---|
compThreshold |
–60–0 dB | –24 | Compressor threshold |
compRatio |
1–20 | 4 | Compression ratio |
compAttack |
0.001–0.1 s | 0.003 | Attack time |
compRelease |
0.01–1.0 s | 0.1 | Release time |
Standard dynamics compressor, same as other engines.
8. Volume (master)
| Param | Range | Default | Description |
|---|---|---|---|
volAttack |
0.001–5 s | 0.002 | Envelope attack |
volDecay |
0.01–10 s | 0.5 | Envelope decay |
volSustain |
0–1 | 0.3 | Sustain level |
volRelease |
0.01–10 s | 0.3 | Release time |
volume |
0–1 | 0.75 | Master level |
Extended-range ADSR envelope for percussive hits through sustained tones.
9. Normalize (builtin)
| Param | Type | Default | Description |
|---|---|---|---|
normalize |
checkbox | true | Peak normalisation (target 0.944) |
Signal Flow
OSC → Terrain (3 parallel paths crossfaded by Harmonics)
Basic ──→ sine-multiply waveshaper ──→ ┐
Bias ──→ stepped S&H waveshaper ───→ ├→ terrainSum → Pre-Deci Gain
Bizarre → folding waveshaper ──→ ┘
Noise ─────────────────────────────────→┘
↓ (tear LFO modulates if tearToDeci > 0)
Deci waveshaper (decimate + fold)
↓
Filter → Distortion → Compressor → Volume → Normalize
Signal Normalisation
Unlike the kick/juno engines, this engine does not apply srcNorm
normalisation — the terrain waveshapers and Deci stage inherently clip/distort
the signal, making peak normalisation counter-productive. The Volume ADSR and
Normalize module handle final leveling.
Rendering
getDuration returns max(1, volAttack + volDecay + volRelease + 0.1).
The render function builds three parallel waveshaper chains driven by
a single oscillator, sums them with the noise path, applies the Deci
waveshaper, optionally modulates with Tear LFO, and feeds the result to
chainInput.
Dependencies
core.js—SAMPLE_RATE,randInRange,randInt,logRandregistry.js—register()
See Also
docs/synth/engines/kick.md— the kick engine this was inspired bydocs/synth/ui-builder.md— how module params become UIdocs/synth/engine.md—initSynthandrenderToBuffer- Noise Engineering Basimilus Iteritas Alter — the inspiration