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
I'm playing around with LFOs on __().sampler nodes within a __.loop. Since buffer nodes are recreated on each play modulators get disconnected after the first play, so you need something like this for it to work:
In /src/create.js I see the this.resetNode method is designed to reconnect the sampler after each play. I'm wondering if it's possible to reconnect modulators here as well.
I don't know of a way to query the audio context for modulator connections on the node being reset, so perhaps it would require adding a reference to the modulator node's uuid on the sampler node when __().lfo({}).connect('sampler') is called.
maybe something like this could be added to resetNode method:
for (var i = 0; i < this.connectedModulators.length; i++) {
this.connect(connectedModulators[i]);
}
I'm happy to try it out and make a PR, but I thought I'd run it by you to see if you have recommend other approaches or considerations.
The text was updated successfully, but these errors were encountered:
This is great, thanks! Your two line workaround would probably be fine for me, but if you'd like take this on, please do. We definitely reconnect modulators with other kinds of nodes so maybe have a look there for precedents. For example
Something is reconnecting the modulator here. I'm a little rusty on the source so you'll have to find it, but would love to see your PR if you decide to tackle it.
Ah ok so it actually works fine when everything is connected in the same chain like your example. That's probably a fine work around for my use case but I'll still take a look and see if I can come up with something to support reconnecting modulators that are not instantiated as direct sibling nodes
I'm playing around with LFOs on
__().sampler
nodes within a__.loop
. Since buffer nodes are recreated on each play modulators get disconnected after the first play, so you need something like this for it to work:I'm wondering what it would take to get a script to work such that the LFO continues to modulate the sampler speed on each loop. eg.
In
/src/create.js
I see thethis.resetNode
method is designed to reconnect the sampler after each play. I'm wondering if it's possible to reconnect modulators here as well.I don't know of a way to query the audio context for modulator connections on the node being reset, so perhaps it would require adding a reference to the modulator node's uuid on the sampler node when
__().lfo({}).connect('sampler')
is called.maybe something like this could be added to
resetNode
method:I'm happy to try it out and make a PR, but I thought I'd run it by you to see if you have recommend other approaches or considerations.
The text was updated successfully, but these errors were encountered: