memlnaut-nisps/playground/js/synth
monkey-w1n5t0n afff406d92 feat(playground): add Modular audio mode with shared mod pool
New "Modular" engine in a-immersive with three hot-swappable Faust
sub-engines (subtractive/additive/fm) sharing a common modulation pool:
16 ADSR slots + 32 LFO slots (single-knob sine->tri->square->saw
wavemorph) routed through a 48-source x 10-destination matrix per
engine. Per-connection scalar amounts in [-1, 1], summed at each
destination. Default MLP output count is 512 (32 mod-source params +
480 matrix cells); model reinits on sub-engine swap, count change, or
engine-param exposure toggle.

Faust layer:
- mod-pool.lib: shared ADSR/LFO/source-bus library
- gen-modular-dsp.py: byte-reproducible generator (source of truth)
- modular-subtractive: faithful Minimoog (3 osc, ladder filter, no envs)
- modular-additive: 64-partial, spectral shape + formants, no envs/LFOs
- modular-fm: 4-op matrix + self-feedback, no envs
- All three share d08=amp, d09=pan conventions
- MODULAR_DESTINATIONS.md: authoritative destination table

JS layer:
- ModularEngine: self-contained SynthEngine with getState/setState,
  setSubEngine, setModSourceCount, setExposeEngineParam
- modular-ui: drawer with sub-engine toggle, ADSR/LFO count steppers,
  per-slot enable switches, matrix grid editor (tap-cycle, long-press
  precise, right-click menu, negative amounts), preset overlay
- modular-presets: 6 named presets (Slow pad, Plucky bass, Crystal,
  DX bell, Morphing drone + default)
- a-app.js: Modular mode registered, paramMeta:change -> resizeMLP,
  modular DSP state persisted under modularDspState, window.__nisps
  debug hooks for programmatic control

Tests: tests/e2e/modular-mode.spec.js (11 Playwright tests, all passing
including DSP state survives reload, sub-engine swap keeps paramCount,
preset apply verification).

Also fixes a pre-existing build.sh bug where the -e flag caused faust
to overwrite .wasm outputs with expanded DSP source text, leaving
additive/fm-matrix/eoc-* committed as invalid WebAssembly. Rebuilt all
affected engines with the corrected script. Added an early-message
buffer to faust-worklet-processor.js so setParam calls arriving before
wasm instantiation are queued rather than dropped (needed when the user
configures modular state before clicking Start Audio).
2026-04-11 07:34:41 +02:00
..
additive-engine.js feat(playground): Additive + FM engine integration, live engine switching (meml-mdy, meml-355) 2026-04-03 17:56:35 +01:00
additive-presets.js feat(playground): per-engine param presets for additive + FM (meml-ax4) 2026-04-03 18:26:12 +01:00
arpeggiator-worker.js feat(playground): engine abstraction layer + C15 adapter (meml-byk) 2026-04-03 17:30:28 +01:00
arpeggiator.js feat(playground): engine abstraction layer + C15 adapter (meml-byk) 2026-04-03 17:30:28 +01:00
c15-adapter.js feat(playground): EOC chain wired into audio graph, bypass mode manual sliders (meml-xp3) 2026-04-03 17:49:14 +01:00
c15-bridge.js feat(playground): EOC chain wired into audio graph, bypass mode manual sliders (meml-xp3) 2026-04-03 17:49:14 +01:00
engine-interface.js feat(playground): Faust WASM build pipeline + param auto-discovery (meml-5s3) 2026-04-03 17:30:23 +01:00
faust-engine-base.js fix(playground): FaustEngineBase creates AudioContext if none passed; add stop()/start() methods 2026-04-03 19:08:52 +01:00
faust-param-meta.js feat(tests): add 24 Playwright e2e tests for engine switching + fix hidden param filtering 2026-04-03 19:28:23 +01:00
fm-engine.js feat(playground): Additive + FM engine integration, live engine switching (meml-mdy, meml-355) 2026-04-03 17:56:35 +01:00
fm-presets.js feat(playground): per-engine param presets for additive + FM (meml-ax4) 2026-04-03 18:26:12 +01:00
midi-input.js fix(playground): decouple MIDIInput from C15Bridge — use SynthEngine interface (meml-se4) 2026-04-03 18:20:29 +01:00
modular-engine.js feat(playground): add Modular audio mode with shared mod pool 2026-04-11 07:34:41 +02:00
modular-presets.js feat(playground): add Modular audio mode with shared mod pool 2026-04-11 07:34:41 +02:00
osc-output.js feat(playground): add OSC output bridge for external synth control 2026-03-25 11:55:58 +02:00
param-map.js feat(playground): add synth parameter tooltips, group drawer with per-param curve/mute controls 2026-03-22 21:57:21 +02:00
presets.js feat(playground): add tiered synth parameter preset system 2026-03-23 00:50:56 +02:00