User Actor On/Off : sends an enterscene trigger

Posted by DusX on 6 June 2013 | Comments

Tags: , ,

 I spend a lot of my time creating User Actors in Isadora. User Actors are possibly the most powerful internal building block that Isadora offers. They allow you to create a library or code/patch objects, that you can save externally, but the most powerful feature is probably that fact that multiple instances of a User Actor can be updated by simply updating one in your patch and allowing Isadora to update the rest for you when you close the User Actor.
My favorite way to optimize a large patch it to use a User Actor specific actor, 'User Actor On/Off', this actor works like bypass on most every other actor, in that it will allow you to shut off the processing of a User Actor, but unlike bypass in that inputs do not make it thru to the outputs. This means when you turn off a User Actor with the 'User Actor On/Off' actor that it is dead, and a dead end to all inputs.
This is an amazing way to save CPU cycles when you are switching between features (used HEAVILY in Syst3m to allow video FX and ALL other features).

When you turn on a User Actor via the 'User Actor On/Off' actor it will receive an enter-scene trigger. Let me repeat: when you turn on a User Actor via the 'User Actor On/Off' actor it will receive an enter-scene trigger.
This means that User Actors can and will receive enter-scene triggers more than once if turned on and off multiple times in once scene. Not fully intuitive when you first start with User Actors, once learned this allows for some powerful initialization of Objects (user actors).

Screen Capture of user actor

The Screen capture here is the simplest proof that I could think up tonight. This is the internal view of the User Actor, and you can see that very little is happening here. We have the ability to turn On and Off the user actor via the 'User Actor On/Off' actor, as well as; an enter scene trigger that generates a random number as the user actors only output.
If you close this user actor (and I hope you just made a version to test), ensure Isadora is running, and toggle the 'enable' input on and off you will see that each time you turn it on your output is a new random number. PROOF, an enter scene trigger is received each time the actor is enabled.

It is very important to understand that also any inputs set to 'init' to a value will also re-initialize each time the enable is toggled. Knowing this ahead of time may save you hours in debugging, since errors related to these setup values often only exist for a split moment before new values override them, making them difficult to pin point.
In a follow up article I will discuss working with these multiple enter-scene triggers, and methods of creating a singular enter-scene trigger for an User actor while treating the others as Enable actor triggers.
A last note about the 'User Actor On/Off' actor, DO NOT try to initialize the value of 'enable' on an actor that uses the 'User Actor On/Off'. It will not work as expected, and will likely freeze your patch or worse.