home/ atoms/ nn-tilde-void-lazy-init

nn~'s void/lazy mode lets you fix inlet/outlet count before attaching a model

Normally, nn~‘s inlet and outlet count is determined when a model is loaded — changing models would require deleting and recreating the object. The void special model argument enables lazy initialization: the object is created with a fixed number of inlets/outlets and no model attached. A model can then be loaded dynamically at any time with the load message without restructuring the patch. This is useful for performance patches that need to hot-swap models mid-set without rewiring. Available since v1.6.0.

Examples

Create nn~ void with 1 inlet and 2 outlets. Then at runtime, send load piano.ts to attach a model. Later send load strings.ts to swap — no patch rewiring needed.

Assessment

Describe a live performance scenario where void/lazy mode is necessary. What message do you send to load a model into a void nn~ object? What constraint must the new model satisfy relative to the patch wiring?

“Since v1.6.0, nn~ has a `void` mode, that allows to initialise it with a fixed number of inlets / outlets, and may be attached to a model afterwards. This can be done with the `void` special model, that enables this lazy initialisation.”
corpus · nn-nn-tilde-run-rave-neural-models-live-in-max-msp-and-pure · chunk 2