EventList is a list of Events which is usually recorded and used for playback. EventLists are used in EventLoop, KeyPlayer and other related classes for capturing various forms of user gestures in time.
Each event has a required entry for \absTime
, i.e. the absolute time at which the event was recorded, plus any other key/value combinations that are needed to describe the event fully in semantically rich form. An EventList always starts with a start event - usually (absTime: 0, type: \start);
then some events with ascending values for absTime, and an end event, which is usually (type: \end, absTime: <loopEndTime>);
.
the total duration of the recorded event sequence
the playing total duration of the EventList, may be different.
print event values in the order of keys given; post the rest if flag is true
start recording, add a 'start' event like (type: \start, absTime: 0)
add an event with a value for absTime, plus any other key/value pairs
add an 'end' event, like (type: \end, absTime: <loopEndTime>).
quantize durations to some grid, and to an optional full duration.
set the dur values in the events by some func, used e.g. when quantizing.
restore durations unquantized state.
in all events, calculate delta and dur values based on absTime values.
in all events, copy values for delta to dur key.
check whether event range between minIndex and maxIndex has at least one positive playDur. this is used to avoid infinite loops when running in a play task.