Commit Graph

496 Commits

Author SHA1 Message Date
Paul Davis 50232a23a7 temporal: hide superclock_t variant of TempoMap::metric_at()
This fixes several callsites that were passing samplepos_t to get a TempoMetric,
some of them somewhat significant (e.g. VST plugins that want tempo information).

Bad API design on my part, apologies.

This commit combines libs/ and gtk2_ardour because the new private status
of the ::metric_at() call would be a blocking point for git bisect
2023-06-12 12:36:16 -06:00
Robin Gareus 61b41fd5d0
A user initiated locate cancels play-range (#9360) 2023-06-08 18:38:25 +02:00
Robin Gareus cd2d0448a9
Fix Play Range (#9360)
When starting RangePlay while the transport is already rolling
the transport is now stopped (and de-clicked) before locating.

This should not clear the RangeStop event when it is caused
by a RangePlay request.
2023-06-08 16:51:24 +02:00
Robin Gareus b6428b421f
Fix Region Export alignment
Session::start_audio_export correctly sets preroll offset
depending on export-mode. A later locate must not change it.
2023-05-27 02:21:40 +02:00
Robin Gareus dd9f9ef19d
When synced to engine vari-speed is not possible 2023-05-19 23:28:32 +02:00
Paul Davis 6cc116e6de Revert "add ProcessedRanges element to Session and update its contents appropriately"
This reverts commit 33047987a7.
2023-04-18 13:48:59 -06:00
Paul Davis 909a2ad639 Revert "modify API of MIDI Clock ticker to use ProcessedRange"
This reverts commit 720102f98a.
2023-04-18 13:48:59 -06:00
Robin Gareus 295dbd8e1e
Make RCU reader return a const pointer (omnibus commit) 2023-04-08 00:15:37 +02:00
Paul Davis 720102f98a modify API of MIDI Clock ticker to use ProcessedRange
This solves the faulty MClk output when we locate due to a loop end.
2023-03-24 14:19:16 -06:00
Paul Davis 33047987a7 add ProcessedRanges element to Session and update its contents appropriately 2023-03-24 14:19:16 -06:00
Paul Davis a486fba3e9 std::atomic - 2nd batch of changes to convert from glib to std::atomic 2023-03-24 14:19:15 -06:00
Paul Davis 4ba4cd69ff switch from glib atomic to std::atomic (libs edition) 2023-03-24 14:19:15 -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 259499fc5f require use of BBT_Argument as both parameter and return type from most methods (libs edition) 2023-02-15 16:02:56 -07:00
Robin Gareus 349d25a2d2 Update latency compensation when sends are added or removed
Previously only adding an aux-send triggered a graph-reorder but copying
or deleting sends did nothing.

Adding/removing an aux-send may not even change the graph, but
both upstream/downstream latency can change and delaylines need to be
configured (which is done by calling update_latency_compensation with
force_whole_graph = true).

This fixes an issue with incorrect initial latency compensation after
copying a send (any later change to connections will correctly
recalculate it).
2023-01-27 23:13:52 +01:00
Ben Loftis 1e283adb22 disambiguate trigger functions: stop_all_triggers -> trigger_stop_all 2022-10-01 09:13:14 -05:00
Colin Fletcher cef86efe1b libs/ardour: allow creating region source markers while recording
Add a list of marker locations to the session, for the the UI to add the
current location to when "add-region-cue-marker" happens whilst recording.
On record-stop, create source markers at the locations in that list in all
newly-recorded audio regions.
2022-08-09 14:03:03 -06:00
Paul Davis 6fdd745dc5 fix may-be-used-unset warning 2022-06-22 13:31:08 -06:00
Robin Gareus 4825d67c4a
Fix record w/count-in
The pre-nutemo code used fmod() to calculate the offset into the bar:
`bar_fract = fmod (barbeat, 1.0); // fraction of bar elapsed`
with nutempo, beats start at 1, and the tick offset must also be
taken into account.

The bug was introduced in f67029bd0
2022-06-20 21:15:00 +02:00
Paul Davis 842fa3c708 NOOP: comment terminology update 2022-06-13 10:20:50 -06:00
Paul Davis 6bef80ae60 triggerbox: use regular transport request mechanism to get transport started
if a slot becomes active, and the transport is not rolling, it still
asks the transport to roll. however, (1) there's only 1 request across
all triggerboxen (2) the request will not be handled till the next
process cycle (3) the triggerbox returns after the request i.e. it
waits until the transport is rolling
2022-06-10 11:59:12 -06:00
Paul Davis cc2e6b3cf8 libardour: change API of Session::request_locate() to include "force" argument
No behavior should be changed by this modification; the argument has a default value of false, which
matches previous semantics, and every instance where the argument is specified, it is given as false.
2022-05-27 18:49:11 -06:00
Paul Davis e3501a05f8 temporal: remove the concept of a time domain for the tempo map
TempoPoint and MeterPoint always have their position set in musical time; MusicTimePoint (BBT)
always has a position in audio time. It's that simple
2022-05-24 17:10:25 -06:00
Robin Gareus baa30262b8
Be more specific about RouteProcessorChange signals
Session::route_processors_changed accumulates signals emitted
in realtime and processing is delegated to a dedicated rt-safe
thread. Previously this resulted in any changed to be converted
to a `GeneralChange`, which unconditionally triggered a route-reorder.

Record-arming a track causes a MeterPointChange (meters change to "in"),
and this caused routes to be resorted and a latency-update.

While the former is reasonable (Ardour prefers to process
rec-armed routes first), the latter certainly is not.
2022-05-24 02:26:56 +02:00
luz paz 78f1205806 Fix typos in source foward(s)->forwards(s)
Fix source typos
2022-05-12 10:15:15 -04:00
Paul Davis a4459ebf9c avoid double-locates when locate-while-rolling
We know when we call non_realtime_stop() if we will be subsequently
locating. If so, do not do an additional non_realtime_locate() from
within the stop.
2022-03-17 17:43:43 -06:00
Paul Davis 1cc8a3f92c extend Session API to provide ::transport_locating() 2022-03-17 12:20:34 -06:00
Paul Davis d505ae3372 triggerbox: record stop-all-cues "cue" when appropriate 2022-03-13 10:22:20 -06:00
Robin Gareus 562cb7cb3a
Cancel audition when the backend is stopped 2022-01-28 06:41:37 +01:00
Ben Loftis 00aec4f91e Trigger page: changes to cue-recording behavior (see comments) 2022-01-23 20:24:44 -06:00
Paul Davis 2fa8c7cd42 triggerbox: if any cues were recorded, remove all existing cue markers in transport-roll-range before adding new ones 2022-01-21 13:08:47 -07:00
Paul Davis b023b97538 triggerbox: flush newly recorded cue markers back to RT context 2022-01-21 10:55:55 -07:00
Paul Davis d830800ed9 triggerbox: add flush-at-transport-stop from recorded cues to locations 2022-01-21 10:55:54 -07:00
Paul Davis 02f4daffe4 fix inconsequential debug-trace garbage value report from clang 2022-01-20 13:40:49 -07:00
Paul Davis ff89d998b2 triggerbox: steps toward sane trigger stopping API and design 2021-12-22 17:27:26 -07:00
Ben Loftis e7569eabe7 Trigger Cues: implement master Stop button (libardour part) 2021-12-13 07:26:47 -06:00
Paul Davis 91a28b78c4 modify and extend both Session and TriggerBox API to allow better transport control
This allows a stop transport request to first stop all active triggers and then stop the transport
2021-11-10 15:55:58 -07:00
Paul Davis e52eead1b6 Add Session::start_transport_from_processor() (for process() context use only) 2021-08-13 12:51:36 -06:00
Paul Davis 8cc54e5c7e fix use of timepos_t for locates after rebase with new transport API changes 2021-08-13 12:51:35 -06:00
Paul Davis 8bada4b5e1 remove public ::bbt_at (INTEGER) methods, because of superclock_t/samplepos_t confusion
libtemporal still needs ::bbt_at (superclock_t) fairly often so retain it as a private method, but public
interfaces take either Beats or timepos_t
2021-08-13 12:51:35 -06:00
Paul Davis 79763893b3 remove/hide Session::tempo_map() and use TempoMap::use() instead (thread local shared ptr) 2021-08-13 12:51:30 -06:00
Paul Davis f67029bd02 random commit to facilitate trivial move of work from laptop back to main system 2021-08-13 12:51:29 -06:00
Paul Davis eae9d276fe libardour: conversion to use timeline types (mega-commit) 2021-08-13 12:51:29 -06:00
Paul Davis f194e1859d remove debug output 2021-07-26 17:27:43 -06:00
Paul Davis cd7c222942 Do not queue TransportStateChanged events (and thus signals) when locating from the end of a loop.
There is no event processing after the locate, and so the event that is (was)
queued at the loop start will not be processed, and each time we reach the
loop end, we will try (and fail) to queue an identical event (fail because
duplicate events are not allowed). We don't need this event (or signal) at
all, because locates (and then ::start_transport() while looping do not
represent a state change that any UI needs to know about.
2021-07-26 17:27:43 -06:00
Robin Gareus a6ef7df1fd
Fix TSC signal emission (monitoring and automation)
TransportStateChange() triggers various updates.
However at the time the signal is handled
`transport_rolling()` and/or `transport_state_rolling()`
may still return false.

This fixes incorrect In/Disk display on tracks (RouteUI)
and incorrect automation write-pass handling,
when toggling stop/play.
2021-07-19 19:17:57 +02:00
Robin Gareus 572a69758a
Min playback speed is +/- (100/16)%
This is for at least two reasons: transport will effectively
move with 32 samples * 6.25% = 2 samples per cycle and the
resampler cannot up/downsample a factor of > 16 with
reasonable quality.
2021-07-19 18:26:19 +02:00
Paul Davis e01f898f3b libardour: adjust names for default speed APIs and make ::set_default_play_speed() private 2021-07-18 19:48:13 -06:00
Paul Davis 3bdf009e11 libardour: provide infrastructure for requesting default play speed 2021-07-18 19:40:21 -06:00
Robin Gareus 2e90a58611
Fix pre-roll rec trim near 00:00:00 2021-07-12 02:13:05 +02:00