Ndef Bus question

I’m a rookie with Ndef- and Proxystuff and don’t get several things.

If I have an FX-Bus with Input “In.ar(80,2)” and Output “Out.ar(0,sig)”.

A Synthdef sends audio to Bus 80 with “Out.ar(80,2)”. The wet audio comes back on Bus 0 and plays through the audiointerface. That’s how it should be.

A Ndef sends audio to Bus 80 with “Ndef(\x).play(80)” . The Server Meter on channel 80 modulates but nothing reaches the FX-Bus, neither comes back to Bus 0, nor plays through the audiointerface.

The Ndef works when playing direct to the interface.

It can’t be the order, I launch the FX-Bus before the Ndef. Is the bussystem in Proxymode different from synthdef-node? I’m also a bit confused with In, InBus and BusPlug.

cheers, and thanks for any hint, Benu

It is the order :boom:
Let’s do this quick test and check the Server’s Node Tree:

// a very minimal fx Synth
SynthDef(\fx){|in=80,out=0| Out.ar(out,In.ar(in))}.play;
// all-time favorite source Ndef
Ndef(\src){SinOsc.ar}.play(80);

/* (ctrl+t : post the node tree)
NODE TREE Group 0
   1006 localhostInputLevels
   1 group
      1001 fx
      1002 group
         1003 temp__0src-1897321440_0
      1004 group
         1005 system_link_audio_1
   1007 localhostOutputLevels
*/

group 1002 contains Ndef(\src)'s node, group 1004 contains Ndef(\src)'s monitor node, which takes sound from Ndef(\src) “private bus” (every NodeProxy is “encapsulated” in its own private bus) and plays it to the bus you defined with .play, 80 in this case.
They are both added to the tail of the default group! That’s the opposite of what happens with Synths, but \addToTail is the default addAction for NodeProxies and Ndefs.

I don’t really know the reason for this. My interpretation is that since Ndefs use InFeedback to “freely” capture sound from each other, putting them to tail by default maximizes their capture abilities regarding normal Synths. But again, I don’t know :slight_smile:

Thanks elgiano,

made it happen.

being a dummy I don’t know how post code to show in its own window?
"
// first the Ndef
Ndef(\src){SinOsc.ar/100}.play(80);

// then the SynthDef whith ‘addToTail’ makes it work
SynthDef(\fx){|in=80,out=0| Out.ar(out,In.ar(in))}.play(nil,nil,‘addToTail’);

"

You can use three backticks ``` before and after your code to format code in the forum

1 Like

Was a bad idea before, each Ndef launched after the SynthDef is lost. Better to launch first the SyntDef then launch every new Ndef with ‘addToHead’

// first the SynthDef as is (no change in addAction)
SynthDef(\fx){|in=10,out=0| Out.ar(out,In.ar(in))}.play;


// then each new Ndef with 'addToHead'
Ndef(\src){SinOsc.ar/100}.play(10,1,nil,nil,nil,nil,'addToHead');
1 Like