Commit graph

40804 commits

Author SHA1 Message Date
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
Paul Davis
c3a4026ace pianoroll: update bbt ruler when changing zoom level 2025-05-16 16:43:12 -06:00
Paul Davis
5a0919f2b0 do not construct a useless tempo map when setting samples per pixel in a pianoroll MidiView 2025-05-16 16:43:12 -06:00
Paul Davis
f6b3caad52 do not attempt to compute samples per pixel (zoom level) on EditingContext if _track_canvas_width is still zero
This leads to undefined/incorrect arithmetic results
2025-05-16 16:43:12 -06:00
Paul Davis
4732e702ce use a Glib constant as a better indication of the return value semantics in an idle callback 2025-05-16 16:43:12 -06:00
Paul Davis
5d34dd2f57 change error message when a PortRegistrationFailure exception is thrown, to no longer refer specifically to JACK 2025-05-16 16:43:12 -06:00
Robin Gareus
e81f1464a9
Potential fix for #9932 2025-05-16 18:17:32 +02:00
oxfn
c486289c68 Update ru.po: fix typo 2025-05-16 18:01:09 +02:00
Bill Smith
0f8e941d0d
Roland / Boss GT-8 Midnam
Adding a midnam for Boss GT-8 Guitar Effects Processor
2025-05-15 15:34:57 -07:00
Robin Gareus
d6c6c58155
NO-OP: fix alignment after recent code change 2025-05-14 20:28:56 +02:00
Robin Gareus
6c8a2ec05b
Fix false read-only detection of sessions on Windows with OneDrive
see https://discourse.ardour.org/t/ardour-8-4-on-win11-amd64-always-opens-session-in-read-only-mode/110063/38?u=x42
2025-05-14 20:21:44 +02:00
Paul Davis
9494ecf6e9 EditorComponent should have a reference, not pointer, to an Editor
the value is not allow to be null, and the coding style guide says in such cases to prefer
a reference.

No semantics change here, just the fact that all EditorComponents receive *this instead
of this when the Editor that owns them creates them
2025-05-14 11:50:30 -06:00
Paul Davis
94dbcaa7e2 provide a new EditingContext/Editor method to set the cursor appropriately for section selections 2025-05-14 11:37:01 -06:00