PBD::IgnorableControllable() is no longer used.
It also was problematic, because in every case where a
Controllable is required, min/max range and usually also
get/set value are significant.
This cleans up various issues that have been accumulated over the past
and fixes bugs introduced in d4e023e1 and e31f5d99.
Previously GainControl as saved as part of the Amp, however the
automation was saved via Send (is-a Automatable).
In d4e023e1cb, the GainControl was changed a "BusSendLevel"
parameter, but AutomationList was not updated. This prevented
loading existing automation (control parameter was not found).
So far this is only used for MIDI, missing audio files are
already handled by asking a user to locate them.
The same approach doesn't work for MIDI, since there cannot be
externally referenced (embedded) .mid files (since MIDI is destructive).
This fixes a crash: missing playlist due to missing .mid,
and retains regions for missing MIDI files.
As opposed to missing Audio, we cannot use a SilentFileSource,
because MIDI files are destructive.
This also adds an API to query missing files that have been replaced
with silence to report them to the user.
This API is not official, and the upcoming official API differs.
The source-code is left in-place since most of it will be
re-usable as-is, regardless.
This fixes the following (loop-lennth > internal_playback_seek
length. Due to read-ahead on some cycles the following can happen
---
Loop From: 3528000 To: 3880800 (len: 352800)
start-sample: 3880971 playback_sample: 3528171 nframes: 96
start-sample: 3880875 playback_sample: 3528075 nframes: 192
---
which resulted in disk_samples_to_consume == 0;
This is required to toggle the strip to revert from aux-view
to the main route using the aux-send processor itself.
Discuss:
Perhaps this should be reverted, and ProcessorBox::edit_aux_send()
be removed: It is currently possible to create various
inconsistent mixer-states.
* use "Aux" on a Bus, then double-click some Internal-Send to
revert strips. But Aux remains active
* Removing sends while "Aux" is active does not disable Aux.
If the processor box was insensitive those issues won't be present.
However it is convenient to use double-click on the editor-mixer to
access a send's panner ...
* add an option to the controller configuration gui
to assign the 3x2 send banks in mixer mode
to either the upper (1-6) or lower (7-12) Mixbus sends
* This was a user request to better support the workflow
of the CoMondo Mix system
[Re]name sidechain port directly when a plugin is added.
Usually plugins are constructed without an Route (owner is unset).
PluginInsert c'tor may already create a side-chain port, at the
time of construction the sidechain port will be created using
the port-name "toBeRenamed".
Previously the plugin had to be added to a route using "add_processor",
in order to set a unique name, before a new plugin with sidechain
could be constructed.
ProcessorBox::use_plugins() did that in the correct sequence,
however there may have been cases where this didn't work, and
Route::add_processors() was called directly..
Exponential approach to zero:
1 / exp(t) == exp (-t)
we "stretch" it by a time-constant "c":
gain(t) = exp (-t * c)
To find the time t, at which the exponential approach reaches gain "g":
exp (-c * t) = g
take the log of both sides: log (exp (-c * t) = log (g)
since log (exp (x)) == x : -c t = log (g)
divide by -c : t = -log (g) / c
set g = 1e-5 and c = _a/sr and we get: t = -log (1e-5) / (_a/sr)
The iterative approach using g += c * (target_gain - g);
converges faster than the exact exp() calculation.
Except with 32-bit float, if target-gain is 1.0f and "c" is small.
With 32bit float (1.0 - 1e-5) = .9999900 is represented as
sign: +1 | mantissa: 0x7fff58 | exponent: 126
there are only 126 "steps" to 1.0. Rounding of the lowest
mantissa bit does matter. We have to assume worst-case,
and increase the required loop_fade_length buffersize.
vs. approaching 0, where there are over 2^110 steps between
zero and 1e-5.
If use_transport_fades() is false, then the declick_amp will have its gain always set to the current target (no declick).
Therefore only testing if it has reached zero is not enough, we need to check if we are declicking at all.
If there's no GUI property for the MIDNAM model name, and the plugin has no MIDNAM, there's no reason to set the property to the default
It will pick up the default ("Generic") during update_patch_selector() calling into model_changed
Attempt to re-use GUI property for MIDNAM device mode, and if it doesn't exist, use the first from the model's device mode list.
Also require at least one device mode in the MIDNAM file (via assert) - consider anything else to be malformed
We do not store the MIDNAM model as a GUIObject property if the using the plugin-provided MIDNAM. Selecting a different MIDNAM for
the plugin should now result in that choice being saved/restored correctly.
This all feels crazily complicated, but I don't want to change more of the architecture at this time