Commit graph

203 commits

Author SHA1 Message Date
Paul Davis
1146a4ad07 move RecordState enum from ARDOUR::Session to ARDOUR so we can use it in TriggerBox (GUI) 2024-10-17 07:44:32 -06:00
Paul Davis
549defc068 more work on fixing pianorule recomposition of objects 2024-10-17 07:44:29 -06:00
Paul Davis
182a24751b get standalone MidiView to display notes
This also removes an unused TriggerBoxWidget from each regular
MixerStrip.
2024-10-17 07:44:29 -06:00
Paul Davis
e24d1d069d all streamviews are now ViewBackgrounds
This new inheritance heirarchy lets us share (a very small piece of) code
between streamviews in the Editor and the nascent piano roll object on the cue
page.
2024-10-17 07:44:29 -06:00
Paul Davis
a550b6482f start using the now-compilable MidiView
Nothing yet derives from this, but MIDI display items and drags
do use it.
2024-10-17 07:44:29 -06:00
Paul Davis
204d4237f8 further steps towards MidiRegionView outside the Editor 2024-10-17 07:44:29 -06:00
Paul Davis
089a9521d5 steps to an ecology of editing 2024-10-17 07:44:29 -06:00
Paul Davis
f407d4e3b7 ensure that MidiStreamView calls a color handler for each region
This allows MIDI regions to auto-update during theme editing
2023-12-09 14:07:58 -07:00
Paul Davis
70c3142c2c small visual and peformance tweaks for midistreamview bg draw 2023-09-25 20:03:04 -06:00
Paul Davis
85375397ed fix semi-random MIDI note separator line vanishing 2023-09-11 14:04:59 -06:00
Paul Davis
2797ea9666 remove unusued "MIDI underlay" cruft 2023-06-26 14:18:17 -06:00
Robin Gareus
1feb9b5e89
Streamview: NO-OP, consolidate code 2023-06-04 20:21:41 +02:00
Paul Davis
4f87506e5c do not sort lineset every time a coord is added; use RAII to create scope and sort at end 2023-04-09 14:36:03 -06:00
Paul Davis
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
Paul Davis
a365a7ebf3 respond to MIDI max note height changes 2023-02-05 12:24:12 -07:00
Paul Davis
2756be4b62 add an option to control the maximum MIDI note height (not yet GUI exposed) 2023-02-05 11:36:24 -07:00
Robin Gareus
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
Robin Gareus
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
Paul Davis
948fc52c5c NOOP: whitespace before parens in function call 2022-04-17 12:04:05 -06:00
Paul Davis
a4f26f91c8 parametize default MIDI scroomer (and thus MIDI track) note range 2022-04-16 12:08:44 -06:00
Paul Davis
f8b0a8843c stash info on whether we disabled region view redisplay for view-only or model changes
The bool may be unnecessary since everywhere we use this seems to be for model changes
2022-04-05 20:52:10 -06:00
Paul Davis
b8a6b97b49 redesign (MIDI)RegionView display disabling around an RAII model 2022-04-05 20:52:10 -06:00
Paul Davis
d586956636 NOOP: some minor whitespace fixes 2022-04-05 20:52:09 -06:00
Paul Davis
ae8c043fe1 regionviews: use integer counter instead of boolean to control redisplay of contents 2022-04-05 20:52:09 -06:00
Paul Davis
bc38f8d424 MidiSource: change thread mutual exclusion object from Mutex to a RWLock
This allows two reader threads to proceed without blocking each other, as can
happen when the butler renders a MIDI track into an RT-safe buffer while the
GUI reads the same MidiModel/Source for visual display.
2022-04-05 20:52:09 -06:00
Paul Davis
1686db8b0c Change the type of reference held by a MidiModel to its MidiSource
This also requires a change in the type of reference held by
a MidiAutomationListBinder.

Both the MidiSource and MidiModel have a reference to each other, and it is
important that we avoid circular references to avoid problems with object
destruction. We had been accomplishing this by having the Model hold a
weak_ptr<MidiSource>. However, the lifetime of a MidiSource and its MidiModel
are coincident and there's really no need to use a smart ptr at all. A normal
reference is just fine. However, due to constructors that accept a serialized
state, we cannot use an actual reference (we cannot set the constructor in the
initializer list), so we use a bare ptr instead.

This forces a similar change in MidiAutomationListBinder, which also maintains
a reference to the Source. However, the only purpose of this object is to
ensure that if the Source is destroyed, relevant commands will be removed from
the undo/redo history, and so all that matters here is that the binder connects
to the Destroyed signal of the source, and arranges for its own destruction
when received.

Note that the previous construction of the binder, actually holding a
shared_ptr<MidiSource> would appear have prevented the Destroyed signal from
ever being emitted (from ~Destructible), and so this may also be a bug fix that
allows MidiSources to actually be deleted (the memory object, not the file).
2022-04-05 20:52:09 -06:00
Paul Davis
e0fa447d29 NOOP: whitespace and multiline -> one line changes 2022-04-05 20:52:09 -06:00
Robin Gareus
97fe05e4de
Improve GUI HiDPI support
* scale default track heights
* scale region-gain, automation lane control points
* scale max. MIDI note lane height
2022-01-29 22:33:07 +01:00
Paul Davis
b6f290add2 timeline type changes for new ripple code and post-conflict-resolution fixups 2021-08-13 12:51:36 -06:00
Paul Davis
49424ab0e3 Region::_start should be a timepos_t not a timecnt_t (GUI edition) 2021-08-13 12:51:34 -06:00
Paul Davis
18d64f0402 change all Region::nt_*() methods to names without the nt_ prefix (GUI version) 2021-08-13 12:51:30 -06:00
Paul Davis
2a08e4bdaa continued work on timeline types conversion. in theory, just editor_ops.cc remains 2021-08-13 12:51:29 -06:00
Paul Davis
5b2a435e02 getting editor_drag.cc to compile 2021-08-13 12:51:29 -06:00
Paul Davis
82bad0725a libcanvas: reapply LineSet::add_line -> add_coord change after rebase conflicts with master 2021-08-13 12:51:27 -06:00
Paul Davis
b54c9b6a30 use modified Canvas::LineSet API 2021-08-13 12:51:25 -06:00
Robin Gareus
9e2c5f4ffc
Fix MIDI rec-rectangle when rec-arm while looping 2021-07-12 02:13:07 +02:00
Johannes Mueller
bff9c9a5a1 Work around a race condition
This covers a race condition in session transport that when synced to an
external engine it sometimes occurs that at the end of ::realtime_stop()
::transport_stopped_or_stopping() returns false when ::setup_rec_box() is
called. In this case the rec boxes are not erased when the recoding transport
is stopped.

This fixes this behavior about the remaining rec boxes, however the race
condition remains.

The race condition is reported in #8104. It should be considered reverting this
commit once the race condition is fixed.
2020-05-10 14:53:38 +02:00
Paul Davis
e4e035c6e2 remove debug output 2020-04-16 17:48:12 -06:00
Paul Davis
65f7a6a938 changes to deal with region/note selection when changing into/out of internal edit mode
Also, activate MIDI editing actions so that they are effective in internal edit mode
2020-04-16 17:48:12 -06:00
Johannes Mueller
0f806d1322 Same as 97e07f4, only for MidiStreamview, duh 2020-04-13 02:28:35 +02:00
Robin Gareus
4050ca5633
Update GPL boilerplate and (C)
Copyright-holder and year information is extracted from git log.

git history begins in 2005. So (C) from 1998..2005 is lost. Also some
(C) assignment of commits where the committer didn't use --author.
2019-08-03 15:53:15 +02:00
Robin Gareus
53c677e08f
Remember MIDI-track note-range -- #7773
Previously only manual changes of the note-range using the scroomer.
The NoteRangeChanged() was ignored for implicit changes (e.g. while
recording, step-entry) and automatic-fit that didn't involve a drag
event.
2019-07-14 18:49:30 +02:00
Robin Gareus
37aaa2d11b
NO-OP: whitespace, alignment 2019-04-08 22:39:22 +02:00
Paul Davis
30b087ab3d globally change all use of "frame" to refer to audio into "sample".
Generated by tools/f2s. Some hand-editing will be required in a few places to fix up comments related to timecode
and video in order to keep the legible
2017-09-18 12:39:17 -04:00
Robin Gareus
b57b1de491 Fix rec-box w/count-in
Since 478f26b2ad, transport_rolling() is only true when actually rolling.
Count-in is a no-roll process (don't move playhead, no playhead UI
position interpolation 55b8b448).

But transport isn't exactly stopped either (preparing to roll), so
during count-in transport_stopped() == transport_rolling() == false.
2017-06-08 13:34:23 +02:00
Tim Mayberry
3edb6b2e1f Use PBD string conversion functions in PBD::Property class 2017-04-19 09:36:47 +10:00
Robin Gareus
bbda37c28f Fix note-grid, canvas bounding-box offset.
Note lines on a MIDI-track were able to exceed the time-axis' height
towards the top. If a MIDI track was at the top, the TAV's canvas-group
would increase the overall bounding-box of the track-area and allow
tracks to visually bleed into the time markers group.
2017-03-16 03:47:46 +01:00
Ben Loftis
cdab4c9906 Revert to allowing stacked layer region view for MIDI tracks, for now. 2017-02-06 12:52:40 -06:00
Paul Davis
d29f6bde5e prevent suggestion that MIDI tracks can be set to stacked view 2017-01-29 15:03:29 +01:00
Paul Davis
cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00