Commit graph

115 commits

Author SHA1 Message Date
Robin Gareus
768a6da017
Add EditingContext transient-parent
This is in preparation to allow EditNoteDialog, QuantizeDialog
etc to be on top of the Pianroll or Editor in question.
2025-11-20 16:51:23 +01:00
Paul Davis
34bede65aa editing contexts: remove unusued method parameter from get_grid_music_divisions() 2025-10-31 13:24:35 -06:00
Robin Gareus
82bdb3f05f
Expose MIDI Strum using operator in libardour 2025-09-26 00:00:19 +02:00
Paul Davis
521f01984b refactor code associated with cut/copy/clear so that pianoroll ops will affect automation points there 2025-09-14 13:49:26 -06:00
Paul Davis
2e33194ed5 virtualize some CueEditor methods to allow audio clip editor to do the right thing 2025-09-02 11:09:37 -06:00
Paul Davis
4b28ca2136 move minsec-ruler related code and variables from Editor to EditingContext 2025-09-02 11:03:38 -06:00
Paul Davis
07b20aa60a kbd automation: no popup immediately after add, 2nd Return/Enter for that
Also, two different bindings for adding a point with and without guard points.
2025-08-21 18:56:00 -06:00
Robin Gareus
4b88330c9c
Use main editor for loop-range undo/redo - fix crash
While CueEditor is-a HistoryOwner, session specific
changes such as Location don't belong in EditingContext.

This fixes a heap-use-after-free crash since MementoCommand
was free()ed twice. Once via ARDOUR::Location::~Location
and earlier due to direct Destructible::drop_references
from the History.

This partially reverts 04a8fb1eb6
2025-08-20 21:32:22 +02:00
Robin Gareus
d2512c814a
Use short labels for grid and beat-div dropdown 2025-08-19 18:24:22 +02:00
Paul Davis
bd34f1744d add window geometry to region UI settings, and save after changes
Changes are detected in Pianoroll::canvas_allocate(), which is a proxy for window
geometry. Since Pianoroll doesn't own a window, this is not necessarily ideal, but it
works.
2025-08-18 12:47:25 -06:00
Paul Davis
192c7a2f9a fix for a subtle bug that led to track headers not expanding as intended
now that we use action-as-state, there was no way to look up the old
mouse mode when changing into or out of internal editing. this
prevented us from queuing the redisplay of trackviews that allows the track
headers to expand when appropriate.
2025-08-14 18:48:04 -06:00
Paul Davis
fa97071872 mamy improvements to kbd-driven automation editing
Really needs a short video to demo/explain
2025-08-12 21:44:50 -06:00
Paul Davis
478dd72fb0 moved scoped tempo map from GUI to libtemporal (gui) 2025-08-11 15:41:34 -06:00
Paul Davis
1136ba4c99 let's (maybe) inline some of the scoped tempo stuff 2025-08-10 21:03:32 -06:00
Paul Davis
2312187070 sort-of-a-solution for local TempoMap context in EditingContext 2025-08-10 20:25:59 -06:00
Paul Davis
1ecb28da47 tweak local tempo scope infrastructure 2025-08-08 15:03:11 -06:00
Paul Davis
a07ba74c9d fix constness in relationship to EditingContext:: local tempo map 2025-08-08 14:34:03 -06:00
Paul Davis
e682e1fde4 refinements to infrastructure for an EditingContext's locally scoped tempo map 2025-08-08 14:34:03 -06:00
Paul Davis
28e0082868 use std::unique_ptr for a couple of EditingContext members 2025-08-08 12:12:09 -06:00
Paul Davis
4f5848d85c action-ify stationary playhead mgmt; fix up follow-playhead action handling 2025-08-08 11:35:20 -06:00
Paul Davis
d654d98661 fix a #warning about zoom focus state 2025-07-30 22:18:26 -06:00
Paul Davis
9c890f2690 zoom focus and snap mode get the stateful-action treatment 2025-07-30 15:28:46 -06:00
Paul Davis
1d4e3940d1 large-scale refactoring of Pianoroll, CueEditor and AudioClipEditor
Enables code-sharing between "clip editors"
2025-07-29 18:16:35 -06:00
Paul Davis
7be70d658b Revert "refactor pianoroll/cueeditor/audioclipeditor to share code and do the right stuff (compile success stage)"
This reverts commit 01beb00a5f.
2025-07-17 22:38:05 -06:00
Paul Davis
01beb00a5f refactor pianoroll/cueeditor/audioclipeditor to share code and do the right stuff (compile success stage) 2025-07-17 22:36:25 -06:00
Paul Davis
74a0272c50 Editor/EditingContext get proxyimplementations of HistoryOwner::add_commands() 2025-07-09 17:01:22 -06:00
Paul Davis
e448c3f4aa allow pianorolls not to show MIDI channel selector/dropdown
pianorolls have the visibility channel control. at some point we want the same idea
for the timeline, but it is not there yet
2025-06-23 16:16:12 -06:00
Paul Davis
c6a49fdd50 basic implementation of Live-style kbd-driven automation editing 2025-06-17 14:03:43 -06:00
Paul Davis
ea1695dbc0 code refactoring and action name handling to make follow-playhead work in multiple editing contexts 2025-06-15 21:17:42 -06:00
Robin Gareus
666a32499c
Move the follow_edits from toolbar to editor context bar 2025-06-12 22:11:33 +02:00
Paul Davis
08da5255fe tweak EditingContext APIs to get context menus in pianoroll working sensibly
There is now a separate context menu for note-context clicks and "region" context clicks.
Something similar may be desirable for timeline editing too
2025-06-12 12:09:11 -06:00
Paul Davis
6918a8a267 some rationalization to how Editor & CueEditor (Pianoroll) handle ZoomLevel and TimeOrigin changes 2025-05-19 14:57:19 -06:00
Paul Davis
94dbcaa7e2 provide a new EditingContext/Editor method to set the cursor appropriately for section selections 2025-05-14 11:37:01 -06:00
Paul Davis
8d7b4f7991 fixes so that cursor changes inside a MidiRegionView work as intended
They already worked in the PianorollMidiView, because that hands off enter/leave events
to the parent EditingContext (a Pianoroll). But MidiRegionView and Editor were
not interacting in the same way, so leaving a note object would not cause the Editor
to do the right thing with the cursor.
2025-04-25 11:28:45 -06:00
Paul Davis
5526880ac8 do not create an empty region for a cue slot when it is selected for editing
There's an assumption that slots with regions cannot be recorded into,
so adding a region to an empty slot makes it impossible to record to that
slot.

Create the region at the appropriate point during a NoteCreateDrag.

This may also be needed for some automation drawing drag operations.
2025-04-24 12:07:19 -06:00
Paul Davis
fad3c32267 better handling of cloned bindings/actions 2025-04-01 14:55:32 -06:00
Paul Davis
51dbe70b44 no more trim cursor in drae mode in the pianoroll
For some reason, we allow users to trim notes on the timeline when in
draw mode. Not sure why. We don't allow this in pianorolls, so make
sure the cursors don't suggest otherwise
2025-03-20 14:14:08 -06:00
Paul Davis
04a8fb1eb6 add mostly-function play/loop/solo buttons to pianoroll
These need to be hidden when working on cues
2025-03-15 10:56:47 -06:00
Paul Davis
179fd25715 some fixes for sigc::connection mgmt and lifetime mgmt for EditingContext 2025-03-14 15:56:21 -06:00
Paul Davis
49d9701aaf cleanup a virtual method that is no longer relevant after the prior commit 2025-03-12 21:15:32 -06:00
Paul Davis
252be10a73 fix action group used for Editor/set-mouse-mode-object-range 2025-03-12 21:10:44 -06:00
Paul Davis
56e587476e continuing work managing bindings, actions and action groups 2025-03-12 17:59:24 -06:00
Paul Davis
83d2adfd67 remove current_editing_context concept
All bindings, actions and members of an EditingContext are now per-EditingContext,
and have no impact on others (other than cursors).
2025-03-12 12:36:34 -06:00
Paul Davis
801099e057 use Gtkmm2ext::BindingSet for the GUI 2025-03-10 18:49:02 -06:00
Robin Gareus
d8e7e24f59
Use dedicated common actions per edit context
Pianoroll and main editor mouse-mode/tool actions are
now separate.
2025-03-05 22:49:37 +01:00
Paul Davis
852ad9a7da move grid updating code and members into EditingContext 2025-01-29 17:40:57 -07:00
Paul Davis
ef6502d88d initial refactoring to prepare for grid lines in pianoroll 2025-01-29 17:40:57 -07:00
Paul Davis
b82ae5590c ensure that a Pianoroll window (and its action groups) are deleted when appropriate 2025-01-28 13:29:40 -07:00
Paul Davis
454f87568a pianoroll window needs to forward key press events to make MIDI bindings active 2025-01-26 19:57:41 -07:00
Paul Davis
698ae7ca9f fix Pianoroll::zoom_to_show() so that it does what it says
... and also interacts with EditingContext::reset_zoom() correctly due to the
scaling factor that, for the Pianoroll, tries to show a bit more time than
is represented by the data
2025-01-26 15:51:18 -07:00