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: simple toggle on render




To continue this rather one-sided thread...

I did find a hack to do a per-evaluation toggle:

A Javascript block with:
"output[0] = !output[0];"
seems to work nicely.

Of course, you need to connect an input to something which will always be updating (e.g. a Patch Time block) in order to ensure that the Javascript block itself is evaluated.

I'm still curious to know if there's a better (or more general way) to do this sort of thing in QC.

Cheers,
Daniel

On 25/10/2005, at 8:01 PM, Daniel Heckenberg wrote:


Hi Shaun, list,

Thanks for the suggestion: Mod 2 is a nicer way to constrain the Counter's output but how to get the counter to advance each frame?

When I made the first post, I had assumed this was automatic but as soon as I looked carefully I realised that toggles on the inputs are counted... and this is obviously just what I'm trying to generate.

Thanks again,
Daniel

On 25/10/2005, at 5:06 PM, Shaun Wexler wrote:


On Oct 24, 2005, at 10:55 PM, Daniel Heckenberg wrote:



I'm just getting started with quartz composer and for my first trick, I thought I'd play with some flicker effects. In order to make this somewhat FPS independent I'm looking for a block or patch method to toggle a number (int or boolean) each time the view is rendered.

Suitable generators (e.g. LFO with square wave) seem to have periods in real time. An obvious fudge (using a 0 period or period less than the frame period) doesn't seem to give my intended effect... it correctly samples the specified waveform.

The other obvious approach -- using a Conditional or Logic block looped back on itself -- doesn't seem to be allowed as a valid patch. The same issue seems to preclude using a counter with reset caused by a chained conditional.

My first working attempt is a Counter followed by a Range and then taking the Rolled-Over Value.

Is there a better way? And more generally, is there a general buffer block to allow loops to be formed?



Boolean Toggle: Counter -> Math (Mod 2)

--
Shaun Wexler
MacFOH
http://www.macfoh.com




_______________________________________________
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/danielh% 40cse.unsw.edu.au


This email sent to email@hidden


_______________________________________________ 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: 
 >simple toggle on render (From: Daniel Heckenberg <email@hidden>)
 >Re: simple toggle on render (From: Shaun Wexler <email@hidden>)
 >Re: simple toggle on render (From: Daniel Heckenberg <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.