Expand description
Preset = a stereo audio graph parameterised by TrackParams + GlobalParams.
Math-heavy modulation lives inside lfo(|t| …) closures that read
Shared atomics cloned at build time (lock-free). Everything is
f64-throughout (FunDSP hacker module) so multi-hour playback stays
phase-stable — f32 time counters drift at ~5 min at 48 kHz.
Structs§
- FreqMod
- Shared bundle of everything a freq-generating closure needs to apply arp + LFO on top of a base pitch. Cloning it is just a handful of Arc refcount bumps.
- Global
Params - LfoBundle
- Lightweight bundle of the three Shared atomics that drive a track’s per-voice LFO. Clone is ~3× Arc-clone (refcount bumps) — cheap.
- Preset
Enums§
Constants§
- ALL_
KINDS - All preset kinds in cycle order. Used by the TUI
t/Tkeys. - LFO_
CUTOFF - LFO_
FREQ - LFO_
GAIN - LFO_OFF
- LFO_
REVERB - LFO_
TARGETS - MASTER_
SHELF_ HZ - MIN_
SHELF_ GAIN
Functions§
- brightness_
to_ lp_ cutoff - Map brightness to the master lowpass cutoff (Hz). 0 → 3000 Hz (hard cut of reverb HF resonances) 0.6 → ~8.6 kHz (default — mellow) 1.0 → 18 kHz (effective bypass)
- brightness_
to_ shelf_ gain - Map brightness [0..1] → shelf amplitude gain [MIN..1.0] linearly.
- lerp3
- Three-point linear interpolation:
c=0 → a,c=0.5 → b,c=1 → d. Used by every preset’scharactermorph so the neutral 0.5 setting reproduces the hand-tuned original formula exactly. - lfo_
target_ name - master_
bus - Stereo master bus: per-channel high-shelf (tilt) → lowpass
(hard cut) → limiter. Both EQ stages driven by the same
brightness. - shelf_
gain_ db - Amplitude → dB for header readout.