Commit Graph

983 Commits

Author SHA1 Message Date
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 69ee83e6ce require explicit time domain for most region-centric drags
This removed one #warning nutempo line.
2022-05-27 15:57:14 -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
Mads Kiilerich cc6a1e2d6f gtk2_ardour/editor_drag.cc: fix confusing newline 2022-05-24 17:15:37 -06:00
Paul Davis 2ec6d45d6d temporal: remove the concept of a time domain for the tempo map (GUI edition) 2022-05-24 17:10:25 -06:00
Paul Davis 1a44e612e9 ctrl-dragging a tempo mark uses horizontal, not vertical motion to adjust tempo 2022-05-24 17:10:25 -06:00
Paul Davis d8ba73f542 temporal: change "clamped" terminology to "continuing" (since that's what the GUI calls it) (GUI edition) 2022-05-23 08:07:08 -06:00
Ben Loftis 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
Ben Loftis f7abe8dacd fix: RegionMotionDrag actions are always rippling to other tracks
* if we aren't in RippleAll, you should only ripple the regions
 on the same track as the grabbed region
2022-05-14 14:16:21 -05:00
Paul Davis 6f973af1e1 tempo end drag: make this work with new implementation 2022-05-13 19:05:13 -06:00
Paul Davis db17a46498 tempo twist drag: changes to work with new (old) implementation 2022-05-13 19:05:13 -06:00
Paul Davis a60412373a tempo map editing: re-enable stretch tempo drag 2022-05-13 19:05:13 -06:00
Ben Loftis 83d0892777 when drawing notes, the grid should be scaled to the zoom scale
this prevents the case where have enabled snap, and you add a note that
 appears to be on a bar line. but actually it is {some Grid value} off,
 it just looks right because of pixel rounding.
2022-05-11 11:45:33 -05:00
Ben Loftis a60dfc19d2 take Snap enablement into account when drawing new notes
* snap_to_bbt assumes that snap is enabled and you want to snap to bbt
* snap_to() is the generic form to snap to the user's snap+grid settings
2022-05-11 11:38:54 -05:00
Ben Loftis de9f18b4f9 when Drawing MIDI notes, enforce a minimum length
This fixes the issue where you click to create a note, but move the mouse
 just a little, resulting in a note of invisibly small length

Do the calculation in ::motion so it displays the final
 size while you are dragging. "what you see is what you will get"
2022-05-10 20:00:26 -05:00
Ben Loftis 5310e1e099 create_note: fix a few thinkos which resulted in nested undo 2022-05-10 15:47:56 -05:00
Ben Loftis 9fcf8b3a11 midi_region_view: rename commit_resizing -> finish_resizing
* 'commit' suggests that this function would commit an undo record
2022-05-10 15:47:48 -05:00
Paul Davis 6f9aa3677f tempo markers: ctrl-drag now alters tempo for that section 2022-05-10 09:46:08 -06:00
Paul Davis 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
Paul Davis eff34f2e1b use editor tempo editing API rather than TempoMap API 2022-05-10 09:46:08 -06:00
Paul Davis b5487415ec editing: a partiaally implemented version of TempoTwistDrag, to be completed. 2022-05-02 16:47:23 -06:00
Paul Davis 0a99d67dac meter marker drag: better initialization of map member 2022-05-02 11:50:34 -06:00
Paul Davis 90a38a2b31 fix tempo marker drag crash caused by use of uninitialized map member 2022-05-02 11:49:43 -06:00
Paul Davis 789abc561d MIDI editing: fix selection during note resize drags
The ::start_drag() implementation now defers add/extend selection logic to
MidiRegionView::note_selected(), and drops the original limitation that we did
not do extend-selection on button press, only button release.
2022-04-17 22:18:31 -06:00
Paul Davis 7293904e53 use new TempoCommand when putting tempo map ops into undo/redo history 2022-04-08 11:58:04 -06:00
Paul Davis 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
Paul Davis 1a8b80e56e drop experimental use of RegionView::DisplaySuspender during trim drags 2022-04-05 20:52:10 -06:00
Paul Davis 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
Paul Davis ae8c043fe1 regionviews: use integer counter instead of boolean to control redisplay of contents 2022-04-05 20:52:09 -06:00
Paul Davis b3ccccb48f add #warning to code that should be fixed ASAP but not pre-Mixbus8 release 2022-03-21 13:00:01 -06:00
Robin Gareus fead587a5a
Remove debug output 2022-03-21 18:47:53 +01:00
Robin Gareus f6646eaa2d
Fix undo/redo when moving regions to a different track
This was broken during development of ripple-all.
First explicit rdiff_and_add_command() was used, but
when that was reverted later, the original stateful_diff
was not restored.

989408626d
1ccf272d58
2022-03-21 18:47:53 +01:00
Robin Gareus 139d54ac9b
Fix automation range drag guard points
This addresses an issue with missing guard points at the
beginning of a range drag when the range is not snapped to
a musical grid.

Note that the code below "same thing for the end" does not use
.beats() either.
2022-03-18 02:31:31 +01:00
Paul Davis e3b66825eb superclock_ticks_per_second: GUI edition changes 2022-03-17 14:15:59 -06:00
Robin Gareus 9f29986a16
Fix Wreorder 2022-03-17 17:12:08 +01:00
Ben Loftis 01ef5a5b24 ripple (gui part): should_ripple_all() encapsulates modes Ripple+RippleAll 2022-03-14 19:26:41 -05: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
Paul Davis 4c433106a4 add interview mode to preferences and fix up implementation 2022-01-24 11:29:36 -07:00
Paul Davis 8a310a748a add new config variable for interview-editing
If enabled, this prevents range-selection from propagating across
all tracks when RippleAll is set
2022-01-24 11:29:36 -07:00
Paul Davis 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
Paul Davis a6727cace5 use new editor/tempo map editing API for tempo marker drag 2022-01-15 22:53:58 -07:00
Robin Gareus 2342caae46
Push a few more nutempo DnD warning macros 2022-01-10 21:48:11 +01:00
Robin Gareus fa7e7a462c
Work-around/Fix DnD from sidebar to editor-canvas
Editor::drop_regions() creates a new RegionInsertDrag()
with the region to drop to the timeline.

RegionInsertDrag is-a RegionMotionDrag is-a RegionDrag is-a Drag.
However the region does not yet exist on the timeline and
RegionView is NULL.

This will likely need an API change. e.g.
Directly pass the TimeDomain as argument. The information can
be provided by the region, or from the TimeAxisView or RouteUI
when dropping a new source/region.
2022-01-10 21:36:17 +01:00
Paul Davis 7c35783d63 various fixes for cue marker creation, dragging, naming 2022-01-05 13:27:47 -07:00
Paul Davis 1d2fa465d3 remove mistaken handling of cue marker bar events 2022-01-05 13:27:47 -07:00
Paul Davis b1f73d25bf actual GUI interaction for cue marker ruler 2022-01-04 15:23:51 -07:00
Robin Gareus 208010ff18
Fix Wreorder 2021-12-11 15:51:46 +01:00
Robin Gareus 3c03e4951e
Use updated temporal API 2/2 2021-12-11 15:51:31 +01:00
Paul Davis eb0b3f253a make Drag::grab_time() etc. follow the drag's _time_domain 2021-12-04 19:52:42 -07:00
Paul Davis 796785b42f in Drags, use Drag::pixel_to_time() rather than Editor::pixel_to_sample()
This preserves the TimeDomain of the drag
2021-12-04 19:48:31 -07:00