Closed tatecarson closed 7 years ago
Ah, yes. Everything is scheduled under the same clock and that clock is available with the .clock method. So:
a = CuePlayer.new; //.. run your cues and timelines a.clock.clear; //should stop the timeline
Give it a try and let me know if there is still a problem.
But you are right that there should be a stop method so I will add it on the next update. I will keep this open until then.
Thanks for reporting :)
That worked! Thanks for responding so quick. I'm premiering a piece tonight that uses it so this was very helpful.
Just curious, when you call clock on cueplayer are you really calling it on Timeline? How are they connected? Trying to learn more about classes, thanks.
No problem :)
In order for the Timeline class to be independant there is always an option to pass in a clock on instantiation (.new
). If you don't provide it yourself it creates it internally. The CuePlayer class brings together the cues and the tmelines. It defines its own clock and passes it to the timeline among other things. So when you call .clock.clear
you are stopping the CuePlayer
clock that is used by the Timelines
managed by the CuePlayer
.
Have fun and good luck with the concert!
stop
method added in upcoming update (0.2
).
I know that if you instantiate a timeline directly it has a method to stop it but when I use a timeline as part of a put structure I can't figure out how to stop it. What's happening is that I'm stopping a cue but the timeline keeps running and then triggers the next event on the timeline even though I stopped the cue. I would like to be able to stop the next event in the cue's timeline from happening. This is only an issue during rehearsals where starting and stopping often is needed.