Ndef node proxy definition
superclass: NodeProxy
reference to a proxy, forms an alternative to ProxySpace.
All methods are inherited from NodeProxy
see also: ProxySpace
a general overview: JITLib
Ndef(key) returns the instance
Ndef(key, obj) stores the object and returns the instance, like Tdef and Pdef.
*new(key, object)
return a new node proxy and store it in a global ProxySpace under the key.
if there is already an Ndef there, replace its object with the new one.
The object can be any supported class, see NodeProxy help.
if key is an association, it is interpreted as key -> server name. (order changed in SC3.3)
*clear
clear all proxies
*at(server, key)
return an instance at that key for that server
defaultServer_(a server)
set the default server (default: Server.local)
// examples
Server.default.boot;
Ndef(\sound).play;
Ndef(\sound).fadeTime = 1;
Ndef(\sound, { SinOsc.ar([600, 635], 0, SinOsc.kr(2).max(0) * 0.2) });
Ndef(\sound, { SinOsc.ar([600, 635] * 3, 0, SinOsc.kr(2 * 3).max(0) * 0.2) });
Ndef(\sound, { SinOsc.ar([600, 635] * 2, 0, SinOsc.kr(2 * 3).max(0) * 0.2) });
Ndef(\sound, Pbind(\dur, 0.17, \freq, Pfunc({ rrand(300, 700) })) );
Ndef(\lfo, { LFNoise1.kr(3, 400, 800) });
Ndef(\sound).map(\freq, Ndef(\lfo));
Ndef(\sound, { arg freq; SinOsc.ar([600, 635] + freq, 0, SinOsc.kr(2 * 3).max(0) * 0.2) });
Ndef(\lfo, { LFNoise1.kr(300, 400, 800) });
Ndef.clear; //clear all
recursion:
Ndefs can be used recursively.
a structure like the following works:
Ndef(\sound, { SinOsc.ar([600, 635], Ndef(\sound).ar * 10, LFNoise1.kr(2).max(0) * 0.2) });
Ndef(\sound).play;
this is because there is a feedback delay (the server's block size), usually 64 samples,
so that calculation can reiterate over its own outputs. For single sample feedback,
see:
Document.open("Examples/demonstrations/single_sample_feedback.scd")