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
Tom Poole
94d98a2b10
Update licensing information
2024-04-16 11:39:35 +01:00
Tom Poole
6bf9bb9a2e
Add final specifiers in implementation files
2023-10-10 16:12:38 +01:00
Tom Poole
4153d59e39
Formatting
2023-10-02 15:42:20 +01:00
reuk
28414a6af8
Global: Avoid floating-point equality checks where possible
2023-04-04 19:55:11 +01:00
reuk
5d096b46d7
Add simple Optional type
2022-04-22 14:18:48 +01:00
Tom Poole
dea3fe60e4
Update copyright banners
2022-04-04 12:36:32 +01:00
ed
fc0f6b1f2f
Tidy up
2021-12-02 09:24:55 +00:00
reuk
1fb2203517
MidiFile: Allow reporting the type of parsed files
2021-07-05 12:21:36 +01:00
ed
2fb3637e25
MidiMessage: Added VariableLengthValue::isValid() and removed assertion from MidiMessage::readVariableLengthValue()
2021-01-21 11:12:14 +00:00
reuk
0943291990
MidiFile: Make file-reading more robust
...
This commit adds tests and fixes some potential crashes caused by
out-of-bounds reads.
2020-10-23 15:50:47 +01:00
Tom Poole
894e7d2bd2
Updated all license headers
2020-04-23 17:30:39 +01:00
ed
0ed474e412
Fixed a potential crash when reading MIDI files with incorrect track length chunks
2019-06-12 14:53:28 +01:00
ed
839ca11746
Made a couple of MidiFile methods const
2019-02-06 11:19:13 +00:00
ed
eaf0f990d4
Replaced all uses of static_cast<Type&&> with std::move
2018-11-28 17:29:20 +00:00
hogliux
b856e38d46
Midi: Adding matching note-offs for note-ons is now optional and be disabled via a parameter of MidiFile::readFrom
2018-05-14 10:22:11 +01:00
jules
4955271ce0
Added some move constructors for MidiFile, and tidied-up its internals a bit
2018-01-31 17:19:51 +00:00
jules
d4a7afa73f
Replaced some old juce-style sort operations with std::sort and lambdas
2017-11-03 16:35:11 +00:00
jules
eda613c6db
Moved all "namespace juce" declarations from module headers to the individual .h and .cpp source files. This makes life a lot easier for Intellisense and other IDE autocompletion tools
2017-09-08 08:59:55 +01:00
hogliux
b5afccc37c
Updated file headers and the README with the JUCE 5 license
2017-04-27 14:43:04 +01:00
tpoole
2e84129479
Updated the juce_audio_basics, juce_audio_devices, juce_blocks_basics, juce_core and juce_events modules to a new ISC license
2016-12-14 10:07:26 +00:00
ed
cd752ed6af
MidiFile::writeTo() method now returns false if unsuccessful
2016-12-05 12:56:34 +00:00
ed
17600a2902
Added copy constructor and copy assignment operator to MidiFile
2016-12-02 12:45:52 +00:00
ed
29320a01cc
Changed maxSensibleMidiFileSize in MidiFile from 2mb to 200mb to allow loading of large MIDI files
2016-09-05 10:23:42 +01:00
jules
02492b36b9
Lots of small whitespace tweaks.
2015-12-13 19:32:05 +00:00
hogliux
c7b8e77031
Update copyright notice
2015-07-22 15:59:34 +01:00
jules
87348c4467
Added an option to MidiFile to set the format type.
2014-03-21 21:36:08 +00:00
jules
f35dc2df92
Correction to MidiFile end-of-track handling.
2013-10-15 18:24:59 +01:00
jules
bf16cbdd7f
Stopped MidiFile writing an end-of-track event if the data provided already contained one.
2013-10-15 12:58:29 +01:00
jules
f4bc1e033d
New methods MidiFile::findAllKeySigEvents() and MidiMessage::isKeySignatureMajorKey()
2013-09-18 19:23:28 +01:00
jules
03c2801f3f
Copyright header update in all module files. juce_core modules are now ISC licensed. All other modules are GPLv2/3/AGPLv3
2013-06-13 13:17:12 +01:00
jules
bfd9350bed
Changed some types from int to size_t where appropriate. Fixed a CoreMidi build problem in 64-bit mode.
2013-02-24 15:49:06 +00:00
jules
a9b177f2da
Fix to midi file frame-based timecode conversion.
2012-12-20 11:12:31 +00:00
jules
eb47f3c656
Fix for MidiFile::readNextTrack()
2012-07-11 10:18:24 +01:00
jules
1f95f54089
Purged some warnings.
2012-04-10 10:29:14 +01:00
jules
56bbab1537
(automated whitespace clean-up)
2012-03-20 16:00:06 +00:00
jules
9d973f0089
Fixes for CoreAudio, MidiFile, TextEditor, Tooltip.
2012-02-20 12:04:49 +00:00
jules
295d125142
Stopped using the old BEGIN_JUCE_NAMESPACE macros, and just used hard-coded namespaces where necessary instead. The macro definitions are still there, so this shouldn't affect anyone's code.
2012-02-11 14:09:23 +00:00
jules
e74219b736
Midi fixes for reading/writing variable-length sysexes.
2012-02-08 09:17:20 +00:00
jules
f35738afe0
Midi file fix to avoid multiple end-of-track events. Some openGL tweaks.
2011-09-27 11:33:42 +01:00
jules
dcc767868f
Misc minor clean-ups.
2011-09-26 23:21:15 +01:00
Julian Storer
b70e0a28d2
First check-in of the "jucequake": a major re-organisation of the library to break it up into modules. For more details about this, see the website forum..
2011-08-12 10:04:52 +01:00