Commit Graph

316 Commits

Author SHA1 Message Date
Paul Davis d6beba67dc note joining should occur per-channel 2023-11-24 08:32:28 -07:00
Paul Davis b92b2389fd make note-tupling work on multiple notes 2023-11-22 19:37:46 -07:00
Paul Davis c3d14b1169 basic note-tupling functionality implemented 2023-11-21 17:07:42 -07:00
Paul Davis e39709863a add new state and methods to MidiRegionView for note splitting 2023-11-21 17:07:42 -07:00
Paul Davis d5a7e5f289 pass vectors for velocities by reference 2023-10-28 17:48:33 -06:00
Paul Davis ef0938a16d more improvements to velocity drawing (including straight line) 2023-10-27 11:50:15 -06:00
Paul Davis 91fbb1c65b first steps towards improving straight line drags for velocity 2023-10-27 11:50:15 -06:00
Paul Davis edc0e636e2 allow users to opt for "select only the last drawn note" when drawing notes 2023-10-17 22:03:47 -06:00
Paul Davis 1f13b311fd midi display: ensure that lollipops are visible right after import
VelocityGhostRegion used the visibility of the "parent" note canvas item of a
lollipop canvas item to determine the lolli's visibility. But during the
construction of the MidiRegionView, the note's container is not yet visible, so
this fails.

In addition this logic would hide lollis for notes that are outside the current
visible note range of the track (because the parent note item was not visible).

This change adds a method to MidiRegionView to decide if a note is within the
region's time range, and if so, we show the lollipop item. This means that
lollis for notes outside the note-range will still be visible, which seems more
correct. In addition, the nascent condition of the parent note's container no
longer affects lolli visibility.
2023-09-24 18:38:20 -06:00
Paul Davis 60256282e3 lollis: make a single drag be represented by a single Command object (for undo/redo) 2023-06-26 14:18:18 -06:00
Paul Davis 6d4bbae48c prototyping mouse-drag-paint velocity 2023-06-26 14:18:18 -06:00
Paul Davis 31de7e93bf lollis: show note selected status (using note selection outlien color) 2023-06-26 14:18:18 -06:00
Paul Davis 2d9a2ad668 lollis: also adjust velocity bars during the drag 2023-06-26 14:18:18 -06:00
Paul Davis f7130f5c02 lollipop drag: move all selected notes 2023-06-26 14:18:18 -06:00
Paul Davis cf7ba80fc1 the basics of lollipop dragging 2023-06-26 14:18:18 -06:00
Paul Davis 73ed3bc7e0 midi copy drag: select all new notes after drag
Cut-n-paste worked before, but Primary-drag only selected the dragged note.

This also contains several code changes to use for (auto ...) syntax.
2023-06-14 21:42:23 -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 e06bd481a1 fix color of MIDI notes during capture so that they are visible 2022-10-28 16:41:15 -06:00
Robin Gareus 63c78ebced Fix MIDI edit opertaiont (trim, draw) across tempo-changes
In the presence of tempo-changes distinguishing between offsets and
absolute positions is signficant. It is only valid to convert absolute
times using the tempo-map

Furthermore since GUI zoom-factor is time-invariant (samples per pixel),
all GUI operations must explictly use samples (or timecnt). It is not
valid (and problematic) to use use a location dependent timepos.
2022-10-23 19:12:31 +02:00
Paul Davis d2fc142e21 infrastructure and implementation to allow "q" to drive quantize-selected-notes in midi edit mode 2022-08-31 13:53:55 -06:00
Ben Loftis 1fa7a72f72 midi_region_view: rename 'apply_diff' to 'apply_note_diff' for clarity
these functions operate on the _note_diff_command,
 which is explicitly a NoteDiff,  not a generic DiffCommand

also fix a few thinkos where the ambiguous naming led to errors
2022-05-10 15:47:48 -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 9e77d8923a MIDI: ctrl-d now duplicates selected notes
This commit also fixes selection-after-paste, so that the selection is always
the newly pasted notes.
2022-04-27 08:13:09 -06:00
Paul Davis a0d08232ad midi selection: implement MidiRegionView::set_selected()
This allows an MRV to clear its own selection of notes when
the region itself is deselected. This should help #8729 and #8899
2022-04-17 22:58:16 -06:00
Paul Davis bde3f3a277 midi region view: allow change_note_note() to return the new note value 2022-04-17 12:02:53 -06:00
Paul Davis 4fa97e2c50 split midi region view redisplay into two similar methods
::model_changed() is used when the model has changed (eg. new notes or some
notes deleted); ::view_changed() is used when only some view parameter (e.g.
zoom, scroll, track height etc) has been altered.

Not fully functional yet (::view_chanted() ignores scroll)
2022-04-05 20:52:10 -06:00
Paul Davis b8a6b97b49 redesign (MIDI)RegionView display disabling around an RAII model 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
Ben Loftis 252ae56a08 MIDI Draw: change behavior regarding MIDI Channel of new notes
When adding a note, use these criteria to choose the channel number:
* if the user has explicitly specified a note in the pulldown, use that
* if the user has AUTO selected and we are in a region, choose the nearest note's channel (consistent with velocity behavior)
* as a fallback, query the track for its channel-filter (old behavior)
2021-11-18 08:23:08 -06:00
Ben Loftis 2a6da0113f MIDI Draw: Provide a menu to explicitly select note-length
ToDo: 3,5,7's?  keyboard shortcuts?
2021-11-18 07:35:13 -06:00
Paul Davis 831c085b2e remove MidiRegionView::snap_sample_to_grid_underneath() and replace with calls directly into Editor snap method 2021-08-13 12:51:35 -06:00
Paul Davis dee71c0a97 mostly fix region- and note-create drags 2021-08-13 12:51:32 -06:00
Paul Davis 313d957eaf MidiRegionView: restore functioning (?) of snap_sample_to_grid_underneath() 2021-08-13 12:51:31 -06:00
Paul Davis 5b2a435e02 getting editor_drag.cc to compile 2021-08-13 12:51:29 -06:00
Paul Davis 9d69fa3820 another day or two's work on timeline type conversion 2021-08-13 12:51:29 -06:00
Paul Davis 7433bc27e0 intermediate, unfinished snapshot of ongoing timeline types work on GTK GUI 2021-08-13 12:51:29 -06:00
Paul Davis 0a469527f1 updated Temporal::Beats ... GUI edition 2021-08-13 12:51:28 -06:00
Paul Davis 11cb981e30 add extend_selection() to MIDI region bindings; expose invert-selection also 2021-06-08 07:40:54 -06:00
Paul Davis 6bd12a4e83 clearing note selection in internal edit mode also deselects regions 2021-01-18 16:07:20 -07:00
Robin Gareus 4ad1c19166
Special case MIDI note selection auditioning - #8358
This adds a few exceptions to the general preference
"Sound MIDI notes as they are being selected in the editor".

* Select all no longer plays _all_ notes.
* Remain silent when selection is inverted or a range is selected.
* Play no sound when a saved selection is restored on session load.
2020-08-09 20:37:56 +02:00
Paul Davis 8545250936 MidiRegionView no longer handles any keypresses or alters editor "note selection"
1. Alt is still handled to change drag behavior
2. Selection doesn't store notes unless they are part of the cut buffer, which means we should not
be altering the note selection in the editor's selection object most of the time.
2020-04-16 17:48:12 -06:00
Paul Davis eca7888047 NOOP: newline removal 2020-04-16 17:48:12 -06:00
Paul Davis abe275c3e0 add a bunch of argument-free methods to MidiRegionView for use as actions 2020-04-16 17:48:12 -06:00
Robin Gareus 4e005540c6
Update PatchChange when instrument/midnam changes 2020-04-04 01:48:30 +02:00
Robin Gareus 0a6f517230
No more doxygen warnings for gtk2_arodur/*
That's with doxgen 1.8.13.
2019-09-30 21:03:16 +02:00
Robin Gareus c7be6f2330
Fix some UI doxygen warnings 2019-09-30 05:34:06 +02:00
Robin Gareus 4050ca5633
Update GPL boilerplate and (C)
Copyright-holder and year information is extracted from git log.

git history begins in 2005. So (C) from 1998..2005 is lost. Also some
(C) assignment of commits where the committer didn't use --author.
2019-08-03 15:53:15 +02:00
Paul Davis b9c6ffac21 fix header order and space alignment 2017-09-24 12:57:27 -04:00
Paul Davis 7db12f6b12 convert codebase to use Temporal for various time types 2017-09-24 12:03:54 -04:00
Paul Davis 30b087ab3d globally change all use of "frame" to refer to audio into "sample".
Generated by tools/f2s. Some hand-editing will be required in a few places to fix up comments related to timecode
and video in order to keep the legible
2017-09-18 12:39:17 -04:00