Commit Graph

788 Commits

Author SHA1 Message Date
5f60ff212d remove unused variable 2017-10-26 15:41:01 -04: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
e37558502e changes required to operate with the Evoral::Beats ticktime commit 2017-09-18 11:40:53 -04:00
f9e7ffc601 no more per-track varispeed 2017-09-18 11:40:53 -04:00
631629b8e7 Editor zoom: add zoom_to_extents() 2017-08-26 23:06:29 -05:00
1c145ccfc3 Editor zooming: Config preference to define how much zooming will be easily allowed beyond the session_ui_extents() 2017-08-26 22:44:58 -05:00
901432f030 Editor zooming: refactor zoom-limiting code into editor::session_gui_extents. 2017-08-26 22:44:58 -05:00
ea5d75a05b Use new separate_by_channel API 2017-08-23 21:33:29 +02:00
9d1a793fec Mark session dirty after applying MIDI transform 2017-08-22 04:12:18 +02:00
45eef0be1b slight tweak for more code consistency between ::toggle_solo() and ::toggle_mute() 2017-08-07 12:14:17 -04:00
c7237a606a Improve Track > Toggle Solo/Mute, include VCAs 2017-08-07 16:29:08 +02:00
1cbbbf6aad Update Remove Track(s) dialog to include VCAs 2017-08-06 22:17:54 +02:00
0ae9cda51d Allow to select VCAs 2017-08-06 22:17:42 +02:00
e91821bd76 Fix pasting automation at 0 2017-07-27 03:22:21 +02:00
Johannes Mueller
9bfe404b4e Fix #6280 – region (first_frame()==0) selectable with SnapRegionBoundary
Issue #6280 states that when selecting ranges using SnapToRegionBoundary it's
not possible to select regions with first_frame() == 0. This is because
Playlist::find_next_region() does not consider region boundaries == pos but
only > pos. Thus it never considers pos == 0 to be a region boundary.

This solution tries to be as little invasive as possible without changing the
semantics of PlayList::find_next_region(). Therefore position 0 is added to the
region boundary cache if there's a region starting at position 0 in any track.
2017-07-25 17:39:08 +02:00
nick_m
515cdb6b32 Rework region selection XML
Ensures that selection is restored in the same object type order
it was created in, which may some day make a difference.
2017-07-22 02:15:20 +10:00
nick_m
1d8548306b Cropping a single region to time selection works for multiple ranges
Should fix 7285.
2017-07-22 02:15:20 +10:00
nick_m
c54978bd5c Add missing braces to Editor::cut_copy conditional 2017-07-22 02:15:20 +10:00
nick_m
c9617b4b16 Editor::playhead_forward/backward_to_grid snaps even in magnetic mode 2017-07-22 02:15:20 +10:00
53fba8326c Rationalize Editor Zooming: make it harder for user to step into ridiculous zoom-out scales. 2017-07-19 15:37:59 -05:00
1f5ebc5485 Remove ArdourPrompter wrapper 2017-07-17 21:06:04 +02:00
eb1e423b75 Remove <gtkmm.h> include from header files. 2017-07-17 21:06:04 +02:00
f9e5e4360e Move more Gtkmm2ext widgets into libwidget 2017-07-17 21:06:04 +02:00
5c92613698 Separate Ardour UI widgets into dedicated library 2017-07-17 21:06:04 +02:00
Thomas Brand
63ea7b6516 NO-OP whitespace (updated GH PR #357) 2017-07-01 19:28:26 +02:00
555fcb89e5 GUI: prepare for API changes
remove use of
- unbound_min/max
- list->default_value and min/max_y
2017-06-21 18:12:16 +02:00
d88da33949 NO-OP: whitespace 2017-06-17 04:36:50 +02:00
dc3ae8d196 Add a "select topmost" track editor action 2017-04-29 12:38:53 +02:00
1519565890 Fix crash when removing time from track with automation
Resolves : #7287
2017-03-10 22:59:58 +10:00
ddb4b8a7c3 Add reset region gain action for selected regions 2017-03-04 15:26:00 +10:00
f0a3c84e8c Fix crash when inserting time with split intersected regions 2017-03-02 21:20:09 +01:00
nick_m
97c4c2a28c complete changes to tempo type.
- this implements in the intention behind the previous commit.
	  a tempo mark is constant until its end has been changed by a
	  shift-drag on the next marker.
2017-02-27 20:16:10 +01:00
nick_m
ccb51a8ddb rework tempo editing.
most changes are due to a new design where tempo discontinuities at the
beginning of a ramped section may be set.
this allows easier mapping of live performance, especially in
the common case of a ramped ritard before the beginning of a new section.

feature summary:

holding constraint modifier (shift) while dragging the BBT ruler area
drags the tempo lines by changing the start tempo (as before)

holding copy modifier (control) while dragging the BBT ruler area
drags the tempo lines by changing the end tempo (ahem. not quite there)

dragging a tempo mark while holding constraint (shift) will change the
previous end tempo to match the marker position *worth trying*.

holding constraint and copy modifier (control + shift) while dragging
the BBT ruler area attempts to'pinch' or twist the surrounding tempi
sp that later ones are not repositioned (currently suffereng from
rounding errors)
2017-02-27 20:16:10 +01:00
nick_m
b066ad3164 fix missing command in Editor::snap_regions_to_grid ()
- fixes 7246
2017-02-19 07:13:26 +11:00
65b38322db GUI action Transport/RecordCountIn 2017-02-13 23:01:11 +01:00
675c59652c NO-OP: whitespace changes 2017-02-08 20:00:49 +01:00
b911303fdd improved fix for #7208, hopefully 2017-02-08 20:00:36 +01:00
70e4bb30a0 'CheckMenuItem' conflicts with an item already existing in MSVC 2017-02-04 16:14:55 +00:00
nick_m
52d3c2216d more inconsistent menu item fiddling. 2017-02-04 22:57:36 +11:00
nick_m
1cfa6bd69f more messing about with inconsistent menu state. 2017-02-04 22:57:36 +11:00
nick_m
f336f4e6d1 allow "Glue to Bars & Beats" in region menu to be in an inconsistent state.
- toggling an inconsistent lock style sets all selected regions
	  to AudioTime
2017-02-04 22:57:36 +11:00
nick_m
59daffea1d rework snap
snap now fills in a struct (MusicFrame) which contins a snapped frame
along with a music divisor.
this gives useful information wrt magnetic snap which may or may not
have rounded to an exact musical position.

region position may now be set musically (using quarter notes for now).

this patch fixes several problems in the current code:

	- dragging a list of music-locked regions now maintains correct
	  musical offsets within the list.

	- splitting regions using magnetic snap works correctly (#7192)

	- cut drag should now work correctly with magnetic snap.

	- musical length of split midi regions is no longer frame based.
2017-02-04 22:57:36 +11:00
cc82fc675b remove editor/mixer selection change signals; make editor and mixer use PresentationInfo::Change more correctly; make Selection a bit smarter when setting track selection 2017-01-27 22:17:53 +01:00
4333a80cb2 make undo/redo work for Regions > Edit > Close Gaps 2017-01-22 22:16:08 +01:00
425cdb7e48 GUI: use new preroll-rec + trim mode 2017-01-19 13:05:54 +01:00
ebdf3de598 Remove rec-with-preroll, prepare for rework 2017-01-19 13:05:54 +01:00
22eae69078 Remove Editor API to calc preroll duration 2017-01-19 13:05:54 +01:00
ef64c7ba19 Promote the preroll_seconds config option to include musical time:
Interpret negative preroll time as bars
2017-01-18 23:47:50 +01:00
d650b3c292 prepare for musical-time preroll 2017-01-18 17:31:42 +01:00
645402bc42 Add GUI action to record with preroll 2017-01-18 15:16:05 +01:00
75c029f65f Support repeated jump-backward-to-mark while playing. 2017-01-12 11:51:43 -06:00
nick_m
d0580ecfbc allow all types of range location (loop, start, end etc.) to be glued to bars and beats. 2016-12-29 01:39:31 +11:00
3e214eb4ea Tweak behavior of Play-With-Preroll action 2016-12-19 13:14:44 -06:00
628c99d555 Follow Edits => Follow Range
* "Follow Edits" button had several behaviors that confused users.
* "Follow Range" only has 2 behaviors:
** Click anywhere in Range mode (or Smart mode) to locate the playhead.
** When you select a Range, "Play" will play the selected range.
2016-12-19 13:14:44 -06:00
89623923bd Change Zoom to Selection action (Z key) to zoom on both axes
Add Zoom to Selection (Horizontal) action to access previous behavior.

Remove Editor::temporal_zoom_region as it was duplicate code and broken for
both_axes

Should Resolve: #7112
2016-12-13 12:25:03 +10:00
6b8cadef01 Don't move the Range Selection after performing Multi Duplicate
This is necessary for a single Duplicate so you can keep duplicating but it
doesn't make sense to move it for Multi Duplicate.
2016-12-06 14:06:18 +10:00
0d3c2a9dbf Speed up track deletion when Editor-Mixer is visible 2016-11-28 15:36:04 +01:00
73f3e479d3 Make Cut mode respect snap modifer 2016-11-21 22:19:56 +10:00
37a7d87786 Use the frame corresponding to the current mouse position when zoom dragging
Editor::mouse_frame only works within the track canvas. If a zoom drag is
initiated and the mouse cursor goes outside of the track canvas the zoom
position should still based on the current x position of the cursor.
2016-11-11 14:13:53 +10:00
9485748e17 Change Editor temporal zoom methods to be able to use different scale for the zoom 2016-11-11 14:13:53 +10:00
9990da35d8 prevent crash during track-deletion (un-selecting deleted tracks) 2016-11-10 23:20:58 +01:00
9a9a9f9eac Track Add/Remove Time dialog improvements:
Add a clock to show the position of the edit, to remove ambiguity
 If a Range is selected, pre-fill the position and length clocks
 Clock format should default to the editor's secondary clock mode
2016-10-20 16:02:18 -05:00
67540ad0f5 add explicit "duplicate-regions" action 2016-09-27 14:59:31 -05:00
9c2a517cb0 don't get into nested run loops if quantize is reinvoked (e.g control surface) while already in progress 2016-09-27 14:59:31 -05:00
3f95b5ac19 closing the normalize dialog should not run normalize (#7016) 2016-09-09 19:15:10 -04:00
673e580726 fix WM close handling for session lock dialog (#7017) 2016-09-09 19:09:15 -04:00
400f38c721 single action punch in
Consecutive execution (e.g. from a control surface button) engages punch in, then punch out, then clears both.
Patch by Nathan Stewart
2016-08-27 19:57:40 -04:00
e8427ee2cb GUI does an even stronger check on no undo/redo while recording 2016-08-17 19:22:26 -04:00
nick_m
a7032917b1 Remove assumption that the meter starts at frame 0 in Editor::apply_midi_note_edit_op_to_region(). 2016-08-14 04:49:37 +10:00
Nathan Stewart
5b4584ad94 Add "Marker Toggle" #5193 2016-08-13 16:07:16 +02:00
836693036a add RMS region normalization option 2016-08-13 14:50:59 +02:00
6a4fb58384 fix thinko that causes near duplicate menu items in group context menu when not in group tabs 2016-08-08 23:36:33 +02:00
ac8f4baa00 add some flush_pending timeouts 2016-07-25 14:51:23 +02:00
cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
fc06525bb2 two more places where the user can explicitly set the session end now also make the end non-free 2016-07-12 12:31:02 -04:00
774ad0752a GUI side of : once the user has explicitly set the session range end, playlist/range changes do not move it.
The user may drag the marker, edit in the Location UI, or use nudge, to set the end
2016-07-12 11:19:49 -04:00
140258d8ab remove reference "const int32_t&" -> const int32_t"
this simplifies lua-bindings and also let's the compiler worry about
constant primitive types.
2016-07-10 15:30:41 +02:00
nick_m
0bdbe56cf1 Stop passing references to things that may disappear when a metric section is replaced. 2016-07-10 02:18:37 +10:00
nick_m
93c24e4433 Paste uses exact beats. rework _start_beats calculation in copy-with-offset ctor. 2016-07-10 02:18:36 +10:00
nick_m
94e0a15325 Exact beat - provide audio->music mapping for region split.
- for those not in the know, this series provides a way to
	  remove the temporal distortion introduced when using an
	  audio frame-based gui for music-locked objects.

	  In short, the gui uses an audio frame representation to move
	  objects. It displays the object using frame_at_beat(), quantizing
	  the time value to audio frames. This is fine until the user selects
	  that frame but expects it to be interpreted as a beat.
	  Thus beat_at_frame() would not produce the user-expected beat
	  (temporal quantization error of up to 0.5 audio samples).
	  This is one method of mapping audio time to music time accurately.
2016-07-10 02:18:36 +10:00
f1d9dbf359 fix behaviour of select_(next|prev)_route() in editor, when VCAs are present. 2016-06-10 13:57:19 -04:00
6baac7d46f various safety checks for the result of dynamic_cast-ing a TimeAxisView to RouteTimeAxisView
Now that we have VCATimeAxisView, this needed to be done, but it also potentially applied with automation
2016-06-02 08:42:58 -04:00
d30266dfc3 use new record safe control in GUI 2016-05-31 15:30:45 -04:00
e0ff70cf86 first vaguely working version using PresentationInfo
remote control ID and "order keys" have been removed.
2016-05-31 15:30:42 -04:00
653ae4acd6 universal change in the design of the way Route/Track controls are designed and used. The controls now own their own state, rather than proxy for state in their owners.
Massive changes all over the code to accomodate this. Many things are not finished. Consider this a backup safety commit
2016-05-31 15:30:40 -04:00
nick_m
aad7b129b6 Tempo ramps - rename meter/tempo_section_at() -> meter/tempo_section_at_frame() 2016-05-27 23:38:18 +10:00
nick_m
baf8f37967 Tempo ramps - rename meter_at() -> meter_at_frame() & make the ticker slightly more efficient. 2016-05-27 23:38:17 +10:00
nick_m
074db3b861 Tempo ramps - more code consolidation wrt add meter/tempo. 2016-05-27 23:38:16 +10:00
nick_m
2d3d7a5355 Tempo ramps - fix ambiguous api, fix flickering tempo curves. 2016-05-27 23:38:16 +10:00
nick_m
618a391346 Preformance - reinstate EditorRegions::freeze_tree_model (). 2016-05-27 23:38:14 +10:00
nick_m
a53d94c3d0 Perfornamce - remove dubious optimisation. 2016-05-27 23:38:13 +10:00
nick_m
58d4889ad3 Tempo ramps - music-locked meters now use beats rather than pulses as their reference.
- fixes many problems with a non-zero audio-locked first meter.
2016-05-27 23:38:12 +10:00
nick_m
a2495cdff3 Tempo ramps - fix more namespace confusion 2016-05-27 23:38:10 +10:00
nick_m
5c6e18e6a0 Tempo ramps - remove the concept of bars from tempo sections.
- this helps where tempo and meter have a somewhat circular
	  dependency.

MetricSection now has a musical position expressed in beats (a double).
MeterSection still has a bbt, but it really isn't needed as we have
enough information to discover the number of bars at a given beat without it.
TempoSection now has a hack to enable loading of legacy sessions, which will
ultimately be a lot cleaner than the current code.

Removing bars from tempo sections also allows us to place them
at arbitrary frames (implemented here).
2016-05-27 23:38:09 +10:00
nick_m
7898435d3f Tempo ramps - define_one_bar() delivers constant tempo.
- also some renaming and code review
2016-05-27 23:38:09 +10:00
nick_m
7fc3b0c34c Initial stab at tempo ramps.
Replaces the list of points in TempoMap with TempoSection functions, which
compute tempo-at or tick-at time relative to tempo section start.
TempoMap consults them additively to determine things like bbt_time(),
frame_time() get_grid() etc.
This has a marked effect on scrolling speed along with the code simplification
in the places it has been attempted.

Several things are broken here.
Currently every ramp except the last one is an exponential ramp. this may
be simple to fix :).
Mouse-over midi grid doesn't match mouse click grid. should also be simple.

Many things seem to work, but their accuracy should be in question until
each area has been addressed.
2016-05-27 23:38:09 +10:00
2074dbdbe2 freeze thread is not detached and needs to be joined 2016-05-24 03:33:11 +02:00
a232673454 make boost shared_ptr debugging a little easier to turn on/off 2016-05-07 13:36:04 -04:00
f148d70d41 batch remove tracks 2016-05-03 14:27:57 +02:00
8fe2a308a5 GUI updates for transient rework 2016-05-01 02:02:25 +02:00
ec0ec95262 change const some functions to const. (prepare lua bindings) 2016-04-09 00:33:03 +02:00
yonideshi
c1ce5dd9ec Fix for issue #0006803 2016-03-05 15:54:47 +01:00
16731d07d3 remove use of current_toplevel() where unnecessary, fix broken necessary cases, generally fix up show/hide/attach/detach for Tabbables 2016-02-22 15:31:22 -05:00
9010262bed first compilable version of tabbable design.
I would have loved to split this apart, but there are just so many interrelated changes,
it makes little sense and would be a huge effort that would break future git bisect
use because so many intermediate commits would not compile
2016-02-22 15:31:21 -05:00
Adrian Knoth
6fa88273aa Spelling correction patch from Debian
Patch taken (and forward-ported to HEAD) from
<https://anonscm.debian.org/cgit/pkg-multimedia/ardour.git/plain/debian/patches/0100-fix-typos.patch>
2016-02-22 15:13:01 -05:00
df76996aaa insert time: ignore mouse as edit point
This is arguable, but at least is now consistent with 'remove time'.
2016-02-06 11:35:45 +00:00
05345048a6 insert time: remove pointless local variable 2016-02-06 11:23:16 +00:00
b69a980d3b Make name of undo action for 'Remove Time' consistent 2016-02-06 10:21:44 +00:00
45e8bda65f Change duplicate range to use time range/s rather than a single region
This should fix bugs #4980, #4984, #4986 and #6579
2016-01-28 12:25:16 +10:00
9e5b7db89f first compiling, mostly working version of group controls changes 2016-01-22 11:58:31 -05:00
6ba6cce799 Refactor code into Editor::temporal_zoom_step_mouse_focus method 2016-01-21 11:25:56 +10:00
08cbe0532c Refactor scrolling in Editor ruler canvas area into two utility methods 2016-01-21 11:25:56 +10:00
c6805c1454 Refactor scrolling track canvas in Editor class into two utility methods 2016-01-21 11:25:55 +10:00
c2493141d9 fix "stuck marker focus" after deleting marker. 2015-12-08 23:39:47 +01:00
André Nusser
00c68ae2e6 Remove "Fill Range with Region" from menu and also its function. 2015-12-04 11:40:24 +01:00
André Nusser
0040ab5158 Fix "Crop Region to Range" -- second attempt. 2015-12-03 12:57:01 -05:00
eb1d1acab8 fix double template syntax 2015-12-02 16:59:11 -05:00
André Nusser
653789424b Fix "Fill Track".
It now behaves like Multi-Duplicate until the end marker. The end
marker is excluded as this would often lead to size 1 regions.
2015-12-02 14:59:43 -05:00
André Nusser
add37c6b96 Fix "Crop Region to Range".
Before only regions that contained the start of the range were cropped,
now all are cropped.
2015-12-02 14:58:42 -05:00
ca381a908e provide user preference for pre-roll 2015-11-19 16:56:09 -06:00
André Nusser
2cc707e88f Fix fencepost error in duplicate_some_regions. Adapt start position. 2015-11-04 17:50:12 -05:00
4a3413f2d4 suspend timers while flushing the gtk-event queue.
This fixes an issues where Ardour never completes to flush the GUI event
queue due to rapid updates for meters and similar events.

ARDOUR_UI::load_session() never returned and the complete session
ran inside Gtkmm2ext::UI::flush_pending(), this later causes a crash
at exit.

as side effect, this also speeds up session load.
2015-10-30 15:55:27 +01:00
d04c16e927 fix edge-case: (move playhead w/o session) 2015-10-22 14:14:27 +02:00
André Nusser
e807fe2b28 Introduce "Transpose..." also in the context menu of selected notes. 2015-10-17 22:12:55 -04:00
André Nusser
bc83699e44 Fix tiny memory leak. 2015-10-17 22:12:54 -04:00
f307080808 disable follow-edits with external sync #6577 2015-10-18 02:03:41 +02:00
38405fa210 fix crash on 2nd Lock 2015-10-07 15:50:55 +02:00
22b07e0233 NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
4dc63966f0 globally remove all trailing whitespace from ardour code base.
Paul Davis was responsible for introducing almost all of this.
2015-10-04 14:51:05 -04:00
95df99e6d4 remove unused function 2015-10-04 17:53:02 +02:00
621fd845e6 Revert "add new action and loop marker menu item for setting up loop record"
This reverts commit ebb43508f1.
2015-09-28 17:44:04 -04:00
ebb43508f1 add new action and loop marker menu item for setting up loop record 2015-09-28 17:42:11 -04:00
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