Commit graph

1202 commits

Author SHA1 Message Date
Paul Davis
690b571b7b allow specifying the note to use for brushing when the drag starts 2025-11-06 09:19:20 -07:00
Paul Davis
ddf5c3c8b6 rename HitBrushDrag to NoteBrushDrag 2025-10-31 16:00:07 -06:00
Paul Davis
a30540c3c0 brush notes: secondary modifier changes to every-other-stride point 2025-10-31 15:56:15 -06:00
Paul Davis
bdf7cc7590 some fixes (maybe, probably) for undo/redo mgmt associated with note drags 2025-10-31 14:27:45 -06:00
Paul Davis
ebf16b7ece allow creator of a HitBrushDrag to specify a note length 2025-10-31 13:35:58 -06:00
Paul Davis
88bf459a61 add HitBrushDrag, to allow brushing notes on the grid 2025-10-31 13:24:35 -06:00
Robin Gareus
4f4a62564a
Update TimeFX settings and dialog for StaffPad inclusion
Also rubberband is required these days and USE_RUBBERBAND
not optional.
2025-10-09 00:02:06 +02:00
Paul Davis
bca71d0cc4 fix error in position of notes drawn in percussive mode 2025-09-02 13:56:00 -06:00
Paul Davis
6187dd35c8 refactor code for region trimming from Pianoroll/MidiView
This splits out boundary-dragging things into boundary.{cc,h} and the rest
into CueEditor
2025-08-27 14:02:49 -06:00
Paul Davis
20701362c3 also scale drag move threshold by UI scale
If UI scale is > 1, pixels are likely small, so it seems appropriate to scale
2025-08-19 12:09:12 -06:00
Paul Davis
d316a4b1c3 scale move threshold by UIConfiguration parameter 2025-08-19 12:09:12 -06:00
Paul Davis
99585debbe change use of MoveThreshold.first to reflect pixel units 2025-08-19 12:09:12 -06:00
Paul Davis
fc08397ad8 use both relevant UIConfiguration parameters in ::move_threshold() 2025-08-19 12:09:12 -06:00
Paul Davis
1efd0c06bd move threshold for drags goes back to pair<int,int>
And for now, there's only a single implementation, though other types of
drags could implement it if needed. There really seems to be no need.

Note that the x-axis threshold is 3x in the case of a copy-drag.
2025-08-19 12:09:12 -06:00
Paul Davis
f34e314d93 move _copy member of some types of drags into Drag base class
this allows us to use it when computing move thresholds
2025-08-19 12:09:12 -06:00
Paul Davis
28e0082868 use std::unique_ptr for a couple of EditingContext members 2025-08-08 12:12:09 -06:00
Paul Davis
1d4e3940d1 large-scale refactoring of Pianoroll, CueEditor and AudioClipEditor
Enables code-sharing between "clip editors"
2025-07-29 18:16:35 -06:00
Paul Davis
57eda4f7ee remove 2nd of 3 #warnings from the EditingContext refactor
I'm not 100% sure this is correct, but it doesn't really matter - velocity
lollipop drag are vertical only
2025-07-11 17:40:58 -06:00
Paul Davis
f356c914b9 fix location of drawn notes in some contexts 2025-07-10 18:18:31 -06:00
Paul Davis
6a4f4e4710 rework NoteDrag::total_dy() to correctly clamp y to within the required range 2025-07-01 17:31:42 -06:00
Paul Davis
1ed9876446 Change various positions and dimensions to integer from double
This includes note heights, note positions, contents height
for streamviews, positions of tracks. It makes zero sense to think of these as
having potentially fractional positions.

In addition, fractional note heights and positions lead to numerous
errors drawing MIDI stuff at the pixel level.
2025-06-02 19:28:10 -06:00
Paul Davis
3600a6ffd0 fix computation of note position for HitCreateDrags 2025-04-30 18:07:55 -06:00
Paul Davis
5526880ac8 do not create an empty region for a cue slot when it is selected for editing
There's an assumption that slots with regions cannot be recorded into,
so adding a region to an empty slot makes it impossible to record to that
slot.

Create the region at the appropriate point during a NoteCreateDrag.

This may also be needed for some automation drawing drag operations.
2025-04-24 12:07:19 -06:00
Paul Davis
0c924c3933 pianoroll: dragging start handle before zero shifts MIDI later in time 2025-04-08 15:50:30 -06:00
Paul Davis
15c808c9f4 expand the dialog used for renaming location markers to allow scene editing
This has no visible effect for anything that is not livetrax (for now).
2025-04-07 17:46:01 -06:00
Paul Davis
7bdb86b357 call a spade a spade (or rather, a MidiView a view) 2025-03-16 15:01:51 -06:00
Paul Davis
367800830d in internal edit mode, a rubber-band select with no motion (i.e. click) selects region 2025-03-14 13:24:49 -06:00
Paul Davis
c14a8e91a7 fix start and end trim of timeline regions in a pianoroll 2025-03-10 09:42:27 -06:00
Paul Davis
a94bd4b7c6 rename MidiView::relative_position() to ::view_position_to_model_position() 2025-03-06 18:12:40 -07:00
Paul Davis
67fa5282cb Remove Region::absolute_time_to_region_beats()
This method did not do what its name suggested. Replace it with
::absolute_time_to_source_beats() which already existed and
computed the same result.

Also in a NoteCreateDrag, correctly adjust note start
depending on whether we are viewing the whole source or
just the region. This part may be amended later.
2025-03-06 18:12:39 -07:00
Robin Gareus
000c25edcc
Update gtkmm -> ytkmm header location (omnibus commit) 2025-02-01 15:25:14 +01:00
Paul Davis
a7382b9424 provide MidiView methods for use in NoteDrags (fixes note drags to earlier times in pianoroll) 2025-01-19 10:53:52 -07:00
Paul Davis
5f049affac change name of _region member of NoteDrag to _view (since it's a MidiView) 2025-01-19 10:53:52 -07:00
luzpaz
1a18417464
fix typos in gtk2_ardour directory
Found via `codespell -q 3 -S "*.pdf,*.po,./.git,*.tosc,./waf,./share/patchfiles,./libs,./msvc_extra_headers,./share/web_surfaces,*.patch" -L acount,addin,ane,ba,buss,busses,caf,capela,devine,disconnectin,discreet,doubleclick,envolution,filetest,fo,ghandi,homs,hsi,layed,maschine,mis,nd,ontop,pass-thru,removeable,retrn,ro,scrollin,sectionin,seh,siz,sord,sur,te,trough,ue,wth`
2025-01-18 00:55:34 +01:00
Paul Davis
d0b643b116 do not use DragManager::current_pointer_x() directly during drags
That ignores a _bounding_item and can give incorrect coordindates for the drag when
that is used (e.g. clip editor)
2025-01-10 11:17:59 -07:00
Paul Davis
e273ec06bb fix note drawing in clip editor by adding MidiView::relative_position() 2025-01-10 10:31:48 -07:00
Paul Davis
cb26e309af alter NoteResizeDrag to operate on a single region only
This lets us use a MidiView as the target, rather than a MidiRegionView
2025-01-09 16:33:43 -07:00
Paul Davis
5635144e42 initial rename of MidiCueEditor -> Pianoroll 2025-01-07 11:30:26 -07:00
Paul Davis
96595669dc fix clip start/end drags with snap enabled 2025-01-07 10:37:56 -07:00
Paul Davis
dbcf4c14f4 fix mechanism used for moving/dragging clip end handles 2024-12-27 14:10:00 -07:00
Paul Davis
84c78db3ad remove unused variables 2024-12-27 14:09:27 -07:00
Paul Davis
76fa75cf9a add a check on the event type passed to start Drags
Drags should always be started by a button press event.
2024-12-27 14:09:11 -07:00
Paul Davis
084a23a80d some work on being able to swap channels and have different MIDI automation displayed in pianoroll 2024-12-20 11:48:40 -07:00
Paul Davis
98c9c03e9f remove all trace of cursor stacks; canvas cursor is always "just set" 2024-12-08 12:13:41 -07:00
Paul Davis
2096ff7876 cue editor end dragging operational 2024-11-26 13:11:17 -07:00
Paul Davis
2eece78718 stop leftward drags from corrupting clip start 2024-11-25 21:37:55 -07:00
Paul Davis
ecd3cf8766 improved ("working") clip start drag 2024-11-25 21:16:15 -07:00
Paul Davis
efc153d880 actually set trigger start to where mouse was released when dragging 2024-11-25 18:16:56 -07:00
Paul Davis
5ef4f8973f somewhat sort of working clip start drag (GUI edition) 2024-11-25 17:54:15 -07:00
Paul Davis
465f39e5bf create nonfunctional clip boundary drags when appropriate 2024-11-23 09:06:38 -07:00