Commit Graph

846 Commits

Author SHA1 Message Date
Robin Gareus c437d6f886 Commit TempoChange undo operation after map update
Tempo Map updates can change a region's position/length, in which case
region-automation may follow the region, and DiskReader:: playlist_ranges_moved
will save additional undo information.

These MementoCommand(s) need to be included in the undo operation.
2022-10-23 23:21:08 +02:00
Paul Davis 25ed864d87 fix find next region boundary : must use absolute value of distance
This matches semantics in 6.9 and avoids negative distances entering the
flow for various next/prev region boundary operations.
2022-10-22 14:25:05 -06:00
Paul Davis cf83815133 add clear-all-cues item to cue marker ruler context menu 2022-10-21 07:52:23 -06:00
Paul Davis 254297355e increment/decrement name changes ... out with old in with the new (gui) 2022-10-07 17:30:45 -06:00
Paul Davis 45e21de209 implement and adopt new conventions for AudioClock use
The class now has two separate methods for setting a duration or a point
value. They MUST be used appropriately, because their behavior is different.

When ::set_duration() is used in timecode mode, an extent (inclusive-end
length) is shown rather than a length.

Some objects, such as the TimeInfoBox, now deliberately shown an inclusive end
for their "end" clock, but this not universally followed, pending more feedback
from users and investigating of conventions in other DAWs.
2022-10-07 16:24:56 -06:00
Robin Gareus d9c6842ea3 Fix region property inheritance (GUI) 2022-10-07 00:36:20 +02:00
Paul Davis 0c2176dd71 move default_triggers_per_box into a namespace ; change value for Ardour to 16 (GUI edition) 2022-10-04 19:55:15 -06:00
Robin Gareus 5fb628d3ed
Use new record-mode pref (2/2), GUI control 2022-09-19 22:50:11 +02:00
Robin Gareus 97f0fac7d5
Copy region properties (2/2) - see prev commit 2022-09-19 22:49:42 +02:00
Paul Davis d2fc142e21 infrastructure and implementation to allow "q" to drive quantize-selected-notes in midi edit mode 2022-08-31 13:53:55 -06:00
itmuckel 63f94d2946 Remove unused includes 2022-08-19 09:27:19 -06:00
Colin Fletcher 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
Colin Fletcher c9446aa1e1 gtk2_ardour: set region marks into currently recording regions
Region actions are generally set insensitive whilst recording, so
special-case the "add-region-cue-marker" action by explicitly enabling it
when starting to roll in record. Additionally, the action becomes disabled
again after it's been executed, so re-enable it after queuing the cue when
recording.
2022-08-09 14:03:16 -06:00
Robin Gareus 3ea5fd5d91
Fix incorrect use of timepos_t::increment API 2022-07-06 01:49:51 +02:00
Ben Loftis fed731cb3d add single range marker: fix dialog to ask for a Range not a Location 2022-06-07 16:35:14 -05:00
Ben Loftis c431575f22 add menu-accessible actions for Consolidate Range 2022-06-06 14:17:38 -05:00
Ben Loftis bd62f76875 fix redundant bounced-clips from a Consolidate operation 2022-06-06 14:17:35 -05:00
Ben Loftis 7225773660 fix Crop operation: all layers, preserve fades 2022-06-06 14:16:57 -05:00
Robin Gareus 8f074200cc
Fix Ferret when using onset detection + split
When not starting at a silent area, onset detection can have
a transient at 0 (region start). This needs to be ignored.
2022-06-02 01:45:47 +02:00
Paul Davis e2e6274956 libardour: change API of Session::request_locate() to include "force" argument (GUI edition) 2022-05-27 18:49:23 -06:00
Paul Davis 399a5b3f25 convert use of operator* for tim::line types with ::scale(ratio_t) (GUI edition) 2022-05-27 12:47:44 -06:00
Ben Loftis 4339e3c729 temporarily remove effective_ripple_mark_start behavior
citations are needed to explain when&how this is useful

the definition of Ripple is "accommodate cut/insert/moves by moving all
 regions to the 'right' (later) of the operation by the same amount".

moving markers to the 'left' of the grabbed_region explicitly breaks the
 definition of ripple. it makes documentation hard.

furthermore, in a more complicated session with multiple tracks, this behavior
 ignores the regions on other tracks and the markers that still might be
 associated with them  (consider the case where you move the first region
 on track A but there are many prior regions on track B with markers over
 them)
2022-05-14 14:47:54 -05:00
Ben Loftis 5f6f01a8e2 fix trim_region_to_{loop|punch} ... coverage logic was reversed 2022-05-10 15:47:56 -05:00
Ben Loftis 764aa75f09 reset_region_scale_amplitude is redundant with reset_region_gain 2022-05-10 15:47:56 -05:00
Ben Loftis 62fd8ecd35 crop_region_to_selection: remove redundant check for a Range
get_edit_op_range() already checks for the existence of a Range
2022-05-10 15:47:56 -05:00
Ben Loftis 256549e0c7 correctly abort the undo record when Editor::clear_markers (et al) have no effect
* move abort_reversible_command into the correct bracketed location

* check for missing _session at top of function to avoid unnecessary nesting

* this fixes an undo 'assert' when an action like "clear xrun markers" has no effect

* this was likely a copy+paste thinko since they are adjacent in the code
2022-05-10 15:47:56 -05:00
Ben Loftis dbd80a6dd0 fix thinko in command name ('set session END' not start) 2022-05-10 15:47:56 -05:00
Ben Loftis 07b468b108 fix undo for toggle_region_mute 2022-05-10 15:47:56 -05:00
Ben Loftis dbe49ae8c4 editor::paste fix a thinko in undo nesting 2022-05-10 15:47:56 -05:00
Paul Davis ae32daa148 allow ARDOUR::Filter to be used with MIDI regions/sources 2022-04-20 17:11:29 -06:00
luz paz 74453cac86 Fix user facing typos
Found via `codespell -q 3 -S *.po,./.git,./share/patchfiles,./libs,./msvc_extra_headers,./share/web_surfaces,*.patch  -L ba,buss,busses,discreet,doubleclick,hsi,ontop,ro,scrollin,seh,siz,sord,sur,te,trough,ue`
2022-04-10 19:58:47 -04:00
Mads Kiilerich d52c727ec5
gtkmm: use get_mapped instead of deprecated Gtk::Widget::is_mapped() 2022-04-08 20:20:10 +02:00
Paul Davis 7293904e53 use new TempoCommand when putting tempo map ops into undo/redo history 2022-04-08 11:58:04 -06:00
Paul Davis 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
Paul Davis a3c5db5d51 ensure that non-drag track height changes cause a call to Editor::redisplay_track_views() 2022-04-05 20:52:10 -06:00
Paul Davis 1999a3aae8 explicitly discard the return value from ::process_redisplay_track_views() 2022-04-05 20:52:10 -06:00
Robin Gareus 9c9f1dbf82
Fix nudge-playhead-backward 2022-03-30 03:08:16 +02:00
Paul Davis e3b66825eb superclock_ticks_per_second: GUI edition changes 2022-03-17 14:15:59 -06:00
Ben Loftis f0372e0b17 ripple (gui part) ripple_marks should work without a plist (Range cut) 2022-03-14 21:35:35 -05:00
Ben Loftis f8f53a4cae ripple (gui part) changes to Range + RippleAll behavior on markers
Range->Delete is the most common type of ripple-editing imho
... so we need to implement ripple_marks for that common action

* markers inside a deleted range should be removed
* range markers (start+end) need special handling
* remaining markers to the right can be rippled by libardour
* implement undo
2022-03-14 21:35:35 -05:00
Ben Loftis 01ef5a5b24 ripple (gui part): should_ripple_all() encapsulates modes Ripple+RippleAll 2022-03-14 19:26:41 -05:00
Ben Loftis 2eb286eb76 make range+region Bounce dialogs more consistent
* cleaner table layout
* explicit options for bouncing to Trigger and Clip List
* any bounce is added to Source list, so remove that from menu
* format context menus to match "(with processing)"
* use same code structure where possible
2022-03-13 19:42:00 -05:00
Robin Gareus 4048bcc6b6
Fix crash when freezing track
The freeze threads needs a thread-local tempo-map to call
Route::bounce_process which runs processors.
2022-03-09 17:47:36 +01:00
Robin Gareus 9cac17ea7d
Speed up silence-stripping when there are many silent chunks
Previously every region fragment was added one at a time,
with each emitting signals and updating the GUI. If there are a
few thousand regions Ardour can freeze for a significant amount
of time.

There is still the issue that the GUI freezes after the progress-bar
reached the end: consolidate overlapping ranges after analysis, then
add regions.

And Playlist::flush_notifications still emits
RegionFactory::CheckNewRegion() for every region individually
and RegionListBase::add_region becomes the bottleneck.

But at least adding 7k regions now returns in under 5 minutes
instead of taking over an hour.
2022-03-08 16:31:47 +01:00
Robin Gareus 080bfdc2d0
Simplify grid next/prev logic
Round[Up/Down]Always does not need an offset to avoid snapping
to the same position.
2022-03-04 19:39:02 +01:00
Robin Gareus 9dabe047f1
NO-OP: clean up and consolidate PH next/prev grid code 2022-03-04 18:29:43 +01:00
Ben Loftis 7cc3fbaccf editor_ops: bounce to trigger: warn user when they try to bounce a range to an already-populated trigger slot 2022-03-03 16:49:28 -06:00
Paul Davis 685a3ebc7e do not use a write copy of the tempo map when not planning to modify the map 2022-02-20 09:31:23 -07:00
Ben Loftis a8cf442bc9 pixel-pushing: clean up the dialog for Range->Bounce to Trigger Clip 2022-02-11 15:32:00 -06:00
Ben Loftis a02689f41e Range->Bounce to Trigger Clip: use UISTate api to set tempo of clip
* also use the desired name without the extra stuff that bouncing adds to the filenam
2022-02-11 15:32:00 -06:00