13
0
Commit Graph

815 Commits

Author SHA1 Message Date
1febe07480 lollis: use layering to enable editing of overlapping regions 2023-06-27 09:19:29 -06:00
60256282e3 lollis: make a single drag be represented by a single Command object (for undo/redo) 2023-06-26 14:18:18 -06:00
6d4bbae48c prototyping mouse-drag-paint velocity 2023-06-26 14:18:18 -06:00
31de7e93bf lollis: show note selected status (using note selection outlien color) 2023-06-26 14:18:18 -06:00
c75b9a11ef lollis: fix drawing and positioning glitches 2023-06-26 14:18:18 -06:00
2d9a2ad668 lollis: also adjust velocity bars during the drag 2023-06-26 14:18:18 -06:00
cf7ba80fc1 the basics of lollipop dragging 2023-06-26 14:18:18 -06:00
1a4ef77222 C++11 FTW 2023-06-26 14:18:17 -06:00
52f10ad2a8 velocity views will be ghost regions 2023-06-26 14:18:17 -06:00
9e071f70d7 remove debug output 2023-06-26 14:18:17 -06:00
2797ea9666 remove unusued "MIDI underlay" cruft 2023-06-26 14:18:17 -06:00
1251b90b66 midi notes: fix visual end point of notes
ArdourCanvas::Rectangle has exclusive end coordinates, so the - 1
is not necessary.
2023-06-15 20:10:32 -06:00
de334c14b1 drop use of Editor::sample_to_pixel_unrounded() in some cases
We want things rounded to the nearest pixel in these (and perhaps all) cases.
2023-06-15 20:10:32 -06:00
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
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
luzpaz
44a869732c Fix various typos
Found via `codespell`
2023-02-20 17:35:24 -07:00
bd82e2cc07 fix transparency when opaque MIDI region is edited 2023-01-22 17:41:43 -07:00
516bf1fa17
Set "opaque region base" alpha to 1.0 2022-12-10 02:37:05 +01:00
3442500002
Remove "midi frame base", consistent TAV color (1/2) 2022-12-10 02:37:05 +01:00
0bb81a9a18
Do not shade transparent regions in Layered mode
There already is a shaded coverage frame indicating
if a layer is audible. This leads to a more consistent view.

In addition changing layered mode now has to update the
colors (set_frame_color).
2022-12-10 02:37:05 +01:00
f003bee985
Use a dedicated Canvas Group for MRV
This fixes rendering of opaque MIDI regions (previously
MIDI regions were always transparent). This change provides a
way to "flatten" layered MIDI regions, while still allowing
to show the note-line and grid behind the regions.
2022-12-10 02:37:05 +01:00
05b8df6da9
Item::grab_focus was a NO-OP (see 34e7c2ffc5) 2022-11-19 22:02:21 +01:00
6832ad2af9 use correct name for recording note color 2022-11-01 08:12:05 -06:00
e06bd481a1 fix color of MIDI notes during capture so that they are visible 2022-10-28 16:41:15 -06:00
492073e47d fix display of MIDI notes during recording
Note that the notes are almost invisible due to coloring
2022-10-28 16:39:38 -06:00
a3795031da patch changes: fix/supply missing code to position patch changes on session load
For one reason or another, the required computation from 6.9 had been
replaced with "x = 0".
2022-10-28 14:06:45 -06:00
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
173de9f0ef change MidiRegionView scroll behavior to somethings slightly more useful
1. leave tertiary-scroll for navigation and primary scroll for session timeline zoom
2. unmodified scroll in edit mode scrolls contents
3. secondary-scroll zooms in and out on contents (i.e. vertical zoom for MIDI)
4. primary-secondary scroll has the just-one-edge behavior previously provided
2022-09-30 16:32:29 -06:00
47e9bb05c8 midi editing: if nudge clock says zero, use grid for nudging notes 2022-09-23 11:30:17 -06:00
04d367fdfe midi note drawing: fix snap used to place ghost note 2022-09-22 16:16:20 -06:00
d2fc142e21 infrastructure and implementation to allow "q" to drive quantize-selected-notes in midi edit mode 2022-08-31 13:53:55 -06:00
b11ba8eec7 MIDI editing: primary+tertiary makes scroll do what it does when not editing 2022-08-31 12:16:14 -06:00
itmuckel
63f94d2946 Remove unused includes 2022-08-19 09:27:19 -06:00
c0ec11db8e
Cleanup code, return early, don't nest 2022-07-14 01:25:06 +02:00
b4a7c8a17d
Better version of 6a57baf193
This also fixes Menu > Edit Delete "delete MIDI" operation.
Pressing backspace/delete calls "Delete Selection" which is
unrelated to MRV::cut_copy_clear.
2022-07-14 01:23:04 +02:00
6a57baf193
Fix MIDI note cut
1. Editor::cut_copy() calls begin_reversible_command ("cut MIDI")
2. Editor::cut_copy_midi calls mrv->cut_copy_clear()
3. MidiRegionView::cut_copy_clear calls start_note_diff_command()
4. second call to  begin_reversible_command()
- debug builds assert() here, optimized builds continue
5. abort_reversible_command() is called, _current_trans = NULL;
6. MidiModel::apply_diff_command_as_subcommand()
7. Session::add_command, segfault because _current_trans == NULL

```
An UNDO transaction was started while a prior command was underway.
Aborting command (midi edit) and prior (cut MIDI)
```
2022-07-13 22:12:30 +02:00
f631f742fa remove debug output 2022-06-29 08:17:16 -06:00
fadf77e39c NO-OP: update comment to reflect the context 2022-06-28 12:24:54 -06:00
5c2831e218 tempo display: modify how we implement MidiRegionView::_redisplay() so that the width is also correctly updated 2022-06-28 12:21:44 -06:00
4acd63b2ef fix uninitialized variable (detected with valgrind) 2022-06-18 12:37:39 -06:00
86ddb11b9b
Fix displaying note events across tempo-changes
Note position in samples must be calculated using absolute position
on the timeline. Otherwise the tempo-map is not applied correctly.

Previously this caused issues since the position was first
offset back by _region->position() - time relative to region left
edge - and then the tempo-map was applied.

Another solution identically would be:
(note_start + session_source_start).samples() - _region->position().samples()
2022-06-17 17:07:47 +02:00
39f41e2357 fix midi-note Copy+Paste and Duplicate actions
* broken in 1fa7a7
2022-05-13 14:00:14 -05:00
41815f8d53 midi_region_view: use absolute_time_to_region_beats
* this fixes the location of the 'ghost note' that is shown
 when adding notes with the Draw tool
2022-05-12 12:15:53 -05:00
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
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
ee137333b9 midi_region_view: implement undo for duplicating a note selection 2022-05-10 15:47:56 -05:00
dbe49ae8c4 editor::paste fix a thinko in undo nesting 2022-05-10 15:47:56 -05:00
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
133600d5dc midi_region_view::apply_diff: implement using renamed midi_model functions 2022-05-10 15:47:48 -05:00
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