Fixes for zzfx and soundfonts

This commit is contained in:
Aria 2025-12-29 13:28:26 -06:00
parent b6264a1513
commit 0edede106a
2 changed files with 6 additions and 2 deletions

View file

@ -19,7 +19,11 @@ const getNodeParam = (node, name) => {
} }
} }
// Built-in node case // Built-in node case
const p = node?.[name]; let p = node?.[name];
if (p === undefined && name === 'frequency') {
// Fallbacks for source nodes without 'frequency' params (e.g. soundfonts)
p = node?.['detune'] ?? node?.['playbackRate'];
}
if (p instanceof AudioParam) { if (p instanceof AudioParam) {
return p; return p;
} }

View file

@ -75,7 +75,6 @@ export const getZZFX = (value, t) => {
source.start(t); source.start(t);
return { return {
node: source, node: source,
nodes: { source: [source] },
}; };
}; };
@ -91,6 +90,7 @@ export function registerZZFXSounds() {
}); });
return { return {
node: o, node: o,
nodes: { source: [o] },
stop: () => {}, stop: () => {},
}; };
}, },