Thanks Christopher.I was particularly interested in loop mode, where I
didn't want to assume that the endpoints would be hit dead on."check last frame
time and current frame time, see if the interval contains the duration, and if
so, you just ended."Frame Number.qtz uses some JS to count frames. var _frame =
0function (__number frame) main (__boolean sampling, __boolean reset, __number
patchTime){ var result = new Object() if (sampling)
_frame++ if (reset) _frame = 0
result.frame = _frame return result}Can I check that a) this is the only way
to get the current frame number?b) efficiency is not adversely affected by this
approach?
Keith########
On Tuesday, 2 November 2010 at 4:33 PM, George Toledo wrote:
Yep, my error. I had a feeling I hadn't typed that quite
correctly.-GTOn Tue, Nov 2, 2010 at 1:27 AM, Christopher Wright
<[email protected]> wrote:In loop mode, something is on the backside
of the loop if patch time after it passes .5 in relation to any integer.
It's actually not quite that simple: in mirrored loop mode, the duration from
start to start is 2x duration. It's still manageable, just a bit more complex
than checking against 0.5.
I think you can make yourself a custom virtual macro that did this exact
function you desire using existing patches, and load it into your patch library.
Basically, I often want to know when an Interpolation patch has just
'bounced' from one of it's Start or End values, and sometimes, which
direction it's heading in.
This would be useful for triggering events at the end of the
interpolation, loop, etc.clean way:If loop mode is none, and patch time is 0,
it just hit start. if patch time == duration, it just ended. (you should
check if the interval between the current frame and the last frame includes the
end time, instead of expecting to have a frame land exactly on the end time)
If loop mode is repeat, check last frame time and current frame time, see if
the interval contains the duration, and if so, you just ended.If loop mode is
mirrored repeat,… you get the idea.
It's totally addressable with built-in patches, as long as you're mindful of
the duration and do interval math correctly.
--Christopher [email protected]
-- George [email protected]
The information contained in this E-mail and any attachments may be
confidential.If you have received this E-mail in error, please notify us
immediately by telephone or return E-mail.
You should not use or disclose the contents of this E-mail or any of the
attachments for any purpose or to any persons.
_______________________________________________
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]