13
0
Commit Graph

837 Commits

Author SHA1 Message Date
f693c0406a
When drawing a note, only play it once
Previously two identical Note on events were sent:
 * Select newly created note -> note-on event
 * Play newly created note -> note-on event
2024-05-20 19:42:29 +02:00
5d175786e8
Remove debug messages, cleanup output (1/2) 2024-05-08 00:56:43 +02:00
4b6e372ce7
Fix deleting the same point multiple times (#9689)
When iterating over automation tracks, previously it was
possible that the same point was added multiple times to
the selection.
2024-04-15 00:39:20 +02:00
253dcb312b make note joining code a bit cleaner and preserve note velocities 2023-11-24 09:29:31 -07:00
d6beba67dc note joining should occur per-channel 2023-11-24 08:32:28 -07:00
f95e94bc29 note tupling tweaks, and note join added
bindings moved to s/S and j, no need to use split-by-grid first

split-by-grid still needs work for non-grid aligned notes
2023-11-23 22:42:04 -07:00
b92b2389fd make note-tupling work on multiple notes 2023-11-22 19:37:46 -07:00
c3d14b1169 basic note-tupling functionality implemented 2023-11-21 17:07:42 -07:00
3792bf86e4 MidiRegionView: stubs for new methods 2023-11-21 17:07:42 -07:00
0f170ec87b MidiRegionView: initialize new members 2023-11-21 17:07:42 -07:00
7762fa47ea make an attempt to show note length with verbose cursor
Likely much more intelligent string formatting is needed to make this
actually useful to most people
2023-11-14 11:05:13 -07:00
d5a7e5f289 pass vectors for velocities by reference 2023-10-28 17:48:33 -06:00
ef0938a16d more improvements to velocity drawing (including straight line) 2023-10-27 11:50:15 -06:00
91fbb1c65b first steps towards improving straight line drags for velocity 2023-10-27 11:50:15 -06:00
a5a1caf9fa NOOP: whitespace changes 2023-10-22 17:15:20 -06:00
8f405f3657 provide preference for scrolling-adjusts-note-velocity 2023-10-22 17:15:20 -06:00
4974369787 fix logic in MidiRegionView::select_matching_notes() to not add notes when asked not to 2023-10-18 09:05:48 -06:00
d88b9d36ca freehand draw for velocity only affects selected notes, if any are selected (#9491) 2023-10-18 08:26:42 -06:00
9f475d5427 avoid double call to ::model_changed() during set up of a MidiRegionView
There is a DisplaySuspender in MidiRegionView::init(), and another invoked
during the addition of a RegionView to a StreamView. Before this change, both
suspenders were created to invoke a full "model-changed" redisplay. Since every
RegionView must be added to a StreamView to be visible, we only need the second
suspender to invoke the model-change. The first one can be just a view
change (and probably isn't necessary at all, but I did not want to change that
much at this point in time).
2023-09-24 18:41:51 -06:00
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
61d8ceaa85 change API of Editor::get_quantize_op() and fix flaky UX when using quantize-notes 2023-09-24 15:01:04 -06:00
cf9f9db48b
Set length of new percussive hits to 1 tick
This prevents overlap of successive hits.

Ardour 7 added a new duration select drop-down menu,
which defaults to "Auto" (musical grid) and removed
the special case when drawing percussive notes.
It was possible to accidentally create overlapping notes,
without the user being aware of doing so.
2023-09-04 23:26:54 +02:00
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