ExternalClock:
Filter:
BBCut/Classes (extension) | Libraries > BBCut > Core

ExternalClock
ExtensionExtension

Externally driven scheduling

Description

Wrapper for a TempoClock that deals with the special scheduling queue required for externally driven scheduling. Subclasses of ExternalClock may deal with the case of a ServerClock (server side clock, as for instance from beat tracking UGens), or control from external applications.

Because of Server latency, perceptual attack time of events and timing groove deviations, the next beat's worth of music must be generated before that beat, and cannot be rescheduled with changes of tempo. You add instances (individual bbcutters, patterns etc) to the clock.

Note that the scheduler compensates for latency- it is built for real-time reactions, so the latency is taken into account to avoid network jitter in communicating with the Server, but there is no delay from the required time of an event. Also, perceptual attack time and time deviations (possibly due to groove/expressive timing) of events are factored in. PAT necessitates pre-scheduling, expressive timing can go either way.

warnings of undefined behaviour:

Tempo is assumed in a moderate range 1-4 bps say.

s.latency must be small, ie 0.05 sec.

Using with Patterns- you can play EventStreams only. See EventStreamPlayer2 class file.

Using as a general scheduler: this scheduler assumes that everything it schedules is an Event that has a \play field, within which is a Function. For default Events this will be the same result as Event.play. For your own special Events you require at least (play:{"something".postln;})

Class Methods

.new

Arguments:

tempoclock

A TempoClock object. If a SimpleNumber gets passed in, a new TempoClock is created at that bps. The default is to use TempoClock.default;

Examples