Robin Gareus
2bfdbc161b
Fix heap-use-after-free when drawing automation events
...
When drawing over existing automation it can happen that the
range that is being replaced is currently being in the lookup
cache.
2026-01-10 03:43:07 +01:00
Paul Davis
b4ba3d2b9f
remove debug output
2026-01-09 18:02:39 -07:00
Paul Davis
9d2c755f69
successfully import SMF files with badly-formed time signature events
2026-01-09 18:00:47 -07:00
Robin Gareus
41c90a2063
Fix MIDI import edge-case when doubling allocation is insufficient
...
MIDI file from #10079 - see also 65332e603b
2025-12-29 09:23:56 +01:00
Paul Davis
856aad62da
SMF import: attempt to find tempo-related metadata in any track
2025-12-11 18:20:17 -07:00
Paul Davis
0459902b9a
Evoral::Event show event address in operator<<
2025-11-24 21:51:23 -07:00
Robin Gareus
1c3cc95b3b
Fix optimized bilds
2025-11-18 18:30:09 +01:00
Paul Davis
65332e603b
libsmf: speed up ridiculous design of smf_save()
...
This would realloc a buffer for every event, making it absurdly slow for
large MIDI files (say, 10k events). Use the somewhat standard heuristic
of doubling the requested allocation every time we need to increase the size.
This results in a speedup of 40-100x when saving SMF to disk
2025-11-17 16:05:03 -07:00
Paul Davis
662d1b9e46
NO-OP: fix commented printf of MIDI data
2025-11-17 16:05:03 -07:00
Paul Davis
2c7841777b
Evoral: more useful output if there's an illega MIDI event sent to SMF or Sequence
2025-11-17 16:05:03 -07:00
Paul Davis
637f22508b
Evoral::Sequence: tweak DEBUG_TRACE messages during note removal
2025-10-31 13:24:35 -06:00
Robin Gareus
78677b672c
Copy more mingw branches for MSVC
2025-10-22 18:48:40 +02:00
Paul Davis
bea740e634
Evoral testing requires Temporal::reset()
...
We might roll superclock initialization into Temporal::init()
2025-10-09 10:58:57 -06:00
Paul Davis
05210fc7e2
Evoral: add ControlList::has_event_at (timepos_t)
2025-08-21 18:56:00 -06:00
Paul Davis
c49f607ce6
slightly refine SMF::is_meta() to differentiate realtime system reset
2025-08-18 16:35:41 -06:00
Paul Davis
73065f814a
modify API of Evoral::SMF::append_event_beats() to add meta-event legality
...
If the (new) final argument is true, we allow writing SMF meta events to the
underlying libsmf object (which doesn't care one way or another).
2025-08-18 16:35:41 -06:00
Paul Davis
b60702e014
add Evoral::SMF::end_track()
...
This changes the assumption that an SMF object only refers to
a single track when being written.
::end_track() is used within begin::write()/end_write() pairs to mark the start
of a new SMF track.
2025-08-18 16:35:41 -06:00
Paul Davis
785047bf47
add Evoral::SMF::is_meta() to test for SMF meta events
...
These are not legal in "live" MIDI but are allowed in SMF files.
2025-08-18 16:35:41 -06:00
Paul Davis
e703cf2d73
use nullptr instead of zero in initializer
2025-08-18 16:35:41 -06:00
Paul Davis
a22a84cbee
SMF: return meta events, with size set to event size, but return value of zero
2025-08-18 12:47:26 -06:00
Paul Davis
b5f1c5b0dd
Fix potential infinite loop when iterating over ControlLists
...
If you have the "wrong" kind of MIDI CC, the interpolation for the list is set
to Linear, which causes interpolation to return audio time stamps instead of
beat time. Because of the asymmetrical transforms, this causes iterators over
the Sequence to go haywire and create an infinite loop.
This fix changes ControlList behavior to always return times in the time domain
of the list.
2025-08-07 12:49:18 -06:00
Paul Davis
60d8e1b817
SMF: use new TempoMap::smf_*() API to build tempo map from smf info
2025-08-05 11:37:35 -06:00
Paul Davis
59f58946a9
correct math for setting SMF-imported tempo/meter positions
2025-07-30 22:17:33 -06:00
Paul Davis
4ee709af7b
libardour APIs for Sequence::shift (timepos_t const &)
...
A way to move all MIDI data in a Sequence later in time.
This is likely not finished, and may need a new signal for
notifications
2025-04-05 17:25:03 -06:00
Paul Davis
fd890b4891
evoral: add Sequence::channels_present()
2025-03-08 17:56:44 -07:00
Paul Davis
cee0b498e9
NO-OP: braces, please
2025-03-08 17:30:29 -07:00
Paul Davis
3ce789dc4c
add ::duration_is_explicit() to SMF
2025-02-28 16:49:48 -07:00
Paul Davis
efcb26d7c1
add smf_length_is_explicit() to libsmf
2025-02-28 16:49:15 -07:00
Alejandro Domínguez
fa57d5ed86
Disambiguate std and boost placeholder
2024-11-17 20:20:23 +01:00
Paul Davis
c0c9d79325
remove Evoral::Sequence::overlaps{_unlocked} (). Not used anywhere
2024-10-31 12:22:35 -06:00
Paul Davis
883ec6aa68
NO-OP: misc whitespace adjustments
2024-10-31 12:22:35 -06:00
Paul Davis
39661732c3
modify how Evoral::SMF (maybe) writes an EOT event into an SMF
...
every write pass deletes existing tracks, which means it also deletes any existing
EOT event. Rather than try to replicate the _length value() that is kept in a
Source object in the SMF object, add a virtual method to SMF that returns
the _length value (or std::numeric_limits<Beats>::max() if not set).
If the _length value is not the max, we will add EOT events to each track
(usually just one) right before writing to disk.
2024-10-31 12:22:35 -06:00
Paul Davis
ebcc6b8250
add the concept of a length that is data-independent to MIDI files (libs)
2024-10-31 12:22:35 -06:00
Paul Davis
9ed9567b43
Evoral: add new is_xxxx() methods for various MIDI events, including is_realtime()
2024-10-31 12:22:35 -06:00
Paul Davis
aa2fb8c1d4
SMF: add a set_length() method which will place TrkEnd meta-events
2024-10-22 14:49:50 -06:00
Mads Kiilerich
b4ff4f356c
Make header files more self-contained - add missing Ardour and lib includes
2024-10-20 03:30:46 +02:00
Mads Kiilerich
955e634371
Make header files more self-contained - add missing std includes
2024-10-20 03:11:53 +02:00
Mads Kiilerich
8a5f21d8e3
Drop some unused files - avoid trying to maintain stuff that can't be tested
2024-10-20 03:11:53 +02:00
Robin Gareus
74c4ca3e52
Reduce reliance on boost - the hard part
...
the rest from `tools/convert_boost.sh`.
* replace boost::function, boost::bind with std::function and std::bind.
This required some manual fixes, notably std::placeholders,
some static_casts<>, and boost::function::clear -> = {}.
2024-10-19 03:47:21 +02:00
Alejandro Domínguez
2436b4df06
Replace boost::noncopyable with C++11 deleted copy constructors
2024-10-19 01:04:15 +02:00
Robin Gareus
2d7cce44f1
Replace PBD::Signals (1/2)
2024-10-18 20:41:08 +02:00
Paul Davis
75f56cd3e1
the great onceification (libs)
...
Replace use of #ifndef header guards with #pragma once
Modern C++, baby!
2024-10-17 07:44:31 -06:00
Paul Davis
5da8de05ca
NO-OP: internal whitespace and newline cleanup
2024-10-17 07:44:30 -06:00
Paul Davis
b35b30c230
factor out code to extract a TempoMap from an SMF
2024-10-17 07:44:29 -06:00
Alejandro Domínguez
1752f30a66
Remove #include <boost/utility.hpp>
2024-08-29 23:08:42 +02:00
Robin Gareus
5a647cd84a
Fix guard point logic for editor_add_ordered API.
...
Previously the code was too simple and potentially added points out of
order, leading to automation jumping back in time.
2024-07-12 00:45:37 +02:00
Robin Gareus
1cd78c94d3
Improve doxygen's main page, add references
2024-05-28 01:00:42 +02:00
Robin Gareus
ab62177bdf
Fix incomplete doxygen doc (libardour)
2024-05-27 22:21:57 +02:00
Paul Davis
15eae21c37
fix failure to record MIDI notes that are already on when capture starts
2024-02-18 19:31:19 -07:00
Robin Gareus
1306a698a7
Sanitize MIDI track names, remove unprintable chars #9553
2023-11-28 00:29:19 +01:00