For example, striking a key causes ONE random number to be sent to
an input of a particular patch.
But Random seems to output a continuous stream of numbers. How to
hold its value after the first number is output?
I'd use a javascript patch like this:
if(inputs[0]) {outputs[0] = Math.random()};
if you connect your keyboard patch (and nothing else) to that
node's input, it will only change when you hit the corresponding key.
Another approach would be to connect the keyboard patch to a counter
which is connected to the patch time of a random patch whose
variability is set to 0.0. In this way you are offsetting the sample
position in the random patch and thus producing a random number per
keystroke press.
Even better would be if the event that triggered this could be the
start of the composition running. Is there some kind of "start"
event I can make use of?
check if the patch time equals zero (conditional + patch time)
Convert your composition to a macro and externalize its timebase.
Then you can start/stop the macro with a stop watch patch.
.xX
-Anatol
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list (Quartzcomposer-
email@hidden)
Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quartzcomposer-dev/asabatelli
%40apple.com