playN, Ndef, multiple channels

Hi all -
I’m currently trying to take 8 channels from one Ndef and input them to another Ndef. Here is the simplest I could write the code:

~oct =, 8);
~node1 = Ndef(\k, {!8, 0, 0.1)}).play;
~node2 = Ndef(\l, {, 8)}).play;

As you will see, the audio only comes out of a single channel on the second node…
Can anyone here help me understand what I’m doing wrong?
Thank you, in advance

you can reference one Ndef from another and get the output like this

~node2 = Ndef(\l, { Ndef(\k).ar }).play;

In this particular case, I need to pass some things through a bus for the sake of consistency with a larger amount of code. I know it’s not the standard practice, but is it completely off-the-table?

Visiting the playN helpfile, I tried to add:

p = ProxySpace.push;

But this created even more erratic results.

Having said that, using .play, as opposed to playN seems to work. I’m assuming this is because the channels are non-adjacent.

When using NodeProxies, you don’t have to use Busses for routing anymore :slight_smile:
There are two popular ways (of many!) for using NodeProxies, I demonstrated them below

// you enter a ProxySpace with:
// every ~ variable is now a NodeProxy
p = ProxySpace(s).push

~node1 = {!8, mul: 0.1)}
~node2 = {[(0..3)] *} // channels 0 through 3
~node2 = {[[0,1]] *} // channels 1 and 2
~node2 = {[[1,6]] *} // channels 1 and 2

// and you leave it with:

// When using Ndefs, the Ndef class holds a proxyspace where the NodeProxies are stored:
Ndef(\node1, {!8, mul: 0.1)})
Ndef(\node2, {Ndef(\node1).ar[(0..3)] *}) // 0 through 3
Ndef(\node2, {Ndef(\node1).ar[[1,2]] *})  // 1 and 2
Ndef(\node2, {Ndef(\node1).ar[[3,4,7]] *}) // 3,4,7

Hope this helps!

1 Like