Fixed tick calculations so they work for non-quarter-note-beat
time signatures.