I tracked this down to be because of the use of XOut in the filter pattern (we’d only want to crossfade between the two \filter instances, not the previous signal).
when replacing the filter with itself, i.e. repeatedly evaluating
Ndef(\a)[1] = \filterIn -> {|in| Silent.ar};
the original sound comes back in temporarily.
This is especially annoying, if the filter implements panning or (substantial) amplitude modulation in a bigger chain and I change one (unrelated) parameter via xset.
AFAICS, the difficulty here is that the stack that is writing to a single Bus.
The chain is (in this concrete case):
[0] // sound
v // 1 * [0]
[1] // XOUT(1) filter
v // 1 * [1]
bus
when replacing the filter, this happens (time stopped at fadeTime/2):
[0] // sound
v
[1] // XOUT(0.5) filter (old)
v /// here, we have: 0.5 * [0] + 0.5 * [1]
[1'] // XOUT(0.5) filter (new)
v /// here, we have: 0.25 * [0] + 0.25 * [1] + 0.5 * [1']
bus
which effectively means that we do not have any way to get to the original signal
We would like to have this, though:
[0] // sound
| \
| [1] // XOUT(0.5) filter (old)
| |
| v
| bus 1
\
[1'] // XOUT(0.5) filter (new)
|
v
bus 2
SUM (bus1, bus2)
Yes, I always thought I should never have allowed more than one object in a node proxy. It was a nice to have, and has found a lot of use. But eventually, it is a syntactic shortcut for something we perhaps should be doing with whole proxyspaces.
There could be a special object that carries this extra bus and is instantiated by an additional role.
I guess it’s always a question in cases like this, whether the object that is almost meeting the requirement should adapt to handle the new scenario, or whether the object that is almost meeting the requirement should be a component of a new superstructure designed for the new job. In SC-land, we often default to the position that objects should do more stuff; I’m not sure that’s always right.
Here, if effects processors need their own buses, that may be outside the scope of single-bus-range NodeProxies, so if it were my project, I might consider an object that could coordinate multiple NodeProxies rather than an extension to NodeProxy itself.