1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00
JUCE/modules/juce_audio_basics/midi
reuk 281c56f2f9
MidiFile: Fix invalid comparator argument to stable_sort
Previously, stable_sort was used to reorder note-ons and note-offs, with
the intention that note-offs would always be ordered before note-ons
with the same time stamp. However, stable_sort requires the comparator
to be a strict-weak ordering, which was not the case for the previous
implementation.

Additionally, the old implementation could unnecessarily reorder events.
Note ons and offs only need to be reordered if the note numbers and
channels match. It's fine for a note-on to be ordered before a note-off
if the note itself is different.

The new implementation only uses stable_sort to order events by
time-stamp. Then, for each range of events with matching timestamps, the
first note-on event will be swapped with the last following note-off
event with matching channel/number.
2024-07-31 19:36:51 +01:00
..
ump MinGW: Remove support 2024-06-27 18:10:21 +01:00
juce_MidiBuffer.cpp Update licensing information 2024-04-16 11:39:35 +01:00
juce_MidiBuffer.h Update licensing information 2024-04-16 11:39:35 +01:00
juce_MidiDataConcatenator.h Update licensing information 2024-04-16 11:39:35 +01:00
juce_MidiFile.cpp MidiFile: Fix invalid comparator argument to stable_sort 2024-07-31 19:36:51 +01:00
juce_MidiFile.h Update licensing information 2024-04-16 11:39:35 +01:00
juce_MidiKeyboardState.cpp Update licensing information 2024-04-16 11:39:35 +01:00
juce_MidiKeyboardState.h Update licensing information 2024-04-16 11:39:35 +01:00
juce_MidiMessage.cpp Update licensing information 2024-04-16 11:39:35 +01:00
juce_MidiMessage.h Update licensing information 2024-04-16 11:39:35 +01:00
juce_MidiMessageSequence.cpp Update licensing information 2024-04-16 11:39:35 +01:00
juce_MidiMessageSequence.h Update licensing information 2024-04-16 11:39:35 +01:00
juce_MidiRPN.cpp Update licensing information 2024-04-16 11:39:35 +01:00
juce_MidiRPN.h Update licensing information 2024-04-16 11:39:35 +01:00