The class containing timer and timed queue methods.
Automation is executed via a queue of events to be executed in time,
format for the queue is a list of events, with each event represented as
a list with the following format: [type, time, data]. The type field is a
string, to be parsed in eventCaller.parseEvents(). Time is in beats and
may be fractional. The data field may contain several parameters (not as
sublist).
|
|
|
run(self)
The main clock increment method, also polling the event queue. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
insertQueue(self,
timeStamp,
event)
Insert an event into the queue, keeping the timeStamps in sorted
order. |
source code
|
|
|
|
|
|
|
|
|
insertListFromNow(self,
list)
Insert a list of timed events into the queue, transposing each
event's timestamp relative to the "now" time. |
source code
|
|
|
|
|
stop(self)
Stops the thread from running, by setting isRunning = False. |
source code
|
|
Inherited from threading.Thread :
__repr__ ,
getName ,
isAlive ,
isDaemon ,
join ,
setDaemon ,
setName ,
start
Inherited from threading.Thread (private):
_set_daemon
Inherited from threading._Verbose (private):
_note
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__str__
|
|
queueMutex
The mutex for thread safe handling of the queue list.
|
|
isRunning
Flag to keep the clock thread running, set to False to exit
thread.
|
|
timeResolution
Timer resolution in seconds, 0.001=millisecond resolution (not
accurate).
|
|
queue
The list of events in the timed queue.
|
|
beatCounter
Counter for quarter notes at a given bpm.
|
|
fractionalBeat
Counter for fractions of a beat.
|
|
bpm
The tempo in beats per minute for the beat counter.
|
|
runClock
Flag to run or pause the clock.
|