Commit Graph

1051 Commits

Author SHA1 Message Date
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
5153124664 change (GUI) Marker objects to accept any Canvas::Item as parent, and use this to draw BBT position markers in the BBT ruler 2021-08-13 12:51:34 -06:00
4f1ad4ed0d start adding new BBT marker support 2021-08-13 12:51:34 -06:00
c22c8ed69f get TempoMarkerDrag and BBTRulerDrag to compile 2021-08-13 12:51:33 -06:00
6a44dcbdad add Editor::canvas_event_time()
See comments in header for more
2021-08-13 12:51:33 -06:00
5074553f15 add Editor::default_time_domain()
Not 100% certain about the logic here, but at least the method exists now
2021-08-13 12:51:33 -06:00
e653e61923 fix up redrawing Tempo/Meter rulers when tempo changes 2021-08-13 12:51:32 -06:00
06f93e65b2 fix timefx to use ratio_t from the beginning of the operation 2021-08-13 12:51:32 -06:00
dade9994d8 collect together modifying TempoMap methods, and make ::apply_with_metrics() more clearly const 2021-08-13 12:51:30 -06:00
7ef11dc698 continued work on using new tempo map API (before switch to RCU) 2021-08-13 12:51:30 -06:00
749a49c278 incorporating new tempo map API 2021-08-13 12:51:29 -06:00
f67029bd02 random commit to facilitate trivial move of work from laptop back to main system 2021-08-13 12:51:29 -06:00
5836a4f2b6 timeline types conversion for editor_ops.cc 2021-08-13 12:51:29 -06:00
2a08e4bdaa continued work on timeline types conversion. in theory, just editor_ops.cc remains 2021-08-13 12:51:29 -06:00
5b2a435e02 getting editor_drag.cc to compile 2021-08-13 12:51:29 -06:00
9d69fa3820 another day or two's work on timeline type conversion 2021-08-13 12:51:29 -06:00
1b06fcb335 another snapshot of ongoing work on timeline types. still not compilable 2021-08-13 12:51:29 -06:00
1ee38e7a7f another in-progress snapshot of gtk2_ardour after getting audio_clock.cc to compile 2021-08-13 12:51:29 -06:00
7433bc27e0 intermediate, unfinished snapshot of ongoing timeline types work on GTK GUI 2021-08-13 12:51:29 -06:00
23aa663f9d when doing a ripple-all drag, move relevant markers during the drag too
Note that this is purely GUI-level: the ARDOUR::Locations are changed at the end of the drag
in Editor::ripple_marks()
2021-08-13 12:51:28 -06:00
12b536d8f2 add API to fetch all regionviews after a given position 2021-08-13 12:51:28 -06:00
ac1d5bac0a improve rippling of marks to include any in the gap between the primary-dragged region and the one before it 2021-08-13 12:51:27 -06:00
0c77a35178 completely remove RegionRippleDrag, and merge Editor::add_region(_copy,}_drag() into one method 2021-08-13 12:51:27 -06:00
77e67809f9 we removed Splice mode from the GUI 7 years ago; now remove all code related to Splice mode (GUI edition) 2021-08-13 12:51:27 -06:00
e5175f51d6 make region-selection on click apply across tracks if RippleAll is in use 2021-08-13 12:51:27 -06:00
636f1331e8 stop using ripple callback API, add Editor::should_ripple() and Editor::do_ripple() to manage rippling 2021-08-13 12:51:27 -06:00
e7595f2cd5 follow modified Playlist ripple callback API 2021-08-13 12:51:27 -06:00
0e2bd5383c GUI changes to follow new Playlist::ripple() API
Current ripple callback does nothing at all
2021-08-13 12:51:27 -06:00
c5cbc2d2d3 Playlist UI Tweaks: remind the user (more strongly) about the action they are taking 2021-07-20 16:00:19 -05:00
2b066293fb
Set playlist ID when importing to new tracks
This amends 730a0954 and b27bb586.
This also restores the original API for do_import()
and do_embed() as used by Lua scripts.

Note that this uses distinct IDs when importing both audio
and MIDI in the same DnD request.
2021-07-08 05:28:10 +02:00
73b0a3fdb9
Layer Display: add explicit actions for stacked+overlaid 2021-07-03 19:06:04 +02:00
d4392b4a1b
Playlist UI Tweaks: provide radio-buttons to switch ALL, Rec-armed, and grouped playlists (wip) 2021-07-03 19:06:04 +02:00
d7bd87eb13
Playlist UI Tweaks: add an action to show playlist selector for selected track 2021-07-03 19:06:04 +02:00
730a0954d7
Playlist UI Tweaks: assign a pgroup_id on Import (gtk part) 2021-07-03 19:06:04 +02:00
b23e13b331
Playlist UI Tweaks: when prompting user for a playlist name: remind them if it is a Copy or a New (empty) playlist 2021-07-02 01:44:56 +02:00
bcab07af63
Resolve microseconds_t ambiguity 2/2 2021-06-27 17:33:06 +02:00
45bd2c47d8 Brush Drag: refactor Brush-drag into its own Drag class (operation is still weird though) 2021-06-17 10:56:30 -05:00
1c9bb9ab41 Playlist UI tweaks: refactor PlaylistSelector (life-cycle, code-cleanup)
* You can now show a selector for each track, rather than one global dialog
* Removed the 'cancel' button: it was too easy to unintentionally revert your selection
* Correctly sort and name new playlists when they are added or renamed from the P menu
* Fix problem where list contents disappeared when changing desktops (on_unmap_event)
2021-06-08 08:33:48 -05:00
285101d88c Cruft removal: behavior of Region List no longer needs these functions (gtk part) 2021-06-08 08:33:48 -05:00
a8395718bc Playlist UI tweaks: rationalize playlist functions in Editor::
* new global playlist functions for {all | rec-armed | selected} tracks.
* new API passes (bool copy) arg instead of separate functions for copy_X.
* consistently use mapover_X functions to consolidate code
* update Lua bindings to match
2021-06-08 08:33:48 -05:00
cf999ecaa9 Playlist UI tweaks: clarify purpose of get_region{view}s_corresponding_to 2021-06-08 08:33:48 -05:00
b339d083a8 Playlist UI tweaks: relax requirement that playlists have a discrete name, and use pgroup for organization instead 2021-06-01 11:59:13 -05:00
b17629bddf implement option to move markers during a "remove gaps" operation 2021-05-28 17:43:33 -06:00
bbcdd959bf dialog for remove gaps operation 2021-05-28 13:44:39 -06:00
d0f94dd63d add "remove gaps" editing operation
Like the libardour functionality it uses, this likely needs work to properly deal with the
intended cross-track workflow
2021-05-28 12:36:17 -06:00
c444a81f1a offer alternative region marker "promotion" method to CD marker (rather than just global marker) 2021-05-25 14:10:36 -06:00
8774740e72 add action to "promote" region cue markers to global marks 2021-05-25 14:01:30 -06:00
6277419673 Rulers: do not trigger ruler auto-display when only selecting between bbt subdivisions (#8717)
Also remove 'nonmusical' construct which was a convoluted way
 to handle GridNone when determining how to draw grid lines.
2021-05-24 16:45:42 -05:00
3047b25527 split out region marker actions to their own submenu; implement remove and clear all 2021-05-18 20:59:37 -06:00
bd2d8b8c87 tweak Editor remove-marker APIs to set state for removing region cue markers 2021-05-18 16:50:55 -06:00
91ec860b3b redesign color mgmt when entering/leaving markers of various kinds 2021-05-18 16:17:37 -06:00
1685843082 global marker objects do not need a canvas height, so remove member and API to manage it
They extend (down) from an origin to COORD_MAX. The height is irrelevant
2021-05-14 18:37:50 -06:00
a1c68460be add basic/initial code for action to add a region marker 2021-05-14 18:37:50 -06:00
3e47057609 import process now allows optional import of MIDI markers/cues 2021-05-07 14:58:16 -06:00
39334279b5
LAN for ranges 2021-04-13 00:10:38 +02:00
1bffdfc334
Open add-route dialog on double-click or context-click 2021-03-28 20:39:34 +02:00
bcb3e75cec GUI to remove xrun markers 2021-03-16 16:49:49 -06:00
7e196e7559 snap-revisited: Fix occasional variance between the visible ruler and the snap grid
code changes:
  bbt_ variables don't need to be global to editor; we only use these in compute_bbt_ruler_scale now anyway
  drive the ruler with the same coarse-ified bbt_ruler_scale that we calculate for the snap grid
2021-02-20 10:35:36 -06:00
d644bb16f6 snap-revisited: Add finer (64ths and 128ths) Ruler scalings to match those Grid selections 2021-02-20 10:35:36 -06:00
01bb38d99e
Add option to en/disable showing automation-lane on touch 2021-02-09 02:11:09 +01:00
cf6e785ed3
Move Playlist GUI functions to RouteUI
This allows to re-use playlist editing in all RouteUI derivatives,
not just the main editor time axis header.

The change is mostly a NO-OP, simply moving methods from
RouteTimeAxisView (is-a RouteUI), to RouteUI.
2021-01-26 01:54:33 +01:00
4769c387f3
Expose EditorCursor via public editor API
This is in preparation to subscribe to playhead cursor position
changes in the recorder-UI.

This change also clean up the API, replacing a public variable
with a const access method and follows #12 of
https://ardour.org/styleguide.html
2021-01-08 18:39:56 +01:00
e85ae7f9a6
Verbose cursor audio region peak display
https://discourse.ardour.org/t/is-it-possible-to-view-audio-levels-in-db-by-moving-cursor-over-a-waveform/105199
2020-12-30 13:42:42 +01:00
818a81aa40
Prepare removing static selection API 1/2 2020-10-18 14:28:38 +02:00
02a31b97b2
Add Loudness Assistant to session menu 2020-07-23 04:11:47 +02:00
251f683119
Allow loudness analysis for session-range 2020-07-21 02:18:39 +02:00
239319c214
Initial prototype for session loudness #8318 2020-07-20 03:37:14 +02:00
ad6de3c233 when carrying out MIDI editing operations, be sure to act only once per Model when the selection involves non-forked copies
Still can fail if the non-forked copies have been modified enough, but user should not multi-select them in that instance
2020-07-02 23:15:10 -06:00
575c818482 when a MIDI region has a note selected with none previously, cancel existing MIDI region/note selection 2020-05-01 17:39:13 -06:00
65f7a6a938 changes to deal with region/note selection when changing into/out of internal edit mode
Also, activate MIDI editing actions so that they are effective in internal edit mode
2020-04-16 17:48:12 -06:00
eca7888047 NOOP: newline removal 2020-04-16 17:48:12 -06:00
0ecf1e40ea add Editor-level action to toggle track layer display 2020-04-03 18:54:51 -06:00
9ca9aa8ae1 add new Editor method to toggle all existing automation
Applies to selected tracks if non-empty; all tracks otherwise
2020-04-03 13:28:58 -06:00
75adc33629
Remove unused variable 2020-04-01 22:55:06 +02:00
d7500056fc stop transport clocks from jumping after the playhead is moved via a CursorDrag 2020-03-25 19:24:38 -06:00
3a9a9f247f
Clear import-status shared-ptr<> after use
Previously "Sequence files" set import_status.track and never
reset() the shared pointer. This resulted in various follow up
issues.
2020-02-25 02:37:52 +01:00
142ce953da Split Select-All-Tracks into 2 appropriately named actions
Existing function select-all-tracks is now renamed select-all-visible-lanes, to match its behavior.

New function select-all-tracks will select all Tracks, as the name implies.

To maintain consistency for those users who actively used select-all-tracks,
  the default shortcut ctrl+t  will continue calling select-all-visible-lanes.
2020-01-22 10:33:15 -06:00
dba7421153
Allow public access to the editor-mixer-strip
This is currently used by Mixbus to sync visibility of switches on
the editor-mixer-strip with the main mixer.
2020-01-05 19:22:55 +01:00
a701882e66
Add convenience methods to test for active drags 2019-11-09 05:59:55 +01:00
4050ca5633
Update GPL boilerplate and (C)
Copyright-holder and year information is extracted from git log.

git history begins in 2005. So (C) from 1998..2005 is lost. Also some
(C) assignment of commits where the committer didn't use --author.
2019-08-03 15:53:15 +02:00
da3d8e5418 (Source List) Implement insert-region action... now uses the Source List. 2019-08-01 12:11:31 -05:00
50786b3e5c (Source List) Recover Regions feature: WIP 2019-08-01 12:11:31 -05:00
b409c58ee6 (Source List) Fix drag-n-drop. 2019-08-01 12:11:31 -05:00
71c2ed8160 (Source List) Source list, Region List: Resolve various action+behaviors between the 2 lists.
Duplicate the remove_unsued_region action in the Session->Cleanup menu, for discoverability.
Region list should use the same Region actions as the canvas...
OK, now resolve the change in use-cases of Region List and Source List.  tentative.
Rough-in remove_selected_sources (Delete in Sources list).
Column tweaks.
2019-08-01 12:11:31 -05:00
c12a017728 (Source List) Region Tags (gtk2 part) 2019-08-01 12:11:31 -05:00
b1019bbbf6 (Source List) Region List rewrite (gtk2 part)
See:  https://docs.google.com/document/d/1sI7p9RoRVZtNx2n67RvBa0_16fuZblV_lNkkKN2g93s/edit?usp=sharing
2019-08-01 12:11:31 -05:00
90962d3426 (Source List) Source property signals (gtk2 part)
See:  https://docs.google.com/document/d/1sI7p9RoRVZtNx2n67RvBa0_16fuZblV_lNkkKN2g93s/edit?usp=sharing
2019-08-01 12:11:31 -05:00
675759c167 Update references to ptfformat -> ptformat && fix api calls 2019-06-22 17:26:05 +10:00
01a43c6b1e
Another round of whitespace fixes 2019-04-09 00:27:33 +02:00
50303d90bd
NO-OP: whitespace, indent 2019-04-08 20:58:18 +02:00
8a7e452265
Yet another "Rect frame" (not a sample) 2019-04-08 20:57:56 +02:00
12a415f077
Cleanup Editor/Marker context-menu
This could have caused crashes previously:
::build_range_marker_menu() may have created range_marker_menu
while the GUI wanted transport_marker_menu.
2019-03-07 23:50:46 +01:00
3bc9281c31
Fix some Gtk::Menu related memory leaks
A Gtk::manage()d widget will be deleted when its parent container
is destroyed. Top-level context menus are not inside a container and
hence need to be manually deallocated.

This adds explicit delete calls for menus where there is a
member variable reference to the Menu.
2019-03-07 23:50:32 +01:00
204d7bf76c
Remove cruft: unused members 2019-03-07 22:25:19 +01:00
b410cd07ab
Remove unused region_edit_menu & edit-point action 2019-03-07 22:25:19 +01:00
47d143a45d
Remove unused RulerType 2019-03-01 00:52:36 +01:00
Alex Pilon
e7091cb2cd
Observe preference to prompt for names when adding range markers 2018-12-28 17:25:30 +01:00
922bc86b8e
Video-Frame (not sample) 2018-12-13 17:44:58 +01:00
fc83d044f8 use ActionManager namespace, rather than ActionMap objects, and remove all per-context action maps 2018-12-10 08:34:01 -05:00
4423945643 start using ActionMap in preference to ActionManager 2018-12-05 17:33:06 -05:00
0154c82fa3 fix several inter-related problems with libptformat 2018-10-14 20:35:31 -04:00
a5a5ba1ace Clarify where the file 'ptfformat.h' can be found 2018-10-13 13:49:50 +01:00
031b910cab PT import: editor_pt_import complete rewrite 2018-10-12 19:09:40 +11:00
232096bcb2 NO-OP: clean up whitespace, separate methods 2018-07-27 00:28:52 +02:00
0883f02de9 new_grid: The Return of the snap_to_X functions.
We no longer assume that Snap always uses the visible ruler lines.
 If you want to snap to the grid, and ignore the users zoom scale, use SnapPref::SnapToGrid_Unscaled
 This fixes 2 (known) oversights: "snap region(s) to grid" and "regions whose start are left of the canvas edge".
2018-07-27 00:28:47 +02:00
808dc8ad64 new_grid: fix some thinkos in ruler math, to better match sensible grid lines.
Tweak enums to better match the Grid values they represent.
2018-07-27 00:26:21 +02:00
fcabb27561 Remove some redundant calls to snap_to(). get_preferred_edit_position() already did it. 2018-02-27 08:55:17 -06:00
1a293bb480 Add drop-shadow decorators to menu bar and transport toolbar.
Allow status bar to fill available width.
2018-02-19 08:05:55 -06:00
c206fa98a1 Re-pack the master meters (in the toolbar) so the editor_meter_peak_display button is more clickable. 2018-02-14 14:47:00 -06:00
0299229e41 SoloSelection: gui part. 2018-02-11 09:39:45 -06:00
dc61256466 new_grid: Rewrite of Snap and Grid. (squashed commit)
Separate Snap from Grid.  Lots of naming changes.
Multiple simultaneous snap options allowed. Grid is one of the possible Snap options.
Grid uses the same data as the rulers.  Replace complicated tempo_lines with simple grid_lines.
The Grid is zoom-scale-sensitive along with the rulers.  If you are zoomed out, grid becomes coarser.
2018-02-09 09:59:39 -06:00
c6eab71435 new_snap: Snapped Cursor ( squashed commit )
Snapped Cursor is a line that follows the edit point, and indicates where the operation will occur.
This replaces and extends the line that appears with the Cut tool.
New associated preferences:  snap_threshold and show_snap_cursor.
2018-02-09 08:21:45 -06:00
ba2b136af2 NO-OP: whitespace 2017-12-12 00:13:12 +01:00
dade19310d Lua scripting: add convenience function Editor::trigger_script_by_name(). 2017-12-07 11:08:26 -06:00
43f329256e Consistent default argument for virtual fn. 2017-11-23 10:45:04 +01:00
98439cf88c GUI to set clock-origin marker 2017-11-23 00:13:44 +01:00
231e25544b Tweak 842d758e: selection & move into view
Use separate editor + mixer flags for moving selected tracks into view.
Changing selection in the Editor will only pan the mixer-view and vice-
versa. This fixes an issue with the track that is being clicked-on to
be moved out of view (due to groups)
2017-10-21 21:07:18 +02:00
7db12f6b12 convert codebase to use Temporal for various time types 2017-09-24 12:03:54 -04:00
30b087ab3d globally change all use of "frame" to refer to audio into "sample".
Generated by tools/f2s. Some hand-editing will be required in a few places to fix up comments related to timecode
and video in order to keep the legible
2017-09-18 12:39:17 -04:00
631629b8e7 Editor zoom: add zoom_to_extents() 2017-08-26 23:06:29 -05:00