Commit Graph

191 Commits

Author SHA1 Message Date
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
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
a365a7ebf3 respond to MIDI max note height changes 2023-02-05 12:24:12 -07:00
2756be4b62 add an option to control the maximum MIDI note height (not yet GUI exposed) 2023-02-05 11:36:24 -07:00
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
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
948fc52c5c NOOP: whitespace before parens in function call 2022-04-17 12:04:05 -06:00
a4f26f91c8 parametize default MIDI scroomer (and thus MIDI track) note range 2022-04-16 12:08:44 -06:00
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
b8a6b97b49 redesign (MIDI)RegionView display disabling around an RAII model 2022-04-05 20:52:10 -06:00
d586956636 NOOP: some minor whitespace fixes 2022-04-05 20:52:09 -06:00
ae8c043fe1 regionviews: use integer counter instead of boolean to control redisplay of contents 2022-04-05 20:52:09 -06:00
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
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
e0fa447d29 NOOP: whitespace and multiline -> one line changes 2022-04-05 20:52:09 -06:00
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
b6f290add2 timeline type changes for new ripple code and post-conflict-resolution fixups 2021-08-13 12:51:36 -06:00
49424ab0e3 Region::_start should be a timepos_t not a timecnt_t (GUI edition) 2021-08-13 12:51:34 -06:00
18d64f0402 change all Region::nt_*() methods to names without the nt_ prefix (GUI version) 2021-08-13 12:51:30 -06:00
2a08e4bdaa continued work on timeline types conversion. in theory, just editor_ops.cc remains 2021-08-13 12:51:29 -06:00
5b2a435e02 getting editor_drag.cc to compile 2021-08-13 12:51:29 -06:00
82bad0725a libcanvas: reapply LineSet::add_line -> add_coord change after rebase conflicts with master 2021-08-13 12:51:27 -06:00
b54c9b6a30 use modified Canvas::LineSet API 2021-08-13 12:51:25 -06:00
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
e4e035c6e2 remove debug output 2020-04-16 17:48:12 -06:00
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
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
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
37aaa2d11b
NO-OP: whitespace, alignment 2019-04-08 22:39:22 +02:00
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
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
3edb6b2e1f Use PBD string conversion functions in PBD::Property class 2017-04-19 09:36:47 +10:00
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
cdab4c9906 Revert to allowing stacked layer region view for MIDI tracks, for now. 2017-02-06 12:52:40 -06:00
d29f6bde5e prevent suggestion that MIDI tracks can be set to stacked view 2017-01-29 15:03:29 +01:00
cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
140258d8ab remove reference "const int32_t&" -> const int32_t"
this simplifies lua-bindings and also let's the compiler worry about
constant primitive types.
2016-07-10 15:30:41 +02:00
nick_m
93c24e4433 Paste uses exact beats. rework _start_beats calculation in copy-with-offset ctor. 2016-07-10 02:18:36 +10:00
nick_m
94e0a15325 Exact beat - provide audio->music mapping for region split.
- for those not in the know, this series provides a way to
	  remove the temporal distortion introduced when using an
	  audio frame-based gui for music-locked objects.

	  In short, the gui uses an audio frame representation to move
	  objects. It displays the object using frame_at_beat(), quantizing
	  the time value to audio frames. This is fine until the user selects
	  that frame but expects it to be interpreted as a beat.
	  Thus beat_at_frame() would not produce the user-expected beat
	  (temporal quantization error of up to 0.5 audio samples).
	  This is one method of mapping audio time to music time accurately.
2016-07-10 02:18:36 +10:00
653ae4acd6 universal change in the design of the way Route/Track controls are designed and used. The controls now own their own state, rather than proxy for state in their owners.
Massive changes all over the code to accomodate this. Many things are not finished. Consider this a backup safety commit
2016-05-31 15:30:40 -04:00
André Nusser
39bd216725 Fix two ghost note drawing problems.
A ghost note could appear:
1) above the region.
2) inside another note even though we haven't yet entered it.
2016-01-12 13:45:38 +01:00
22b07e0233 NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
6b019a4953 Move UIConfiguration Singleton into UIConfiguration header
This removes the direct dependence on ardour_ui.h from 39 files
2015-09-16 16:55:17 -04:00
fc1e7dbb55 Move DPIReset and ColorsChanged signals into UIConfiguration 2015-09-16 16:55:17 -04:00
64fa63212f move all (G)UI related configuration parameters into UIConfiguration, not RCConfiguration 2014-12-22 13:39:46 -05:00
a12a065457 Fix copy paste of MIDI and track automation. 2014-12-18 20:23:34 -05:00
5fef655380 Remove internal edit mode and add "content" tool. 2014-12-18 20:21:01 -05:00
6e912a0aa3 Fix display of MIDI notes/regions while recording.
Make record rect transparency configurable.

Factor out some copy-paste streamview code.
2014-12-17 18:41:23 -05:00