This may need some small tweaks for MB channelstrip to set
print-format (like LV2 plugins would) for cases where the default
value_as_string() differs.
Do not use AutomationType to identify parameters, use complete
Evoral::Parameter and Automatable.
For "batch connections", a Slavables needs to implement an API to return
the relevant controls.
This is only a first step towards a more generic Master/Slave framework.
Let the plugin implementation of Plugin::add_state use a LocaleGuard if it is
necessary (VST/LV2). This puts the LocaleGuards where they are required but the
LocaleGuards in Session::set/get_state will mean these LocaleGuards are a noop.
They are still useful for documentation purposes and in case the code is called
from a non-Session context at some point.
ARDOUR::AutomationList is no longer using LocaleGuards as float <=> string
conversion is using PBD::to_string/string_to so the reason for adding these
guards as per comment no longer applies.
I think this was only to protect the float <=> string conversion in
Session::setup_click_state related to click gain which is now using
PBD::to_string/string_to and so no longer necessary.
There are no float <=> string conversions in MidiDiskstream state methods,
these guards must have been to protect conversions in Diskstream state methods
which are now using PBD::to_string/string_to via XMLNode so no longer need
guarding.
The float conversion in Diskstream::get_state is now done using
PBD::to_string/string_to via XMLNode::set_property API.
There was no explicit LocaleGuard protecting the string -> float conversion to
remove so it was probably protected by the caller.
Saving the new ControlList interpolation methods (enum) breaks loading
the session in older version. The session-format version will
need to be increased.
Until then:
* Fader automation + region gain envelope uses linear fades
* The automation-line visible in the GUI does not match the actual fade
(the y-axis is log/exp-scale, the fade is linear)
* Adding new points on the line is not using the correct initial value
* Custom changes of interpolation mode are not available
Neither of these issues is a regression.
The Control and ControlList uses the raw value (eg. coefficient for gain,
Hz for frequencies) and those Lists are stored in existing sessions.
In the vast majority of cases interpolating automation values using exp/log
scale for dB, freq makes more sense -- it's also what the fader does.
Adding additional interpolation methods is future proof (we might at allow
to even add different methods per automation point (to the next) like other
DAWs do.
Currently it's mainly used in preparation for consistent GUI automation-
lanes. Between 2 points there's always a visual straight line.
This explicit case should never have existed in the first place.
Plugins can always implicitly exceed the range and are expected to
cope with out-of-range values (e.g. meters when fed with a peaking signal
may return an out-of-bounds value)
This allows complete mathematical description of a given parameter
and parameter values.
Semantic type abstraction is reserved for Ardour::ParameterDescriptor.
Functions formerly in ardour/util.h and some more functions.
The main motivation is libevoral which can use libpbd but not libardour.
The eventual goal is to consolidate various different interpolation,
scaling and deflection methods.
Trim automation is planned via SlavableAC as normal AutomationMode.
Some of this code have a revival (a special "Trim+Preview" state
before merging Automation but that has to be more general than Pan & Gain.
Cloning a region retains the region-lock style.
Playlist partitioning set the region start-property only (audio-time).
If a MIDI region is locked to musical-time, Properties::start is ignored
and overwritten by Properties::start_beats.
* The UI and ctrl-surface controls use and display the combined value,
including control-masters.
* The Automation lane of a control is the raw value of the control
without masters.
When touching (or writing) automation, the control-master needs to be
factored out (or subtracted). e.g press+hold a control -> write inverse
master automation.
This went unnoticed because: VCA gain automation was always applied
(regardless of automation state) but when it was not playing
master_ratio() factored it out again (per block).
* remember master-ctrl value on assignment & save with session
* Control/AutomationCtrl only stores ctrl's own value (w/o master)
* virtual AutomationControl::get_value () -> use SlavableAC method
* MasterRecord uses weak-ptr (fixes recursive ~Controllable() deadlock)
If _engine.transport_frame() is not up to date, we emit Located in
Session::backend_sync_callback() because that's when audible_frame() is up to
date. We don't want to emit it twice, because then, the playhead jumps back and
forth.
* mouse click in the ruler -> jump to requested location
* mouse release -> jump to old location (because audible_frame has to catch up)
* backend_sync_callback() called -> jump to new location
If we sync to jackd AudioEngine::transport_frame() is not yet updated when
Session emits Located. Then the playhead ends up in an obsolete
position. Therefore we emit Session::Located() also from within
Session::backend_sync_callback() as that is called when AudioEngine is done
with the relocation.
The crashed previously because:
A VCA is-a Automatable is-a Evoral::ControlSet
After VCA's d'tor completes ~Automatable runs and emits signal to
DropReferences of all master-controls.
This in turn calls SlavableAutomationControl::master_going_away()
for slaved parameters for the given master-control
In ::master_going_away() the weak-pointer reference to the master's
AutomationControl (owned by the destroyed VCA) is still valid.
Execution is in the d'tor of Automatable which is-a ControlSet and
the ContolSet keeps a reference to the Control and hence also to the
AutomationControl which is-a Evoral::Control.
So master_going_away() locks a boost::shared_ptr<ARDOUR::AutomationControl>
which is actually the MuteControl owned by the VCA.
It calls SlavableAutomationControl::remove_master() which
in turn calls MuteControl::pre_remove_master() which uses the
MuteMaster API to retrieve the value. The MuteMaster however is the
VCA that has just been destroyed.
The solution is twofold:
1) emit "drop_references" from the VCA d'tor itself,
before the VCA is destroyed.
2) disconnect a slaved control from the master's drop_references signal
when un-assigning a master-control.
Keep Pannable::value_as_string() for now. That is another inconsistency
which needs cleaning up. GUI StereoPanner and MonoPanner print
the value as they see fit, the panner-plugin provided formatting
is not used.
Probably due to historical reasons, there are two APIs to format a
control's value. In all both variants end up calling either
ARDOUR::value_as_string() or the Controllable's formatting function
(except for panners).
TempoMap::get_grid() supplies a list of beat positions, leaving the lines
to work out any subdivision positions.
This is fine, unless a tempo section falls in between beats.
Use a BeatsFramesConverter along with a quarter note position
(in the BBTPointsList) to make this easier.
Previously there were large spurious spikes in the signal when
the bandwidth parameter was adjusted on a pure sine tone
for the peaking circuits. This has been *greatly* reduced if not
eliminated by fixing a typo in two of the equations.
If the parameters change too slowly the filter may never get updated. Indeed,
in spite of v_f0, v_g or v_bw being updated, set_params may never be called,
thus v_filter never updated.
Useful as temporary buffer: This allows a controllable to
get a master's automation-curve and combine it with its own
(gain, trim, send) automation buffer.
* Depending on individual strips to watch the selection property is prone to failure.
* Stripable_selection_changed() is called when a selection operation is completed.
Basically, libardour is calling functions from libardour_cp and vice versa. For example, libardour needs 'ARDOUR::ControlProtocol::name()' whereas ardour_cp needs 'ARDOUR::Route::soloed()' and various others. Ordinarily, this would require each library to get built before the other one! :-(
To get around this (in MSVC at least) one of the libraries must be forced to use late binding (e.g. by declaring its functions as 'virtual'). It looks like this is already being done for most of the other functions from 'ARDOUR::ControlProtocol', so let's do it for this function too...
With large sample-rates and high-zoom-level the minimal request-size
or at least 1/10sed can exceed the max image size supported by cairo.
e.g. @192kSPS; 100ms = 19200 samples.
* 1 sample/pixel, * 2 (left/right) = 38400px > 2^15px.
* consistent hpf/lpf controllables (actually hi/lo bell in 32C)
* HPT, LPF frequencies are exposed as EQ band
* don't expose filter ctrl for mixbuses/master
Loading a read only Session then making a copy with Save As and switch was
not allowing new Session to be saved as writable state was not updated.
Resolves: #7352
The Editor continues to notify them, but via a direct call to ControlProtocolManager, not a signal.
The CP Manager calls the ControlProtocol static method to set up static data structures holding
selection info for all surfaces and then notifies each surface/protocol that selection has changed.