Refactored shared functionality to a base class.
Modified the event generation to support variable note lengths. Added a metronome that ticks a note on every beat.