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: I/O problem with conditional



Hi Romain. Thomas' method will work in the example you described.
Set the Start Signal of the Stop Watch patch to true when you want to re/start your animation.
You can see this by attaching a Mouse patch's Left Button output to the Stop Watch's Start Signal input.



Attachment: Cube Rotation.qtz
Description: application/quartzcomposer


I have done this in the attached example.
I have also inserted an interpolation patch for more control: repeat mode=none, interpolation=sinusoidal in-out and duration=2.
.xX


On Jan 23, 2007, at 3:39 AM, Romain Carrere wrote:

Thanks again for your fast answer, I really appreciate.
I understand your example (attached qtz) but it's not suitable for my purpose.
Letting run endlessly the stopwatch and catching the output with math just take off the ability of looping.
I explain you a bit more :
I am making image slideshows, let's us just say first 3D cube slideshow.
So that I want to be able to send a trigger on an input and the result must be a 90° rotation of the cube.Each time the input receive a true signal, the rotation must be done and stopped at 90.


So that in your example i get the stop at the correct value but it is not possible to relaunch it.
I hope my english is clear enough :-(




On 23 janv. 07, at 12:01, Thomas Haggett wrote:

Ah, no, I was suggesting to just let the stopwatch run endlessly, and the Math.min will cause the output of the javascript to be capped at 60 (or whatever value you enter).
Actually. I've just been playing, and the Math patch has a "Min" setting. See attached .qtz for what I was thinking of.


Yeah, loops just can't be made, and the Core Image Accumulator is a special case in the main QC root patch, as far as I can tell.

Thomas.

<limited stopwatch.qtz>

On 23 Jan 2007, at 10:54, Romain Carrere wrote:

Thanks for the advice, but I tried this to and it's not possible to plug a javascript output to the stopwatch StopSignal input. So this seem to be hard to make this kind of loop and I don't see how the image accumulator can be used there.

On 23 janv. 07, at 11:06, Thomas Haggett wrote:

Hi,

Yeah, QC *really* isn't happy about loops in a graph, I believe the only patch to allow this is the Image Accumulator, that acts as a basic state machine latch. We've managed to hack up a custom macro patch that will allow arbitrary connections (including loops and all manner of other mind bending links) inside it, but it can be very unstable!

Off the top of my head (i'm sure someone will have a better idea), you could have the stopwatch feeding a JavaScript with an:

outputs[0] = Math.min(inputs[0], 90);

or

outputs[0] = Math.min(inputs[0], inputs[1]); if you wanted to vary it.

Hope this helps,

Thomas.



On 23 Jan 2007, at 10:00, Romain Carrere wrote:

Hi,

I'm making a quartz composition that'll be used in a dashboard widget(JS).
I have got a few problems with a StopWatch patch. I set the start signal with an input, and I would like to stop it when the value reach 90.
So I put a conditional at the output of the StopWatch but I can't plug the Conditional's output to StopWatch's Stop Signal. The wire is not accepted(keep white).
Or conditional output and stopwatch input are both boolean values so I can't understand. It does the same if I use input splitters...



<Picture 1.png> can anybody help me ? I am a quartz new comer.

Thanks.

Romain

Romain CARRERE
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




_______________________________________________
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

 _______________________________________________
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: 
 >I/O problem with conditional (From: Romain Carrere <email@hidden>)
 >Re: I/O problem with conditional (From: Thomas Haggett <email@hidden>)
 >Re: I/O problem with conditional (From: Romain Carrere <email@hidden>)
 >Re: I/O problem with conditional (From: Thomas Haggett <email@hidden>)
 >Re: I/O problem with conditional (From: Romain Carrere <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.