Achim's suggestion is probably better because it will trigger for only one 
frame, which sound like what you're after. 

Another option would be to connect the output of a random patch to a queue. You 
can then use a structure index patch to send a single value to the sprite, from 
the result of the queue. By stepping through various indices one can trigger 
the random values that have been stored in the queue.

On Oct 22, 2011, at 3:21 PM, Achim Breidenbach <[email protected]> wrote:

> Hi Ben,
> 
> a slightly different method than George' solution would be the following:
> 
> You connect the Random patch to the value input of the Sample and Hold patch. 
> You connect you LFO to a Pulse patch and result of that pulse patch to the 
> "Sampling" input to the Sampler. The output of the Sampler goes to your 
> sprite width. The pulse patch generates a "1" for exactly one frame and would 
> trigger the Sample and Hold patch just once. find a sample composition 
> attached.
> 
> Is this what you are looking for?
> 
> best,
> 
> Achim Breidenbach
> Boinx Software
> 
> <random width.qtz>
> 
> 
> On 22.10.2011, at 18:50, George Toledo wrote:
> 
>> From the scenario you describe, it sounds like the easiest solution would be 
>> to connect the output of the random patch to the input of a sample and hold 
>> patch. The lfo, set to square wave, could have it's result connected to the 
>> input on the sample and hold patch that controls whether or not it's 
>> currently sampling. You may need to adjust the offset value on the lfo, I 
>> can't remember. That sample and hold result value would then be connected to 
>> the sprite.
>> 
>> You can also use multiplexers to divert the input that's currently chosen. 
>> So, you could also create a number multiplexer, and toggle between a default 
>> value and a value created by a random patch, by manipulating the index value.
>> 
>> 
>> 
>> On Oct 22, 2011, at 11:11 AM, Ben <[email protected]> wrote:
>> 
>>> 
>>> 
>>> Lets say I have an LFO which oscillates between 0 and 1.   When the LFO 
>>> reaches 1, I want to trigger a Random number which controls the width of a 
>>> sprite.
>>> Using a Conditional I can effectively say "if firstValue isEqual to 1" 
>>> which is great, but the result is a boolean, how do I use a boolean to 
>>> generate a random number(sprite width).
>>> 
>>> There is no boolean input on a Random patch. So how do I use a boolean to 
>>> trigger a random number?
>>> 
>>> 
>>> Thanks _______________________________________________
>>> 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/gtoledo3%40gmail.com
>>> 
>>> This email sent to [email protected]
>> _______________________________________________
>> 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/achim%40boinx.com
>> 
>> This email sent to [email protected]
> 
 _______________________________________________
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]

Reply via email to