-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update sorting to allow for empty messages and to sort controllers be…
…tter automatically.
- Loading branch information
Showing
1 changed file
with
24 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
732faa3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit updates the sort function for two things:
(1) change from
operator[]
togetP*()
functions. This allows the event list to be sorted even when the expected number of bytes is not correct in the midi messages. Also this allows for sorting tracks when there is an empty message in the list.(2) the function now sorts controllers with the same timestamp according to controller number (lower numbers first), and if still a tie, then by controller value (lower values first). This helps place pedal up messages before pedal down messages (and similar cases for other binary controllers).