Skip to content

ossia pd max object registration algorithm

Antoine Villeret edited this page Oct 25, 2020 · 3 revisions

When adding an OSSIA object, the object will look for a parent to register against. With a relative address, ossia.parameter looks for ossia.model or ossia.device, ossia.view looks for ossia.client or ossia.device, etc. When one is found, it checks if that object have been registered, if yes then it takes its node(s) (could have several in case of pattern matching) and register against. If parent has not been registered yet, the object abord self-registration and wait for the parent to register it. With absolute address, object only search for ossia.device or ossia.client object, if relevant device is found but no node yet, object registers to device on_node_created signal and will register once a relevant node is created. With global address, object will ask ossia-max instance for devices and clients lists and iterate through them until it find a match.

Once an object is registered, it triggers its children registration. That's all.

Max specific

To register an object we need to iterate over patcher hierarchy. Unfortunately in Mac it is not possible to query the patcher pointer of an object before the end of loadbang method. That why the object self registration is delayed by an amount of 1 tick.

Clone this wiki locally