[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] Querying TempoClock status
- To: "sc-users@xxxxxxxxxxxxxxxx" <sc-users@xxxxxxxxxxxxxxxx>
- Subject: Re: [sc-users] Querying TempoClock status
- From: henrique matias <hems.inlet@xxxxxxxxx>
- Date: Fri, 27 Dec 2013 20:21:36 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=24B+AdXyNpWgnNEmlJFWLU+iQgCzmZr1LFmAX50Fizs=; b=H5w1JysdNREEB1AIfzEQvr9FshdecpnYffZDhm+3o5J6CHzBrJsUW+Yc76weIjOPUM +rLOpkE3QNB130xIBBiz1vx8SOZTo9xDhF4ScLzKHeiYV6q7X4Edi69hl8FOD8/bjjmA 95OH/qInL5G7ktISr7RebdeT0nmKYf4Ln/B+Uq9s3u6Hd6I04X5FGtja/LCpZR2Yn6hU EyhXxdh+CrJ4Q/iGtFgXRZxO0DgvDKDi9RLle0cAEIVkfcR3M6V6NvZXu6ULSeLkpsTo xRdNR20C7y5FcWaPM7v+e3qhPGtAYLOJfQQJYIKl9YDNUdh7X8v+ySdm6bVL4mkKQf7l YK/w==
- In-reply-to: <CAFniQ7VU05PrjJ+t3y+c0Qi=GZAEHqaWN=0=q7Ljqq7HpjP2vA@mail.gmail.com>
- List-id: SuperCollider users mailing list <sc-users.create.ucsb.edu>
- References: <52A9A5D7.4030204@batuhanbozkurt.com> <CAFniQ7VU05PrjJ+t3y+c0Qi=GZAEHqaWN=0=q7Ljqq7HpjP2vA@mail.gmail.com>
- Reply-to: sc-users@xxxxxxxxxxxxxxxx
- Sender: owner-sc-users@xxxxxxxxxxxxxxxx
indeed hjh
On Friday, 13 December 2013, James Harkins wrote:
On Thu, Dec 12, 2013 at 8:02 PM, Batuhan Bozkurt
<batuhan@xxxxxxxxxxxxxxxxxx> wrote:
> Hi all,
>
> Is it possible to ask a TempoClock if it is stopped or not somehow?
>
> I store { }.fork(TempoClock.new) Routines in a list to iterate and stop
> those specific ones when desired. But sometimes I want to kill every
> non-permanent clock with cmd period. At some point I want to remove the
> Routines with stopped clocks (from outside, with cmd period) from my list
> but I couldn't find a way to ask a clock its running status.
Indeed, it seems there isn't a nice, neat interface to ask the clock
if it's still running or not.
An alternate way is to add a dependent to the clock. It will broadcast
a \stop message when it's stopped. Your object can receive that
message and remove routines immediately when the clock stops, instead
of "at some point."
t = TempoClock.new;
~tDeathWatcher = SimpleController(t).put(\stop, { "t stopped".postln;
~tDeathWatcher.remove });
t.stop;
My ddwGUIEnhancements quark adds a method to TempoClock:
isRunning { ^ptr.notNil }
I suppose I should put that in ddwCommon -- it's in ddwGUIEnhancements
to support TempoClockGui.
I can't think of a good reason not to add this method to the main class library.
hjh
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/