You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior
The output should either emit sound, or should report warnings in the console if this operation isn't supported.
What I've tried
I've tried using fan, as well as specifying 0, 0 in calls to connect (e.g. this._reverbNode.connect(this._wetMixNode, 0, 0);), but to no avail. When disconnecting any node in the loop, the chain emits sound again, so I'm guessing this is an issue specific to feedback loops.
The text was updated successfully, but these errors were encountered:
Hi @ascpixi, I believe what you ran into is that feedback loops without a delay get muted by design. It would otherwise be a bit like an infinite loop in programming.
It's defined by the Web Audio API specification:
If nodes contains cycles, mute all the AudioNodes that are part of this cycle, and remove them from nodes.
Ah, that's a shame. I'm guessing the only way around this is to implement a set number of iterations by duplicating the nodes. To be fair - I was also led astray by the FeedbackEffect class, haha...
I do think there should be some kind of warning for this case, though. A lot of audio effects are based on feedback loops (the one in the example is the Eno/Lanois shimmer reverb), so I'm guessing other programmers could easily fall into the same exact trap.
Describe the bug
When forming a loop via audio effects, the result will always be silent, no matter the node. For example, this graph:
...will always produce silence, and only silence.
To Reproduce
codesandbox.io sandbox: https://codesandbox.io/p/sandbox/tone-js-feedback-loop-issue-9xq3gk
Pure HTML/JS version:
Expected behavior
The output should either emit sound, or should report warnings in the console if this operation isn't supported.
What I've tried
I've tried using
fan
, as well as specifying0, 0
in calls toconnect
(e.g.this._reverbNode.connect(this._wetMixNode, 0, 0);
), but to no avail. When disconnecting any node in the loop, the chain emits sound again, so I'm guessing this is an issue specific to feedback loops.The text was updated successfully, but these errors were encountered: