Commit Graph

827 Commits

Author SHA1 Message Date
Nikolaus Gullotta d5988b232c Add settings retention to StripSilenceDialog
StripSilenceDialog will now retain its threshold, minimum length, and
fade length values from run to run.

This is done via Session::add_extra_xml() and recalled during the
construction of StripSilenceDialog via Session::extra_xml()
2019-08-30 12:40:28 -05:00
Robin Gareus 4050ca5633
Update GPL boilerplate and (C)
Copyright-holder and year information is extracted from git log.

git history begins in 2005. So (C) from 1998..2005 is lost. Also some
(C) assignment of commits where the committer didn't use --author.
2019-08-03 15:53:15 +02:00
Ben Loftis da3d8e5418 (Source List) Implement insert-region action... now uses the Source List. 2019-08-01 12:11:31 -05:00
Ben Loftis 50786b3e5c (Source List) Recover Regions feature: WIP 2019-08-01 12:11:31 -05:00
Ben Loftis c12a017728 (Source List) Region Tags (gtk2 part) 2019-08-01 12:11:31 -05:00
Robin Gareus b1587940e4
Fix crash when deleting selected region-view in ripple mode #7764
Changing the playlist (remove_region) invalidates selection and
unsets `clicked_regionview`. The region to operate on needs
to be stored for later use.
2019-05-27 14:10:59 +02:00
Robin Gareus 31815b5f26
NO-OP: whitespace
This fixes mostly <tab> after <space> and similar <tab> not used
for indenting as well as some related code alignment issues.
2019-04-13 17:57:46 +02:00
Robin Gareus c09c7bab52
Update GUI, use Session::playlists() getter (2/2) 2019-03-19 05:14:40 +01:00
Ben Loftis 66f73f40db Fix thinko: if the entered_regionview is already part of the selection, do not treat it as a special case when splitting. 2019-03-07 09:50:00 -06:00
Ben Loftis 3e442ae52b Session-range behavior (gtk2 part)
* Both the session-start and session-end point should follow the is-free option
  * Rename the end-is-free option to session-range-is-free, to reflect that change
  * This fixes the problem: recording before the start marker would move the Start,
    even if the user had already fixed the End marker.
2019-02-12 11:35:57 -06:00
Ben Loftis 22deebb42f Selection-after-split behavior (gtk2 part)
*  When splitting in MouseObject, entered_region should get priority over selected regions.
    This fixes the unexpected case where you try to split an unselected a region, but
       a)  nothing happens  OR
       b)  some other region (maybe off-screen) is split

*  Range mode now has its own option for splits, which can be:
     Clear:  the selection is cleared.
     Preserve:  the selection is left as-is. (default)
     Force:  all the regions that resulted from the split are selected (forcing a tool change).

*  Un-hid the additional config options to select only the regions BEFORE or AFTER a split.

*  Note:  splits made with Cut Tool should be unaffected by these changes.
2019-02-12 11:35:39 -06:00
Alex Pilon e7091cb2cd
Observe preference to prompt for names when adding range markers 2018-12-28 17:25:30 +01:00
Robin Gareus 245d48dbd0
NO-OP: Clarify function name 2018-11-28 15:16:25 +01:00
Robin Gareus f150f6c074
Use central method to check for engine where required
These are generally places where tracks/busses are created or port
connections change.
2018-11-28 00:01:50 +01:00
Robin Gareus 57d7b5de65
GUI limitation: Require engine to add/remove tracks/busses 2018-11-27 13:18:39 +01:00
Paul Davis 58e9bb0a14 move away from "sync source" concepts 2018-10-05 14:15:02 -04:00
Ben Loftis 35243c9b3e Fix weird behavior in playhead_x_to_grid: use return value from snap_to_grid. 2018-10-02 20:12:21 -05:00
Ben Loftis 2b95b5b8b3 More correct fix for 8bfbef4: the check was already there; just needed to set the dirty flag. 2018-10-02 09:41:04 -05:00
Ben Loftis 8bfbef4888 Fix deadlock when no region boundaries are selected in the Snap prefs. 2018-10-02 09:28:05 -05:00
Paul Davis 932eefad9f use new CoreSelection methods in editor and mixer 2018-08-24 14:04:18 -04:00
Ben Loftis 0883f02de9 new_grid: The Return of the snap_to_X functions.
We no longer assume that Snap always uses the visible ruler lines.
 If you want to snap to the grid, and ignore the users zoom scale, use SnapPref::SnapToGrid_Unscaled
 This fixes 2 (known) oversights: "snap region(s) to grid" and "regions whose start are left of the canvas edge".
2018-07-27 00:28:47 +02:00
Ben Loftis 7fbbfc0729 Allow snapping to the start of the video timeline. (should work, but needs testing on a machine with harvid). 2018-06-08 16:12:35 -05:00
Ben Loftis 41cf86cb9f Playhead to Grid: handle case where PH is rolling, and we are prevented from skipping backwards sensibly. 2018-05-17 15:01:09 -05:00
Ben Loftis c074c7ce52 playhead_X_to_grid: Handle the case of GridTypeNone 2018-05-08 09:03:20 -05:00
Ben Loftis a5d90c3d9d Arrow keys (playhead_x_to_grid()) should move the view along with it. This is more consistent with jog-wheel operation, which has proven to work nicely. 2018-05-08 08:45:22 -05:00
Paul Davis 5132a6c2eb fix undo/redo for duplicate-regions in ripple mode
Also fix duplicate of multiple regions in the same track, and change "gap" variable
name to "span" for greater clarity
2018-03-28 14:24:21 -04:00
Paul Davis 9840f84830 duplicate (regions) should honor ripple edit mode 2018-03-27 10:19:12 -04:00
Ben Loftis d88cdcc1bf Reinstate the ability to split regions while dragging playhead. I think this was unintentionally lost. 2018-02-27 13:08:40 -06:00
Ben Loftis fcabb27561 Remove some redundant calls to snap_to(). get_preferred_edit_position() already did it. 2018-02-27 08:55:17 -06:00
Ben Loftis 5d423e38d5 Should be able to Split in range mode, with a selected track. 2018-02-26 20:38:50 -06:00
Ben Loftis 292f998298 Fix bug: sequential pasting to the same time, but different tracks, would trigger paste offset. 2018-02-26 19:40:24 -06:00
Ben Loftis 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
Robin Gareus 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
Ben Loftis 881c8eeca8 Tell the user why Insert/Remove Time failed, rather than fail silently. 2018-02-23 14:37:32 -06:00
Ben Loftis 0299229e41 SoloSelection: gui part. 2018-02-11 09:39:45 -06:00
Ben Loftis 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
Robin Gareus ba2b136af2 NO-OP: whitespace 2017-12-12 00:13:12 +01:00
Ben Loftis aab02cac3d zoom-to-selection should clear the selection, afterwards. 2017-12-11 10:51:33 -06:00
Robin Gareus 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
Paul Davis 5f60ff212d remove unused variable 2017-10-26 15:41:01 -04:00
Paul Davis 7db12f6b12 convert codebase to use Temporal for various time types 2017-09-24 12:03:54 -04:00
Paul Davis 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
Paul Davis e37558502e changes required to operate with the Evoral::Beats ticktime commit 2017-09-18 11:40:53 -04:00
Paul Davis f9e7ffc601 no more per-track varispeed 2017-09-18 11:40:53 -04:00
Ben Loftis 631629b8e7 Editor zoom: add zoom_to_extents() 2017-08-26 23:06:29 -05:00
Ben Loftis 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
Ben Loftis 901432f030 Editor zooming: refactor zoom-limiting code into editor::session_gui_extents. 2017-08-26 22:44:58 -05:00
Robin Gareus ea5d75a05b Use new separate_by_channel API 2017-08-23 21:33:29 +02:00
Robin Gareus 9d1a793fec Mark session dirty after applying MIDI transform 2017-08-22 04:12:18 +02:00
Paul Davis 45eef0be1b slight tweak for more code consistency between ::toggle_solo() and ::toggle_mute() 2017-08-07 12:14:17 -04:00
Robin Gareus c7237a606a Improve Track > Toggle Solo/Mute, include VCAs 2017-08-07 16:29:08 +02:00
Robin Gareus 1cbbbf6aad Update Remove Track(s) dialog to include VCAs 2017-08-06 22:17:54 +02:00
Robin Gareus 0ae9cda51d Allow to select VCAs 2017-08-06 22:17:42 +02:00
Robin Gareus 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
Ben Loftis 53fba8326c Rationalize Editor Zooming: make it harder for user to step into ridiculous zoom-out scales. 2017-07-19 15:37:59 -05:00
Robin Gareus 1f5ebc5485 Remove ArdourPrompter wrapper 2017-07-17 21:06:04 +02:00
Robin Gareus eb1e423b75 Remove <gtkmm.h> include from header files. 2017-07-17 21:06:04 +02:00
Robin Gareus f9e5e4360e Move more Gtkmm2ext widgets into libwidget 2017-07-17 21:06:04 +02:00
Robin Gareus 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
Robin Gareus 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
Robin Gareus d88da33949 NO-OP: whitespace 2017-06-17 04:36:50 +02:00
Robin Gareus dc3ae8d196 Add a "select topmost" track editor action 2017-04-29 12:38:53 +02:00
Tim Mayberry 1519565890 Fix crash when removing time from track with automation
Resolves : #7287
2017-03-10 22:59:58 +10:00
Tim Mayberry ddb4b8a7c3 Add reset region gain action for selected regions 2017-03-04 15:26:00 +10:00
Robin Gareus 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
Robin Gareus 65b38322db GUI action Transport/RecordCountIn 2017-02-13 23:01:11 +01:00
Paul Davis 675c59652c NO-OP: whitespace changes 2017-02-08 20:00:49 +01:00
Paul Davis b911303fdd improved fix for #7208, hopefully 2017-02-08 20:00:36 +01:00
John Emmas 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
Paul Davis 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
Paul Davis 4333a80cb2 make undo/redo work for Regions > Edit > Close Gaps 2017-01-22 22:16:08 +01:00
Robin Gareus 425cdb7e48 GUI: use new preroll-rec + trim mode 2017-01-19 13:05:54 +01:00
Robin Gareus ebdf3de598 Remove rec-with-preroll, prepare for rework 2017-01-19 13:05:54 +01:00
Robin Gareus 22eae69078 Remove Editor API to calc preroll duration 2017-01-19 13:05:54 +01:00
Robin Gareus 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
Robin Gareus d650b3c292 prepare for musical-time preroll 2017-01-18 17:31:42 +01:00
Robin Gareus 645402bc42 Add GUI action to record with preroll 2017-01-18 15:16:05 +01:00
Ben Loftis 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
Ben Loftis 3e214eb4ea Tweak behavior of Play-With-Preroll action 2016-12-19 13:14:44 -06:00
Ben Loftis 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
Tim Mayberry 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
Tim Mayberry 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
Robin Gareus 0d3c2a9dbf Speed up track deletion when Editor-Mixer is visible 2016-11-28 15:36:04 +01:00
Tim Mayberry 73f3e479d3 Make Cut mode respect snap modifer 2016-11-21 22:19:56 +10:00
Tim Mayberry 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
Tim Mayberry 9485748e17 Change Editor temporal zoom methods to be able to use different scale for the zoom 2016-11-11 14:13:53 +10:00
Robin Gareus 9990da35d8 prevent crash during track-deletion (un-selecting deleted tracks) 2016-11-10 23:20:58 +01:00
Ben Loftis 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
Paul Davis 67540ad0f5 add explicit "duplicate-regions" action 2016-09-27 14:59:31 -05:00
Paul Davis 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
Paul Davis 3f95b5ac19 closing the normalize dialog should not run normalize (#7016) 2016-09-09 19:15:10 -04:00
Paul Davis 673e580726 fix WM close handling for session lock dialog (#7017) 2016-09-09 19:09:15 -04:00
Paul Davis 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
Paul Davis 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
Robin Gareus 836693036a add RMS region normalization option 2016-08-13 14:50:59 +02:00
Paul Davis 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
Robin Gareus ac8f4baa00 add some flush_pending timeouts 2016-07-25 14:51:23 +02:00
Paul Davis cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
Paul Davis 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
Paul Davis 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
Robin Gareus 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
Paul Davis f1d9dbf359 fix behaviour of select_(next|prev)_route() in editor, when VCAs are present. 2016-06-10 13:57:19 -04:00
Paul Davis 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
Paul Davis d30266dfc3 use new record safe control in GUI 2016-05-31 15:30:45 -04:00
Paul Davis e0ff70cf86 first vaguely working version using PresentationInfo
remote control ID and "order keys" have been removed.
2016-05-31 15:30:42 -04:00
Paul Davis 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
Robin Gareus 2074dbdbe2 freeze thread is not detached and needs to be joined 2016-05-24 03:33:11 +02:00
Paul Davis a232673454 make boost shared_ptr debugging a little easier to turn on/off 2016-05-07 13:36:04 -04:00
Robin Gareus f148d70d41 batch remove tracks 2016-05-03 14:27:57 +02:00
Robin Gareus 8fe2a308a5 GUI updates for transient rework 2016-05-01 02:02:25 +02:00
Robin Gareus 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
Paul Davis 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
Paul Davis 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
Colin Fletcher 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
Colin Fletcher 05345048a6 insert time: remove pointless local variable 2016-02-06 11:23:16 +00:00
Colin Fletcher b69a980d3b Make name of undo action for 'Remove Time' consistent 2016-02-06 10:21:44 +00:00
Tim Mayberry 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
Paul Davis 9e5b7db89f first compiling, mostly working version of group controls changes 2016-01-22 11:58:31 -05:00
Tim Mayberry 6ba6cce799 Refactor code into Editor::temporal_zoom_step_mouse_focus method 2016-01-21 11:25:56 +10:00
Tim Mayberry 08cbe0532c Refactor scrolling in Editor ruler canvas area into two utility methods 2016-01-21 11:25:56 +10:00
Tim Mayberry c6805c1454 Refactor scrolling track canvas in Editor class into two utility methods 2016-01-21 11:25:55 +10:00
Robin Gareus 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
Paul Davis 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
Ben Loftis 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
Robin Gareus 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
Robin Gareus 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
Robin Gareus f307080808 disable follow-edits with external sync #6577 2015-10-18 02:03:41 +02:00
Robin Gareus 38405fa210 fix crash on 2nd Lock 2015-10-07 15:50:55 +02:00
Robin Gareus 22b07e0233 NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
Paul Davis 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
Robin Gareus 95df99e6d4 remove unused function 2015-10-04 17:53:02 +02:00
Paul Davis 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
Paul Davis 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
Robin Gareus 646bc2bb43 fix possible endless loop in silence detection 2015-09-19 19:00:43 +02:00
Tim Mayberry 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
Tim Mayberry 7b82277c7e Don't try and split a region when dragging, should fix bug #6338 2015-09-16 16:28:18 +10:00
Colin Fletcher 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
Ben Loftis 43f3c0e0f2 clean-up previous commit 2015-08-27 10:13:35 -05:00
Ben Loftis 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
Ben Loftis 9673e6b271 merge fix again 2015-07-16 17:14:14 -05:00
Ben Loftis 46c8369328 merge fix 2015-07-16 16:13:24 -05:00
Paul Davis a81bfbfc41 use Tracks' MainMenuDisabler during session lock (could be improved with more RAII) 2015-06-29 14:18:09 -04:00
Paul Davis ee791f251a make the quantize dialog persistent so that settings are retained 2015-06-26 12:47:11 -04:00
Colin Fletcher 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
Colin Fletcher 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
Colin Fletcher 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
Colin Fletcher e234e98f13 Use 'Insert time' dialogue for 'Cut time' too. 2015-06-17 17:15:21 +01:00
Colin Fletcher 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
Colin Fletcher 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
Ben Loftis 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
Colin Fletcher 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
Paul Davis 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
Robin Gareus d05c09c1f6 consistent message session start->end. 2015-03-25 12:33:51 +01:00
Robin Gareus 5dc7866132 only temp. disable visual state saving. 2015-03-21 16:09:35 +01:00
Robin Gareus f121d04d6d vertical fit: hide tracks in-between 2015-03-21 16:09:35 +01:00
Robin Gareus 6874bca886 vertical scroll stop on automation lanes 2015-03-19 20:32:59 +01:00
Ben Loftis 45f874cfab remove locate before loop, which was causing intermittent loop behavior 2015-01-30 10:26:27 -06:00