Commit Graph

385 Commits

Author SHA1 Message Date
Paul Davis 65c81feb5e fix consistency and accuracy of tempo edit behavior setting 2023-04-22 11:12:21 -06:00
Paul Davis b4d8a3f933 get initial display for tempo ruler more correct 2023-04-18 14:37:46 -06:00
Paul Davis 13d814f87c fix a few canvas thinkos related to mapping bar 2023-04-08 14:12:41 -06:00
Paul Davis 13311b7a32 tempo mapping: tempo group and mapping group are now only ever visible one at a time
Currently, the "switch" is in Edit > Tempo
2023-04-08 11:44:21 -06:00
Robin Gareus 295dbd8e1e
Make RCU reader return a const pointer (omnibus commit) 2023-04-08 00:15:37 +02:00
Paul Davis 57398b1e5e tempo mappoing: use actual mouse cursors not canvas item cursors
Also some changes to attempt to do "half-twist" that will be removed soon.
2023-04-07 12:56:57 -06:00
Paul Davis 77cefd7721 new tempo mapping drag objects (API and implementation) 2023-03-24 14:19:16 -06:00
Paul Davis 20349d868e fix various aspects of display of mapping cursor
This might all change in the future, or even go away.
2023-03-24 14:19:16 -06:00
Paul Davis 868d606d16 track mouse motion in the mapping bar
This does not yet snap to BBT positions
2023-03-24 14:19:16 -06:00
Paul Davis 5e01503a56 add a new canvas-based cursor for mapping 2023-03-24 14:19:16 -06:00
Paul Davis e9b83e0f1d it's only debug info but let's get it right 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
Robin Gareus 380005f50f Update preference to set macOS render performance 2023-02-04 22:34:12 +01:00
Robin Gareus eb42318d3e
Consolidate ruler prelight events
This fixes various copy/edit bugs (e.g. transport ruler uses
"range marker bar" colors, but only after a enter/leave event).
2022-12-10 15:14:29 +01:00
Robin Gareus 49f7e4d447
Amend 07dea50456 (DnD import, copy to track) 2022-10-01 03:38:34 +02:00
Robin Gareus 07dea50456
Fix DnD import to grouped tracks
Import via Drag/Drop previously worked by selecting a track,
and then importing to the selected track.

This approach fails when the selected track is in a track-group,
and selecting the track also selects other tracks of different type.

Now the track to drop onto is passed directly passed through to
::finish_bringing_in_material as existing_track.
2022-09-30 21:30:48 +02: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
Mads Kiilerich cb4e10683d
gtkmm: use size_request() function instead of deprecated Gtk::Widget::size_request(&) 2022-04-08 21:11:07 +02:00
Mads Kiilerich 7f649efd42
gtkmm: use set_can_focus() instead of deprecated Gtk::Widget::set_flags(CAN_FOCUS) 2022-04-08 21:11:06 +02:00
Mads Kiilerich a86aa31747
gtkmm: use get_visible() instead of deprecated Gtk::Widget::is_visible() 2022-04-08 20:20:10 +02:00
Paul Davis 1999a3aae8 explicitly discard the return value from ::process_redisplay_track_views() 2022-04-05 20:52:10 -06:00
Ben Loftis 9ad82787a1 Instrument Selector: use a 3-way Disposition to disambiguate the uses of this widget 2022-02-04 21:33:12 -06:00
Robin Gareus 5cebd64924
Fix fit tracks
The track-height change needs to be applied so that
vertical_adjustment max range is set correctly.
Otherwise vertical_adjustment.set_value() may fail
or scroll to the wrong position.

In 5b3eacd421 `redisplay_track_views()` was moved from
EditorRoutes to Editor. The call was delegated to the idle
thread, potentially collecting multiple calls before performing
the update.

This resulted in "Fit selection" to set the y-offset before the
height-change was applied.
2022-01-27 19:57:58 +01:00
luz paz 364f2f0788 Fix typos in gtk2_ardour/ directory
Found via `codespell -q 3 -S *.po,./share/patchfiles,./libs -L ba,buss,busses,doubleclick,hsi,ontop,ro,seh,siz,sur,te,trough,ue`
2022-01-26 12:35:38 -05:00
Ben Loftis d50e854b05 Rulers: restore theme-ing of ruler bars (reverts much of 60cb) 2022-01-21 11:30:14 -06:00
Ben Loftis 60cbe57a6e Marker Rulers: changes to match mini-timeline aesthetic
Highlight ruler lanes when you enter, instead of showing many lines
2022-01-20 18:59:21 -06:00
Robin Gareus b51621a1ae
Fix assert() when using DnD to import MIDI files
When importing a multi-track MIDI files with identical track-names,
Ardour would create the same file for each track. Effectively
overwriting an existing file.

The following MIDI file would create the same file twice
in `interchange/`, once for each MTrk.

```
MFile 1 2 240
MTrk
0 Meta SeqName "Foo Bar"
0 TimeSig 4/4 24 8
0 Tempo 666667
0 Meta TrkEnd
TrkEnd
MTrk
0 Meta TrkName "Foo Bar"
0 On ch=10 n=36 v=95
...
```
2022-01-19 19:22:51 +01:00
Robin Gareus 0204ea1f24
Unify Region Drag/Drop
Identify Regions using PDB::ID. This allows dragging regions
from almost anywhere to anywhere, without special cases.
2022-01-19 17:13:51 +01:00
Robin Gareus 056189c76c
Clean up DnD, use MIME-types
This is in preparation for allowing to drag trigger-regions
or trigger-slots. Those will not use a static singleton
PublicEditor API.

Additionally this constrains Ardour-internal drags to Ardour
(via Gtk::TARGET_SAME_APP).
2022-01-10 21:29:29 +01:00
Paul Davis b1f73d25bf actual GUI interaction for cue marker ruler 2022-01-04 15:23:51 -07:00
Paul Davis 77d83540b1 copy-n-paste addition of cue marker ruler (based on cd marker ruler) 2022-01-04 15:23:51 -07:00
Robin Gareus 4720a45868
Make convert_drop_to_paths() reusable 2021-12-13 22:50:13 +01:00
Robin Gareus 3c03e4951e
Use updated temporal API 2/2 2021-12-11 15:51:31 +01:00
Paul Davis 44e67c3566 small API change to provide (debug) name to canvas cursor items 2021-08-13 12:51:36 -06:00
Paul Davis 52d41fa4e1 fix timeline type usage on macOS 2021-08-13 12:51:35 -06:00
Paul Davis 4f1ad4ed0d start adding new BBT marker support 2021-08-13 12:51:34 -06:00
Paul Davis cce695d33a changes required by fixing ambiguities in timepos_t/timecnt_t API (GUI edition) 2021-08-13 12:51:31 -06:00
Paul Davis eec4addcd5 GUI side cleanup forced by explicit BBT_Offset (double) 2021-08-13 12:51:30 -06:00
Paul Davis 7433bc27e0 intermediate, unfinished snapshot of ongoing timeline types work on GTK GUI 2021-08-13 12:51:29 -06:00
Robin Gareus 2b066293fb
Set playlist ID when importing to new tracks
This amends 730a0954 and b27bb586.
This also restores the original API for do_import()
and do_embed() as used by Lua scripts.

Note that this uses distinct IDs when importing both audio
and MIDI in the same DnD request.
2021-07-08 05:28:10 +02:00
Ben Loftis 730a0954d7
Playlist UI Tweaks: assign a pgroup_id on Import (gtk part) 2021-07-03 19:06:04 +02:00
Paul Davis 1685843082 global marker objects do not need a canvas height, so remove member and API to manage it
They extend (down) from an origin to COORD_MAX. The height is irrelevant
2021-05-14 18:37:50 -06:00
Paul Davis 3e47057609 import process now allows optional import of MIDI markers/cues 2021-05-07 14:58:16 -06:00
Paul Davis efd0d65acb when window size technically, just the window containing the editor canvas, or the canvas itself) changes, recompute BBT ruler stuff 2021-02-20 17:41:32 -07:00
Robin Gareus aecd84e7fd
Update session extents calculation
* Expose API via Public Editor
* Skip hidden tracks in calculation
* Use a single call to query playlist extents.
  This way the playlist read-lock is needed at most once per track
  which speeds up calculation.
2021-01-08 18:39:57 +01:00
Robin Gareus 4769c387f3
Expose EditorCursor via public editor API
This is in preparation to subscribe to playhead cursor position
changes in the recorder-UI.

This change also clean up the API, replacing a public variable
with a const access method and follows #12 of
https://ardour.org/styleguide.html
2021-01-08 18:39:56 +01:00
Robin Gareus e85ae7f9a6
Verbose cursor audio region peak display
https://discourse.ardour.org/t/is-it-possible-to-view-audio-levels-in-db-by-moving-cursor-over-a-waveform/105199
2020-12-30 13:42:42 +01:00
Paul Davis b9674115b7 when re-entering the track canvas in internal edit mode, ensure that kbd focus is set 2020-04-17 11:34:34 -06:00
Robin Gareus 701605129e
Drag/Drop import region to where it was dropped
Previously only drag/drop to existing tracks used the target
time-position and files imported as new tracks using the drop-zone
were placed at 00:00:00:00.
2020-04-14 17:58:28 +02:00