Tutorials/JITLib | JITLib > Tutorials


the lazy proxy

The class NodeProxy (and BusPlug) uses a lazy evaluation scheme to derive its appropriate rate and numChannels from the first meaningful input that is assigned to it. see NodeProxy and ProxySpace helpfiles for basic info. So as long as the source is not set, the proxy is neutral :

as soon as the first time the source is set, it derives its bus arguments from that input

in order to reset these properties, clear is used:

for a quick initialisation, also defineBus can be used:

the properties are also set when some other proxy reads from it:

if no number of channels is passed in, the default value is used:

the default can be set in the class NodeProxy:

also if a proxy is used as a map source, control rate is assumed:

when unary or binary operations are performed, the highest rate / numChannels is used to initialize all uninitialized proxies:

if a rate-1 proxy is used as rate-2 input, the rate is converted and the channels are expanded in the usual multichannel expansion pattern:

an offset can be passed in as second argument to ar/kr