Commit Graph

35593 Commits

Author SHA1 Message Date
f631f742fa remove debug output 2022-06-29 08:17:16 -06:00
ca49bc00f0
Remove old "user" API, use consistent get/set_double() 2022-06-29 01:39:02 +02:00
09e8ba00c2
Replace ::user_double() with ::get_double() 2/2 2022-06-29 01:39:02 +02:00
3623b39168
Replace ::user_double() with ::get_double() 1/2 2022-06-29 01:39:02 +02:00
a4a241c738
Prepare replacing ::user_double() with ::get_double()
Automation Controls (and controls in general) are now
only updated in realtime context. Either via automation-playback,
or via SessioEvent. This directly sets the Control:_user_value
(before emitting the Changed signal).

The GUI does not need to evaluate the control at a given point
in time, so the API call can be removed and unified.

This commit first removes all calls to "get_double" to ensure
that no special cases exist.
2022-06-29 01:39:02 +02:00
5cb6e1046b
Fix automated controllable display value
::automation_run() evaluates the value, possibly ahead of time
depending on latency-compensation. The actual value is set in
realtime-context via set_value_unchecked() -> actually_set_value()
which emits the Changed signal.

At this point in time Control::user_value is already set correctly.
There is no need to evaluate and interpolate again, at a potentially
incorrect (uncompensated) time: `_session.transport_sample()`.

This fixes an issue with the GUI Automation control showing an
outdated value when there is an "immediate jump" in the signal:
eg. add a latent plugin post-fader, then automate the Fader to jump
from 0dB to -inf dB (snap to grid) and play though that transition.

(Plugin controls were not affected by this bug, the process
cycle is split for those, but Mixbus internal AC were affected).
2022-06-29 01:39:02 +02:00
7a01f3cbcd
Fix automated fader display value (use cycle-end value) 2022-06-29 01:39:01 +02:00
b0b7750bc7
NO-OP, use default argument 2022-06-29 01:38:55 +02:00
fadf77e39c NO-OP: update comment to reflect the context 2022-06-28 12:24:54 -06:00
5c2831e218 tempo display: modify how we implement MidiRegionView::_redisplay() so that the width is also correctly updated 2022-06-28 12:21:44 -06:00
ecf554aa4a tempo display: basics of updating MIDI during tempo-related drag operations 2022-06-28 11:44:25 -06:00
bf87916fb1 tempo display: further simplifications to handling map changes
When a tempo map change originates from a drag, we know the required redraws have
already been done. Use a new bool member, ignore_map_change, to tell the Editor
to ignore the map change signal. For all other map changes, do the full reset.
2022-06-28 10:16:31 -06:00
32a3bf229e remove commented code 2022-06-27 22:27:15 -06:00
6dfaac9e94 redesign the mechanisms for updating tempo/meter display during drags and other map changes
We now simply move markers during drags, and do not seek to create/delete markers.

When the map is changed, we rebuild the markers from scratch. This might need optimization to avoid doing
when the editor itself changed the map.
2022-06-27 22:21:27 -06:00
602a029773 tempo curves: fix width so that the curve from the Nth marker does not overlap the Nth+1 2022-06-27 22:21:27 -06:00
ee350362d3
Debug loop range squishing
When the loop-range is defined in BeatTime, the disk-reader encounters
rounding issues due to time-domain mismatches.

With a simple session fixed BPM at 120,  48kHz.
looping 1 bar exactly 2 sec at the start of the session:
```
 Range::squish start: b0 end: b7680 squish: a113554560
 Range::squish using modulo:       b45 = a661500
 Range::squish using modulo in TD: a5760
 Range::squish using earlier():    a658560
```
The correct answer is a113554560 - 2 * 56448000 [SC/sec] = a658560

Calculating the modulo iteratively is not great, however usually
only one iteration is required.
2022-06-28 03:01:41 +02:00
65956407bb
Fix initial display of markers that are glued to BeatTime 2022-06-28 02:55:53 +02:00
b0738b1950
Fix tempo-marker/curve z-axis stacking
Previously it was possible that the tempo-curve display was rendered
above a tempo-marker (e.g. create a marker in the between of existing
markers). With the tempo-curve in front, markers on the right
became inaccessible.
2022-06-26 16:20:00 +02:00
944b0ed6e0
Prefer const iterators when container does not change 2022-06-26 13:55:46 +02:00
c3f40aedeb tempodisplay: fix thinko in display of tempo/meter/bartime markers
Code used to just push back new markers to the end of the relevant list, and
this would then the new marker to be deleted soon thereafter. Instead pass
an interator indicating where to place the marker in the list.

Note that we rely on the use of std::list<T> here to keep the iterator to the
existing marker valid.
2022-06-25 22:26:34 -06:00
873f78de78 NOOP: rearrange code DiskReader::get_midi_playback() to follow the "early exit for conditional" style guide 2022-06-25 13:36:55 -06:00
d9ce918c41
Small test tool for PBD::Transmitter thread-safety tests
Launch as
```
 ./session_utils/run ardour7-debug_transmitter
 ./session_utils/debug ardour7-debug_transmitter
```
2022-06-24 21:11:51 +02:00
64f9829b56
AudioBackends: ignore setting latency of invalid port(s) 2022-06-24 19:55:17 +02:00
fe0e997335
Backend: prefer debug_msg over PBD::Transmitter in threads
PBD::Transmitter is neither thread-safe nor rt-safe. This likely
fixes a crash on macOS when process-threads are started.
Many threads simultaneously enter coreaudio_process_thread() and
log a message calling `PBD::info << .. << endmsg` simultaneously.
2022-06-24 19:27:57 +02:00
9ab32d7cb4
Fix builds on platforms without execinfo (amend cd4549aff7) 2022-06-23 01:59:58 +02:00
5831ddd40b amend b30ac5e221 to actually replace the assert with a return 2022-06-22 16:09:38 -06:00
7b7f17085b
Fix crash when using get_all_equivalent_regions wih VCAs in a session 2022-06-22 22:22:52 +02:00
e8e21b3152 NOOP: fix comment for abort-after-fatal to follow norms 2022-06-22 13:31:08 -06:00
3245a89bfe add comment explaining non-idiomatic C++ 2022-06-22 13:31:08 -06:00
b2d553cc51 editor: fix HitCreateDrag to (a) not crash (b) use the right length (c) snap correctly 2022-06-22 13:31:08 -06:00
1de542120a editor: remove a couple of unnecessary uses of Beats::from_double() and uses ::ticks() method instead 2022-06-22 13:31:08 -06:00
22e77130e2 use new macros to cleanup #ifndef NDEBUG as much as possible (GUI edition) 2022-06-22 13:31:08 -06:00
0d9656ef82 use new macros to cleanup #ifndef NDEBUG as much as possible (libs edition) 2022-06-22 13:31:08 -06:00
0004ca2c41 add useful DEBUG_RESULT and DEBUG_RESULT_CAST to pbd/debug.h 2022-06-22 13:31:08 -06:00
d917d7b351 fix actual x_assert macro definition 2022-06-22 13:31:08 -06:00
df641765ec add new header for x_assert() macro 2022-06-22 13:31:08 -06:00
4599b07217 fix optimized unused variable warning 2022-06-22 13:31:08 -06:00
046cdf1295 fix unused variable warning by removing it. 2022-06-22 13:31:08 -06:00
41948821e2 fix optimized unused variable warning 2022-06-22 13:31:08 -06:00
ebb9d3d4dc fix optimized unused variable warning 2022-06-22 13:31:08 -06:00
26d2c8a7fa handle compiler stupidity with early return 2022-06-22 13:31:08 -06:00
bb5798ee66 fix may-be-used-unset warning and bizarre brace/indent style 2022-06-22 13:31:08 -06:00
6fd4c01fc9 fix optimized unused variable warning 2022-06-22 13:31:08 -06:00
4878c48386 fix optimized unused variable warning 2022-06-22 13:31:08 -06:00
7a32ff33d4 handle compiler stupidity with early return 2022-06-22 13:31:08 -06:00
f7b91d577b handle compiler stupidity with early return 2022-06-22 13:31:08 -06:00
9922daf284 handle compiler stupidity with early return 2022-06-22 13:31:08 -06:00
24f1a65d5f use C style cast in C code, rather than C++ constructor 2022-06-22 13:31:08 -06:00
48a109e8c8 fix snprintf buffer size warning 2022-06-22 13:31:08 -06:00
660d2fc8ab fix strncpy() size argument error (Windows only, needs review) 2022-06-22 13:31:08 -06:00