I wanted to expand on an old idea, discussed a bit in this previous thread. The updated, simplified code is re-posted here below.
The part beginning with new.do{|o| is where I am running into trouble. I would like to take each signal and have it pan across all 8 channels. I believe because each instance in do is a different channel, I am loading at an offset into PanX.
Would someone here help correct my error? Many thanks, in advance.
{
var time1, fb1, local, new, sig;
sig = Decay.ar(Impulse.ar(0), 2)*SinOsc.ar(400);
time1 = Array.fill(8, {1.0.rand});
local = LocalIn.ar(8);
local = local+(sig);
new = local.collect{|a, index| a = DelayN.ar(a, 10, time1[index])};
LocalOut.ar(LeakDC.ar(new*(0.999)));
new.do{|o|
PanX.ar(8, o, LFDNoise1.ar(0.001));
};
}.play;
Another way of thinking about it might be something like the below…
The issue here would be that I am now passing an 8-channel signal into an 8-channel panner. I’m sure I’m looking for something quite simple, but I can’t quite find it.
{
var time1, fb1, local, new, sig, f;
sig = Array.fill(8, {Decay.ar(Impulse.ar(0), 2)*SinOsc.ar(1200.0.rand)});
time1 = Array.fill(8, {1.0.rand});
local = LocalIn.ar(8);
local = local+sig;
new = local.collect{|a, index| a = DelayN.ar(a, 10, time1[index])};
LocalOut.ar(LeakDC.ar(new*(0.999)));
f = PanX.ar(8, new, LFDNoise1.ar(0.1));
}.play;
s.meter;
So basically, you have an 8 channel signal which you want to pan in a circle keeping each channel equally spaced?
If that’s right, I suggest PanAz instead of PanX (it seamlessly loops back on itself)
I’d think to do it like this:
s.options.numOutputBusChannels_(8);
s.options.numWireBufs = 128; // this synth runs out of wire bufs at the default 64
s.reboot;
s.meter;
(
// # of channels, this is not modulateable,
// if you want e.g. a 4 channel version it needs to be a new synthdef
var n = 8;
{
// PanAz takes a position from 0 to 2
// (or from -1 to 1, like any of the LFNoise)
var pos = MouseX.kr(0, 2) - 0.25;
// dummy signals, with varying amplitude so you can see in the meter also
var sigs = n.collect { |i| SinOsc.ar((i + 1) * 100) * 0.5/(i + 1) };
// for each signal, pan it to the appropriate spot in the field
// then sum each 8-channel panned result
sigs.collect { |sig, i| PanAz.ar(n, sig, pos + (2 * i/n)) }.sum
}.play;
)
Well, the idea was that each channel has its own delay/feedback - and then to have it so that each channel could pan across all 8 channels, on its own random path.
For some reason, my code is keeping each signal in its own original channel.
EDIT - Sorry - I thought this would work - but it is still acting a little unexpectedly…It seems like the single channels are disappearing at certain points?
{
var time1, fb1, local, new, sig, f;
sig = Array.fill(8, {Decay.ar(Impulse.ar(0), 2)*SinOsc.ar(1200.0.rand)});
time1 = Array.fill(8, {1.0.rand});
local = LocalIn.ar(8);
local = local+sig;
new = local.collect{|a, index| a = DelayN.ar(a, 10, time1[index])};
LocalOut.ar(LeakDC.ar(new*(0.999)));
f = new.collect{|a|PanAz.ar(8, a, LFDNoise1.ar(0.1))}.sum;
}.play;
If I reduce the array sizes to 1, I can’t reproduce that – looking at an 8-channel scope, the signal is always clearly present. Then, re-expanding to multiple channels, I still don’t see dropouts.
How are you measuring that the channels disappear?