Commit Graph

748 Commits

Author SHA1 Message Date
5d423e38d5 Should be able to Split in range mode, with a selected track. 2018-02-26 20:38:50 -06:00
292f998298 Fix bug: sequential pasting to the same time, but different tracks, would trigger paste offset. 2018-02-26 19:40:24 -06:00
f64a39a07f Fixes for region_boundary_cache:
If no region-snaps are defined, bail out before generating cache.
 Avoid potential overflow at max_samplepos+1
 Snap should continue to work beyond the End marker.
2018-02-24 10:30:52 -06:00
ceac42cc03 NO-OP: whitespace
- remove trailing whitespace
- remove space after opening brackets and before closing brackets
- add space around operators
- do not use '//' for multi-line comments, do not use "//" on line-start
  to comment-out code breaking indenting (-Wmisleading-indent)
- do add a single space after comment-start /*{SPACE}... or //{SPACE}...
- reserve duplicate whitespace "  " for alignment, remove other duplicate
  whitespace
- use established "TODO" and "XXX" (highlighted keywords)
- remove equal-sign series "====" (those indicate merge conflicts)
2018-02-24 13:55:20 +01:00
881c8eeca8 Tell the user why Insert/Remove Time failed, rather than fail silently. 2018-02-23 14:37:32 -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
ba2b136af2 NO-OP: whitespace 2017-12-12 00:13:12 +01:00
aab02cac3d zoom-to-selection should clear the selection, afterwards. 2017-12-11 10:51:33 -06:00
c591368133 Remove unreachable code.
if (working_on_selection) {
  ...
} else {
  if (working_on_selection) { .. never reached .. }
}

Found by PVS: https://www.viva64.com/en/b/0540/
2017-11-23 10:51:20 +01:00
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