Commit graph

72 commits

Author SHA1 Message Date
Paul Davis
ddf5c3c8b6 rename HitBrushDrag to NoteBrushDrag 2025-10-31 16:00:07 -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
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
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
a9e7ce15db
Add MIDI note strumming feature 2025-09-12 19:02:07 +02: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
1e2a2d5506 remove infinitely recursive, never-called method from MidiView 2025-08-19 23:29:58 -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
15079176ac get note display working in pianoroll PRH (needs set_visible_channel()) 2025-06-11 11:54:33 -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
1f4ddcd53f fix inheritance design error in MidiRegionView/MidiView
trim_front_(starting|ending) must be in a class derived from RegionView,
which MidiView is not.

This ensures that Carl's original design for this (with these two methods
called at the start and end of a front-trim drag) is still operational, and we
do not end up with MIDI regions that have a negative start value.
2025-04-08 15:50:30 -06:00
Paul Davis
0c924c3933 pianoroll: dragging start handle before zero shifts MIDI later in time 2025-04-08 15:50:30 -06:00
Paul Davis
05b8c6d2d3 some potential fixes for wierd note split/join behavior
the split_info for a MidiView would stick around across note selection
operations that really should act as a "boundary" or end of the
split op. This commit ends the split op any time selection is cleared
or notes are added to the selection (except when in the middle of a split
2025-03-19 17:34:33 -06:00
Paul Davis
a94bd4b7c6 rename MidiView::relative_position() to ::view_position_to_model_position() 2025-03-06 18:12:40 -07:00
Paul Davis
93f1211db9 add MIdiView::show_source() method to expose _show_source value 2025-03-06 18:12:39 -07:00
Paul Davis
b489d466cf commit crash caused by event-sensitive ghost note in MidiView 2025-03-04 12:18:29 -07:00
Paul Davis
06050bb578 several related changes to get visible channel control working in MidiView/Pianoroll 2025-03-04 11:30:48 -07:00
Paul Davis
e34fd3cc3b remove unused methods related to channel changing for MIDI notes 2025-03-04 11:30:48 -07:00
Paul Davis
47e635b689 initial work on displaying non-selected-channel notes in pianoroll 2025-02-28 13:39:45 -07:00
Paul Davis
ab39c26f68 a variety of changes to make timeline-region editing-in-pianoroll to start to work
This also removes the useless "new pianoroll window" menu option and action
2025-01-20 18:05:19 -07:00
Paul Davis
a7382b9424 provide MidiView methods for use in NoteDrags (fixes note drags to earlier times in pianoroll) 2025-01-19 10:53:52 -07:00
luzpaz
1a18417464
fix typos in gtk2_ardour directory
Found via `codespell -q 3 -S "*.pdf,*.po,./.git,*.tosc,./waf,./share/patchfiles,./libs,./msvc_extra_headers,./share/web_surfaces,*.patch" -L acount,addin,ane,ba,buss,busses,caf,capela,devine,disconnectin,discreet,doubleclick,envolution,filetest,fo,ghandi,homs,hsi,layed,maschine,mis,nd,ontop,pass-thru,removeable,retrn,ro,scrollin,sectionin,seh,siz,sord,sur,te,trough,ue,wth`
2025-01-18 00:55:34 +01:00
Paul Davis
5cade315fb redraw (pianoroll) MidiView when note mode changes
This also fixes the position of the percussive mode canvas items
2025-01-15 10:34:46 -07:00
Paul Davis
678ebca032 don't always adjust note range in a MidiView after a model change 2025-01-14 16:49:58 -07:00
Paul Davis
e273ec06bb fix note drawing in clip editor by adding MidiView::relative_position() 2025-01-10 10:31:48 -07:00
Paul Davis
c98a36be0f switch mouse button and motion handling in MidiView to use Drag formalization
It appears that mouse handling in MidiRegionView (now moved into MidiView)
predated the full Drag formalization. This led to inconsistencies as parts of the Drag
formalization were adopted, including the use of motion events to start a drag (this
is incorrect in the current semantics of a Drag).

This commits removes all/most of the special purpose drag handling machinery in MidiView
and uses Drags instead
2024-12-27 14:13:02 -07:00
Paul Davis
25b830b032 fix event handling/routing from MidiView up to EditingContext
in particular, rename MidiView::canvas_group_event() to
avoid confusion with TimeAxisViewItem::canvas_group_event()
since a MidiRegionView inherits from both these classes.
2024-12-27 14:00:55 -07:00
Paul Davis
c98fc2477a add a new canvas item for cue start/end dragging 2024-12-27 13:44:56 -07:00
Paul Davis
755aeb74b0 midi cue view can use midi view's canvas event method directly 2024-12-12 11:53:15 -07:00
Paul Davis
9243dcf961 draw clip rect correctly after it is reset\n 2024-11-25 18:30:01 -07:00
Paul Davis
465f39e5bf create nonfunctional clip boundary drags when appropriate 2024-11-23 09:06:38 -07:00
Paul Davis
8064353a82 fix/remove on the current #warnings arising from the pianorule refactor 2024-11-23 09:06:38 -07:00
Paul Davis
d5cc1b5efc initial steps to trigger start/end point display and editing 2024-11-22 09:33:38 -07:00
Paul Davis
48ed5be776 skeleton for clip start/end editing 2024-11-12 18:54:41 -07:00
Paul Davis
a1dd7ae4c3 remove unused member variable
this was a solution to a problem eventually solved a different way
2024-11-11 22:06:05 -07:00
Paul Davis
61f1466f50 use virtual methods to get MidiRegionView to do ::set_model() correctly 2024-11-05 13:27:22 -07:00
Paul Davis
8986768731 fix invisble notes in MidiRegionView after transport stopped-recording
MidiCueView needs an _active_notes array setup when it is assigned a track that is
already rec-enabled, because we can start clip recording without session record-enable
being active.

MidiRegionView does not need this; it uses session rec-enable status to create or delete
_active_notes (also transport stop, sometimes)
2024-10-31 12:22:35 -06:00
Paul Davis
c7192b4cc0 add the concept of a length that is data-independent to MIDI files (GUI) 2024-10-31 12:22:35 -06:00
Robin Gareus
ff95d81612
Reduce reliance on boost - the easy part
* boost::unordered_map -> std::unordered_map
* BOOST_STATIC_ASSERT/static_assert
* BOOST_FOREACH -> for
* boost::tuple -> std::tuple/g
* boost::math::isnormal -> std::isnormal
* boost::container::set -> std::set
* boost::none -> std::nullopt
* boost::optional -> std::optional
2024-10-19 03:41:16 +02:00
Paul Davis
c2094085e3 sort of get MIDI notes to extend during clip recording
Also, robustify MidiView against a missing MidiModel member variable
2024-10-17 07:44:33 -06:00
Paul Davis
d7e85de7c2 first somewhat version of show-clip-capture MIDI notes as they arrive 2024-10-17 07:44:33 -06:00
Paul Davis
bd0b5495c6 robustify MidiView so that it can be created without a MidiTrack 2024-10-17 07:44:33 -06:00
Paul Davis
35f16f1bb6 preparations for clip data display (MIDI) while recording (GUI edition) 2024-10-17 07:44:33 -06:00
Paul Davis
b8fb779fa7 allow dragging in MIDI automation line in cue editor
Note: once this is cleaned up and checked with respect to snap and more,
the same should be done for MidiRegionView
2024-10-17 07:44:32 -06:00
Paul Davis
ca1583cdad the great onceification (gui)
Replace use of #ifndef header guards with #pragma once

Modern C++, baby!
2024-10-17 07:44:31 -06:00
Paul Davis
56ce9c33c0 renaming: AutomationLineBase => AutomationLine, AutomationLine => EditorAutomationLine 2024-10-17 07:44:31 -06:00