Finally, I’m wondering if a RNBO object can be safely created on the realtime thread. I’m pretty sure that some objects require dynamic memory allocation in the setup function.
Now, in most audio programs (Max/MSP, Pd, all DAWS, etc.) ugens/plugins are never initialized in a realtime context, so you don’t have to worry about the setup function. However, in SC, UGens are created on the audio thread and all initialization must be realtime safe. There are ways to defer UGen initialization to the NRT thread (like I do in VSTPlugin
), but it’s a bit complex.
Long story short: the RNBO SC example is bogus