Most event patterns specify rhythm in terms of time deltas between events. (The formal term is "inter-onset interval" or IOI.) Some rhythms may be more convenient to express in terms of time points within a measure:
Time point | Meaning |
0 | barline |
1 | beat 2 |
2.5 | 2nd eighth-note of beat 3 |
PTimePoints supports this by converting successive time points into deltas. Write the time point sequence into the \timept
event key.
Time points make sense only in reference to a barline. TempoClock defines barlines according to its variables TempoClock: -beatsPerBar and TempoClock: -baseBarBeat. Barlines occur at integer multiples of beatsPerBar after baseBarBeat: if n is an integer, barline = baseBarBeat + (beatsPerBar * n)
.
These two variables are set whenever you change the meter using beatsPerBar's setter method:
PTimePoints will begin with a rest event if needed, to synchronize to the first sounding event's time point.
When the child pattern ends, the final event's delta will bring the pattern player back to the next barline.
Create a PTimePoints.
pattern |
An event pattern, where the result events contain values for |
tolerance |
Avoids certain problems with floating-point rounding. Time points whose difference is below |
An instance of PTimePoints.