Commit Graph

555 Commits

Author SHA1 Message Date
André Nusser
6a248b61f0 fix duplicating multiple selected regions - fixes #6202 2015-09-20 22:22:39 +02:00
646bc2bb43 fix possible endless loop in silence detection 2015-09-19 19:00:43 +02:00
6b019a4953 Move UIConfiguration Singleton into UIConfiguration header
This removes the direct dependence on ardour_ui.h from 39 files
2015-09-16 16:55:17 -04:00
7b82277c7e Don't try and split a region when dragging, should fix bug #6338 2015-09-16 16:28:18 +10:00
3eb7ee6ac1 Check that a route has a track before trying to insert time on it.
Routes which are busses don't have a track, and thus no playlists either:
avoid a crash when inserting time when a bus is selected and 'all
playlists' is chosen.
2015-09-10 11:50:20 +01:00
43f3c0e0f2 clean-up previous commit 2015-08-27 10:13:35 -05:00
84845833c1 Add missing actions from MB2 for Mike:
Set-Loop-Start/End-From-Edit-Point
Set-Punch-Start/End-From-Edit-Point
2015-08-19 14:53:35 -05:00
9673e6b271 merge fix again 2015-07-16 17:14:14 -05:00
46c8369328 merge fix 2015-07-16 16:13:24 -05:00
a81bfbfc41 use Tracks' MainMenuDisabler during session lock (could be improved with more RAII) 2015-06-29 14:18:09 -04:00
ee791f251a make the quantize dialog persistent so that settings are retained 2015-06-26 12:47:11 -04:00
94e4e2f55f rename TempoMap::cut_time() to remove_time()
Everywhere else, 'cut time' has been renamed to 'remove time': for consistency,
rename this one remaining function to match.
2015-06-25 15:33:53 +01:00
b56bb944f6 Rename 'Cut time' to 'Remove time'
'Cut time' implies that the cut timeline items might end up on the
clipboard to be pasted somewhere: this isn't the case at present, so rename
the functions, class, &c. to say 'remove' rather than 'cut'.

Rename insert_time_dialog.{cc|h} to insert_remove_time_dialog while we're
at it.
2015-06-17 17:15:21 +01:00
721608aef3 Update 'Cut time' to match 'Insert time', and fix cut-time moving range markers
Add options to move glued & locked markers to Editor::cut_time(), in line
with the insert_time() implementation.

Fix up the order in which operations apply to range marker start & end
points, to avoid problems when a range which lies after the cut point is
shorter than the length of the cut.
2015-06-17 17:15:21 +01:00
e234e98f13 Use 'Insert time' dialogue for 'Cut time' too. 2015-06-17 17:15:21 +01:00
292f704b30 Insert time: don't unlock markers we're not going to move anyway
Move checking for locked markers in Editor::insert_time() so it doesn't
happen if we're going to skip the marker because it's glued to musical
time.
2015-06-17 17:15:21 +01:00
34e1e00f8b Insert time: fix moving of range markers
When inserting time and moving a range marker, move its end first, before
moving its start, so that if the time being inserted is greater than the
length of the range, we don't try to set its start to after its end.
2015-06-17 17:15:21 +01:00
nick_m
d019ee836c Use a better pattern to avoid abort_reversible_command().
- also, duplicated regoins are now selected and some end-of sesion
	  bugs fixed there.
	- should fix lack of tempomap undo in Editor::insert_time ()
2015-06-17 09:54:23 +10:00
nick_m
4c1d79af4a Unbreak region brush drag wrt undo, avoid some dangling commands in the gui
- also allow moving of automation lines in internal mouse mode.
	- this is also a first pass at ensuring that if an operation does
	  nothing, avoid an undo entry.
2015-06-17 09:54:22 +10:00
4aace9be68 new actions: allow user to set session start and end to playhead location 2015-04-27 15:59:03 -05:00
ben
e2afdb21c3 minor tweaks to Cut Time dialog. Use an enum to tell preferred_edit_location what to ignore, so cut and insert dialogs will never use mouse location. 2015-04-21 10:22:28 -05:00
84f0dceefb Port 'Cut time' code from Mixbus
Copy the 'Cut time' code from Mixbus, making a few obvious fixes to work in
A3 (e.g. nframes_t => framepos_t / framecnt_t).

Seems to work to move & remove markers, tempo & meter markers, and regions on
selected tracks.

Still TODO:
 - use existing A3 'Insert time' dialogue
 - make it respect 'No selection = all tracks'
 - rename the command to something like 'Remove time' or 'Delete time': 'Cut'
   sounds to me as if the removed range should end up on the clipboard ready
   to be pasted somewhere, which of course it doesn't.
2015-04-21 10:22:27 -05:00
803853b4a4 rationalize incorrect design for removing tracks.
Still requires a way to make this work correctly from the mixer window
2015-04-06 17:56:23 -04:00
d05c09c1f6 consistent message session start->end. 2015-03-25 12:33:51 +01:00
5dc7866132 only temp. disable visual state saving. 2015-03-21 16:09:35 +01:00
f121d04d6d vertical fit: hide tracks in-between 2015-03-21 16:09:35 +01:00
6874bca886 vertical scroll stop on automation lanes 2015-03-19 20:32:59 +01:00
45f874cfab remove locate before loop, which was causing intermittent loop behavior 2015-01-30 10:26:27 -06:00
c7affd79c2 remove track-selection requirement so fit_selected_tracks works as coded. change name to fit-selection. remove action to zoom (both axes) because this can trivially be accomplished by clicking (f)it and (z)oom sequentially, and it frees a keybinding. remaining bug: Fitting a selection of MIDI regions doesnt work right 2015-01-11 11:46:36 -06:00
f7e3d1be2c change Split menu entry to say Split/Separate (it was already doing that anyway). also fix a bug so you can drag the playhead and split at the playhead location 2015-01-08 16:00:49 -06:00
a4f7c21ec3 now that regions and range selections are exclusive, the separate actions to set ranges or zoom to selections are redundant. save some menu entries and keybindings by consolidating them. also consolidate some code with new function get_selection_extents(). as a side-effect, this checkin fixes the assert failure in play_with_preroll 2015-01-07 15:31:30 -06:00
2a251b4570 MusicalTime => Beats. 2015-01-07 00:12:07 -05:00
nick_m
61315c314d Make editor undo/redo actions sensitive at appropriate times. 2015-01-02 08:01:12 -05:00
nick_m
a795892492 Separate selection operations into their own temporary history mechanism.
The user can now replay *all* earlier selection operations until the next
session undo/redo command, or the completion of a new operation.
Nothing relating to selection ops is stored, and selection operation history
is begun on first idle.

Selection operation history is fundamentally different from the history of
operations which act on a selection in terms of both their viewport and the
amount of information required to replay them.
WRT undo, the user of a selection op doesn't care about the viewport state
at the beginning of an op, but rather that at the end of the previous one.
2015-01-02 08:01:12 -05:00
4c0cebf7f9 MIDI transform dialog. 2014-12-28 16:06:44 -05:00
c5db19bc52 fix "alt+g" duplicate range selection.
This is a somewhat wacky workaround but no there is
no better solution in sight.

Related bug:
 select range, save, quit, restart & re-load session
-> range selected but tool == object
2014-12-26 13:10:01 +01:00
12a7f12b0b Context menu for applying edits to note selection. 2014-12-25 15:32:10 -05:00
1211278a2b consolidate zoom-to-range and zoom-to-regions into: zoom-to-selection. ToDo: zoom to selection of midi notes, control points, tracks(?) 2014-12-22 17:42:43 -06:00
64fa63212f move all (G)UI related configuration parameters into UIConfiguration, not RCConfiguration 2014-12-22 13:39:46 -05:00
David Robillard
670938c8c4 Fix various cursor problems.
Add a new scoped cursor system that makes it much harder to screw up and end up
with stick cursors and so on.
2014-12-20 01:13:25 -05:00
1823126408 Implement configurable region selection after split
Implement the configured behaviour of region selection after split.
2014-12-19 17:12:04 +00:00
a12a065457 Fix copy paste of MIDI and track automation. 2014-12-18 20:23:34 -05:00
5fef655380 Remove internal edit mode and add "content" tool. 2014-12-18 20:21:01 -05:00
nick_m
9af9e17adc Add editor selection state to session history via a SelectionMemento, which
combines selection related editor properties with the current editor selection.

The related editor properties are:
mouse mode,
zoom setting,
left frame of the canvas,
y origin of the canvas.

Selection state now includes region views (storing the underlying region id)
and time.

This patch also fixes a region mute undo bug.
2014-12-18 11:03:10 -05:00
e66752cec1 add set-session-extents-from-edit-range 2014-12-09 16:18:47 -06:00
4f8714a038 Fix alignment of automation paste.
Preserve alignment between notes and control points when doing an internal
copy/paste of both.

Relative alignment between points on multi-paste is still not preserved.  Both
behaviours here are actually useful, perhaps a modifier...
2014-12-07 23:16:42 -05:00
bfbb0f6178 Add legatize and remove overlap MIDI operations.
We're going to need the ability to apply MIDI edit operations to a note/control
selection soon...
2014-12-06 23:42:11 -05:00
2ea4ae603a Fix crash on shift+rclick of region to remove.
This doesn't seem to have been touched for years, and I don't see how such an
obvious bug could possibly have been around for so long, but, well, this fixes
it as far as I can tell.
2014-12-06 22:43:06 -05:00
4650912ae3 Adapt range when copying between automation types.
For things like copying from pitch bender to a CC.

Also things like fader to pan, but that seems a bit funny.  The conversion
probably needs to be a bit smarter here, perhaps taking the normal into
consideration...
2014-12-06 13:40:35 -05:00
63082821d8 Support paste between automation lanes.
Also push the increasingly unwieldly paste parameters into a context object.

As with othe things, currently it is only possible to do "cross-type paste" by
explicitly selecting the target track.  We will need to get automation region
view selection working to do better here, but at least for now it's possible to
get the data over.
2014-12-06 12:20:52 -05:00
767c0238a3 Replace half-baked param metadata with descriptor.
Among other things, this means that automation controls/lists have the actual
min/max/normal/toggled of parameters, and not those inferred from the Parameter
ID, which is not correct for things like plugin parameters.

Pushing things down to the Evoral::ParmeterDescriptor may be useful in the
future to have lists do smarter things based on parameter range, but currently
I have just pushed down the above-mentioned currently used attributes.
2014-12-01 23:35:24 -05:00
002c3b1646 Add comment about parameters to coverage() including the end point. 2014-12-01 20:06:08 +00:00
ea5876b836 Remove dead code. 2014-11-25 02:11:44 -05:00
57c1b6e261 Fix quantization and other time-related ops. 2014-11-22 21:49:42 -05:00
c1cfa12d6e Wrap MusicalTime in a class.
This lets us get a more explicit handle on time conversions, and is the main
step towards using actual beat:tick time and getting away from floating point
precision problems.
2014-11-22 04:05:42 -05:00
aabde88de0 Fix incredibly unlikely NULL pointer dereference. 2014-11-18 02:53:27 -05:00
2c85e7acac Fix zoom out limiting logic to actually limit minimum zoom. 2014-11-18 02:53:27 -05:00
563f5c11a6 Support cut/copy/paste of MIDI notes and controllers at the same time. 2014-11-16 22:35:45 -05:00
2fa6caad95 Support cut/copy/paste of several regions and lines at once.
The idea here is to do the reasonable thing, and copy objects of some
type (e.g. MIDI region, gain line) to tracks with a matching type.  The user
can override this with a track selection, which will be used straight-up.

Lost: ability to copy/paste lines across types, e.g. gain to pan.  This is
often questionable, but sometimes useful, so we will need to implement some
sort of "greedy mode" to make it possible.  Implementation simple, but not sure
what to do.  Perhaps this should only be possible if one automation track is
explicitly (i.e. via track selection) involved, and the types are at least
compatible-ish?
2014-11-16 22:35:45 -05:00
5393982c80 Don't add spurious points when copy/pasting automation. 2014-11-16 22:35:45 -05:00
9321aedb24 Reset repeated paste state on cut/copy. 2014-11-16 22:35:45 -05:00
fd9ccc7058 Use an enum for RoundMode instead of magic numbers.
No functional changes in this one (for easier auditing), but towards having
round up/down only if necessary modes, rather than kludging around that
situation with a double round as we do currently.
2014-11-16 22:35:45 -05:00
31acd96384 Implement "multi-paste" for notes, regions, and automation.
The idea here is that pasting several times to the same location doesn't make
sense.  Instead, the paste is appended past the last paste, snapped to the
grid.  This make it simple to replicate a given section a number of times,
simply by copying once and pasting several times.

This behaviour only appears when successive pastes are done to the same
location (whatever the edit point is).  When the paste point changes, the
"multi-paste" state is reset.

Boots 'n cats 'n boots 'n cats.
2014-11-14 20:04:19 -05:00
31b6b05125 Fix MIDI note cut/copy/paste. 2014-11-14 20:04:19 -05:00
6b3a8915f3 add abort() to non-reached code
This cleans up a lot of false-positives in static analysis
and also helps compilers to optimize code paths in general.
(tagging the fatal stingstream operator as ‘noreturn’ is
far less trivial)
2014-11-14 11:30:08 +01:00
589cc3162b Fix crash when deleting overlapped regions.
Use RegionSelection for MIDI regions as well, since the old dumb stub didn't do
some things correctly.  There's probably no reason to have a separate class for
this at all, and some good ones for putting all regions in the same selection,
so we should probably do that.  For now they are still separate in the
selection but use the same base class.
2014-11-13 21:32:08 -05:00
cca7ddf046 fix vertical canvas scrolling
* properly account for hidden tracks
 * allow to scroll to last track
2014-10-29 12:06:20 +01:00
b2a183d4b7 a few tweaks to zoom computations so that zoom-to-range works correctly 2014-10-21 14:48:45 -04:00
c2fc7f04a7 Don't select newly created regions after splitting selected regions (except on Mixbus)
I can't see a reason to select the newly-created regions after
splitting selected regions: I can't think of any case where you'd want
the next operation to apply to both the regions, and it makes it very
easy (in my experience) to trim/move/&c. both regions afterwards by
mistake.

However, this behaviour is desired for Mixbus, so make the selection of
regions after a split of selected regions dependent on
Profile->get_mixbus() for now.
2014-10-02 21:00:33 +01:00
44f71ce599 Text tweaks and typo fixes 2014-10-02 18:03:19 +01:00
f415e24514 do not stupidly try to save punch/loop/session ranges during clear_ranges op 2014-09-17 09:38:17 -04:00
8b98125ad3 fix various loop-initiation faults 2014-09-15 12:44:45 -05:00
017dcfea45 Make zoom-to-session include regions currently being recorded 2014-09-13 15:27:30 +01:00
4a00bdf04a fundamentally change ArdourButton PangoLayout handling
This fixes issues where button text was set during static
initialization where the widget style was not yet available,
and a lot of related issues where the text was set
before style.
2014-09-06 00:41:56 +02:00
6dd114c3f1 fix Play Loop from range context menu 2014-09-03 09:40:22 -05:00
4718def3c4 update track-header width when removing track(s). 2014-08-31 22:54:43 +02:00
96171ebe83 several fixes to make processor selection and deletion feel right, for both mixer and editor-mixer strips 2014-07-24 22:49:47 -05:00
6bdc976462 Remove "implicit" selection for plugin deletion.
Allow deletions in the mixer strip to fall through to editor if nothing was selected.
2014-07-24 22:49:47 -05:00
61c66afd4c Revert previous select-strips-under-mouse behavior
However, keep the path for deletions in the editor-mixer via _entered_mixer_strip
TODO:  if nothing was deleted, assume the user was trying to delete something in the editor instead
Show selected plugins by a red border
TODO:  more work on the selection model for plugins and mixer strips
2014-07-24 11:28:31 -05:00
05f3adaba3 Allow deletion of processors in editor_mixer_strip by pointing and pressing Delete
This had to be hacked because the editor_mixer strip is on the editor and doesnt respond to mixer keybindings.
Also force the gain intry to lose focus if the user leaves the mixer strip.  this will probably solve some long-standing complaints.  although perhaps a more elegant solution is possible.
2014-07-23 16:58:43 -05:00
b22e136887 Add some new zoom-to-selection actions, so zoom tool is less needed.
Reverse order of items in the zoom menus to match Ardour.
Consolidate the extra zoom math into a function;  this fixes a problem in zoom-to-session.
2014-07-23 11:31:06 -05:00
b69870dfe6 add Editor::trackviews_height() convenience function to determine height of trackview area of canvas; use to help fix set_visible_track_count(); don't consider hidden tracks in that function; add "Selected" to that selector menu 2014-07-15 18:09:04 -04:00
d0bc4b55fa scroll up/down by tracks uses top edge as "focal point"; fix some other nasty code details 2014-07-14 12:36:51 -04:00
8bc0ac7529 restore correct functioning of fit-tracks, which was mistakenly removed because of a failure to understand its complexities 2014-07-11 06:19:32 -04:00
07e0f785f8 add "fade range" operation, bound to alt-f at present by default 2014-07-10 08:17:22 -04:00
c1166c9f63 fix thinko with split selections. also ignore follow_edits when we are splitting, because the playlist freeze and the newly added regions cause the playhead to jump to unexpected locations 2014-07-08 15:00:19 -05:00
fcabd5d8ee initial implementation of "bring all media into session folder". Incomplete but basically functional for audio files 2014-07-08 00:53:13 -04:00
db60bc86b8 now that track and region selections are mutually exclusive, you need a separate action to select-all-tracks and select-all-regions. also, preserve region selection during a split, iff we are working on a region selection: only add the newly created regions, dont change anything else in the selection; leave that in control of the user 2014-07-06 12:57:36 -05:00
0b38d65dd0 new approach to selections which will help rationalize Split and similar functions. Object and Track selections are now mutually exclusive. a split will happen at (a) selection->regions (b) the intersection of edit_point and selection->tracks or (c) the region under the mouse, IFF nothing else is selected. 2014-07-05 20:47:43 -05:00
62c3638a42 further rationalization of the editor. after a split, ardour was switching the tool to object mode. this is the only place were ardour switched the tool for the user. that has been removed. Delete operation should not depend on the mouse mode, but rather the existence of selections. this solves the problem where you have selected regions in smart mode, but cant delete them because the mouse is in the top half (fange mode) of a track 2014-07-05 18:27:38 -05:00
ba8898bd5f add new regions created by split to selection after operation is complete 2014-07-03 19:43:35 -04:00
555a5d6348 lots of keybinding changes. added a new action to allow removing markers at the playhead location. numpad now allows you to access marks higher than 9. to locate to a marker, use the numpad decimal to start and end the operation - for example press .19. to locate to marker 19. also added alternate bindings for redo, delete, and several other alternates that will be needed in subsequent commits. tab is not working, using either Tab or nabla in the binding.in file 2014-07-03 17:50:14 -05:00
043b76569d fix the naming and behavior of always-play-range to match the button, which is follow-edits. when you select a range, the playhead should jump to the start of the range and begin to play the selection. BUT (unlike previous implementation) if the user wants to relocate the playhead, then that should be allowed. The user should always remain in charge of the playhead location. NOTE: your previous config setting will be invalidated. You must re-save a session to overwrite with the new config variable 2014-07-03 12:56:33 -05:00
3dbf37eab7 simplify zooming, remove Editor::clamp_samples_per_pixel(), fix getting "stuck" at max and min zoom levels 2014-07-02 15:53:24 -04:00
e5e12acc56 Merge branch 'ripple-mode-cc' into cairocanvas
Fix up merge conflicts in
	gtk2_ardour/editor_mouse.cc
	gtk2_ardour/editor_ops.cc

Also fix up compile errors.
2014-07-01 19:10:47 +01:00
83ae6beca5 Remove unused code
This code was changed to implement ripple mode, but meanwhile it was
removed altogether in cairocanvas. Remove it here too to simplify merging.
2014-07-01 18:38:13 +01:00
c52cb37bf2 suspend route redisplay for (rec-en, solo, mute and monitor) batch changes 2014-06-29 02:52:56 +02:00
4a7eb62bf8 use state Session::StateProtector 2014-06-28 22:02:20 +02:00
c706b1c4bb replace old implementation of Editor::_ensure_time_axis_view_is_visible() with the guts of Editor::ensure_track_is_visible(), then remove the latter.
Also change all users of ensure_track_is_visible() to use _ensure_time_axis_view_is_visible()
2014-06-27 10:49:05 -04:00
a3c378cf62 move utility functions into a dedicated namespace 2014-06-25 21:47:54 +02:00