Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: One-time Events



Coolidge Corner wrote:
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.


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)

-Anatol
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/email@hidden

This email sent to email@hidden
References: 
 >One-time Events (From: Coolidge Corner <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.