fix(modular): duplicate destNames declaration in modular-ui rebuildMatrixGrid
The matrix-seeding edit from the previous commit added a second `const destNames = engine.destNames || [];` inside rebuildMatrixGrid while the same name was already declared earlier in the function body. Chrome threw SyntaxError at parse time, which in turn prevented a-app.js from wiring window.__nisps at all, which is what made the earlier FaustWorkletProcessor error look like the root cause — it was just the next thing that broke once the parse error let partial modules load. Verified end-to-end in headless Chromium via Playwright: engine switches to modular, paramCount=32, audioCtx running, worklet node live, zero console errors. Also updates the Modular engine card description to reflect the new default (32 params = 4 ADSR × 4 + 8 LFO × 2, matrix cells opt-in).
This commit is contained in:
parent
fbeedba2f3
commit
575519df68
2 changed files with 3 additions and 4 deletions
|
|
@ -1351,8 +1351,8 @@ async function init() {
|
|||
{
|
||||
id: 'modular',
|
||||
displayName: 'Modular',
|
||||
paramCount: 512,
|
||||
description: 'Shared mod pool (ADSRs + LFOs) routed through a matrix into a swappable voice. Starts with a 3-osc subtractive sub-engine.',
|
||||
paramCount: 32,
|
||||
description: 'Shared mod pool (4 ADSRs + 8 LFOs) driving a swappable voice via a routing matrix. Starts with a 3-osc subtractive sub-engine.',
|
||||
},
|
||||
];
|
||||
const engineSwitcherEl = document.getElementById('synth-engine-switcher');
|
||||
|
|
|
|||
|
|
@ -347,8 +347,7 @@ export function initModularUI({ getEngine, onStateChange } = {}) {
|
|||
// Seed current values from the engine's _lastRawByLabel map (which
|
||||
// tracks every write via setParam / _setRawByLabel / default patch),
|
||||
// falling back to the walk-entry init value for cells the user has
|
||||
// never touched.
|
||||
const destNames = engine.destNames || [];
|
||||
// never touched. (destNames is already in scope from the early guard.)
|
||||
const lastRaw = engine._lastRawByLabel || new Map();
|
||||
for (let d = 0; d < destNames.length; d++) {
|
||||
const destName = destNames[d];
|
||||
|
|
|
|||
Loading…
Reference in a new issue