Fully working version

This commit is contained in:
Aria 2025-11-19 20:11:02 -06:00
parent c3ad0d1789
commit 3e118ce0a8

View file

@ -971,13 +971,14 @@ export const superdough = async (value, t, hapDuration, cps = 0.5, cycle = 0.5)
} }
if (value.send) { if (value.send) {
for (const p of value.send) { for (const p of value.send) {
const modNodes = idToNodes[p.id]; const modNodes = idToNodes[p.id].deref();
if (!modNodes) { if (!modNodes) {
logger( logger(
`[superdough] Could not connect to pattern ${p.id} -- make sure a pattern with this name exists. Available targets: ${Object.keys(idToNodes).join(', ')}`, `[superdough] Could not connect to pattern ${p.id} -- make sure a pattern with this name exists. Available targets: ${Object.keys(idToNodes).join(', ')}`,
); );
delete idToNodes[p.id];
} else { } else {
const modulator = connectSendModulator({ ...p, begin: t, end: endWithRelease }, post, nodes, chainID); const modulator = connectSendModulator({ ...p, begin: t, end: endWithRelease }, post, modNodes, chainID);
pendingConnections[p.id] ??= {}; pendingConnections[p.id] ??= {};
pendingConnections[p.id][chainID] = new WeakRef([modulator, p.target, endWithRelease]); pendingConnections[p.id][chainID] = new WeakRef([modulator, p.target, endWithRelease]);
} }