fixed engines so that events are run first before audio and control functions: ensures that if an event with time 0 is called, it's audio functions are active from the start
fixed typo
continuing work on MIDI implementation