memlnaut-nisps/playground/js
monkey-w1n5t0n b290144670 fix(modular): base_amp floor + opt-in matrix to keep voice audible
Modular sub-engines computed amp_val as a pure function of mod_amp (the
matrix d08_amp destination sum), so once the MLP drove the matrix cells
every joystick movement had a chance to silence the voice: matrix cells
have signed range [-1, 1], sigmoid outputs near 0.5 denormalise to 0,
and the amp gate collapsed. Additive survived in scattered regions
because it only has one kill-switch (d08_amp); subtractive and fm were
almost always dead because they also have d05_cutoff and d01_op1_level.

Two changes:

1. DSP: each sub-engine gets a base_amp hslider (default 1.0) so
   amp_val = clamp(base_amp + mod_amp) * level * vel_gain. At the
   default the voice is always fully open and d08_amp modulation is
   purely additive decoration; drop base_amp to 0 for classic
   ADSR-gated VCA behaviour.

2. ModularEngine._rebuildParamMeta: restore the _exposedMatrixCells
   gate (default empty). paramCount drops from 512 to 32 (4 ADSR * 4
   + 8 LFO * 2); matrix cells are opt-in via setExposeMatrixCell.
   _applyDefaultPatch no longer writes s00_d08_amp since base_amp
   keeps the voice audible without routing.

Tests updated for the new 32-param baseline; matrix-cell persistence
test now calls setExposeMatrixCell(1, 5, true) before asserting the
cell lands in paramMeta. Drive-by: engine-switching test bumped from
3 to 4 engine cards (stale since the modular engine was added).
2026-04-11 09:27:19 +02:00
..
audio feat(audio-canvas): per-file loop count, beat-synced lengths, param range groups, pitch lock 2026-04-03 20:36:24 +01:00
eoc Merge EOC Delay + Saturation + Master Bus modules (meml-2sl, meml-2zm) 2026-04-03 18:22:00 +01:00
midi feat(playground): engine-aware heatmap + MIDI CC storage on engine switch (meml-qaa) 2026-04-03 17:55:39 +01:00
nisps feat(playground/nisps): warm-start weight transfer on MLP resize (meml-8jc) 2026-04-03 17:27:54 +01:00
shapeseq test(shapeseq): add test runner + smoke tests 2026-04-07 00:03:29 +01:00
synth fix(modular): base_amp floor + opt-in matrix to keep voice audible 2026-04-11 09:27:19 +02:00
ui fix(modular): restore matrix in paramMeta + bypass MLP when untrained 2026-04-11 08:50:59 +02:00
a-app.js fix(modular): base_amp floor + opt-in matrix to keep voice audible 2026-04-11 09:27:19 +02:00
app.js fix(playground): prevent 1/2 keys being swallowed by focused sliders 2026-03-22 11:52:30 +02:00
b-app.js feat(playground): expand gamepad support with face buttons and Steam Deck fixes 2026-03-22 22:40:15 +02:00
c-app.js feat(playground): expand gamepad support with face buttons and Steam Deck fixes 2026-03-22 22:40:15 +02:00
event-bus.js refactor(event-bus): extract to shared module 2026-04-06 23:18:47 +01:00