13
0
Commit Graph

275 Commits

Author SHA1 Message Date
cf7ba80fc1 the basics of lollipop dragging 2023-06-26 14:18:18 -06:00
2977205f3a add skeleton for lollipop drags 2023-06-26 14:18:18 -06:00
72850d456f implement time-stretch from left of region
Make click & drag in the left-hand half of a region with the Timestretch
tool stretch the region on its left, leaving the end position of the new
time-stretched region in the same place as the end of the original.
2023-06-09 17:57:52 +01:00
04d50ab880
Fix mouse edit-point cursor when dragging
Editor::motion_handler() only updates the snap-cursor
when no drags are active. While dragging, Drag::motion is
responsible to set the cursor accordingly.

In many cases the snap-cursor simply remained stuck at
the most recent position. Since in many cases
(e.g. RubberbandSelectDrag) it makes no sense to show the
cursor, so Drag::start_grab now hides the cursor by default.

This also fixes cases where the cursor is shown, but
was displayed in the wrong location.
2023-06-07 02:38:39 +02:00
921b4aaa75
Allow to drag time selection markers 2023-06-01 21:37:40 +02:00
c669ff58e5
Cleanup, fix Wunused-private-field 2023-05-22 22:29:42 +02:00
ca5e56f98c tempo mapping: MappingTwist drag should differentiate between ramped and constant twist
TODO:  probably break these into separate ::Drag classes
2023-05-22 13:33:03 -05:00
9fa8e257a6 tempo mapping: Mapping Drags should inhibit horizontal autoscroll 2023-05-22 13:32:38 -05:00
a258b82ce9 tweak behavior and naming of tempo-map drags:
* correctly handle clicks on the immediate right or left of a beat line
* prefer Mid-Twist and End-Stretch terminology over Twist and Linear
* static-tempo vs ramped-tempo is orthogonal to mid- and end- drags (TODO)
2023-05-04 09:33:08 -05:00
88e4b40857 remove concept/implementation of a mapping stretch drag (aka "half twist")
This concept proved to be impossible.
2023-04-13 17:50:41 -06:00
c10b265333 tempo mapping: various tweaks and improvements to workflow/Ux 2023-04-13 17:47:34 -06:00
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
dd542b8f4d
Use ARDOUR::PlaylistSet instead of local typedefs 2023-04-06 02:13:51 +02:00
0aea2a2ef8 tempo twisting: GUI improvements, including undo/redo logic 2023-03-24 14:19:16 -06:00
77cefd7721 new tempo mapping drag objects (API and implementation) 2023-03-24 14:19:16 -06:00
6d5273e514 tempo marker drag: change type of stored bpm 2023-03-24 14:19:16 -06:00
d61a741e4b mapping bar: some mouse handling 2023-03-24 14:19:16 -06:00
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
f1d784afbb deep fix to the way automation control point drags are handled/computed
The old code could not snap to the grid, because it had a lot of confusion about pixels vs. time,
and between line-origin-relative time and absolute time
2023-02-10 11:11:51 -07:00
c41de90abd drags: add API to set time domain of a drag
This can slightly improve efficiency of temporal computation
during the drag.
2023-02-06 21:04:17 -07:00
44f169bc56 automation line drag: fix crash during segment drags
a drag on a segment without adjacent points would crash because we never
set the _grab_button for the Drag, so the LineDrag object never gets deleted
on mouse-up. This leaves a dangling reversible command, which will then
cause an assert(false) crash in the next Editor::begin_reversible_command()
2022-10-26 16:55:27 -06:00
fba4a5ff73 fix region drag across tracks that auto-partitioned the receiving playlist
Confusion caused during nutempo development when a boolean related to nick_m's old
"for music" concept ended up becoming the "auto_partition" argument instead
2022-09-24 14:27:20 -06:00
2e0bfae628 midi note drawing: use RoundNearest not RoundDownMaybe for note ends 2022-09-22 16:21:07 -06:00
6784f0e5dc basic skeleton for BBT marker drag 2022-08-17 16:40:02 -06:00
b2d553cc51 editor: fix HitCreateDrag to (a) not crash (b) use the right length (c) snap correctly 2022-06-22 13:31:08 -06:00
d47b581cbb remove RegionRippleDrag
This used to be a distinct kind of drag, but ended up being refactored into
something that happens during a regular drag. Has not been used in quite some time.
2022-06-21 15:52:16 -06:00
265f5d8342 numerous fixes for meter marker drag 2022-05-30 21:14:57 -06:00
fdd634f530 add ctrl-drag on tempo bar/ruler to adjust tempo more directly 2022-05-29 14:19:27 -06:00
69ee83e6ce require explicit time domain for most region-centric drags
This removed one #warning nutempo line.
2022-05-27 15:57:14 -06:00
e0f9f11dfc automation-range-drag: if lane is empty, use current value for guard points
* in the case where there are no existing automation points, then
 initiating an automation range drag  (select range, switch to Draw)
 should initialize the line at the current knob position
2022-05-16 07:16:25 -05:00
6f973af1e1 tempo end drag: make this work with new implementation 2022-05-13 19:05:13 -06:00
66a3513dbd remove copy option for TempoMarkerDrag
This just seems like a dumb UI to implement. Drag-copying tempo markers is not a thing
2022-05-10 09:46:08 -06:00
b5487415ec editing: a partiaally implemented version of TempoTwistDrag, to be completed. 2022-05-02 16:47:23 -06:00
e02a96ec6b all Drag objects use an RAII object to block binding activation while they exist 2022-04-18 12:22:56 -06:00
883a44e6a4 temporal: TempoMap::use() returns a const ptr to enforce semantics (GUI version)
This commit leaves two issues outstanding:

1. unclear/ugly semantics for drag operations that reset the GUI thread's tempo map to the writable copy
2. undo/redo for the tempo map

These will be addressed in future commits
2022-04-08 11:58:04 -06:00
582661dbd0 as an experiment, prevent redisplay of (MIDI) regions during trimming
This doesn't actually work right now because of a conflicting design in MidiRegionView, but
could be promising. Or it might be reverted
2022-04-05 20:52:10 -06: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
c916d3d952 Substantial overhaul of tempo display code
Major changes: do not delete and recreate markers and curves for every tempo map
change, attach tempo curves directly to their (preceding) tempo marker, notable
cleanup of TempoCurve class to remove unnecessary members.

More tweaks expected since algorithm for matching markers and tempo map
points is not correct yet.
2022-01-18 19:47:20 -07:00
1d2fa465d3 remove mistaken handling of cue marker bar events 2022-01-05 13:27:47 -07:00
b1f73d25bf actual GUI interaction for cue marker ruler 2022-01-04 15:23:51 -07:00
845b5d81a9 add Drag::pixel_to_time() which reflects the Drag's _time_domain setting 2021-12-04 19:38:26 -07:00
fc155e76b4 give every Drag an explicit time domain 2021-12-04 18:44:57 -07:00
7fca55eeb5 Fix placement of drawn MIDI notes.
Important logic from 6.9 was either missing or incorrectly implemented. New
version is much simpler - we just use the RoundDownMaybe mode of round_to_bbt()
to ensure that the note start is always within the current grid even if the
mouse is more than halfway "through" it.
2021-11-04 18:27:02 -06:00
b6f290add2 timeline type changes for new ripple code and post-conflict-resolution fixups 2021-08-13 12:51:36 -06:00
31b7244856 fix timeline types (post rebase conflict resolution) 2021-08-13 12:51:36 -06:00
39f52cd3ce remove unused and unnecessary Drag::snap_delta_music() code 2021-08-13 12:51:34 -06:00
cb66ae496c don't even pretend to use non-modal dialog API for the BBT marker dialog 2021-08-13 12:51:34 -06:00
d4f52498fa somewhat working dialog for BBT/Position marker creation 2021-08-13 12:51:34 -06:00
dee71c0a97 mostly fix region- and note-create drags 2021-08-13 12:51:32 -06:00
84d33f3ec3 manual fixups after rebase against master (GUI edition) 2021-08-13 12:51:31 -06:00