Stereo send-gain processor for keeping an effect return out of the way of a source or sidechain signal. More...
#include <auto_ducked_send.hpp>
Classes | |
| struct | Config |
Public Types | |
| using | DetectorMode = typename EnvelopeFollowerT<SampleType>::Mode |
Public Member Functions | |
| AutoDuckedSendStatus | prepare (SampleType sample_rate) noexcept |
| AutoDuckedSendStatus | configure (const Config &next) noexcept |
| Atomically adopts a complete valid configuration. | |
| std::array< SampleType, 2 > | process (SampleType send_left, SampleType send_right, SampleType detector_left, SampleType detector_right) noexcept |
| Process a stereo send and an independent stereo detector sample. | |
| void | process_block (const SampleType *send_left, const SampleType *send_right, const SampleType *detector_left, const SampleType *detector_right, SampleType *output_left, SampleType *output_right, int num_samples) noexcept |
| Out-of-place or in-place block processing. | |
| void | process_block (SampleType *send_left, SampleType *send_right, const SampleType *detector_left, const SampleType *detector_right, int num_samples) noexcept |
| Convenience in-place block path for the send buffers. | |
| void | set_bypassed (bool bypassed) noexcept |
| bool | bypassed () const noexcept |
| void | reset () noexcept |
| const Config & | config () const noexcept |
| bool | prepared () const noexcept |
| SampleType | sample_rate () const noexcept |
| std::array< SampleType, 2 > | detector_envelope () const noexcept |
| std::array< SampleType, 2 > | current_gain_db () const noexcept |
| std::array< GainReduction, 2 > | gain_reduction () const noexcept |
Static Public Member Functions | |
| static SampleType | gain_computer_db (SampleType detector_level_db, const Config &config) noexcept |
| Pure memoryless detector-level-to-send-gain transfer function. | |
| static constexpr int | latency_samples () noexcept |
| static constexpr int | tail_samples () noexcept |
Static Public Attributes | |
| static constexpr SampleType | kMinThresholdDb = SampleType{-160} |
| static constexpr SampleType | kMaxThresholdDb = SampleType{24} |
| static constexpr SampleType | kMaxRangeDb = SampleType{96} |
| static constexpr SampleType | kMinSendGainDb = SampleType{-160} |
| static constexpr SampleType | kMaxSendGainDb = SampleType{24} |
| static constexpr SampleType | kMaxSampleRate = SampleType{1536000} |
Stereo send-gain processor for keeping an effect return out of the way of a source or sidechain signal.
The detector envelope is converted to a 1:1 attenuation above threshold, capped by range_db. send_gain_db is then applied independently of that attenuation. This object processes the wet/send input only: it neither accepts nor mixes a dry signal, and it owns no delay, effect, or routing policy. A caller mixes the returned send with dry audio elsewhere.
prepare() and configure() belong at a control-thread retiming point. Once prepared, scalar/block processing, bypass, reset, and inspection are bounded, lock-free, allocation-free, and exception-free. Bypass and the neutral gain setting return every finite send sample bit-exactly while the detector continues to advance.
| using pulp::signal::AutoDuckedSendT< SampleType >::DetectorMode = typename EnvelopeFollowerT<SampleType>::Mode |
|
inlinenodiscardnoexcept |
|
inlinenodiscardnoexcept |
|
inlinenodiscardnoexcept |
Atomically adopts a complete valid configuration.
Rejection preserves both the previous configuration and all detector history.
|
inlinenodiscardnoexcept |
|
inlinenodiscardnoexcept |
|
inlinestaticnodiscardnoexcept |
Pure memoryless detector-level-to-send-gain transfer function.
|
inlinenodiscardnoexcept |
|
inlinestaticnodiscardconstexprnoexcept |
|
inlinenodiscardnoexcept |
|
inlinenodiscardnoexcept |
|
inlinenodiscardnoexcept |
Process a stereo send and an independent stereo detector sample.
Linked mode derives one control value from max(abs(L), abs(R)); detector polarity therefore cannot cancel. Independent mode controls each send channel from the corresponding detector channel.
|
inlinenoexcept |
Out-of-place or in-place block processing.
The output may alias the matching send input. Detector buffers must not alias either output.
|
inlinenoexcept |
Convenience in-place block path for the send buffers.
|
inlinenoexcept |
|
inlinenodiscardnoexcept |
|
inlinenoexcept |
|
inlinestaticnodiscardconstexprnoexcept |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |