Commit graph

174 commits

Author SHA1 Message Date
Paul Davis
015890f16c slight optimization for MidiView::extend_active_notes() 2025-11-16 14:03:11 -07:00
Paul Davis
e2cea58876 in MidiView::view_changed(), don't update existing events unless zoom has changed 2025-11-16 14:03:11 -07:00
Paul Davis
b14859fc46 NO-OP: add comment 2025-11-16 14:03:11 -07:00
Paul Davis
87a1f602d2 NO-OP: add detail to a comment 2025-11-16 14:03:11 -07:00
Paul Davis
e5ef93821c NO-OP: remove inaccurate comment 2025-11-16 14:03:11 -07:00
Paul Davis
d9af50449d play transposed notes/chords (if requested) 2025-11-07 09:47:39 -07:00
Paul Davis
78d146acfe if capslock is engaged, note brushing uses the last seen incoming note number, if any 2025-11-06 09:19:20 -07:00
Paul Davis
32b2bf9a13 dragging notes past the end of a MIDI region extends it to cover them 2025-11-01 15:47:54 -06:00
Paul Davis
1743317acd remove stacktrace call 2025-11-01 08:40:24 -06:00
Paul Davis
ddf5c3c8b6 rename HitBrushDrag to NoteBrushDrag 2025-10-31 16:00:07 -06:00
Paul Davis
a30540c3c0 brush notes: secondary modifier changes to every-other-stride point 2025-10-31 15:56:15 -06:00
Paul Davis
bdf7cc7590 some fixes (maybe, probably) for undo/redo mgmt associated with note drags 2025-10-31 14:27:45 -06:00
Paul Davis
ea8d0d1a57 do the note brushing thing with 1/128th notes in percussive mode 2025-10-31 13:45:48 -06:00
Paul Davis
3ed581d639 add missing variable name change 2025-10-31 13:29:45 -06:00
Paul Davis
88bf459a61 add HitBrushDrag, to allow brushing notes on the grid 2025-10-31 13:24:35 -06:00
Paul Davis
dcb482e74d MidiView: adjust API to use when brushing multiple notes 2025-10-31 13:24:35 -06:00
Paul Davis
cab3d96a4c ensure a locally scoped tempo map in MidiView::{model,view}_changed() 2025-10-20 14:58:16 -06:00
Robin Gareus
82bdb3f05f
Expose MIDI Strum using operator in libardour 2025-09-26 00:00:19 +02:00
Robin Gareus
44097cdd6a
Revert "Add MIDI note strumming feature"
This reverts commit a9e7ce15db

MIDI Strum should use the MidiOperator implementation.
2025-09-25 22:56:39 +02:00
Paul Davis
d9d45f11e9 delete commented line that refers to non-existent variable 2025-09-15 09:43:25 -06:00
Paul Davis
521f01984b refactor code associated with cut/copy/clear so that pianoroll ops will affect automation points there 2025-09-14 13:49:26 -06:00
chousemp3
9dafed2d76
Fix potential buffer overflow when playing 10^18 beats :) 2025-09-12 19:04:25 +02:00
chousemp3
a9e7ce15db
Add MIDI note strumming feature 2025-09-12 19:02:07 +02:00
Paul Davis
4dbacf0cb6 do not alter visible note range of MidiView if data range did not change 2025-09-12 10:32:08 -06:00
Paul Davis
6187dd35c8 refactor code for region trimming from Pianoroll/MidiView
This splits out boundary-dragging things into boundary.{cc,h} and the rest
into CueEditor
2025-08-27 14:02:49 -06:00
Paul Davis
61a766fece don't try to reset visible MIDI note range directly when adding a note
This method is only used for GUI interaction, so the note must already be in the visible
note range
2025-08-25 13:39:54 -06:00
Paul Davis
20ebcc408d fix type from b489d466cf that resensitized the ghost note, causing crashes
Oddly, much, much easier to make happen on macOS and/or mixbus
2025-08-19 23:29:58 -06:00
Paul Davis
1e2a2d5506 remove infinitely recursive, never-called method from MidiView 2025-08-19 23:29:58 -06:00
Paul Davis
28e0082868 use std::unique_ptr for a couple of EditingContext members 2025-08-08 12:12:09 -06:00
Paul Davis
1d4e3940d1 large-scale refactoring of Pianoroll, CueEditor and AudioClipEditor
Enables code-sharing between "clip editors"
2025-07-29 18:16:35 -06:00
Paul Davis
f2eea8b7ce reduce jumping note range in MIDI displays when adding notes 2025-07-12 10:28:49 -06:00
Paul Davis
ff988eec37 fix one of 3 editing context refactoring warnings 2025-07-11 13:27:55 -06:00
Paul Davis
a902f99172 midiview: expose API for _on_timeline 2025-07-10 18:17:33 -06:00
Paul Davis
4bbd1afc98 MidiView: add _on_timeline to help clarify semantics of _show_source
This also fixes where the ghost note in draw mode shows up
2025-07-09 16:02:31 -06:00
Paul Davis
5767c8f62e better handling of MidiView::apply_note_range()
In particular, keep the MidiViewBackground's sense of the data range intact,
use MidiModel::{highest,lowest}_note(), center ranges that don't fit
on the data range
2025-07-01 17:31:42 -06:00
Paul Davis
1fbd7c7124 when selecting a due to note selection, do not keep changing the selection
the code was first clearing the entire Editor selection before adding
the region, causing every note selection to trigger the RegionsChanged
pathway. This is crazy expensive for some reason (more than 8.12) and that
should be investigated, but the logic is also wrong. Selecting a region that is
alrready the sole selected region should not cause any action at all.
2025-06-24 18:11:13 -06:00
Paul Davis
b5f5aeafe7 use C++11 style iterator 2025-06-16 23:01:10 -06:00
Paul Davis
9342886e48 fix thinko in MidiView::pick_visible_channel() ... no data, channel is 0, not 16 2025-06-16 10:47:25 -06:00
Paul Davis
796497b355 remove debug output 2025-06-13 17:20:09 -06:00
Paul Davis
15079176ac get note display working in pianoroll PRH (needs set_visible_channel()) 2025-06-11 11:54:33 -06:00
Paul Davis
eefe584070 another round of fixing for note-to-y and y-to-note and note line setup 2025-06-09 09:29:52 -06:00
Paul Davis
1ed9876446 Change various positions and dimensions to integer from double
This includes note heights, note positions, contents height
for streamviews, positions of tracks. It makes zero sense to think of these as
having potentially fractional positions.

In addition, fractional note heights and positions lead to numerous
errors drawing MIDI stuff at the pixel level.
2025-06-02 19:28:10 -06:00
Paul Davis
6918a8a267 some rationalization to how Editor & CueEditor (Pianoroll) handle ZoomLevel and TimeOrigin changes 2025-05-19 14:57:19 -06:00
Paul Davis
711b12035e using C++17 auto map iterator syntax when iterating over MidiView::_events
Also, call NoteBase::show() and NoteBase::hide() rather than item()->show() or item()->hide()
2025-05-16 16:43:12 -06:00
Paul Davis
0ddb9fa8e2 fix erroneous deletion of notes after MIDI clip recording
If an idle data captured callback executed AFTER the code trigger by capture
end, it would call ::begin_write() which would end up calling clear_events()
which would delete all notes in the correctly setup MidiView.

Now, the idle data capture callback no longer does anything of significance if
the TriggerBox is not actively recording. In addition, we do not call
begin_write() in the MidiView if it is not already set up for capture
display (this is triggered by changes in the TriggerBox's record enable state
and the first data captured callback from an RT thread. Further,
::begin_write(), if called, only deletes notes that were in
_active_notes (though this should probably never happen).
2025-05-16 16:43:12 -06:00
Paul Davis
18c4040b77 fix crash/memory mgmt during MIDI clip recording
the active notes that are extended by transport rolling are
owned by MidiView::_events, not MidiView::_active_notes, so do not
delete them when cleaning up _active_notes.
2025-05-13 12:16:11 -06:00
Paul Davis
57efff5a1f NO-OP: fix spelling in a comment 2025-05-13 12:16:11 -06:00
Paul Davis
d68472115f in MidiViews, primary-scroll is always left unhandled so that horizontal zoom works everywhere 2025-04-29 10:49:34 -06:00
Paul Davis
f28e13fcdb NO-OP: fix named class type in a comment 2025-04-28 16:59:12 -06:00
Paul Davis
a41699737f fix bug in lifetime of MidiView::_ghost_note
As noted in 8b389ee829, we now clear the _note_group container
before any other Note items might be deleted. But since this
may delete the _ghost_note, we have to be sure to reset
that to a null ptr to avoid a double-free later during
~MidiView
2025-04-24 12:07:19 -06:00