I’d like to cross-fade between one set of 8 channels and another set of 8 channels.
Since XFader2 seems to be specifically for sets of stereo pairs, I have been trying to find another way around this problem.
I tried to make an abstraction that would take any size input and cross-fade with the alternating channels.
This didn’t quite work as expected, so I thought I’d share it here and see if anyone had any pointers.
Thanks!
VariFade{
*ar {
arg signal, pan, level;
var out, newSig;
signal = signal.collect{|x, index|
index = index+1;
if (index%2==0,
{pan = pan;},
{pan = 0 - pan});
x = x*pan;
};
out = signal;
^out;
}
}
If you’re synthesizing the channels yourself, there’s no need to make them into a flat array. SC supports nested arrays, and XFade2 can multichannel expand:
Just one other question about clump, flop, unlace, etc…
Is there a simple command to expand an array as such?
[0, 1, 2] → [0, 0, 0], [1, 1, 1], [2, 2, 2]