ListeningClock implements phase and frequency adjustment to a number of other clocks. This can be useful to synchronise ensembles in a fluent way. Together, they behave like cartoonified musicians who entrain to each other.
It takes inspiration from the intricate improvisation practice of Javanese and Balinese Gamelan playing and was developed for the project Virtual Gamelan Graz by Rainer Schütz, Alberto de Campo, and Julian Rohrhuber.
Like TempoClock, ListeningClock keeps track of its instances so that they may be stopped globally. To keep a clock running, set permanent = true. To remove a permanent clock, use the message stop.
Creates a new instance with the given tempo and starting times. If not supplied, tempo defaults to 1.0, beats defaults to 0.0 and seconds defaults to the current elapsed time since SuperCollider startup. The default queueSize is 256, see queue (see TempoClock).
An array of other clocks which this clock listens to.
An array of degrees which determines how much this clock listens to each other clock (0.0..1.0)
Determine the other clocks and their weights. If start is true (default: true), listening begins immediately.
Start to listen to the clocks in others.
Stop listening. The clock continues to work, but without interaction to the others.
Returns true if clock is listening
If verbose is set to true, clock posts a lot of information on its current state.
Time difference between adjustments, at which the clock tempo and phase are updated
Two parameters are responsible for the clock's adaptive behavior: empathy and confidence. Empathy is related to the degree of phase adjustment: If empathy is high, the clock remains tight in phase with the others. Confidence, on the other hand, is connected with tempo (frequency): If confidence is high, the clock keeps its own tempo, if it is low, it quickly adjusts to the other tempi. Basis for these adjustments is the weighted average of phase and tempo of the other clocks.
Set the degree of empathy within a range between 0 (no empathy) and 1 (total empathy). Default: 0.5.
Set the degree of confidence within a range between 0 (zero confidence) and 1 (total self confidence). Default: 0.5.
Get Tempo, and set tempo immediately.
A ListeningClock also implements slow direct tempo adjustments.
Move to new tempo over a given time (dur - default: 1.0) and in a given transition shape (warp - default: \cos). This transition normally happens within the frame of reference of SystemClock (seconds), however a different clock may be passed in the clock argument.
Modify the tempo to a fraction (frac) of the current tempo over a given duration (beats - default: 1.0) and with a given shape (warp - default: \cos). The time base is the clock itself.
Set the tempo to zero over dur (default: immediately)
Returns the current change rate.
If nBeats is given, the clock will not catch up with the absolute phase of the others, but only within the given number of beat cycles. This is useful to avoid confusion after fast tempo changes given that the music has a circular event structure where absolute phase does not matter.