Commit Graph

715 Commits

Author SHA1 Message Date
Paul Davis 2a08e4bdaa continued work on timeline types conversion. in theory, just editor_ops.cc remains 2021-08-13 12:51:29 -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 f2e2cce343 fix an unfortunate "side-effect" of the frame->sample renaming 2021-08-13 12:51:27 -06:00
Robin Gareus 1c0bef3f85
Remove redundant checks
update_ghost_note() can only be called with a valid, non-null
_ghost_note. Explicit checks trigger clang static analyzer to
report false positives, since _ghost_note is unconditionally
used in this method as well.
2021-06-29 01:53:56 +02:00
Paul Davis c46410a1b0 MIDI region extend-selection should select all after start of selection, not all after end of selection 2021-06-08 08:31:41 -06:00
Paul Davis 11cb981e30 add extend_selection() to MIDI region bindings; expose invert-selection also 2021-06-08 07:40:54 -06:00
Robin Gareus f4f9d76e53
Option to how x-run markers in regions 2021-02-14 16:22:35 +01:00
Paul Davis 7cf435a876 deselect everything when the first MIDI note is selected
See comments in code for more information
2021-01-18 16:07:20 -07:00
Paul Davis 6bd12a4e83 clearing note selection in internal edit mode also deselects regions 2021-01-18 16:07:20 -07:00
Paul Davis a307cc602c remove duplicate initialization of PBD::DEBUG::Selection 2021-01-14 11:25:29 -07:00
Paul Davis 20bdc394f4 remove debug output unintentionally committed in 14318dd34 2021-01-03 18:17:14 -07:00
Paul Davis 14318dd342 use larger font for bars on BBT ruler 2021-01-03 16:50:18 -07:00
Robin Gareus 8c2a460b7d
NO-OP: prefer RAII unwind 2020-08-09 22:08:00 +02: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 eecb498a70 restore apparent thinko that removed the effect of "editable region" transparency for MIDI regions 2020-05-16 08:29:37 -06:00
Paul Davis 2f12815565 MIDI: when drawing notes, leave selection containing only the just added note
This matches other DAWs and allows easy editing of just the last note, rather then all
notes added since doing something else
2020-05-14 00:03:42 -06:00
Paul Davis 2e2ca85131 remove debug output 2020-05-06 09:53:55 -06:00
Paul Davis f546b38f42 when creating new notes via MidiRegionView::create_note_at(), add note to selection 2020-05-05 18:00:41 -06:00
Paul Davis f6496524a4 fix thinko in MidiRegionView::add_to_selection()
The existing code isn't wrong, but inefficient. If the selection is empty,
then this is necessarily the first note, and cannot be present in the
selection. So, don't search the std::set<> and then insert, just insert.
2020-05-04 18:48:17 -06:00
Paul Davis 11ec81f4c2 more improvements in visual representation of selected MIDI notes during (and not during) internal editing 2020-05-01 22:28:21 -06:00
Paul Davis 8556560eca change design of MidiRegionView::add_to_selection() so that the rubber-band select works again
Adding the first note trigged Editor::set_selected_midi_region_view() which cleared
the (newly added to) selection
2020-05-01 22:27:50 -06:00
Paul Davis 044be53616 attempt to properly manage MIDI note display of selected status
Whether to display the selected outline depends on BOTH whether the note is
selected, and whether we are in an internal editing mode.
2020-05-01 17:39:13 -06:00
Paul Davis 0b7d0ebfd6 remove debug output 2020-04-17 10:47:01 -06:00
Paul Davis ca9e54100a more sane design for MidiRegionView::nudge_notes()
Use nudge clock if snap/grid is disabled; use grid (and grid/4 if "fine" adjustment is chosen)
2020-04-16 21:39:38 -06: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
Robin Gareus 4e005540c6
Update PatchChange when instrument/midnam changes 2020-04-04 01:48:30 +02:00
Robin Gareus 8d28115ec7
Update MIDNAM handling in GUI
* Always use InstrumentInfo for lookups.
  Remove name lookups that directly used gui_property()
* Use set/get_gui_property() only to save/restore state,
  push custom selection to InstrumentInfo.
* Only store custom selection, use unset for "default"
  default = plugin-provided (if available) otherwise general-midi
2020-04-01 16:33:40 +02:00
Paul Davis e6ce5a611c shortest note length after a drag-trim is 1 tick, not 1/512 beats 2020-01-28 00:06:12 -07:00
Paul Davis fd62b38f8d correct computation of new note length after a front-drag-trim 2020-01-28 00:05:44 -07:00
Paul Davis 2d5a3013e0 fix 03c4335c1e to use the correct test for zero length
That commit used the dangerous Beats::operator== (int) comparison, which only campares the beat portion
2020-01-14 14:35:08 -07:00
Paul Davis 03c4335c1e fix drawing of zero-length notes
Note that the result is too narrow to be manipulated, though it can be moved
2020-01-11 10:57:21 -07:00
Paul Davis 929bd7c8ac use Note::end_time() == numeric_limits<Beats>::max() as the indicator that a note is in-process w.r.t. recording
We used to use length() == 0, but this clashes with actual zero-length notes
2020-01-11 10:57:21 -07:00
Paul Davis 2ae327fa8f prevent MIDI note starts being drawn earlier than their region start 2020-01-08 10:22:08 -07:00
Paul Davis a855119bdd rename all Evoral source from .(hpp|cpp)$ to .(h|cc) 2019-11-02 16:32:18 -06:00
Paul Davis b83ef09947 various adjustments so that a MidiPlaylist gets re-rendered whenever it changes.
This may still be missing a few changes (i.e. they do not cause re-rendering)
2019-11-02 16:32:18 -06:00
Paul Davis 0573e7cdf0 alter where note resolution happens when a re-rendering is scheduled for a MIDI track 2019-11-02 16:32:18 -06:00
Paul Davis 5b90bad68c fix commented out decision on whether or not to hide/show sysexes in MIDI regions 2019-09-20 12:26:49 -06: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
Ben Loftis e0bdcd7137 (Source List) Clean up the natural_position implementation (gtk2 part). 2019-08-01 12:11:31 -05:00
Robin Gareus eb4e854a56
Replace some more "samples" with "frames" (rectangles) 2019-04-09 00:31:29 +02:00
Robin Gareus 01a43c6b1e
Another round of whitespace fixes 2019-04-09 00:27:33 +02:00
Robin Gareus a0b032efe2
Revert more "frame/sample" replacements
- Coverage concerns rectangles (frames, not sample)
- frame-handles are rectangles
- layout container boxes are frames
- inline display boxes are display_frame
2019-04-08 22:42:47 +02:00
Robin Gareus 8a7e452265
Yet another "Rect frame" (not a sample) 2019-04-08 20:57:56 +02:00
Robin Gareus f9e12235c3
Frame as in "picture frame", not sample 2019-04-08 20:19:15 +02:00
Robin Gareus 83981a37a3 Ignore scroll-wheel while dragging notes.
Previously, dragging a MIDI note and scrolling with scroll wheel
(to change velocity) made the note jump back to location before drag.
2018-08-09 18:11:18 +02:00
Ben Loftis 0883f02de9 new_grid: The Return of the snap_to_X functions.
We no longer assume that Snap always uses the visible ruler lines.
 If you want to snap to the grid, and ignore the users zoom scale, use SnapPref::SnapToGrid_Unscaled
 This fixes 2 (known) oversights: "snap region(s) to grid" and "regions whose start are left of the canvas edge".
2018-07-27 00:28:47 +02:00
Paul Davis b0e496c825 remove more unused MIDI note colors 2018-07-05 16:52:49 -04:00