I\'m trying to convert MIDI ticks/delta time to milliseconds and have found a few helpful resources already:
You might want to increase the frame rate. On my system, increasing clock.tick(30)
to clock.tick(300)
gives good results. You can measure this by printing how much your timing is off:
print self.t0[self.event_id].text, millis - self.now - deltaMillis
With 30 ticks the cues are lagging 20 to 30 millisecond behind. With 300 ticks they are at most 2 milliseconds behind. You might want to increase this even further.
Just to be safe you should run python with the -u
switch to prevent stdout
from buffering (this might be unnecessary, since lines end with newline).
I have a hard time determining the timing, but judging from the "Ah ha ha ha"'s it seems to be correct with these changes.