diff --git a/NEWS b/NEWS index 8cb37d2b..073e27b2 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,6 @@ NEWS for Seq66 0.99.14 Chris Ahlstrom -2015-07-10 to 2024-08-21 +2015-07-10 to 2024-08-22 # Changelog @@ -33,6 +33,9 @@ Chris Ahlstrom See issue #128. - Updating the PDF documentation based on issue fixes and other fixes. - Replaced the --session-tag option with --session. +- Changed the sort order of events so that Note Offs get priority over + Note Ons with the same time-stamp. Prevents playback errors in + the tune judyblue.mid. Enabled via macro SEQ66\_PRIORITIZE\_NOTE\_OFF. ## [0.99.13] - 2024-08-05 diff --git a/TODO b/TODO index e24066b6..c8bf77ee 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,6 @@ TO DO for Seq66 0.99.14 Chris Ahlstrom -2019-04-13 to 2024-08-21 +2019-04-13 to 2024-08-22 Mutes: @@ -17,12 +17,9 @@ Playlists: From Testing: - - Add an option fix notes by shortening them a few ticks. - - File errors (fixed!), but odd issues (w/qsynth): - '/usr/local/share/seq66-0.99/midi/FM/judyblue.mid' plays, but some - notes are blipped out. Try with another player. - '/usr/local/share/seq66-0.99/midi/FM/longhair.mid' plays just fine - mostly, some glitches. + - Add an option to fix notes by shortening them a few ticks? Not + really needed with macro SEQ66_PRIORITIZE_NOTE_OFF enabled in + event.cpp. - The 'usr' time-color settings do not seem to work. Actually, it does work, but not with the Qt gtk styling. Document this issue. - The Carpet song has PPQN = 120 and displays weirdly in pattern editor. diff --git a/libseq66/src/midi/event.cpp b/libseq66/src/midi/event.cpp index cbe0721c..f21e52a6 100644 --- a/libseq66/src/midi/event.cpp +++ b/libseq66/src/midi/event.cpp @@ -24,7 +24,7 @@ * \library seq66 application * \author Chris Ahlstrom * \date 2015-07-24 - * \updates 2024-01-16 + * \updates 2024-08-22 * \license GNU GPLv2 or above * * A MIDI event (i.e. "track event") is encapsulated by the seq66::event @@ -79,6 +79,18 @@ #include "midi/calculations.hpp" /* seq66::rescale_tick() */ #include "util/basic_macros.hpp" /* helpful debugging/build macros */ +/* + * As noted elsewhere, the song judyblue.mid does not play all notes. + * This happens when the Note Off for a preceding note follows + * a Note On for the same note number, and these two events have the + * same time-stamp. + * + * Enabling this macro gives Note Offs priority over Note Ons with the + * same time-stamp, and seems to fix the problem. + */ + +#define SEQ66_PRIORITIZE_NOTE_OFF + /* * Do not document a namespace; it breaks Doxygen. */ @@ -1157,6 +1169,15 @@ event::get_rank () const int eventcode = mask_status(m_status); /* strip off channel nybble */ switch (eventcode) { +#if defined SEQ66_PRIORITIZE_NOTE_OFF /* EXPERIMENTAL reversal */ + case EVENT_NOTE_ON: + result = 0x2000 + get_note(); + break; + + case EVENT_NOTE_OFF: + result = 0x1000 + get_note(); + break; +#else case EVENT_NOTE_OFF: result = 0x2000 + get_note(); break; @@ -1164,6 +1185,7 @@ event::get_rank () const case EVENT_NOTE_ON: result = 0x1000 + get_note(); break; +#endif case EVENT_AFTERTOUCH: case EVENT_CHANNEL_PRESSURE: