Commit Graph

827 Commits

Author SHA1 Message Date
Robin Gareus 3c03e4951e
Use updated temporal API 2/2 2021-12-11 15:51:31 +01:00
Ben Loftis 84111a343e Deinterlace MIDI: gui part 2021-11-19 10:28:37 -06:00
Paul Davis b6f290add2 timeline type changes for new ripple code and post-conflict-resolution fixups 2021-08-13 12:51:36 -06:00
Paul Davis bb87f33506 fix timeline types in region/cue marker operations 2021-08-13 12:51:36 -06:00
Paul Davis dec3b9bc2e cleanup mess from manual rebase against master (GUI edition) 2021-08-13 12:51:35 -06:00
Paul Davis 49424ab0e3 Region::_start should be a timepos_t not a timecnt_t (GUI edition) 2021-08-13 12:51:34 -06:00
Paul Davis 125c20e148 manual fixups for recent rebase conflicts left in the wrong state (GUI edition) 2021-08-13 12:51:33 -06:00
Paul Davis eaedcd79d4 fix a bunch of undo-able tempo map operations to use RCU 2021-08-13 12:51:32 -06:00
Paul Davis 75d6ea19c4 fix time/position used when applying MIDI ops 2021-08-13 12:51:32 -06:00
Paul Davis cce695d33a changes required by fixing ambiguities in timepos_t/timecnt_t API (GUI edition) 2021-08-13 12:51:31 -06:00
Paul Davis eec4addcd5 GUI side cleanup forced by explicit BBT_Offset (double) 2021-08-13 12:51:30 -06:00
Paul Davis 18d64f0402 change all Region::nt_*() methods to names without the nt_ prefix (GUI version) 2021-08-13 12:51:30 -06:00
Paul Davis 90553b315f fix up memento command use for tempo map undo/redo 2021-08-13 12:51:30 -06:00
Paul Davis 3c00fab75e remove/hide Session::tempo_map() and use TempoMap::use() instead (thread local shared ptr) (GUI edition) 2021-08-13 12:51:30 -06:00
Paul Davis f0d055ad4d more updates for new tempo map API 2021-08-13 12:51:30 -06:00
Paul Davis 7ef11dc698 continued work on using new tempo map API (before switch to RCU) 2021-08-13 12:51:30 -06:00
Paul Davis 749a49c278 incorporating new tempo map API 2021-08-13 12:51:29 -06:00
Paul Davis 5836a4f2b6 timeline types conversion for editor_ops.cc 2021-08-13 12:51:29 -06:00
Paul Davis 2a08e4bdaa continued work on timeline types conversion. in theory, just editor_ops.cc remains 2021-08-13 12:51:29 -06:00
Paul Davis 7433bc27e0 intermediate, unfinished snapshot of ongoing timeline types work on GTK GUI 2021-08-13 12:51:29 -06:00
Paul Davis 0a469527f1 updated Temporal::Beats ... GUI edition 2021-08-13 12:51:28 -06:00
Paul Davis 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
Paul Davis 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
Paul Davis 1ccf272d58 ripple-all now moves markers too 2021-08-13 12:51:27 -06:00
Paul Davis 0b06c4dc2b manually fix rebase error 2021-08-13 12:51:27 -06:00
Paul Davis 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
Paul Davis e7595f2cd5 follow modified Playlist ripple callback API 2021-08-13 12:51:27 -06:00
Paul Davis 0e2bd5383c GUI changes to follow new Playlist::ripple() API
Current ripple callback does nothing at all
2021-08-13 12:51:27 -06:00
Paul Davis 301b2be5e3 fix clear region cue markers operation to only apply to cue markers within the selected region(s) 2021-08-03 10:19:54 -06:00
Robin Gareus f457225d08
Region loudness normalization GUI #8777 2021-07-20 04:53:57 +02:00
Paul Davis d9877d5c99 prevent add-location-at-playhead-cursor etc. from adding multiple marks at the same location 2021-07-15 09:03:16 -06:00
Ben Loftis 73b0a3fdb9
Layer Display: add explicit actions for stacked+overlaid 2021-07-03 19:06:04 +02:00
Ben Loftis d7bd87eb13
Playlist UI Tweaks: add an action to show playlist selector for selected track 2021-07-03 19:06:04 +02:00
Ben Loftis aaa96ff292
Default_Play_Speed: change some speeds from assuming "1.0" to "default_speed" (gtk part) 2021-07-03 19:06:03 +02:00
Ben Loftis a1257beb23
Default_Play_Speed: prep work (gtk2)
* request_transport_speed should -never- set default_play_speed
2021-07-03 19:06:02 +02:00
Paul Davis 1734fac410 Revert "Paste Mode: overwrite-paste, naive implementation using rec-mode (for testing)"
This reverts commit f4d4dddbeb.

Deferred until after Ardour 6.8
2021-07-01 18:28:04 -06:00
Robin Gareus 83b9ab1bee
Temporarily revert ongoing varispeed development
This reverts bf88f3fe64
until 35813db0f4

in order to move development into a branch, until after the
upcoming 6.8 release
2021-06-26 18:58:24 +02:00
Ben Loftis 3454a34ba4 Default_Play_Speed: change some speeds from assuming "1.0" to "default_speed" (gtk part) 2021-06-25 11:51:35 -05:00
Ben Loftis b4eba1a30b Default_Play_Speed: prep work (gtk2)
* request_transport_speed should -never- set default_play_speed
2021-06-25 11:51:34 -05:00
Ben Loftis f4d4dddbeb Paste Mode: overwrite-paste, naive implementation using rec-mode (for testing) 2021-06-08 08:33:48 -05:00
Paul Davis b17629bddf implement option to move markers during a "remove gaps" operation 2021-05-28 17:43:33 -06:00
Paul Davis 2cf0e94d16 code cleanup of Editor::remove_gaps() (removing functionality derived from copy-n-paste of insert-time) 2021-05-28 13:44:39 -06:00
Paul Davis bbcdd959bf dialog for remove gaps operation 2021-05-28 13:44:39 -06:00
Paul Davis 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
Paul Davis cd7c10c902 implement working undo/redo for region/cue marker operations 2021-05-27 17:17:40 -06:00
Paul Davis 3bfb01a77b improved logic for Editor::add_region_marker() 2021-05-27 17:17:40 -06:00
Paul Davis c444a81f1a offer alternative region marker "promotion" method to CD marker (rather than just global marker) 2021-05-25 14:10:36 -06:00
Paul Davis 8774740e72 add action to "promote" region cue markers to global marks 2021-05-25 14:01:30 -06:00
Robin Gareus 445f9a51bf
Fix ripple undo/redo
Ripple edit undo/redo needs a "recursive diff" of all regions
in the playlist. To work properly owned changes have to be
cleared first, previously unrelated edits were be collected too.

This includes a more consistent version of
7a89d56009 using rdiff() instead of explicitly
saving region diffs.
2021-05-23 17:42:33 +02:00
Robin Gareus 31bbf03a67
NO-OP: always use braces (styleguide #4) 2021-05-23 17:37:28 +02:00
Ben Loftis 5fdbd71d89 Fix bounced file+region names: concatenating all the names was a bad idea. (gtk part) 2021-05-20 11:42:48 -05:00
Paul Davis 3047b25527 split out region marker actions to their own submenu; implement remove and clear all 2021-05-18 20:59:37 -06:00
Paul Davis bd2d8b8c87 tweak Editor remove-marker APIs to set state for removing region cue markers 2021-05-18 16:50:55 -06:00
Paul Davis 3713175bf1 allow user to set name for new region cue marker 2021-05-18 16:17:37 -06:00
Paul Davis f1390ca7f7 add (theoretical) undo-ability for region markers and use source API instead of region 2021-05-14 18:37:50 -06:00
Paul Davis a1c68460be add basic/initial code for action to add a region marker 2021-05-14 18:37:50 -06:00
Paul Davis 981fc6b3cd transition-to-roll should work whether rolling or stopped 2021-05-04 15:57:03 -06:00
Paul Davis 8c427279d9 transition-to-roll should not set the default transport speed 2021-05-04 15:37:04 -06:00
Paul Davis ac53a9bbf8 remove unnecessary 2nd argument from Session::request_locate() calls (default value is identical) 2021-05-03 17:40:41 -06:00
Robin Gareus 61885f0284
Explicitly set announce=false when creating regions (2/2)
This is in preparation for to improve consistency of
RegionFactory::create() default parameters (change
default to true).
2021-04-30 18:40:51 +02:00
Robin Gareus 2c64736604
Fix crash when consolidating range with automation
The undo command needs to be started before calling
playlist->add_region() because that may move automation
or include ripple changes. see the following backtrace:

```
UndoTransaction::add_command
ARDOUR::DiskReader::move_processor_automation
ARDOUR::Route::foreach_processor
ARDOUR::DiskReader::playlist_ranges_moved
ARDOUR::Playlist::flush_notifications
ARDOUR::Playlist::RegionWriteLock::~RegionWriteLock
ARDOUR::Playlist::add_region
Editor::bounce_range_selection
```

Except. it seems automation is moved incorrectly in this case..
2021-04-29 21:17:22 +02:00
Paul Davis 54c135c8b9 fix "trim to loop" region edit operation so that it applies to any region that intersects the loop, not just those spanning it 2021-04-25 09:42:06 -06:00
Paul Davis 52b7e68102 use new Session transport API calls in GUI 2021-04-19 16:14:08 -06:00
Robin Gareus ac5bca4a92
Clean up RouteUI header
* Consolidate access modifiers
* Remove all public member variables
* Only expose required functions, use private
  whenever possible
* Rename private members, prefix underscore
* Remove cruft
2021-03-27 17:44:34 +01:00
Robin Gareus 86a594fe90
Mitigate batch gain-changes #8576
This combines SessionEvent per playlist. Now per change
there are "only" two SessionEvent::Overwrite events
queued per playlist in the GUI thread for later processing
the Butler.

These are triggered by Playlist::ContentsChanged()
and Playlist::LayeringChanged(), both of which trigger
DiskIOProcessor::playlist_modified.

(Previously there used to be two per region)
2021-03-22 02:14:30 +01:00
Robin Gareus 3bda6020b9
Remove excess parentheses 2021-03-18 04:09:04 +01:00
Paul Davis 4abe3ade28 do not commit reversible commands when clearing locations if nothing was changed 2021-03-16 17:40:25 -06:00
Paul Davis bcb3e75cec GUI to remove xrun markers 2021-03-16 16:49:49 -06:00
Robin Gareus 33de08e9e7
Do not commit empty split undo transactions
When no region(s) are selected and none are under the edit-point,
only a selection change was committed as undo action.
2021-03-10 14:20:24 +01:00
Robin Gareus bdc1cdc15f
Fix crash when separating ranges with automation
playlist->partition() calls DiskReader::playlist_ranges_moved()
which may add Panner and Fader automation state changes.

The reversible command has to be started before calling
playlist->partition(). Simply collecting playlist->rdiff() after
the fact is not sufficient.
2021-03-10 13:55:32 +01:00
Robin Gareus 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
Ben Loftis d0abe7e742 Consolidate action adds a whole-file region (for the Source list) AND a region on the timeline (just as if you recorded it) 2020-07-26 09:53:47 -05:00
Ben Loftis 80a7d32e07 Prompt user for name of Range and Region bounces (gtk part) 2020-07-26 09:53:47 -05:00
Paul Davis eaf88040cc NO-OP: add missing braces 2020-07-05 17:48:16 -06:00
Paul Davis 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
Paul Davis c82ca66fcc fix for #8112. No need to request transport roll before requesting loop play
And doing so confuses ardour
2020-05-16 09:31:43 -06:00
Johannes Mueller 1280360a65 Revert "Fix 8061 (partly): Don't scroll down if no further tracks to scroll to"
This reverts commit 81cbf36c56.

Limiting scrolling has other drawbacks. A proper fix for the redraw issue
has to be found.
2020-04-27 22:58:32 +02:00
Johannes Mueller 81cbf36c56 Fix 8061 (partly): Don't scroll down if no further tracks to scroll to
The issue remains if a track is selected by a "fit-selection" action second
last track covers the whole trackview. Then when scrolling one track up, the
huge track disappears and a smaller track follows, that covers a lot less
space.

-> Proper redraw of the track view is still needed.
2020-04-27 21:51:57 +02:00
Robin Gareus 485ac45477
Fix region boundary cache lookup segfault
When the cursor position is after the last item in the vector,
upper_bound returns the last given iterator, here:
`region_boundary_cache.end()`, which is invalid to dereference.

Furthermore prevent possible  duplicate prev/next pair at zero,
when using the video-timelime.
2020-04-22 22:37:43 +02:00
Robin Gareus 929754f48c
Prefer PBD::Unwinder to temporarily change a variable 2020-04-17 22:49:45 +02:00
Paul Davis e4e035c6e2 remove debug output 2020-04-16 17:48:12 -06:00
Paul Davis 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
Paul Davis 0ecf1e40ea add Editor-level action to toggle track layer display 2020-04-03 18:54:51 -06:00
Paul Davis 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
Paul Davis 98884e9736 rename variable (frames -> samples) 2020-04-01 10:10:50 -06:00
Paul Davis b7e30cfc24 remove debug output 2020-03-30 17:37:10 -06:00
Paul Davis ff08fbb969 when build the region boundary cache, use the "end" of a region, not its "last sample"
It makes no sense to every align a region start/sync point during a drag or alignment operation
with the last sample of another region. It only makes sense to align with the position immediately
after the last sample of the other region (e.g. directly sequencing regions).
2020-03-30 17:25:07 -06:00
Paul Davis a4d7b45fe0 remove destructive/tape mode tracks 2020-03-17 16:31:49 -06:00
Robin Gareus d9836ec002
Update GUI: freeze operation error/warnings 2020-03-14 13:25:54 +01:00
Robin Gareus 8710a2d943
Dialog default to cancel (#7915)
There are various ways to cancel a dialog. Only checking for
RESPONSE_CANCEL is not sufficient. e.g. Esc causes a delete-event.

 * Gtk::RESPONSE_CLOSE
 * Gtk::RESPONSE_REJECT
 * Gtk::RESPONSE_DELETE_EVENT
 * Gtk::RESPONSE_CANCEL
 * Gtk::RESPONSE_NO

Among others this fixes "Clicking session > open,
then hitting ESC opens the currently selected folder and session"
2020-02-27 23:27:42 +01:00
Ben Loftis cf4d7387d2
Use a sensible min length for default session-duration
If the user tries to set the Start or End marker on an empty session,
apply some sensible defaults for the resulting session range.
2020-01-26 19:36:23 +01:00
Paul Davis 215d5d556f handle possible failure of a region rename 2020-01-23 14:25:38 -07:00
Ben Loftis c8faadee4b Fit Selection (Vertical): if we cant fit all selected tracks, report that to the user. But still fit what we can. 2020-01-23 14:11:18 -06:00
Paul Davis 47767738b9 rename DoTheRightThing to RollIfAppropriate 2020-01-18 08:49:18 -07:00
Paul Davis 3c00048b0c Session::request_locate() takes a tri-valued second argument for "roll-after-locate"
This allows callers to defer logic about auto-play/current rolling state and more to TransportFSM where it
can be cnentralized and is less ambiguous
2020-01-18 08:49:18 -07:00
Robin Gareus 2b55d6dce3
First batch of MessageDialog replacements 2019-12-14 23:44:01 +01:00
Robin Gareus ccefc64418
Reset paste-count, paste-offset on undo/redo
This fixes an workflow edge-case when undoing a paste in order
to paste at a different location on the same track or automation lane.
After undo, any accumulated paste-offset needs to be reset
2019-11-26 23:49:06 +01:00
Robin Gareus fb4cbb9f9e
Correctly handle Zoom > Edit-point > Mouse
Previously this failed if the event was initiated outside
of the canvas (e.g. Zoom buttons).

This also fixes a special case of Zooming to an edit-point at zero.
2019-09-17 17:18:29 +02:00
Robin Gareus e7637d7786
Fix mute toggle actions when mute is automated
Track menu, as well as mixer-shortcut to set/unset mute
of selected tracks needs to send a start_touch() event, otherwise
the change is not effective.
2019-09-03 22:01:35 +02:00
Nikolaus Gullotta f44a436f70
Move StripSilenceDialog XML to dedicated function
This moves the Session::add_extra_xml() call out of editor_ops.cc and
moves it to its own class method StripSilenceDialog::finished()
2019-08-30 14:44:50 -05:00