Commit graph

1306 commits

Author SHA1 Message Date
Robin Gareus
a0286f2e6f Expose cut-copy-section in the editor
This is still a bit of an experiment, there may need to be a dedicated
ruler for sections, or a side-bar that allows arranging.
2023-03-31 23:13:20 +02:00
Robin Gareus
91c0f143ec Set sensitvity of "Insert Selected Region" 2023-03-31 22:06:41 +02:00
Paul Davis
ece438d73d editor: refactor snap to bbt to allow specifying non-grid-setting grid type 2023-03-24 14:19:16 -06:00
Paul Davis
18249f7395 ardour has a new ruler
The mapping bar is where tempo mapping operations will take place
2023-03-24 14:19:16 -06:00
Paul Davis
b35518e212 switch from boost::{shared,weak}_ptr to std::{shared,weak}_ptr
This is mostly a simple lexical search+replace but the absence of operator< for
std::weak_ptr<T> leads to some complications, particularly with Evoral::Sequence
and ExportPortChannel.
2023-03-24 14:19:15 -06:00
Paul Davis
2c7bfa9ead require use of BBT_Argument as both parameter and return type from most methods (GUI edition) 2023-02-15 16:02:56 -07:00
Robin Gareus
86d9bcf525 Remove direct use of audio-engine rate (2/2)
This is in preparation for sample-rate independence.
2023-01-22 20:07:40 +01:00
Robin Gareus
1ff5592731
Remove UI side grid limit
This concept from 2007 is no longer required Temporal::get_grid
already limits the number of grid-lines depending on the step
size (mod-bar, beat_div) and start/end positions.
2023-01-11 00:32:47 +01:00
Paul Davis
ed7e0a4166 snap: add missing break statements. oops! 2022-12-20 21:54:35 -07:00
Paul Davis
509d762cdd editor: fix snap_to_bbt() to do something closer to right for bars
At the very least, snapping to bars should be different from snapping to beats.
2022-12-19 12:19:05 -07:00
Paul Davis
f37687a985 various fixes for AudioClock duration/!duration confusion 2022-12-06 11:11:08 -07:00
Paul Davis
f2a725b311 NO-OP: add some explanatory comments to Editor::snap_to_bbt() 2022-11-29 10:09:39 -07:00
David Robillard
bdacfb8724 Fix invalid use of Doxygen "@param" command
This is never for inline references to parameters, only for starting parameter
documentation blocks.  The "@p" command is for this, although unfortunately
Doxygen doesn't actually do anything with it and it's just an alias for code
text.
2022-10-30 20:44:28 -04:00
Robin Gareus
3a98d6133c
Hide draw-tools spacer when draw-tools are hidden 2022-10-18 02:11:09 +02:00
Robin Gareus
452eedc994
Pixelpushing: align toolbar buttons
Removing the shadow makes toolbar and editor-tool buttons align
when the editor-mixer is hidden. It also improves consistency
with all other tabs that have no shadow on the left.

Increasing the table border width to 1, makes aligns the
editor-mixer button with the main toolbar.
2022-10-18 01:45:55 +02:00
Robin Gareus
7c6c6290ee
Fix #8996 (show/hide VCAs from script) 2022-10-18 00:08:36 +02:00
Robin Gareus
0f6a2f7320 Remove unneeded scope 2022-10-01 19:01:49 +02:00
Robin Gareus
0b70550b42 Fix width of draw-grid dropdown menu 2022-10-01 19:01:30 +02:00
Robin Gareus
751de3889e Fox grid dropdown menu width
Take submenu items into account, which have strings longer than
GridTypeBeatDiv32 text
2022-10-01 18:53:45 +02:00
Robin Gareus
891b561cad Cleanup: use dedicated method to build draw menu 2022-10-01 18:03:03 +02:00
Paul Davis
91df1d8e94 NO-OP: fix switch statement indentation 2022-09-22 16:10:34 -06:00
Paul Davis
9c64771636 remove some debug output 2022-09-21 10:17:13 -06:00
Robin Gareus
2a42743270
Fix ArdourDropdown sizes 2022-09-20 03:33:01 +02:00
Robin Gareus
888d91d599 Add action to locate to loop start/end 2022-09-07 19:15:36 +02:00
Paul Davis
fc6ad8ebd9 bbt markers: all the basics of dragging, editing, removing 2022-08-17 16:40:35 -06:00
Robin Gareus
67f55d7b4e
EditorSnapshots does not benefit by inheriting from EditorComponent 2022-08-05 00:14:12 +02:00
Ben Loftis
b9419aa405 another attempt to catch details of a rare region-gain undo crash 2022-07-16 10:01:33 -05:00
Robin Gareus
8ead1439d8
Fix ruler/canvas separator
The track-header (gtk) is packed with 1px box spacing. This
is added at the top of each box (best seen by looking at the
group-tab vs track-header alignment in the editor).

However the actual track separator line on the canvas is at the
bottom of each track, aligning with the top of the next track
or automation-lane.

The first track however lacks a separator at the top, which
needs to be provided by the ruler. Once the canvas is scrolled
this ruler/canvas separator overlaps with the bottom separator of
each TAV.

Using ruler Rectangle::set_outline had various issues.
The outline extends outside the rectangle. It bled into the
video-timeline instead of the canvas' top y-axis pixel.

Also the separator was above the video-timeline, not above the
canvas. Hence a dedicated separator Line is preferable.
It also provides a consistent separator if no rulers are visible.
2022-07-06 20:50:06 +02:00
Paul Davis
bf87916fb1 tempo display: further simplifications to handling map changes
When a tempo map change originates from a drag, we know the required redraws have
already been done. Use a new bool member, ignore_map_change, to tell the Editor
to ignore the map change signal. For all other map changes, do the full reset.
2022-06-28 10:16:31 -06:00
Paul Davis
6dfaac9e94 redesign the mechanisms for updating tempo/meter display during drags and other map changes
We now simply move markers during drags, and do not seek to create/delete markers.

When the map is changed, we rebuild the markers from scratch. This might need optimization to avoid doing
when the editor itself changed the map.
2022-06-27 22:21:27 -06:00
Paul Davis
1de542120a editor: remove a couple of unnecessary uses of Beats::from_double() and uses ::ticks() method instead 2022-06-22 13:31:08 -06:00
Robin Gareus
720303a217
Fix edit-note dialog length calculation
The AudioClock uses samples. Duration calculation is
done using the current clock pos. The returned distance is
using Beats, can be directly used for all notes regardless of their
position.

Now that this works correctly the dialog can also be made available
for multiple-selection.
2022-06-04 04:58:31 +02:00
Paul Davis
cc021f9e94 complete list of return values for ::get_grid_type_as_beats()
Except triplets
2022-06-03 15:02:37 -06:00
Paul Davis
e2e6274956 libardour: change API of Session::request_locate() to include "force" argument (GUI edition) 2022-05-27 18:49:23 -06:00
Paul Davis
399a5b3f25 convert use of operator* for tim::line types with ::scale(ratio_t) (GUI edition) 2022-05-27 12:47:44 -06:00
Robin Gareus
b11f76d748
Do not select re-imported tracks
Stem-export defaults to use selected tracks. This retains
the selection, so focus remains. Repeat stem export will use
previously exported tracks if the selection is empty, or the
current selection (again).
2022-05-16 04:54:14 +02:00
Robin Gareus
8d4516228a
Update default time-domain logic
MinSec, CD-Frame, and Timecode grid should use AudoTime
2022-04-27 15:08:34 +02:00
Mads Kiilerich
a86aa31747
gtkmm: use get_visible() instead of deprecated Gtk::Widget::is_visible() 2022-04-08 20:20:10 +02:00
Mads Kiilerich
d52c727ec5
gtkmm: use get_mapped instead of deprecated Gtk::Widget::is_mapped() 2022-04-08 20:20:10 +02:00
Paul Davis
ca22ba77e1 Constification: make Stateful::get_state() const, with all other required const-ness added (GUI) 2022-04-06 21:56:59 -06:00
Paul Davis
a287499f75 queue ::redisplay_track_views() in an idle handler right after ::idle_resize()
Both of these are currently needed: idle_resize() is required for
::set_height() to take effect on all affected tracks, and
::redisplay_track_views() is needed to reposition all other tracks as
necessary.
2022-04-05 20:52:10 -06:00
Paul Davis
c1fb7bc05d we do not need to queue ::redisplay_track_Views() for track height changes
This may be incorrect, since track height changes may be driven
directly (e.g. via menu items) rather than by mouse drags. This may
need revisiting and there may need to be a way to separate dragged height
changes from others.
2022-04-05 20:52:10 -06:00
Paul Davis
da20e4ed60 change return type of Editor::process_redisplay_track_views() to bool
This allows it to be used in an idle callback. If we use
::redisplay_track_views() directly, we do not disconnect the idle
connection. This will happen automatically since the callback will return
false, but it seems better to explicit about this. Even better would be to use
::connect_once() but this may not be available in the version of glibmm that we
are using at present.
2022-04-05 20:52:10 -06:00
Paul Davis
f2e6798e66 change idle priority of Editor::redisplay_track_views()
It appears that GDK/glib will not run idle callbacks with a lower priority than
HIGH_IDLE+10 *if* a new user input event is pending. This means that if mouse
motion events are arriving and causing resizes of selected tracks, the call
to ::redisplay_track_views() which is needed to update all the other tracks,
will not take place if a new motion event arrives. Changing the priority to
same as is used for the ::idle_resize() callback prevents new motion events
from being handled before ::redisplay_track_views() is called.
2022-04-05 20:52:10 -06:00
Robin Gareus
7e10061d16
Disambiguate "Meter" use "Time Signature for music meter
In general we should use
* "meter": signal level meter
* "time-signature": music meter / metrum
2022-04-05 18:56:10 +02:00
Ben Loftis
93207d45c5 editor: clip picker expects set_session(0) to avoid dangling session-handle refs 2022-03-15 15:59:35 -05:00
Ben Loftis
2a611f1d40 editor: add clip-picker list to the editor 2022-03-15 09:03:40 -05:00
Ben Loftis
b0276fd524 ripple (gui part): when Ripple is selected, RippleMode widget appears 2022-03-14 21:35:30 -05:00
Ben Loftis
2eb286eb76 make range+region Bounce dialogs more consistent
* cleaner table layout
* explicit options for bouncing to Trigger and Clip List
* any bounce is added to Source list, so remove that from menu
* format context menus to match "(with processing)"
* use same code structure where possible
2022-03-13 19:42:00 -05:00
Robin Gareus
2cffca4c40
Restore rulers as saved with the session
This fixes an issue with the videotimeline not being shown
when reloading a session. Editor::set_state() restores the grid,
which in turn changes ruler visibility. This triggers
store_ruler_visibility() and the saved session state was lost.
2022-03-07 05:55:26 +01:00