13
0
Commit Graph

1070 Commits

Author SHA1 Message Date
60628a62be somewhat active lollipop event handling 2023-06-26 14:18:17 -06:00
72850d456f implement time-stretch from left of region
Make click & drag in the left-hand half of a region with the Timestretch
tool stretch the region on its left, leaving the end position of the new
time-stretched region in the same place as the end of the original.
2023-06-09 17:57:52 +01:00
a5946ba2e2
Fix heap-use-after-free at exit
Deleting _track_canvas_viewport automatically destroys
any child Items. The LocationMarker's group was already destroyed
when ~ArdourMarker() runs and calls `delete group`.

So first delete the marker, then the canvas
2023-06-08 22:50:15 +02:00
3468ffddbb
Update GUI: add new section operations 2023-06-06 02:42:43 +02:00
c063be6a76
Implement Editor::abort_reversible_selection_op 2023-06-01 21:37:37 +02:00
dbebc0b7e0
Make Markers properly themable, use color-names
This simplifies code, and also immediately changes marker
colors when the theme is changed.
2023-05-18 01:26:35 +02:00
cb78043adc
Indicate selection extents in time ruler 2023-05-17 01:53:40 +02:00
1ee2675716
Implement Selection Marker class and events 2023-05-17 01:50:51 +02:00
a258b82ce9 tweak behavior and naming of tempo-map drags:
* correctly handle clicks on the immediate right or left of a beat line
* prefer Mid-Twist and End-Stretch terminology over Twist and Linear
* static-tempo vs ramped-tempo is orthogonal to mid- and end- drags (TODO)
2023-05-04 09:33:08 -05:00
87b5849a7b kbd bindings: fix issues with delete & backspace bindings in draw/i-edit mode
We now use the same actions in all modes, and the logic is:

1. is there a selected mixer strip and are we in it: if so, delete selected
   processors
2. are we in draw or internal mode? if so ..
   2a. if there are selected control points, delete them
   2b. if not, attempt to delete MIDI notes
   2c. done
3. continue with delete operation as before
2023-04-25 11:38:16 -06:00
13311b7a32 tempo mapping: tempo group and mapping group are now only ever visible one at a time
Currently, the "switch" is in Edit > Tempo
2023-04-08 11:44:21 -06:00
8fbf2c3f52 add enum and member var for controlling what kind of tempo editing we are doing
note: this was much harder than it ought to be
2023-04-08 11:44:21 -06:00
57398b1e5e tempo mappoing: use actual mouse cursors not canvas item cursors
Also some changes to attempt to do "half-twist" that will be removed soon.
2023-04-07 12:56:57 -06:00
f57a9d84df
Do not incrementally ripple during cut/delete #9295
When cutting multiple regions with Ripple-ALL, removing
the first region ripples the remaining tracks which includes
selected regions on those tracks which are to be cut later.
2023-04-06 02:18:42 +02:00
dd542b8f4d
Use ARDOUR::PlaylistSet instead of local typedefs 2023-04-06 02:13:51 +02:00
a0286f2e6f Expose cut-copy-section in the editor
This is still a bit of an experiment, there may need to be a dedicated
ruler for sections, or a side-bar that allows arranging.
2023-03-31 23:13:20 +02:00
91c0f143ec Set sensitvity of "Insert Selected Region" 2023-03-31 22:06:41 +02:00
77cefd7721 new tempo mapping drag objects (API and implementation) 2023-03-24 14:19:16 -06:00
aa3cbd8791 editor: expand handling of tempo-redisplay in middle of drag 2023-03-24 14:19:16 -06:00
ece438d73d editor: refactor snap to bbt to allow specifying non-grid-setting grid type 2023-03-24 14:19:16 -06:00
5e01503a56 add a new canvas-based cursor for mapping 2023-03-24 14:19:16 -06:00
d61a741e4b mapping bar: some mouse handling 2023-03-24 14:19:16 -06:00
18249f7395 ardour has a new ruler
The mapping bar is where tempo mapping operations will take place
2023-03-24 14:19:16 -06:00
21074b189a remove unnecessary virtual (no default value involved) 2023-03-24 14:19:15 -06:00
d25a615e20 API development for time domain flipping (GUI edition) 2023-03-24 14:19:15 -06:00
b35518e212 switch from boost::{shared,weak}_ptr to std::{shared,weak}_ptr
This is mostly a simple lexical search+replace but the absence of operator< for
std::weak_ptr<T> leads to some complications, particularly with Evoral::Sequence
and ExportPortChannel.
2023-03-24 14:19:15 -06:00
b8e9e67f78 tweak ::define_one_bar() API to allow correct undo/redo command name 2023-01-16 14:57:23 -07:00
1ff5592731
Remove UI side grid limit
This concept from 2007 is no longer required Temporal::get_grid
already limits the number of grid-lines depending on the step
size (mod-bar, beat_div) and start/end positions.
2023-01-11 00:32:47 +01:00
0f949bc02b
Add region polarity invert to Region menu 2022-12-17 13:15:42 +01:00
eb42318d3e
Consolidate ruler prelight events
This fixes various copy/edit bugs (e.g. transport ruler uses
"range marker bar" colors, but only after a enter/leave event).
2022-12-10 15:14:29 +01:00
b972301a3b
Add action to noninteractively add BBT marker at playhead 2022-12-02 21:31:56 +01:00
6af9dffa7c
Remove UI code to import markers as locations (3/4) 2022-11-22 01:46:22 +01:00
4e77bbdd96
dd import_markers option (2/4) 2022-11-22 01:45:42 +01:00
21a05f539b tweak PublicEditor API to include virtuals for tempo map edits 2022-10-27 13:42:58 -06:00
Mads Kiilerich
34527525be
Consistently put ruler toggle code in the same order
Just reordering.
2022-10-24 05:14:58 +02:00
0852f898a3
Prepare to move SimpleExport to backend 2022-10-21 19:35:17 +02:00
cf83815133 add clear-all-cues item to cue marker ruler context menu 2022-10-21 07:52:23 -06:00
1faefb5afd
Implement simple/quick export dialog 2022-10-20 21:38:45 +02:00
3a98d6133c
Hide draw-tools spacer when draw-tools are hidden 2022-10-18 02:11:09 +02:00
0938d21c30 change add new bbt marker from primary-click to context-click on BBT ruler 2022-10-03 14:16:34 -06:00
891b561cad Cleanup: use dedicated method to build draw menu 2022-10-01 18:03:03 +02:00
07dea50456
Fix DnD import to grouped tracks
Import via Drag/Drop previously worked by selecting a track,
and then importing to the selected track.

This approach fails when the selected track is in a track-group,
and selecting the track also selects other tracks of different type.

Now the track to drop onto is passed directly passed through to
::finish_bringing_in_material as existing_track.
2022-09-30 21:30:48 +02:00
luz paz
7f06beda50 Fix typos
Found via `codespell -q 3 -S *.po,./.git,./share/patchfiles,./libs,./msvc_extra_headers,./share/web_surfaces,*.patch  -L acount,ba,buss,busses,discreet,doubleclick,hsi,ontop,retrn,ro,scrollin,seh,siz,sord,sur,te,trough,ue`
2022-09-21 19:09:55 -06:00
888d91d599 Add action to locate to loop start/end 2022-09-07 19:15:36 +02:00
d2fc142e21 infrastructure and implementation to allow "q" to drive quantize-selected-notes in midi edit mode 2022-08-31 13:53:55 -06:00
31640a9a5b gtk2_ardour: implement "Unlink from unselected" for MIDI regions
An attempt to satisfy #8848.

Add a new action, "fork-regions-from-unselected", which unlinks all
selected MIDI regions from any unselected regions, but maintains links
within the selection, and add the new action to the region MIDI context
menu as "Unlink from unselected". Rename the existing "fork-region" action
to "fork-selected-regions", and amend the existing "Unlink from other
copies" menu item to "Unlink all selected regions" to (try to) clarify the
difference.

Attach the <Tertiary>U default key-binding to the new action: I personally
think it's generally slightly more useful (otherwise I wouldn't have
implemented it), though I'm not that fussed.

In the case that there's only one MIDI region selected, or that none of
the selected regions are mutually linked, both actions will have exactly
the same result. Ideally, we'd only show a single menu item in this case,
but that would require (a) implementing a function to check whether the
selection contains any linked regions, and (b) making the region MIDI
context sub-menu dynamically generated, so that it can change based on the
result of that function, neither of which I've tried to do yet.
2022-08-18 09:18:25 -06:00
fc6ad8ebd9 bbt markers: all the basics of dragging, editing, removing 2022-08-17 16:40:35 -06:00
6784f0e5dc basic skeleton for BBT marker drag 2022-08-17 16:40:02 -06:00
3259ab2d41 tempodisplay: correctly redisplay tempo map stuff after adding a BBT marker 2022-08-17 16:39:32 -06:00
419f934ecd support group-override when starting a new Range selection 2022-07-14 17:28:07 -05:00
8ead1439d8
Fix ruler/canvas separator
The track-header (gtk) is packed with 1px box spacing. This
is added at the top of each box (best seen by looking at the
group-tab vs track-header alignment in the editor).

However the actual track separator line on the canvas is at the
bottom of each track, aligning with the top of the next track
or automation-lane.

The first track however lacks a separator at the top, which
needs to be provided by the ruler. Once the canvas is scrolled
this ruler/canvas separator overlaps with the bottom separator of
each TAV.

Using ruler Rectangle::set_outline had various issues.
The outline extends outside the rectangle. It bled into the
video-timeline instead of the canvas' top y-axis pixel.

Also the separator was above the video-timeline, not above the
canvas. Hence a dedicated separator Line is preferable.
It also provides a consistent separator if no rulers are visible.
2022-07-06 20:50:06 +02:00
ecf554aa4a tempo display: basics of updating MIDI during tempo-related drag operations 2022-06-28 11:44:25 -06:00
bf87916fb1 tempo display: further simplifications to handling map changes
When a tempo map change originates from a drag, we know the required redraws have
already been done. Use a new bool member, ignore_map_change, to tell the Editor
to ignore the map change signal. For all other map changes, do the full reset.
2022-06-28 10:16:31 -06:00
6dfaac9e94 redesign the mechanisms for updating tempo/meter display during drags and other map changes
We now simply move markers during drags, and do not seek to create/delete markers.

When the map is changed, we rebuild the markers from scratch. This might need optimization to avoid doing
when the editor itself changed the map.
2022-06-27 22:21:27 -06:00
944b0ed6e0
Prefer const iterators when container does not change 2022-06-26 13:55:46 +02:00
c3f40aedeb tempodisplay: fix thinko in display of tempo/meter/bartime markers
Code used to just push back new markers to the end of the relevant list, and
this would then the new marker to be deleted soon thereafter. Instead pass
an interator indicating where to place the marker in the list.

Note that we rely on the use of std::list<T> here to keep the iterator to the
existing marker valid.
2022-06-25 22:26:34 -06:00
d47b581cbb remove RegionRippleDrag
This used to be a distinct kind of drag, but ended up being refactored into
something that happens during a regular drag. Has not been used in quite some time.
2022-06-21 15:52:16 -06:00
3387d127e7 Lua: add arguments to trigger_script_by_name 2022-06-01 08:53:50 -05:00
fdd634f530 add ctrl-drag on tempo bar/ruler to adjust tempo more directly 2022-05-29 14:19:27 -06:00
73a6cb7957 editor: add method to get time domain from any object with a ::time_domain() method 2022-05-27 15:56:41 -06:00
d8ba73f542 temporal: change "clamped" terminology to "continuing" (since that's what the GUI calls it) (GUI edition) 2022-05-23 08:07:08 -06:00
b11f76d748
Do not select re-imported tracks
Stem-export defaults to use selected tracks. This retains
the selection, so focus remains. Repeat stem export will use
previously exported tracks if the selection is empty, or the
current selection (again).
2022-05-16 04:54:14 +02:00
itmuckel
77356c0ebb
Reformat and remove unused imports 2022-05-13 23:07:49 +02:00
764aa75f09 reset_region_scale_amplitude is redundant with reset_region_gain 2022-05-10 15:47:56 -05:00
eff34f2e1b use editor tempo editing API rather than TempoMap API 2022-05-10 09:46:08 -06:00
b5487415ec editing: a partiaally implemented version of TempoTwistDrag, to be completed. 2022-05-02 16:47:23 -06:00
69ee24c22b editor: improved handling of tempo map changes
This splits apart the actual signal handler from the work that needs to be done
to update the GUI in response to a tempo map change. This allows us to do the
visual update when we are manipulating the thread-local write copy of the map
during e.g. a drag operation.
2022-05-02 12:02:04 -06:00
33622474af editor: change return type of begin_tempo_map_edit()
This allows us to get the write-copy of the tempo map in one step.
2022-05-02 12:01:12 -06:00
883a44e6a4 temporal: TempoMap::use() returns a const ptr to enforce semantics (GUI version)
This commit leaves two issues outstanding:

1. unclear/ugly semantics for drag operations that reset the GUI thread's tempo map to the writable copy
2. undo/redo for the tempo map

These will be addressed in future commits
2022-04-08 11:58:04 -06:00
ca22ba77e1 Constification: make Stateful::get_state() const, with all other required const-ness added (GUI) 2022-04-06 21:56:59 -06:00
da20e4ed60 change return type of Editor::process_redisplay_track_views() to bool
This allows it to be used in an idle callback. If we use
::redisplay_track_views() directly, we do not disconnect the idle
connection. This will happen automatically since the callback will return
false, but it seems better to explicit about this. Even better would be to use
::connect_once() but this may not be available in the version of glibmm that we
are using at present.
2022-04-05 20:52:10 -06:00
2a611f1d40 editor: add clip-picker list to the editor 2022-03-15 09:03:40 -05:00
b0276fd524 ripple (gui part): when Ripple is selected, RippleMode widget appears 2022-03-14 21:35:30 -05:00
01ef5a5b24 ripple (gui part): should_ripple_all() encapsulates modes Ripple+RippleAll 2022-03-14 19:26:41 -05:00
90770a2788
Consolidate get_grid_beat/music_divisions
This fixes "snap to bar" which previously snapped to beats
2022-03-04 17:51:21 +01:00
5cebd64924
Fix fit tracks
The track-height change needs to be applied so that
vertical_adjustment max range is set correctly.
Otherwise vertical_adjustment.set_value() may fail
or scroll to the wrong position.

In 5b3eacd421 `redisplay_track_views()` was moved from
EditorRoutes to Editor. The call was delegated to the idle
thread, potentially collecting multiple calls before performing
the update.

This resulted in "Fit selection" to set the y-offset before the
height-change was applied.
2022-01-27 19:57:58 +01:00
5b3eacd421
Make editor independent of EditorRoutes 2022-01-27 01:28:49 +01:00
dd4b4dc00b
Move PluginSetup callback to Editor
This is unrelated to the sidebar route-list and should never
have been in EditorRoutes.
2022-01-25 06:27:21 +01:00
f6813e0749 Ruler Markers: customize the menus for Cue Marks, including a way to change the Cue-ID 2022-01-21 10:13:11 -06:00
0204ea1f24
Unify Region Drag/Drop
Identify Regions using PDB::ID. This allows dragging regions
from almost anywhere to anywhere, without special cases.
2022-01-19 17:13:51 +01:00
c916d3d952 Substantial overhaul of tempo display code
Major changes: do not delete and recreate markers and curves for every tempo map
change, attach tempo curves directly to their (preceding) tempo marker, notable
cleanup of TempoCurve class to remove unnecessary members.

More tweaks expected since algorithm for matching markers and tempo map
points is not correct yet.
2022-01-18 19:47:20 -07:00
4db7aa6bdc add Editor API to manage tempo map edits (at least, drags) 2022-01-15 22:53:36 -07:00
7ea072a4f4 editor markers: refactor ::reassociate_metric_marks() to be able to process one marker at a time 2022-01-15 20:04:03 -07:00
0baf0d859d GUI side of cue behavior (makes it available in the ruler context menu) 2022-01-06 12:00:18 -07:00
7c35783d63 various fixes for cue marker creation, dragging, naming 2022-01-05 13:27:47 -07:00
b1f73d25bf actual GUI interaction for cue marker ruler 2022-01-04 15:23:51 -07:00
77d83540b1 copy-n-paste addition of cue marker ruler (based on cd marker ruler) 2022-01-04 15:23:51 -07:00
541b91d293
Implement Bounce Range to Trigger 2021-12-23 22:39:57 +01:00
8d137b1514
Add API to support Editor sidebar DnD outside of the editor 2021-12-14 21:33:24 +01:00
4720a45868
Make convert_drop_to_paths() reusable 2021-12-13 22:50:13 +01:00
1e38797efc PropertyBoxen: move selection-properties into the sidebar 2021-12-08 12:45:11 -06:00
84111a343e Deinterlace MIDI: gui part 2021-11-19 10:28:37 -06:00
93e68a5a00 MIDI Draw: provide a menu for Channel and Velocity 2021-11-18 07:35:13 -06:00
2a6da0113f MIDI Draw: Provide a menu to explicitly select note-length
ToDo: 3,5,7's?  keyboard shortcuts?
2021-11-18 07:35:13 -06:00
b6f290add2 timeline type changes for new ripple code and post-conflict-resolution fixups 2021-08-13 12:51:36 -06:00
3c57e4a485 fix timeline type use 2021-08-13 12:51:36 -06:00
9009bbf986 fix declaration of {Public,}Editor::do_import() (post rebase conflict resolution) 2021-08-13 12:51:36 -06:00
7938d8de4f fix (some) editing based on tempo & meter marks
After beginning an edit operation with TempoMap::write_copy(), the tempoPoint and meterPoint objects
referenced by markers are incorrect, since they refer to the original map, not the copy we are working
on. Fix this with Editor::reassociate_metric_markers()

Some instances requiring this fix may still remain
2021-08-13 12:51:35 -06:00
fed449d54d various fixes to get time stretching basically working again
Time domains are not well respected at present, so more work is needed here
2021-08-13 12:51:35 -06:00
b2655d13f1 make Editor::snap_to_bbt() public 2021-08-13 12:51:35 -06:00