Input 1: Pulse boolean value Input 2: Pulse boolean valueOutput 1: When Input 1 is True, Lock Output value to True until interrupted at Input 2 When Input 2 is True, Lock Output value to False until interrupted at Input 1
The great part about problem statements like this is that they leave out details like "What's the initial condition" and "what happens if both inputs are active simultaneously?" ;)
I've made the following assumptions about the above: initially, output is false. When both inputs are True at the same time, the output is also false.
var result = new Object();
function (__boolean output) main (__boolean input[2])
{
if(input[0])
result.output = true;
if(input[1])
result.output = false;
return result;
}
This will only evaluate if an input changes, otherwise it incurs no
cost (other than standard QC graph traversal costs).
I did find the signal patch in Patch Creator Palette by chance and it has a "When [x] changes" option but I don't know who owns it and I want to use this gate as part of a detection macro that detects changes in Virtual Objects not just numbers. Also would still need to switch between two watched values and Signal patch doesn't do that on its own – back to sq. one.
Signal is a built-in (but private) patch.
On top of that if anybody has an object (num, str, bool, QCstruct, color) comparison patch/marco/plugin that can compare any two instances of same object over a short elapsed time (0.1 sec say) for any change, that would answer my problem perfectly.
Can you elaborate a bit more on this? sounds like the Queue + some custom stuff could do it, but there aren't many good time-based patches in QC (in 0.1 seconds, you could get 0 frames rendered for slow compositions, or hundreds of frames for fast compositions/ hardware -- queues will do very different things in these cases).
-- [ christopher wright ] [email protected] http://kineme.net/
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Do not post admin requests to the list. They will be ignored. Quartzcomposer-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com This email sent to [email protected]

