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).
1 line
No EOL
7.3 KiB
JSON
1 line
No EOL
7.3 KiB
JSON
{"name": "eoc-reverb","filename": "eoc-reverb.dsp","version": "2.79.3","compile_options": "-lang wasm -ct 1 -cn eoc_reverb -es 1 -mcd 16 -mdd 1024 -mdy 33 -single -ftz 0","library_list": ["/nix/store/yjqpc2a6b2m08zwwrgsdlqsi40m5wnpp-faust-2.79.3/share/faust/stdfaust.lib","/nix/store/yjqpc2a6b2m08zwwrgsdlqsi40m5wnpp-faust-2.79.3/share/faust/maths.lib","/nix/store/yjqpc2a6b2m08zwwrgsdlqsi40m5wnpp-faust-2.79.3/share/faust/platform.lib","/nix/store/yjqpc2a6b2m08zwwrgsdlqsi40m5wnpp-faust-2.79.3/share/faust/reverbs.lib","/nix/store/yjqpc2a6b2m08zwwrgsdlqsi40m5wnpp-faust-2.79.3/share/faust/delays.lib","/nix/store/yjqpc2a6b2m08zwwrgsdlqsi40m5wnpp-faust-2.79.3/share/faust/basics.lib","/nix/store/yjqpc2a6b2m08zwwrgsdlqsi40m5wnpp-faust-2.79.3/share/faust/signals.lib","/nix/store/yjqpc2a6b2m08zwwrgsdlqsi40m5wnpp-faust-2.79.3/share/faust/filters.lib","/nix/store/yjqpc2a6b2m08zwwrgsdlqsi40m5wnpp-faust-2.79.3/share/faust/routes.lib"],"include_pathnames": ["/nix/store/yjqpc2a6b2m08zwwrgsdlqsi40m5wnpp-faust-2.79.3/share/faust","/usr/local/share/faust","/usr/share/faust",".","/home/w1n5t0n/src/MEMLNaut-NISPS/playground/faust"],"size": 2048504,"code": "Ly8gZW9jLXJldmVyYi5kc3Ag4oCUIFN0ZXJlbyByZXZlcmIgZm9yIE1FTUxOYXV0IEVPQyBjaGFpbgovLwovLyA5IHBhcmFtczogcHJlZGVsYXksIHNpemUsIGRpZmZ1c2lvbiwgaGlfZGFtcCwgbG9fZGFtcCwgZGVjYXksIG1peCwgd2lkdGgsIG1vZF9yYXRlCi8vCi8vIFVzZXMgcmUueml0YV9yZXYxX3N0ZXJlbyBmb3IgdGhlIGNvcmUgcmV2ZXJiIGFsZ29yaXRobS4KLy8KLy8gQ29tcGlsZToKLy8gICBmYXVzdCAtbGFuZyB3YXNtIC1jbiBlb2NfcmV2ZXJiIC1qc29uIGVvYy1yZXZlcmIuZHNwIC1vIGVvYy1yZXZlcmIud2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iAoMS4wIC0gbWl4KSArIHdldEwoaW5MLCBpblIpICogbWl4LAogICAgaW5SICogKDEuMCAtIG1peCkgKyB3ZXRSKGluTCwgaW5SKSAqIG1peDsK","inputs": 2,"outputs": 2,"meta": [ { "basics.lib/name": "Faust Basic Element Library" },{ "basics.lib/version": "1.21.0" },{ "compile_options": "-lang wasm -ct 1 -cn eoc_reverb -es 1 -mcd 16 -mdd 1024 -mdy 33 -single -ftz 0" },{ "delays.lib/name": "Faust Delay Library" },{ "delays.lib/version": "1.1.0" },{ "filename": "eoc-reverb.dsp" },{ "filters.lib/allpass_comb:author": "Julius O. Smith III" },{ "filters.lib/allpass_comb:copyright": "Copyright (C) 2003-2019 by Julius O. Smith III <jos@ccrma.stanford.edu>" },{ "filters.lib/allpass_comb:license": "MIT-style STK-4.3 license" },{ "filters.lib/lowpass0_highpass1": "MIT-style STK-4.3 license" },{ "filters.lib/lowpass0_highpass1:author": "Julius O. Smith III" },{ "filters.lib/lowpass:author": "Julius O. Smith III" },{ "filters.lib/lowpass:copyright": "Copyright (C) 2003-2019 by Julius O. Smith III <jos@ccrma.stanford.edu>" },{ "filters.lib/lowpass:license": "MIT-style STK-4.3 license" },{ "filters.lib/name": "Faust Filters Library" },{ "filters.lib/tf1:author": "Julius O. Smith III" },{ "filters.lib/tf1:copyright": "Copyright (C) 2003-2019 by Julius O. Smith III <jos@ccrma.stanford.edu>" },{ "filters.lib/tf1:license": "MIT-style STK-4.3 license" },{ "filters.lib/tf1s:author": "Julius O. Smith III" },{ "filters.lib/tf1s:copyright": "Copyright (C) 2003-2019 by Julius O. Smith III <jos@ccrma.stanford.edu>" },{ "filters.lib/tf1s:license": "MIT-style STK-4.3 license" },{ "filters.lib/version": "1.7.1" },{ "maths.lib/author": "GRAME" },{ "maths.lib/copyright": "GRAME" },{ "maths.lib/license": "LGPL with exception" },{ "maths.lib/name": "Faust Math Library" },{ "maths.lib/version": "2.8.1" },{ "name": "eoc-reverb" },{ "platform.lib/name": "Generic Platform Library" },{ "platform.lib/version": "1.3.0" },{ "reverbs.lib/name": "Faust Reverb Library" },{ "reverbs.lib/version": "1.4.0" },{ "routes.lib/hadamard:author": "Remy Muller, revised by Romain Michon" },{ "routes.lib/name": "Faust Signal Routing Library" },{ "routes.lib/version": "1.2.0" },{ "signals.lib/name": "Faust Signal Routing Library" },{ "signals.lib/version": "1.6.0" }],"ui": [ {"type": "vgroup","label": "eoc-reverb","items": [ {"type": "hslider","label": "decay","varname": "fHslider0","shortname": "decay","address": "/eoc-reverb/decay","index": 0,"meta": [{ "unit": "s" }],"init": 3,"min": 0.1,"max": 20,"step": 0.1},{"type": "hslider","label": "diffusion","varname": "fHslider4","shortname": "diffusion","address": "/eoc-reverb/diffusion","index": 262212,"init": 0.7,"min": 0,"max": 1,"step": 0.001},{"type": "hslider","label": "hi_damp","varname": "fHslider1","shortname": "hi_damp","address": "/eoc-reverb/hi_damp","index": 20,"init": 0.5,"min": 0,"max": 1,"step": 0.001},{"type": "hslider","label": "lo_damp","varname": "fHslider2","shortname": "lo_damp","address": "/eoc-reverb/lo_damp","index": 28,"init": 0,"min": 0,"max": 1,"step": 0.001},{"type": "hslider","label": "mix","varname": "fHslider7","shortname": "mix","address": "/eoc-reverb/mix","index": 2048500,"init": 0.2,"min": 0,"max": 1,"step": 0.001},{"type": "hslider","label": "predelay","varname": "fHslider5","shortname": "predelay","address": "/eoc-reverb/predelay","index": 393288,"meta": [{ "unit": "ms" }],"init": 0,"min": 0,"max": 100,"step": 0.5},{"type": "hslider","label": "size","varname": "fHslider3","shortname": "size","address": "/eoc-reverb/size","index": 44,"init": 0.5,"min": 0,"max": 1,"step": 0.001},{"type": "hslider","label": "width","varname": "fHslider6","shortname": "width","address": "/eoc-reverb/width","index": 2048496,"init": 0.8,"min": 0,"max": 1,"step": 0.001}]}]} |