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

Re: [sc-users] OSC Pattern Scheduling



On Sep 25, 2005, at 9:37 PM, Esben Stien wrote:

James Harkins <jamshark70@xxxxxxxxx> writes:

When playing a routine or task, you can specify any time point using
the quant argument.

Yes, this is nice. The problem is that wait is specified in seconds.

I can't put wait inside the quant'ed routine, because it would not
survive a tempo change.

Use TempoClock. Don't use SystemClock.

t = TempoClock.default;
t.tempo = 2;

Now one beat = 0.5 seconds. t.tempo = beats per second or (beats per minute / 60).

So you write the .waits in terms of beats and change the tempo on the clock. It's the simplest and most direct way.

I basically want to trigger different synths at specific times;

1st - 5% before the first beat (SynthDef 1)
2nd - exactly on the first beat (SynthDef 2)
3rd - 20% after the first beat ..
4th - 5% after the second beat ..
5th - exactly on the third beat ..
6th - 90% after the third beat ..
.. and so on

If you use TempoClock, you can give the wait times in beats.

IIRC, BeatSched was a workaround written before TempoClock existed. Skip the workaround and go directly to the better scheduler.

Then, when playing, send the message with a latency value.

You mean the routine quant value?

No... check the server timing helpfile for a complete description.

Lately I've been scheduling my routines to occur x fraction of a
beat before the actual onset, then sending messages with latency /
thisThread.clock.tempo.

I'm not completely following;). I don't want the routines to be off by
x fractions unless I write a routine for every beat, then delay it and
advance inside it. I don't think this would be the proper way.

Don't worry about it, it's just my technique for scheduling. Other people handle it differently.

If you have precise amounts with wait, I don't see how it survives
tempo changes.

Because I'm using TempoClock. I never schedule musical routines with SystemClock.

hjh

: H. James Harkins
: jamshark70@xxxxxxxxxxxxxxxxx
: http://www.dewdrop-world.net
.::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..:

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman