Commit graph

21437 commits

Author SHA1 Message Date
Paul Davis
a9205ffd55 use nullptr, not NULL 2024-10-17 07:44:31 -06:00
Paul Davis
8baaa7eb66 TriggerReference requires some sort of lifetime tracking
For now we use std::weak_ptr and std::enable_shared_from_this to accomplish tracking. There
may be an argument for using our own (PBD::Destructible) mechanisms instead.
2024-10-17 07:44:31 -06:00
Paul Davis
e3ff81efcb remove dangling line of code that does nothing 2024-10-17 07:44:31 -06:00
Paul Davis
7901b4119f we're gonna need a bigger debug set 2024-10-17 07:44:31 -06:00
Paul Davis
c8924f4133 fix lollipop drawing
Cairo coordinate/argument limits are much smaller than the canvas. Trying
to clip to a gigantic rectangle throws cairo into a weird state, so
make sure we only clip to a part an exposed area
2024-10-17 07:44:31 -06:00
Robin Gareus
e67a3387fd Fix Editor Lua bindings
Methods that have been moved to EditingContext need
to reference the abstract definition there, and PublicEditor's
first parent class also need to be EditingContext (same
memory address)
2024-10-17 07:44:31 -06:00
Robin Gareus
7e7440bc33 Fix Lua bindings, Session is-a HistoryOwner
For derived classes to work in Lua w/o explicit cast,
it needs to be the first parent.
2024-10-17 07:44:31 -06:00
Paul Davis
2fceb66193 manual fixups for errors during rebasing against master 2024-10-17 07:44:31 -06:00
Paul Davis
911ad78c06 add API to access PBD::UndoHistory member of HistoryOwner 2024-10-17 07:44:31 -06:00
Paul Davis
a61f49ad4f show Bindings _name in DEBUG_TRACE output 2024-10-17 07:44:31 -06:00
Paul Davis
42959b1313 adjust MidiModel API to require HistoryOwner not Session for commands 2024-10-17 07:44:31 -06:00
Paul Davis
8c086693af show HistoryOwner::_name in DEBUG_TRACE messages 2024-10-17 07:44:31 -06:00
Paul Davis
b989464914 NO-OP: add useful comment 2024-10-17 07:44:31 -06:00
Paul Davis
e8fdbb8cd9 Session IS-A history owner 2024-10-17 07:44:31 -06:00
Paul Davis
d30c8a1286 abstract concept of a history owner from ARDOUR::Session into libpbd 2024-10-17 07:44:31 -06:00
Paul Davis
fd6afb30e6 use MidiModel::ContentsChanged to drive MIDI cue edit swaps
No need for a special method called post-edit
2024-10-17 07:44:31 -06:00
Paul Davis
62d36832c6 more changes to get MIDI clip editing working
MIDITrigger now has a direct reference to a MidiModel, and uses
that as the basis for discovering what state has changed and needs
updated after an edit operation pushes a new state to the trigger
2024-10-17 07:44:30 -06:00
Paul Davis
7bf464795a add ::render() to MidiModel since that's what we'll be editing 2024-10-17 07:44:30 -06:00
Paul Davis
06d5496f70 further preparation for MIDI cue editing in triggerbox code 2024-10-17 07:44:30 -06:00
Paul Davis
9060a32c34 MIDI state trackers: dump() is const
Plus minor fixes to ::resolve_diff()
2024-10-17 07:44:30 -06:00
Paul Davis
7dee98279a extend MidiModel and MIDITrigger in preparation for edit-change handling 2024-10-17 07:44:30 -06:00
Paul Davis
5da8de05ca NO-OP: internal whitespace and newline cleanup 2024-10-17 07:44:30 -06:00
Paul Davis
4267d5b0d7 MidiStateTracker: extend API to allow "diffs" between two MidiStateTrackers 2024-10-17 07:44:30 -06:00
Paul Davis
d550292f8f additional DEBUG_TRACE (Destruction) output 2024-10-17 07:44:30 -06:00
Paul Davis
e7731f2e89 add -D actions to gtkmm2ext 2024-10-17 07:44:30 -06:00
Paul Davis
009a0e6ffb stacktraces to help track down missing actions 2024-10-17 07:44:30 -06:00
Paul Davis
59ed3d7138 cleanup canvas piano roll header so that it can exist with no current MidiView 2024-10-17 07:44:30 -06:00
Paul Davis
10244c0360 tempo bar and BBT ruler in MIDI cue editor 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
Paul Davis
e3205bded0 do something to make MIDI bindings accessible in any EditingContext 2024-10-17 07:44:29 -06:00
Paul Davis
10b48d2cc4 lock in some major steps for the midi cue/pianoroll editor 2024-10-17 07:44:29 -06:00
Paul Davis
0eeb281bd6 remove debug output 2024-10-17 07:44:29 -06:00
Paul Davis
8e4edd0c07 Revert "separate out all bounds/position info from Region into "Slice""
This reverts commit f3da2cfd8b9dc077ee35fc3bbaf133adec23d463.
2024-10-17 07:44:29 -06:00
Paul Davis
7a5d7cfe69 Revert "add set_* methods to Slice; remove property additions"
This reverts commit 81eee23baab2817218c1766c7d3c37fb7435e619.
2024-10-17 07:44:29 -06:00
Paul Davis
659382ecd8 convert debug output from printf to type-safe iostreams 2024-10-17 07:44:29 -06:00
Paul Davis
a6e02d7a94 add set_* methods to Slice; remove property additions
Derived classes (currently only Region) just register the Slice properties
_start and _length.
2024-10-17 07:44:29 -06:00
Paul Davis
45328723b0 separate out all bounds/position info from Region into "Slice"
The idea here is to be able to describe region size, start and position
independently of an actual Region object.
2024-10-17 07:44:29 -06:00
Paul Davis
7799adc8db make Stateful a virtual base class of StatefulDestructible
This permits dual inheritance from Stateful.
2024-10-17 07:44:29 -06:00
Paul Davis
204d4237f8 further steps towards MidiRegionView outside the Editor 2024-10-17 07:44:29 -06:00
Paul Davis
e3d790207f modify MIDITrigger to use an RTMidiBuffer<Beats,Beats> for playback, not a MidiModel
Creating an iterator on a MidiModel (Sequence) creates a read-lock on the same,
which exists until the iterator is destroyed.

This new designs renders the model/source to an RTMidiBuffer, then atomically
swaps in a new RTMidiBuffer in an RT context.

Not yet implemented in this temporary branch is handling required
state-changing messages when the buffer is swapped.
2024-10-17 07:44:28 -06:00
Paul Davis
a4a277c141 templatize RTMidiBuffer to allow use in different time domains
Also add ::track_state() method to configue a MidiStateTracker
to correspond to the state implied by an RTMidiBuffer<T,D>
at a given point in time.
2024-10-17 07:44:28 -06:00
Paul Davis
b693d07fcb Add a new ::render() method to MidiSource that writes to an EventSink 2024-10-17 07:44:28 -06:00
Robin Gareus
0986b8d1e8
Revert "Only enable RegionFX in debug builds for the time being"
This reverts commit d525f8d60c.
2024-10-17 15:36:29 +02:00
John Emmas
b6cb758357 Another minor tweak to fix a build issue with MSVC/c++17
Fixes a conflict between 'std::byte' (new in c++17) and earlier declarations / typedef's that defined 'byte'
2024-10-17 12:07:05 +01:00
Robin Gareus
d525f8d60c
Only enable RegionFX in debug builds for the time being
This reverts commit 14ff2f2e68.
2024-10-16 18:29:51 +02:00
Paul Davis
6149771910 fix yet more cases where SMF are imported and named incorrectly 2024-10-15 22:35:04 -06:00
Mads Kiilerich
0d4bce8663
backends: Fix class name in debug and error messages for set_latency_range and get_latency_range traces 2024-10-15 00:41:12 +02:00
Mads Kiilerich
99ba70384a
FaderPort8: Improve DEBUG_TRACE messages 2024-10-15 00:41:12 +02:00
Mads Kiilerich
5c763c99ba
FaderPort8: Use explicit "Port 1" for FP8 too
84e38b4c65 made the same change for FP16.

It has apparently not been necessary for FP8 so far, because backends
have happened to report "Port 1" before the control port. But that is
not necessarily the case. It failed for me when playing around.

Change FP8 handling to also not make assumptions about the device order
returned by the backend.
2024-10-15 00:41:12 +02:00
Mads Kiilerich
b7249c8fe7
build: Set _POSIX_C_SOURCE=200809L instead of comment about -std=gnu99 in 8fea1ea42e
We are converging towards setting it globally.
2024-10-14 22:57:15 +02:00