Multichannel Expansion Confusion

Hi there -
I am still at a bit of a loss for the proper way of doing this - and I was hoping some of the experts here might be able to help.

I’d like to have a function that can scale for a range of possible output channels.

The most simple version looks like the following.

The issue is that the instances of the control names don’t seem to be controlling independent channels of delay feedback. I am definitely misunderstanding something here and I hope it is transparent to a more seasoned user. Thank you!

~chans = 2;	

~rangeCon = {
		|name, default=0, defaultLow=0, defaultHigh=1|
		var control = [];
		Array.fill(~chans, {|x|
			control = control.add((name++x)});

~oneDelay = {{|sig|
	var time, panPos, local, feedback, newSig;
	time = ~rangeCon.(\time, 0.1, 0, 10);
	feedback = ~rangeCon.(\feedback, 0.2, 0, 0.999);
	local =;
	local = local+sig;
	newSig =  local.collect{|a, index|
		a =, 10, time[index])*feedback[index];

~a = NodeProxy(s, \audio, ~chans).play;
~a[0] = {!~chans)*};
~a[1] = \filter-> ~oneDelay.();

Array.fill constructs the array for you, so the .add is not needed. It would be needed if you were writing

So you’re ending up with an array of arrays.


~rangeCon = {
		|name, default=0, defaultLow=0, defaultHigh=1|
		Array.fill(~chans, {|x|


1 Like