Commit Graph

1053 Commits

Author SHA1 Message Date
575c818482 when a MIDI region has a note selected with none previously, cancel existing MIDI region/note selection 2020-05-01 17:39:13 -06:00
65f7a6a938 changes to deal with region/note selection when changing into/out of internal edit mode
Also, activate MIDI editing actions so that they are effective in internal edit mode
2020-04-16 17:48:12 -06:00
eca7888047 NOOP: newline removal 2020-04-16 17:48:12 -06:00
0ecf1e40ea add Editor-level action to toggle track layer display 2020-04-03 18:54:51 -06:00
9ca9aa8ae1 add new Editor method to toggle all existing automation
Applies to selected tracks if non-empty; all tracks otherwise
2020-04-03 13:28:58 -06:00
75adc33629
Remove unused variable 2020-04-01 22:55:06 +02:00
d7500056fc stop transport clocks from jumping after the playhead is moved via a CursorDrag 2020-03-25 19:24:38 -06:00
3a9a9f247f
Clear import-status shared-ptr<> after use
Previously "Sequence files" set import_status.track and never
reset() the shared pointer. This resulted in various follow up
issues.
2020-02-25 02:37:52 +01:00
142ce953da Split Select-All-Tracks into 2 appropriately named actions
Existing function select-all-tracks is now renamed select-all-visible-lanes, to match its behavior.

New function select-all-tracks will select all Tracks, as the name implies.

To maintain consistency for those users who actively used select-all-tracks,
  the default shortcut ctrl+t  will continue calling select-all-visible-lanes.
2020-01-22 10:33:15 -06:00
dba7421153
Allow public access to the editor-mixer-strip
This is currently used by Mixbus to sync visibility of switches on
the editor-mixer-strip with the main mixer.
2020-01-05 19:22:55 +01:00
a701882e66
Add convenience methods to test for active drags 2019-11-09 05:59:55 +01:00
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
da3d8e5418 (Source List) Implement insert-region action... now uses the Source List. 2019-08-01 12:11:31 -05:00
50786b3e5c (Source List) Recover Regions feature: WIP 2019-08-01 12:11:31 -05:00
b409c58ee6 (Source List) Fix drag-n-drop. 2019-08-01 12:11:31 -05:00
71c2ed8160 (Source List) Source list, Region List: Resolve various action+behaviors between the 2 lists.
Duplicate the remove_unsued_region action in the Session->Cleanup menu, for discoverability.
Region list should use the same Region actions as the canvas...
OK, now resolve the change in use-cases of Region List and Source List.  tentative.
Rough-in remove_selected_sources (Delete in Sources list).
Column tweaks.
2019-08-01 12:11:31 -05:00
c12a017728 (Source List) Region Tags (gtk2 part) 2019-08-01 12:11:31 -05:00
b1019bbbf6 (Source List) Region List rewrite (gtk2 part)
See:  https://docs.google.com/document/d/1sI7p9RoRVZtNx2n67RvBa0_16fuZblV_lNkkKN2g93s/edit?usp=sharing
2019-08-01 12:11:31 -05:00
90962d3426 (Source List) Source property signals (gtk2 part)
See:  https://docs.google.com/document/d/1sI7p9RoRVZtNx2n67RvBa0_16fuZblV_lNkkKN2g93s/edit?usp=sharing
2019-08-01 12:11:31 -05:00
675759c167 Update references to ptfformat -> ptformat && fix api calls 2019-06-22 17:26:05 +10:00
01a43c6b1e
Another round of whitespace fixes 2019-04-09 00:27:33 +02:00
50303d90bd
NO-OP: whitespace, indent 2019-04-08 20:58:18 +02:00
8a7e452265
Yet another "Rect frame" (not a sample) 2019-04-08 20:57:56 +02:00
12a415f077
Cleanup Editor/Marker context-menu
This could have caused crashes previously:
::build_range_marker_menu() may have created range_marker_menu
while the GUI wanted transport_marker_menu.
2019-03-07 23:50:46 +01:00
3bc9281c31
Fix some Gtk::Menu related memory leaks
A Gtk::manage()d widget will be deleted when its parent container
is destroyed. Top-level context menus are not inside a container and
hence need to be manually deallocated.

This adds explicit delete calls for menus where there is a
member variable reference to the Menu.
2019-03-07 23:50:32 +01:00
204d7bf76c
Remove cruft: unused members 2019-03-07 22:25:19 +01:00
b410cd07ab
Remove unused region_edit_menu & edit-point action 2019-03-07 22:25:19 +01:00
47d143a45d
Remove unused RulerType 2019-03-01 00:52:36 +01:00
Alex Pilon
e7091cb2cd
Observe preference to prompt for names when adding range markers 2018-12-28 17:25:30 +01:00
922bc86b8e
Video-Frame (not sample) 2018-12-13 17:44:58 +01:00
fc83d044f8 use ActionManager namespace, rather than ActionMap objects, and remove all per-context action maps 2018-12-10 08:34:01 -05:00
4423945643 start using ActionMap in preference to ActionManager 2018-12-05 17:33:06 -05:00
0154c82fa3 fix several inter-related problems with libptformat 2018-10-14 20:35:31 -04:00
a5a5ba1ace Clarify where the file 'ptfformat.h' can be found 2018-10-13 13:49:50 +01:00
031b910cab PT import: editor_pt_import complete rewrite 2018-10-12 19:09:40 +11:00
232096bcb2 NO-OP: clean up whitespace, separate methods 2018-07-27 00:28:52 +02:00
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
808dc8ad64 new_grid: fix some thinkos in ruler math, to better match sensible grid lines.
Tweak enums to better match the Grid values they represent.
2018-07-27 00:26:21 +02:00
fcabb27561 Remove some redundant calls to snap_to(). get_preferred_edit_position() already did it. 2018-02-27 08:55:17 -06:00
1a293bb480 Add drop-shadow decorators to menu bar and transport toolbar.
Allow status bar to fill available width.
2018-02-19 08:05:55 -06:00
c206fa98a1 Re-pack the master meters (in the toolbar) so the editor_meter_peak_display button is more clickable. 2018-02-14 14:47:00 -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
c6eab71435 new_snap: Snapped Cursor ( squashed commit )
Snapped Cursor is a line that follows the edit point, and indicates where the operation will occur.
This replaces and extends the line that appears with the Cut tool.
New associated preferences:  snap_threshold and show_snap_cursor.
2018-02-09 08:21:45 -06:00
ba2b136af2 NO-OP: whitespace 2017-12-12 00:13:12 +01:00
dade19310d Lua scripting: add convenience function Editor::trigger_script_by_name(). 2017-12-07 11:08:26 -06:00
43f329256e Consistent default argument for virtual fn. 2017-11-23 10:45:04 +01:00
98439cf88c GUI to set clock-origin marker 2017-11-23 00:13:44 +01:00
231e25544b Tweak 842d758e: selection & move into view
Use separate editor + mixer flags for moving selected tracks into view.
Changing selection in the Editor will only pan the mixer-view and vice-
versa. This fixes an issue with the track that is being clicked-on to
be moved out of view (due to groups)
2017-10-21 21:07:18 +02: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
631629b8e7 Editor zoom: add zoom_to_extents() 2017-08-26 23:06:29 -05:00
9b87279eca Editor zooming:
New function session_gui_extents() reports the extents of all playlists.
  ToDo: include region playlists, when they become available.
also:  slow-down autoscroll (ToDo:  make a config variable for this)
2017-08-26 22:44:58 -05:00
cba622cdce Add Lua bindings to set toggle-actions 2017-08-09 16:29:24 +02:00
7009ff0300 Update Selection API to include all Stripables 2017-08-06 22:17:58 +02:00
0ae9cda51d Allow to select VCAs 2017-08-06 22:17:42 +02:00
nick_m
2925fd52e5 Rework tempo marker editing menu functions
Setting a tempo to 'Continue' via right click puts it in a permanent state
of continuing the previous section's end tempo (basically what
'Lock Continue' should have been). This can be disabled (unlocked) by
selecting 'Don't Continue'.

Remove the previous temporary 'Continue' function.

Reorganise menu to separate position lock style from more commonly
used functions.
2017-07-22 02:15:20 +10:00
40e2f9a68a CursorZoomDrag rework:
* If the use-time-rulers-to-zoom option is enabled, -all- cursor drags can zoom.
* Behavior has been tweaked so it is easy to scroll without zooming, if you want to.
2017-07-20 09:51:26 -05:00
f9e5e4360e Move more Gtkmm2ext widgets into libwidget 2017-07-17 21:06:04 +02:00
b5e9451bc7 Remove unused sources & includes 2017-07-17 21:06:04 +02:00
f6e182b937 Move Gtkmm2ext widgets into libwidget 2017-07-17 21:06:04 +02:00
b6e4dfe37b remove cruft (no more ButtonJoiner) 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
a9224abcf4 Add explicit VideoTimeline change-type, follow up on f73ce2d 2017-06-28 18:46:07 +02:00
5f30d87fd0 Changes to Editor::visual_changer to support Item/Canvas::prepare_for_render
This is necessary to allow calculation of correct intersection of visible
canvas area and items for the new Item::prepare_for_render() API.

samples_per_pixel must be set first to calculate the new horizontal canvas
position in Editor::set_horizontal_position and then
WaveView::set_samples_per_pixel will eventually call
WaveView::prepare_for_render for those items that are visible on the new canvas
position at the new position.

Or if there is not a change to zoom state then call Canvas::prepare_for_render
explicitly.

Also changes so that each method is only called once during
Editor::visual_changer
2017-06-26 08:40:47 +10:00
265f52535a Coalesce visual changes to canvas/items and allow canvas to render
First visual change will be processed as normal and then blocked until the
canvas renders the change. If further visual changes need processing then
Editor::pre_render callback will schedule another expose/redraw/render.

This prevents an issue where idle_visual_changer is called many times in
response to events(keys/motion/etc) but the canvas does not get a chance to
render any but the last one which results in a big pause/jump.

This results in a more responsive canvas and in particular a smoother and more
predictable zooming experience.
2017-06-26 08:40:47 +10:00
dc0139d4af use CoreSelection for track selection 2017-05-05 18:56:25 +01:00
dc3ae8d196 Add a "select topmost" track editor action 2017-04-29 12:38:53 +02:00
e508d41091 NO-OP: whitespace 2017-04-29 12:38:53 +02:00
a534258594 Reset Playhead interpolation when looping and locating 2017-03-31 14:16:04 +02:00
55b8b44889 Improve playhead updates, reduce jitter for follow PH, stationary PH
* resolve rounding mistakes
* extrapolate and filter position using GUI timing
* track engine's position
2017-03-23 19:21:50 +01:00
nick_m
5c741b7a07 tempo editing updates
- a tempo marker may now be set to always continue (clamped)
	  this means that the end tempo of the previous section will
	  track the start tempo during tempo ops.
	  it mimics the behaviour in 5.8, with the gui indicating
	  the curves to be changed.
2017-03-05 05:21:56 +11:00
ddb4b8a7c3 Add reset region gain action for selected regions 2017-03-04 15:26:00 +10:00
nick_m
38b5d88795 allow continuation of tempo via right-click 'Continue' where appropriate.
- this is the opposite of 'Ramp to Next'.
	  it removes discontinuities between the
	  last end tempo and the current by altering the current one.
2017-03-01 01:58:53 +11:00
nick_m
663d0e1743 add right-click 'Ramp to Next' tempo marker menu item. 2017-02-27 20:16:10 +01:00
nick_m
8e944953c6 highlight the tempo curve that is to be altered, modify text to suit. 2017-02-27 20:16:10 +01:00
f64441aa58 remove method no longer needed
Editor::track_selection_changed() is now invoked by EditorRoutes::sync_treeview_from_presentation_info(),
AFTER the Selection has been updated
2017-02-26 18:24:56 +01:00
9e543beb56 Add some convenient public editor methods (for lua-bindings)
and s/get// in the old API for consistency.
2017-02-24 16:10:14 +01:00
1e4e97019d Lua bindings to access editor selection + region selection bindings 2017-02-23 22:32:32 +01:00
92e203a19e Consolidate ActionChanged callbacks, add tooltips 2017-02-18 16:14:41 +01:00
c8d6ddfd10 Don't scroll-jump when selecting all tracks 2017-02-18 01:25:13 +01:00
d463720b6d simplify arguments to Editor::sensitize_the_right_region_actions() 2017-02-15 20:07:49 +01:00
0a41daa932 classify all region actions based on how they get a list of regions to operate on; use this in Editor::sensitize_the_right_region_actions()
There are still problems because actions like trim_front()
that use the edit point get the edit point with different
results than the code that sensitizes actions
2017-02-15 20:07:49 +01:00
2cc94f8880 tentative steps in trying to fix region action sensitivity 2017-02-15 20:07:49 +01:00
65b38322db GUI action Transport/RecordCountIn 2017-02-13 23:01:11 +01: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
8ca53c4497 make editor respond to track seleciton change again 2017-01-28 11:16:50 +01: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
nick_m
7b9784fff4 mark session dirty when dragging tempo markers. 2017-01-27 03:05:32 +11:00
a8afe7faab Remove cruft 2017-01-20 11:43:42 +01:00
22eae69078 Remove Editor API to calc preroll duration 2017-01-19 13:05:54 +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
c6464e9c34 Move some actions into the global group:
This allows common keyboard shortcuts from any Tab (Editor, Mixer).
Discuss: should those actions/methods also be moved to ArdourUI instead of
PublicEditor?
2017-01-12 18:22:56 +01:00
nick_m
3060a458eb allow importing tempo maps at selected position. 2017-01-06 02:14:17 +11: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
a6b4d8b8c6 fix editor sidebar show/hide with embedded TimeInfo 2016-12-23 03:56:01 +01: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
ab37491614 repack widgets, and add some spacer elements 2016-12-18 13:34:15 -06:00
448f921dd8 Transport Layout:
* Remove some redundant containers and frames, for a cleaner look.
* Adjust transport button spacing and sizes to more closely match the editor toolbar.
2016-12-18 09:02:13 -06:00
85e4b1d98f Move selection/punch clocks to editor Sidebar 2016-12-17 02:43:42 +01:00
e1826f8b1c Add API to query editor's playhead cursor position 2016-12-17 02:43:42 +01:00
cd64f17a9c initial attempt at importing SMF tempo maps during MIDI import.
Still with debug output
2016-12-16 16:49:52 +00:00
ebc7eabea2 add arguments (unusued) to control whether or not SMF tempo map is used during import 2016-12-16 14:57:14 +00:00
9e4b972286 GUI changes to allow user to specify how/if to use SMF track/instrument names during import 2016-12-14 12:31:16 +00:00
0eff7d4a0c Add option to Zoom to Selection on double click
Currently implemented for Region and Range selections.

The new option is false/off by default to maintain existing behaviour. I'm not
sure it should require another option, perhaps Zoom to Selection should be the
default and accessing the region properties dialog can be via Modifier+double
click, but further changes can be made on user feedback etc.

Related: #7112
2016-12-13 13:02:04 +10: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
914224f808 Add editor actions to set tempo and meter 2016-12-10 21:30:30 +01:00
73f3e479d3 Make Cut mode respect snap modifer 2016-11-21 22:19:56 +10:00
4ec299779c Reparent cursor used in Cut mode so that it is on top and visible 2016-11-21 20:11:47 +10:00
nick_m
05355d0306 fix incorrect return type for Editor::get_grid_music_divisions(). 2016-11-17 03:13:16 +11:00
dac2d41ee2 Add option to zoom using button press in the time rulers and dragging vertically
This is a common operation used for zooming in other DAWs like Ableton Live and
Cubase. To support such a usage pattern without changing the existing behaviour
of the ruler area I've made it an option that is false by default.

The behaviour of RulerDragZoom is intentionally different than a CursorDrag
that occurs in the rest of the ruler area in that it doesn't follow the snap to
grid setting and no locate related stuff occurs until button release.

There are some issues with responsiveness with more than a few hundred regions
or a large amount of MIDI events/notes.

Implements feature #6768
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
nick_m
715b178130 Improve bbt ruler drawing performance for large time ranges.
- when the timeline displays many bars, zoom/autoscroll
	  speed is improved by calculating the bbt ruler scale first
	  then requesting a suitably scaled grid.
2016-10-19 03:56:43 +11:00
67540ad0f5 add explicit "duplicate-regions" action 2016-09-27 14:59:31 -05:00
07bb5ff347 move kbd focus reset method into ARDOUR_UI where it (probably) belongs 2016-09-06 16:17:08 -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
Nathan Stewart
5b4584ad94 Add "Marker Toggle" #5193 2016-08-13 16:07:16 +02: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
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
da7d7f9502 many changes associated with rationalizing selection flow 2016-07-06 13:39:10 -04:00
906f7e1edd GUI doesn't need to listen to old ControlProtocol signals for stripable selection 2016-07-04 12:45:53 -04:00
nick_m
24f64b3ea7 Make exact beat calculation of tempi a bit less cumbersome. Move tempi on an audio basis for non-musical snap. 2016-06-12 02:46:13 +10:00
c7d6262e9f there is no PresentationInfo::global_order_t any more 2016-06-05 16:33:01 -04:00
260058a4a9 move from PresentationInfo::global_order() to PresentationInfo::order, and fix up part of reordering behaviour
Dragging tracks/busses in the editor *below* VCAs still does not work
2016-06-03 15:15:39 -04:00
91a95b086a initial sort-of-mostly-working integration of new Pane 2016-05-31 15:30:45 -04:00
482873760c initial implementation of VCA time axis views 2016-05-31 15:30:44 -04:00
3eae4b0974 tweak Editor to use Stripable methods for control-surface-driven selection 2016-05-31 15:30:42 -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
nick_m
5ccfeea5bc Tempo ramps - more bbt dragging work.
- display prev tempo and tempo at mouse while dragging
	- simplify ramp dilation somewhat.
2016-05-27 23:38:16 +10:00
nick_m
86b0268e8b Tempo ramps - add visualtempo curve, dragging bbt or music rulers with constraint modifier dilates previous tempo. 2016-05-27 23:38:16 +10:00
nick_m
85c3284adc Tempo ramps - add some right-click options to meter and tempo markers. 2016-05-27 23:38:15 +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
daa07ce6e0 Tempo ramps - tempos now musically snap to their future. 2016-05-27 23:38:12 +10:00
nick_m
340bd42c62 Tempo ramps - allow live updating of tempo markers.
- all a bit slow, but should be ok once we can lock
	  markers to frames.
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
098e8e551a Don't save instant while loading instant.xml
opening a recent session from a session can result in: Editor::constructed
and session_loaded() being true. A partial instant_save can occur (not
to mention: invalid XMLnode iterators)
2016-05-18 20:06:20 +02:00
05baa2d1c1 use WindowManager toggle API for script-manager 2016-05-06 03:59:02 +02:00
ec0ec95262 change const some functions to const. (prepare lua bindings) 2016-04-09 00:33:03 +02:00
9a11e3a64d change API for CairoWidget::focus_handler
This functor/closure is responsible for stealing focus from any existing text entry (or whatever else may have focus)
when clicking on a CairoWidget or derived class.

The old implementation just gave focus back to the editor canvas. The new version walks up the widget packing
heirarchy to find a focusable parent (from the CairoWidget for which it is invoked). If no focusable parent
is found, it cancels keyboard focus in the toplevel window containing the CairoWidget
2016-03-15 12:41:21 -04:00
c9d6d9ed85 add region & range loudnless report 2016-03-11 17:26:42 +01:00
2532911b18 Editor Actions Scripts & Manager 2016-02-23 15:42:53 +01:00
56770ff0af change GTKOSX macro constant to use __APPLE__ instead 2016-02-22 15:31:25 -05:00
6991a07902 remove all trace of SAE from source code.
This had become incoherent over time, and posed a development hazard and burden going forward
2016-02-22 15:31:24 -05:00
bc487bb4b0 replicate the remove-all-trailing whitespace commit(s) in master 2016-02-22 15:31:24 -05:00
949163f806 more changes to Bindings, Keyboard APIs 2016-02-22 15:31:24 -05:00
67e19c177f radically change Keyboard/Binding API design to disconnect Gtk::Action lookup from binding definition
We need this because we need binding information/objects before all
Actions have been defined.
2016-02-22 15:31:24 -05:00
2c6799f247 changes to support new key bindings editor design 2016-02-22 15:31:23 -05:00
a13a8da8ac switch all action registration/binding code over to new API.
This removes the ability to change bindings via menus.

Still to come: saving modified bindings, and reworking the key editor
2016-02-22 15:31:23 -05:00
d5bcf90b1a remove all tearoffs except the monitor section.
We don't need this functionality anymore as we build on 15 years experience plus the new tabbed structure
2016-02-22 15:31:23 -05:00
37fce09a18 widespread changes to get the new (oldArdour binding scheme to be used for keyboard accelerators 2016-02-22 15:31:22 -05:00
552e995297 save/restore tabbable state 2016-02-22 15:31:21 -05:00
98b14ad0e6 get normal GTK accelerators working again 2016-02-22 15:31:21 -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
3332633d19 Editing from a control surface must have the ability to ignore mouse location.
Add mark_in and mark_out actions that explicitly use the playhead as the edit location.
2016-01-28 13:46:33 -06: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
André Nusser
6ccffbaf09 Improve behavior of overwrite_file_dialog.
- Make overwrite file dialogs transient.
- Cancelling the overwrite dialog doesn't close initial dialog.
2015-11-04 17:52:00 -05:00
André Nusser
e8a832f03f no-op; reordering of class forward declarations in editor.h. 2015-11-04 17:52:00 -05:00
André Nusser
e807fe2b28 Introduce "Transpose..." also in the context menu of selected notes. 2015-10-17 22:12:55 -04:00
André Nusser
4c26225ddc Fix "Select All * Edit Point" when used as shortcut. -fixes #6626 2015-10-08 13:46:22 +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
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
d686cb213f Added PT .ptf session audio import functionality
Signed-off-by: Damien Zammit <damien@zamaudio.com>
2015-08-06 00:28:35 +02:00
e1f168de11 rename Marker class
Classes are in the global namespace.
OSX has a flat namespace and OSX32bit/Carbon has a Marker too.
2015-07-23 17:58:40 +02: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
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
nick_m
88477ace25 Fix inverted logic of SnapOff with snap modifiers pressed.
- also clean up, rename and comment some previous hanges.
2015-05-23 03:09:48 +10:00
nick_m
65e06fa350 More cleanup
- remove "no_magnets" ugh.
2015-05-22 04:26:16 +10:00
nick_m
c359f881a1 Relative Snap -make it activated by the tertiary modifier during drag.
Disabled/enabled with the shift key. no config stuff at all now.
	Move existing (strange) trim feature to primary + tertiary modifiers.
2015-05-17 23:47:01 +10:00
nick_m
91a34c596d Relative snap - support magnetic mode (hackishly for now) 2015-05-17 04:26:05 +10:00
nick_m
68a8330afc Relative snap 2015-05-16 04:15:52 +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
91fac4c96d merge fix for tempo branch 2015-04-21 08:35:20 -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
6874bca886 vertical scroll stop on automation lanes 2015-03-19 20:32:59 +01:00
ffd32ae5e1 Right-clicking on the Loop/Punch ruler should "Do Something". 2015-03-13 16:25:59 -05:00
c90400364a prepare saving video-export settings.
* migrate dialog from Editor to UI.
* make it a WM proxied window
* prepare applying state after construction..
2015-02-28 02:36:58 +01:00
1973243a98 Separate out creation of xrun markers from Editor::mouse_add_new_marker()
Remove the is_xrun parameter from Editor::mouse_add_new_marker(), and just
create the marker directly in ARDOUR_UI::create_xrun_marker(), so that xrun
markers don't become automatically selected when they appear.
2015-02-12 18:06:16 +00:00
7de6128169 Add tempo and meter editing functions to main clock context menu
Add 'Edit Tempo/Meter' and 'Insert Tempo/Meter Change' to the main clock's
context menu.
2015-02-12 18:06:16 +00:00
ee6ecf9034 A few whitespace fixes
A few trivial whitesapce fixes, including replacing leading spaces with tabs in
editor.h.
2015-02-12 18:06:16 +00:00
baf10dc4e3 Editor::sample_to_pixel() always returns an integer value, but it should use explicit rounding 2015-02-11 21:59:38 -05:00
nick_m
ff13ac8b4f Clean up Session's _current_trans when aborting a drag. 2015-02-05 23:32:57 +11:00
b759fd5879 Put playhead on top of everything.
Achieve this by adding a new hscroll group just for cursors.

That requires a slightly smarter window_to_canvas() to deal with overlapping
sensitive scroll groups.  New rule is that scroll groups can overlap, but the
most sensitive one found from the top down will be chosen to translate
coordinates.  This basically means don't overlap scroll groups with different
sensitivities.

In the presence of scroll groups, having a canvas-wide window_to_canvas()
and/or canvas_to_window() fundamentally makes no sense.  At some point in the
glorious future we should kill those and use only item-relative coordinate
translation.
2015-01-16 19:13:56 -05:00
1df6931e77 Fix broken whitespace (noop). 2015-01-12 01:05:01 -05:00
43e58911a4 Remove unused vertical scroll group. 2015-01-12 01:05:01 -05: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
nick_m
44203ce955 Fix AutomationTrackItem rubberband click thinking it was unhandled.
Fix several other cases where a single mouse click could cause several
(not nested) selection ops.
Fix missing selection memento for midi notes and midi commands.
Rename some variables.
Fix random style issues.
2015-01-11 04:07:31 +11:00
2eef0612b9 Start step entry at playhead. 2015-01-07 20:46:21 -05:00
3a47d99f5f Fix internal/external snap type restoration. 2015-01-07 19:51:18 -05:00
04bbe402b0 Factor out grid beat divisions. 2015-01-07 19:05:41 -05: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
884cc6f90c Add automation track control points to undo history (and selection_op history). 2015-01-02 08:01:12 -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
ee8dbdb009 Fix internal select all. 2014-12-29 21:04:23 -05:00
4c0cebf7f9 MIDI transform dialog. 2014-12-28 16:06:44 -05:00
c14f6c59db apply font-scale to overall layout (rulers, track-header) - fixes #6088 2014-12-28 15:01:49 +01:00
12a7f12b0b Context menu for applying edits to note selection. 2014-12-25 15:32:10 -05:00
1de39b8971 Add instrument selector to import dialog.
Idea here is for importing large multi-track MIDI files to be immediately
listenable upon play without tediously adding a ton of instrument plugins
manually.
2014-12-24 20:07:10 -05:00
62355de33a Fix cursor update on nested entry.
For example, if you're in a note and something about the mode changes, it's the
underlying region context that needs to change.  So, seems we need a stack of
entry contexts to deal with this sort of thing.

Switching in/out of smart mode still doesn't update immediately because we
don't have the y-coordinate needed to update it.
2014-12-23 13:47:59 -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
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
341146a975 Remove mouse mode toggling. 2014-12-18 20:26:43 -05:00
66870ddf09 Restore snap when switching to/from internal. 2014-12-18 20:23:34 -05:00
cebf191cba Make tools toggle-like by switching to last mode. 2014-12-18 20:21:05 -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
9278ae23c4 tweaks to minsec and timecode ruler display, especially at very high zoom.
Imported from work on Tracks done in Tel Aviv, November 2014
2014-12-11 12:51:01 -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
603748d68a Unify gain and draw tools.
There might be a few special cases lingering around from attempts at magic tool
business, but this seems to work fine as far as I can tell.
2014-12-07 20:37:46 -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
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
f900711136 port changes to ARDOUR::Location and ARDOUR::Locations APIs from Tracks to Ardour.
Fixes deadlocks caused by mutex on Locations list, and clarifies the purposes and uses of the class-level and
object-level change-related signals.
2014-10-24 12:18:46 -04:00
b73f725676 remove mouse zoom mode; bind z to zoom-to-range 2014-10-21 12:47:53 -04:00
8d8717800d add tearoff reattach for the editor 2014-10-16 13:44:36 -04:00
6a971e645d use new ARDOUR::Location signals in GUI
Conflicts:
	gtk2_ardour/editor_markers.cc
2014-09-19 23:06:26 -04:00
e9ab53402c add action and menu item to control use of skip playback 2014-09-17 12:28:36 -04:00
02af7cb418 alternate layout with a full-height editor-mixer, for mixbus 2014-07-28 11:27:02 -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
d46081c275 holding Primary(ctrl/cmd) allows user to make noncontiguous strip selections 2014-07-23 16:13:55 -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
492c933a69 fix the visible_tracks_selector to show * when user tweaks a track height. various experimental tweaks to visible_tracks_selector and a new zoom_preset_selector for Mixbus. 2014-07-14 10:08:55 -05:00
07e0f785f8 add "fade range" operation, bound to alt-f at present by default 2014-07-10 08:17:22 -04:00
8eeb02fe75 add Editor::edit_mode_strings to allow for i18n; correctly size ArdourDropdowns using longest, translated strings 2014-07-09 16:48:36 -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
67eaa62ee9 fix build after copy-n-paste/code change collision 2014-07-07 10:21:47 -04:00
d97199088b some code shuffling to make sure that cut mode always operates at the mouse location, with (maybe) the right regions 2014-07-07 10:13:26 -04:00
779fe6c082 add functionality for cut tool 2014-07-07 07:05:44 -04:00
7ec397c019 add basics of Cut mouse mode, no functionality yet. Icon images are still required 2014-07-07 07:05:43 -04:00
6d97d72999 remove some cruft with previous commits. remove option link-region-and-track-selection since they are now exclusive, and rename select-all-regions to select-all-objects to match the implementation 2014-07-06 14:02:13 -05:00