Lots of different functions in here:
This is essentially a software interupt. A huge function with a big fat case statement in it. Handles note playing, amongst other things.
Handles sync and tempo. Deals with DinSync and Midi Sync.
Handles the tempo knob.
Handles initialization, and is the main loop of the program