[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] OSC Pattern Scheduling



James Harkins <jamshark70@xxxxxxxxx> writes:

> On 9/27/05, Manfred Brockhaus <manfred.brockhaus@xxxxxxxxx> wrote:

> r = Routine({
> [..]
> }).play(TempoClock.default, [4.0, -0.1]);

I don't get how to just define the routine and just start and stop it.

F.ex, if I got a routine s: 

s = Routine({
	var	startCycle;
	loop{
		startCycle = thisThread.clock.beats;
		//1-0.1
		2.15.wait;  
		// 2.0
		Synth("snare909ish");
		// we know exactly when the cycle started, so we can add 4 and subtract the current logical time
		(startCycle + 8.0 - thisThread.clock.beats).wait;
		// now we're at the original integer beat + 4.9 (or 8.9, etc.)
	}
}).play(TempoClock.default, [4.0, -0.15]);

//stop it
s.stop;

//, but it doesn't play again?
s.play;

//and why not?:
s.play(TempoClock.default, [4.0, -0.15]);


-- 
Esben Stien is b0ef@e     s      a             
         http://www. s     t    n m
          irc://irc.  b  -  i  .   e/%23contact
          [sip|iax]:   e     e 
           jid:b0ef@    n     n