Refactored state to maintain duration instead of ticks
Handled note optimizations where dotting is better than changing durations