Commit graph

40816 commits

Author SHA1 Message Date
Paul Davis
cc435bcd0f make connection/emission debugging of PBD::Signal more useful/informative 2025-06-06 09:07:45 -06:00
Paul Davis
5e83fc95b4 Pianoroll: drop region reference when session goes away 2025-06-04 21:41:01 -06:00
Paul Davis
08f77136b9 small class rearrangement for ViewBackground and derived classes related to geometry management 2025-06-04 20:43:18 -06:00
Paul Davis
80a34fc3ec stop crash from adding a note in a region also shown in an invisible pianoroll
if the height of the pianoroll has not been set, we can't do the math
for the note range display.
2025-06-04 20:41:29 -06:00
Paul Davis
baa855d3a0 fix an error with piano roll header display for a new track 2025-06-04 20:41:03 -06:00
Paul Davis
5aabe18063 sort-of NO-OP - use nullptr in Editor initialization expressions 2025-06-04 16:59:45 -06:00
Paul Davis
134907b9b1 fixups for pianoroll header/midi view background key/note positions 2025-06-04 14:11:40 -06:00
Paul Davis
03bd3da740 fix initialization order 2025-06-04 14:11:40 -06:00
Robin Gareus
f40b64b0d5
Properly handle incomplete audio read
DiskReader::[do]refill() returns either 0, or -1 on error.
2025-06-04 17:58:51 +02:00
Paul Davis
06593d1a79 pianoroll note labelling: pixel pushing, crash prevent, theme utilization for fonts 2025-06-03 23:17:53 -06:00
Paul Davis
774658e01c remove debug output 2025-06-03 17:11:45 -06:00
Paul Davis
88f35a9c09 fix thinko when drawing lines in a LineSet
self represents the bounding box of each drawn line, but not
the coordinate(s) where to draw it
2025-06-03 17:10:07 -06:00
Paul Davis
959e360dd0 fix LineSet arithmetic (again!) and reduce redundancy
The logic for "is-integral" was backwards, and the code in both
branches of the conditional was identical
2025-06-03 17:09:29 -06:00
Paul Davis
024dedc446 pianoroll: clarify and resolve some issues caused by confusion over what type the _view member has 2025-06-03 12:14:21 -06:00
Paul Davis
e23fdd5b8c horrific hack to deal with pianoroll header (widget) single pixel misalignment currently not understood 2025-06-03 11:34:21 -06:00
Paul Davis
362672ac34 single pixel line, in themed "black" color, to divide B/C and E/F on piano roll header 2025-06-03 11:33:48 -06:00
Paul Davis
68c4fbe65a for the dark colored theme (the default) make pianoroll dividing lines less bright 2025-06-02 19:54:11 -06:00
Paul Davis
48dde40b4f share piano roll header across both GTK widget and Canvas item implementations
This also uses the new API exposed by MidiViewBackground so that the header simply re-uses
the same exact position & height values computed by the background for its note lines.

PianoRollHeaderBase is the base class with the shared implementation.

PianoRollHeader is the GTK widget derived class.

ArdourCanvas::PianoRollHeader is the canvas item derived class.

Both PianoRollHeader implementations have to implement various methods that gloss
over the differences between drawing and event handling in a GTK widget context
or in a canvas item context
2025-06-02 19:53:34 -06:00
Paul Davis
6b348d7643 some missing double -> int conversions for a Pianoroll background 2025-06-02 19:49:57 -06:00
Paul Davis
16d912c440 sort of no-op: fix canvas debug names of several items in a Pianoroll 2025-06-02 19:49:12 -06:00
Paul Davis
bbc9089264 extend MidiViewBackground API
1. provide access to an EditingContext for use in piano roll headers
2. provide pre-computed note positions and heights for use in
   piano roll headers
2025-06-02 19:47:44 -06:00
Paul Davis
96a88b9dc2 NO-OP: whitespace in function call syntax 2025-06-02 19:46:55 -06:00
Paul Davis
1f18a4defc change MidiViewBackground implementation
1. use a RectSet instead of a LineSet to draw note lines. Cairo provides
different coordinate -> pixel coloration rules for rectangles than for lines,
and it makes more sense in this case to use rectangles rather than fat lines.

2. change ::draw_note_lines() to ::setup_note_lines() since the method
doesn't actually draw anything.
2025-06-02 19:46:25 -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
ae913acacf simplify cairo pixel alignment in Canvas::LineSet
1. do the math when we add a new coord, not at every render call
2. correctly decide whether to force an odd-width line on an integer
   coordinate to a half pixel, or an even-width line on a non-integer
   coordinate to a whole pixel.
2025-06-02 19:19:30 -06:00
Paul Davis
705fe2b52d compile RectSet code 2025-06-02 19:16:11 -06:00
Paul Davis
a47a443079 add a canvas item debug name to midi view background's note lines 2025-06-02 18:32:00 -06:00
Paul Davis
6a67a6bcc4 new canvas item: RectSet
a collection of rectangles, conceptually similar to LineSet

this avoids keeping around N different Canvas::Rectangles and instead
collapses a related set of them down to a single item
2025-06-02 18:30:40 -06:00
Paul Davis
10015f570e NOOP: alignment changes 2025-06-02 18:29:36 -06:00
Paul Davis
b6d8f77173 fix bad lifetime mgmt for VerboseCursor class 2025-05-27 08:49:32 -06:00
Robin Gareus
72057395eb
Fix potential use-after-free (when device in use)
An instance must not delete itself..
Here ARDOUR::SystemExec::Terminated signal handler deleted the
class that emitted the signal in the same thread.
2025-05-25 00:21:19 +02:00
Paul Davis
958135ff26 adjust help msg text for 21st century 2025-05-24 07:35:13 -06:00
Robin Gareus
6cc175343c
Show actual project name in derivative projects 2025-05-24 12:46:22 +02:00
Paul Davis
49ff88fd75 fix crash when calling toggle-roll with no time selection existing 2025-05-19 16:52:15 -06:00
Robin Gareus
b92fa1d0e4
Use PBD::CCurl for libardour HTTP/S requests 2025-05-20 00:03:21 +02:00
Robin Gareus
7b6ca334df
Use PBD::CCurl for Ardour GUI HTTP/S requests 2025-05-20 00:03:21 +02:00
Robin Gareus
4f300b5474
Migrate SSL-cert setup to libpbd, so the downloader can use it 2025-05-20 00:03:21 +02: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
37f318e417 set a minor/micro tick font for Pianoroll BBT ruler 2025-05-19 14:57:19 -06:00
Paul Davis
4a6716e39c add option for a minor/micro tick font description to ArdourCanvas::Ruler 2025-05-19 14:57:19 -06:00
Robin Gareus
ba7e63f570
Ignore FLAC seek/peak-file read while recording
FLAC files are either read-only or write-only.
When recording the GUI may ask for additional data to render.
Depending on zoom level, this may require seeking in the audio
data, which in case of FLAC is not possible, and should fail silently:

ARDOUR::SndFileSource::read_unlocked()
ARDOUR::AudioRegion::read_peaks()
ArdourWaveView::WaveView::process_draw_request()
2025-05-19 22:19:54 +02:00
Robin Gareus
d537cdf60b
Fix windows build (see also e44a66287a) 2025-05-19 18:39:13 +02:00
Robin Gareus
e44a66287a
Correctly detect localtime_r 2025-05-18 20:08:27 +02:00
Paul Davis
c7cc5a1a61 MIDI binding map for Nektar Impact LX, c/o Mike Lupe 2025-05-18 10:38:09 -06:00
Jon Bennett
426107ca20 Add Nektar Impact GXP MIDI Map
Just adding the file
2025-05-18 03:51:29 +02:00
Paul Davis
01a087985e fix set/unset of Pianoroll::ref (trigger reference) when a region is set
We do want to reset things like history, but not lose the trigger reference, if any
2025-05-16 16:43:12 -06:00
Paul Davis
72bb24bb1b remove debug output 2025-05-16 16:43:12 -06:00
Paul Davis
2d79195264 prevent crash when timing issues lead to a playing trigger, no region, during Pianoroll::maybe_update() 2025-05-16 16:43:12 -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