|
DSPark 1.9.0
Header-only C++20 DSP for real-time and offline audio
|
High-fidelity modular compressor designed for real-time applications. More...
#include <Compressor.h>

Classes | |
| struct | AsymDrift |
| One channel's walk: smoothed draws, followed in a line between them. More... | |
| struct | BalanceBands |
| State of the two bands the balance of one channel's key is read from. More... | |
| struct | CharacterProfile |
| What makes a character: the numbers one engine reads. More... | |
| struct | ChunkParams |
| Parameter values of a block whose smoothers are settled. More... | |
| struct | FeedbackLaw |
| Element law result: static target (dB, <= 0) and its |slope|. More... | |
| struct | FeedbackSolve |
| Semi-implicit solve result: stepped gain and the law's target. More... | |
| struct | FeedForwardConfig |
| Per-block routing of the feed-forward block path. More... | |
| struct | GainPathConfig |
| Per-block routing of the gain path (see gainPath()). More... | |
| struct | InterpHistory |
| History of the key of one channel, mirrored so its window is contiguous. More... | |
| struct | Layers |
| What the two layers of a layered character ask for at a level (dB). More... | |
| struct | LookaheadRamp |
| The lookahead as a ramp (LookaheadShape::Ramp). More... | |
| struct | LoopCoeffs |
| Coefficients of one step of the semi-implicit loop. More... | |
| struct | MakeupModelKey |
| Everything the analytic makeup depends on: it is worked out again only when one of these changes. More... | |
| struct | ProgramCoeffs |
| The two coefficients of a frame. More... | |
| struct | ProgramState |
| State of one gain computer under programme-dependent timing. More... | |
| struct | ProgramTiming |
| The weights of a block (zero where the routing leaves the times fixed). More... | |
| struct | SlidingDeepest |
| The deepest gain change of a sliding window (HoldMode::EveryPeak). More... | |
Public Types | |
| enum class | DetectorType { Peak , Rms , TruePeak , SplitPolarity , Hilbert , Hybrid } |
| Level detection methodologies. More... | |
| enum class | Topology { FeedForward , FeedBack } |
| Signal routing topology for the detector sidechain. More... | |
| enum class | Character { Clean , Opto , FET , Varimu , Layered } |
| Time-constant behavior and release curve shape. More... | |
| enum class | Mode { Downward , Upward , Both , Leveler } |
| Processing direction. More... | |
| enum class | CleanBallistics { Branching , Decoupled } |
| Ballistics of the Clean character in feed-forward (see setCleanBallistics). More... | |
| enum class | AutoMakeupMode { Off , Static , Adaptive , Analytic } |
| Automatic makeup-gain behavior (Static and Adaptive apply in Downward mode). More... | |
| enum class | Precision { Standard , High } |
| How finely the control signal is computed (see setPrecision()). More... | |
| enum class | LinkMode { Loudest , Dominant } |
| What the linked level of a stereo pair reads (see setLinkMode()). More... | |
| enum class | Route { Stereo , MidSide , Mid , Side , MidKeysSide , SideKeysMid } |
| What of a stereo pair the compressor works on (see setRoute()). More... | |
| enum class | LookaheadShape { Lead , Ramp } |
| How the lookahead brings a reduction in (see setLookaheadShape()). More... | |
| enum class | RangeShape { Corner , Asymptotic , Local } |
| How the gain change meets the range (see setRangeShape()). More... | |
| enum class | StagePosition { Off , Before , After } |
| Where the analog colour stage sits (see setCharacterStage()). More... | |
| enum class | HoldMode { Deepest , EveryPeak } |
| What the hold keeps (see setHoldMode()). More... | |
| enum class | OptoCell { TwoStage , ThreeStage } |
| The optical cell of the Opto character (see setOptoCell()). More... | |
| using | StageSettings = typename CharacterStage< T >::Settings |
| The settings of the colour stage (Core/CharacterStage.h). | |
| using | KeyEq = KeyEqualizer< T, 16 > |
| The equalizer of the key (see setSidechainBand()). | |
| using | KeyBand = typename KeyEq::Band |
| The settings of one band of the key equalizer. | |
| using | KeyShape = typename KeyEq::Shape |
| What a band of the key equalizer does. | |
| using | KeyPlacement = typename KeyEq::Placement |
| The part of a two-channel key a band of the key equalizer acts on. | |
Public Member Functions | |
| ~Compressor ()=default | |
| void | prepare (const AudioSpec &spec) |
| Allocates buffers and initializes internal DSP state. | |
| void | prepare (double sampleRate) noexcept |
| Prepares the compressor using sample rate only (backward compatibility). | |
| void | processBlock (AudioBufferView< T > buffer) noexcept |
| Processes an audio buffer in-place using its own signal as the sidechain. | |
| void | processBlock (AudioBufferView< T > audio, AudioBufferView< T > sidechain) noexcept |
| Processes audio with an independent external sidechain. | |
| T | processSample (T input, int channel) noexcept |
| Processes a single sample on one channel. | |
| void | reset () noexcept |
| Resets all internal DSP history, states, and buffers to neutral. | |
| void | setThreshold (T dB) noexcept |
| Sets the compression threshold in dB. | |
| void | setRatio (T ratio) noexcept |
| Sets the compression ratio (1.0 = off, >20.0 = limiting). | |
| void | setAttack (T ms) noexcept |
| Sets the attack time in milliseconds. | |
| void | setRelease (T ms) noexcept |
| Sets the release time in milliseconds (clamped to >= 1 ms: below that the envelope stops smoothing at all and the gain path degenerates into a waveshaper). | |
| void | setKnee (T dB) noexcept |
| Sets knee width in dB (0 = hard knee, >0 = soft knee). | |
| void | setMakeupGain (T dB) noexcept |
| Sets manual static makeup gain in dB. | |
| void | setAutoMakeup (AutoMakeupMode mode) noexcept |
| Selects the automatic makeup behavior (default: Off). | |
| void | setAutoMakeup (bool on) noexcept |
| Convenience overload: true selects Adaptive, false turns auto makeup off. | |
| void | setMode (Mode mode) noexcept |
| Sets the curve of the gain computer (Downward, Upward, Both or Leveler). | |
| void | setLift (T belowDb, T ratio, T rangeDb) noexcept |
| Sets the upward half of Mode::Both: what lies under a second, lower threshold is raised. | |
| T | getLiftBelow () const noexcept |
| Distance of the lower threshold of Mode::Both under the main one, in dB (setLift()). | |
| T | getLiftRatio () const noexcept |
| Ratio of the rise of Mode::Both (setLift()). | |
| T | getLiftRange () const noexcept |
| The most Mode::Both raises, in dB (setLift()). | |
| void | setStereoLink (T amount) noexcept |
| Sets stereo linking amount (0.0 = unlinked dual mono, 1.0 = fully linked). | |
| void | setLinkMode (LinkMode mode) noexcept |
| Chooses how a stereo pair is linked. | |
| LinkMode | getLinkMode () const noexcept |
| void | setRoute (Route route) noexcept |
| Chooses what of a stereo pair is compressed, and from which part of the key. | |
| Route | getRoute () const noexcept |
| What of a stereo pair is compressed (setRoute()). | |
| void | setMidSideFocus (T focus) noexcept |
| In Route::MidSide, how the compression leans to the middle or to the sides, -1 to 1: at 0 (the default) each part takes its whole gain; toward -1 the sides take less of theirs (their reduction and makeup in decibels scaled by 1 + focus), at -1 only the middle is compressed and the sides come out as they went in; toward 1 the same for the middle. The detectors and the gain loop are those of the route, so the focus sweeps without a step: it moves across each block, sample by sample. Non-finite values are ignored. State key "midSideFocus" (absent = 0). | |
| T | getMidSideFocus () const noexcept |
| void | setMix (T dryWet) noexcept |
| Sets dry/wet balance for parallel (New York) compression (1.0 = fully wet). | |
| void | setLookahead (T ms) noexcept |
| Sets lookahead time in ms (0 = off, max = 10ms). | |
| void | setMaxLookahead (T ms) noexcept |
| Keeps a latency of its own for the lookahead, so the lookahead can move without the latency changing. | |
| T | getMaxLookahead () const noexcept |
| The latency kept for the lookahead, in ms (0: none; see setMaxLookahead()). | |
| void | setLookaheadShape (LookaheadShape shape) noexcept |
| Chooses how the lookahead brings a reduction in (Lead by default). | |
| LookaheadShape | getLookaheadShape () const noexcept |
| void | setFeedbackKeyed (bool on) noexcept |
| In FeedBack, runs the loop on the key ahead of the audio. | |
| bool | isFeedbackKeyed () const noexcept |
| void | setAutoThreshold (bool on) noexcept |
| Makes the threshold count from the key's own recent peak instead of from full scale. | |
| bool | isAutoThreshold () const noexcept |
| Whether the threshold counts from the key's recent peak (setAutoThreshold()). | |
| T | getThresholdInUseDb () const noexcept |
| The threshold in use, in dBFS (metering; any thread): the set one, or with setAutoThreshold() the key's recent peak plus it. | |
| void | setAmount (T amount) noexcept |
| Sets how much of the gain change is applied, as a scale of its decibels. | |
| T | getAmount () const noexcept |
| The share of the gain change that is applied (setAmount()). | |
| void | setSoftRange (bool on) noexcept |
| Makes the gain change approach the range without a corner. | |
| bool | isSoftRange () const noexcept |
| Whether the gain change meets the range without a corner (setSoftRange(), setRangeShape()). | |
| void | setRangeShape (RangeShape shape) noexcept |
| Selects how the gain change meets the range. | |
| RangeShape | getRangeShape () const noexcept |
| How the gain change meets the range (setRangeShape()). | |
| void | setPrecision (Precision precision) noexcept |
| Selects how finely the control signal is computed (default: Standard). | |
| Precision | getPrecision () const noexcept |
| How finely the control signal is computed (see setPrecision()). | |
| void | setCharacterStage (StagePosition position) noexcept |
| Puts an analog colour stage before or after the compression. | |
| StagePosition | getCharacterStage () const noexcept |
| Where the colour stage sits (see setCharacterStage()). | |
| void | setCharacterStageSettings (const StageSettings &settings) noexcept |
| Sets drive, emphasis, asymmetry, drift, sag and noise of the colour stage. Any thread. | |
| StageSettings | getCharacterStageSettings () const noexcept |
| The settings of the colour stage. | |
| void | setProgramRelease (T amount) noexcept |
| Makes the release depend on how long the compressor has been working. | |
| T | getProgramRelease () const noexcept |
| Weight of the programme-dependent release (see setProgramRelease()). | |
| void | setAdaptiveAttack (T amount) noexcept |
| Makes the attack depend on how far the target is. | |
| T | getAdaptiveAttack () const noexcept |
| Weight of the target-dependent attack (see setAdaptiveAttack()). | |
| void | setSpectralTiming (T amount) noexcept |
| Makes attack and release follow the spectral balance of the key. | |
| T | getSpectralTiming () const noexcept |
| Weight of the spectral balance on the times (see setSpectralTiming()). | |
| void | setAttackEmphasis (T amount) noexcept |
| Deepens or softens the gain change while it attacks. | |
| T | getAttackEmphasis () const noexcept |
| Emphasis of the attack (see setAttackEmphasis()). | |
| void | setDetector (DetectorType type) noexcept |
| Changes the level detection algorithm (Peak, RMS, TruePeak, SplitPolarity, Hilbert, Hybrid). | |
| void | setHoldTime (T ms) noexcept |
| Sets the gain-reduction hold time. | |
| void | setHoldMode (HoldMode mode) noexcept |
| Chooses what the hold keeps (Deepest by default). | |
| HoldMode | getHoldMode () const noexcept |
| void | setRange (T dB) noexcept |
| Limits the maximum gain change the compressor may apply. | |
| void | setTopology (Topology topo) noexcept |
| Changes signal routing topology (FeedForward or FeedBack). | |
| void | setCharacter (Character type) noexcept |
| Changes ballistics and envelope behavior character. | |
| void | setOptoCell (OptoCell cell) noexcept |
| Chooses how the cell of the Opto character remembers. | |
| OptoCell | getOptoCell () const noexcept |
| void | setCharacterColor (T amount) noexcept |
| Sets the amount of the character's harmonic signature (0 to 1). | |
| void | setGainSmoothing (T ms) noexcept |
| Smooths the gain after the ballistics (milliseconds; 0, the default, is off). | |
| T | getGainSmoothing () const noexcept |
| The smoothing of the gain after the ballistics, in milliseconds. | |
| void | setReleaseLanding (T ms) noexcept |
| Makes the last decibels of a release come back slowly (milliseconds; 0, the default, is off). | |
| T | getReleaseLanding () const noexcept |
| The landing of the release, in milliseconds (setReleaseLanding()). | |
| void | setControlNetwork (T depthDb, T cornerHz=T(10)) noexcept |
| A lead-lag network in the control path: only a part of each fast move of the gain is applied at once. | |
| T | getControlNetworkDepth () const noexcept |
| Depth of the network in the control path, in dB (setControlNetwork()). | |
| T | getControlNetworkCorner () const noexcept |
| Corner of the network in the control path, in Hz (setControlNetwork()). | |
| void | setReductionTone (T lowDb, T highDb) noexcept |
| Makes the tone change with the reduction. | |
| T | getReductionToneLow () const noexcept |
| Gain under 200 Hz of the tone that follows the reduction, in dB (setReductionTone()). | |
| T | getReductionToneHigh () const noexcept |
| Its gain over 4 kHz, in dB. | |
| void | setControlLeak (T amount) noexcept |
| Lets the moves of the gain leak into the audio as low thumps (0, the default, is off). | |
| T | getControlLeak () const noexcept |
| How much of the moves of the gain leaks into the audio (setControlLeak()). | |
| void | setDetectorAsymmetry (T amount) noexcept |
| Makes the detector read the two halves of the wave differently (0, the default, is off). | |
| T | getDetectorAsymmetry () const noexcept |
| How differently the detector reads the two halves of the wave (setDetectorAsymmetry()). | |
| void | setDetectorDrift (T amount) noexcept |
| Lets the detector's asymmetry wander slowly at random, as the balance of a rectifier does with its temperature (0, the default, holds it still). | |
| T | getDetectorDrift () const noexcept |
| How far the detector's asymmetry wanders (setDetectorDrift()). | |
| void | setCleanBallistics (CleanBallistics mode) noexcept |
| Selects the Clean character's feed-forward ballistics. | |
| CleanBallistics | getCleanBallistics () const noexcept |
| Returns the Clean character's feed-forward ballistics. | |
| T | getCharacterColor () const noexcept |
| Returns the character colour amount (see setCharacterColor). | |
| void | setSidechainHPF (bool enabled, T cutoffHz=T(80)) noexcept |
| Toggles the internal sidechain high-pass filter. | |
| void | setSidechainBand (int band, const KeyBand &settings) noexcept |
| Sets a band of the equalizer of the key. | |
| KeyBand | getSidechainBand (int band) const noexcept |
| The settings of a band of the key equalizer. | |
| KeyEq::Response | getSidechainResponse () const noexcept |
| The curve of the key equalizer, for a display: build it when the bands change and read each frequency from it. | |
| void | setSidechainListen (bool on) noexcept |
| Plays the key instead of the compressed audio. | |
| bool | isSidechainListen () const noexcept |
| Whether the key is being played instead of the audio. | |
| void | setRemovalListen (bool on) noexcept |
| Removal listen: the output is what the compression takes out, the aligned input minus the compressed signal before the makeup gain (the mix does not apply). A monitoring control, not in the state. | |
| bool | isRemovalListen () const noexcept |
| void | setRmsWindow (T ms) noexcept |
| Sets the RMS analysis window size in milliseconds. | |
| T | getGainReductionDb () const noexcept |
| Returns current active gain reduction in dB (negative value). | |
| DetectorType | getDetector () const noexcept |
| Returns the currently active detector type. | |
| Topology | getTopology () const noexcept |
| Returns the currently active topology. | |
| Character | getCharacter () const noexcept |
| Returns the currently active character. | |
| int | getLatency () const noexcept |
| Returns total processing latency in samples. | |
| std::vector< uint8_t > | getState () const |
| Serializes the parameter state (setup/UI threads; allocates). | |
| bool | setState (const uint8_t *data, size_t size) |
| Restores parameters from a blob (tolerant; rejects foreign ids). | |
Static Public Attributes | |
| static constexpr double | kReductionToneLowHz = 200.0 |
| Corner of the low shelf of the tone that follows the reduction, in Hz (setReductionTone()). | |
| static constexpr double | kReductionToneHighHz = 4000.0 |
| Corner of its high shelf, in Hz. | |
| static constexpr int | kKeyBands = KeyEq::kBands |
| Bands of the key equalizer. | |
Protected Types | |
| enum class | Colour { None , SecondOrder , PushPull } |
| The harmonic signature a character can add (setCharacterColor()). More... | |
Protected Member Functions | |
| void | processBlockImpl (AudioBufferView< T > audio, AudioBufferView< T > sidechain) noexcept |
| Core DSP loop executing sidechain detection, linking, ballistics, and gain application. | |
| void | processFeedForward (AudioBufferView< T > &audio, AudioBufferView< T > &sidechain, int nCh, int nS, int scCh, const FeedForwardConfig &ff, const ChunkParams &constants) noexcept |
| Feed-forward block path, run in passes over chunks of frames. | |
| void | copyGainStateFromChannel0 (int nCh) noexcept |
| Copies channel 0's gain-computer state to channels [1, nCh). | |
| void | runGainRecursion (T *inDb, T *out, int m, int ch, const FeedForwardConfig &ff, const T *thr, const T *rat, const T *kn, const T *dryIn, const double *balance) noexcept |
| The serial part of the feed-forward path for one gain channel: Upward guard, static curve, hold/range and ballistics over a chunk, with the channel's state held in locals. | |
| T | gainPath (T inputDb, int ch, const GainPathConfig &cfg, T thresh, T ratio, T knee) noexcept |
| Static curve plus character ballistics for one channel's state. | |
| T | partWeight (int ch, int idx, int n) const noexcept |
| void | applyGain (AudioBufferView< T > &audio, int ch, int i, T gainLin, T grDb, int activeLookahead, Character charType, T colorAmt, T makeupLin, T mixVal, T outLin) noexcept |
| Applies the frame's gain to one channel: lookahead, FET colour, feedback history, makeup and the parallel mix. | |
| void | updateTimeConstants (T fs) noexcept |
| Pre-calculates recursive exponential decay coefficients. | |
| T | applyHoldAndRange (T targetGR_Db, int ch) noexcept |
| Applies the hold and range stages to the static gain target (dB). | |
| T | rampedIn (T grDb, int g, int length, bool run) noexcept |
| A gain change through the lookahead's ramp of its gain computer, or as it came. | |
| SlidingDeepest * | holdWindow (int ch) const noexcept |
| T | makeupToGain (T makeupDb) noexcept |
| Makeup dB to linear, cached: the makeup is shared by every channel of a frame and constant unless automated or adaptive. Same value as a direct decibelsToGain() call. | |
| double | linkCorrelation (T keyL, T keyR) noexcept |
| void | flushLinkCovariance () noexcept |
| T | detectLevel (T sample, int ch, DetectorType detType) noexcept |
| Computes level detection in Decibels. | |
| T | detectLevelLinear (T sample, int ch, DetectorType detType) noexcept |
| Computes the detected level as a linear magnitude (>= 0). | |
| void | runStage (CharacterStage< T > &stage, double &weight, bool wanted, AudioBufferView< T > buffer) noexcept |
| Runs one place of the colour stage over a block, fading its share towards whether it is wanted (20 ms). Idle, it costs nothing; it starts from clean memory when it comes in. | |
| T | computeGain (T inputDb, T thresh, T ratio, T knee, Character charType, Mode modeType, T guardDb) const noexcept |
| Calculates static target gain reduction based on knee and ratio. | |
| T | lift (T inputDb, T thresh, T knee, T guardDb) const noexcept |
| The upward half of Mode::Both: the rise under the lower threshold, up to its range. | |
| double | layeredStep (T inputDb, T thresh, T ratio, T knee, const CharacterProfile &profile, T range, int holdN, int soft, T &held, int &counter, double &level, double &peak, SlidingDeepest *window=nullptr) const noexcept |
| One frame of a layered character: hold and range on the whole target, each layer towards its part of it, and their sum. | |
| void | syncLayerState (bool layered) noexcept |
| Seats the two layers on the gain as it stands when a layered character engages. Audio thread only. | |
| bool | syncAudioPath () noexcept |
| Takes the settings of the audio path that are not the plain gain (the tone that follows the reduction, the leak of the control, the asymmetry of the detector). Audio thread only. | |
| bool | lopsidedDetector () const noexcept |
| Whether the detector reads the two halves of the wave differently (an asymmetry or its drift). | |
| T | gained (T input, T gain, int ch) noexcept |
| The gain on one sample of a channel when it is not a plain product: through the tone that follows the reduction, and with what leaks of the control. | |
| T | asymmetric (T key, int ch) noexcept |
| The key with a share of its own crest added, scaled so that the half the share favours still reads the crest. | |
| bool | shapesGain () const noexcept |
| Whether anything stands between the ballistics and the gain: the landing, the network or the smoothing. | |
| T | smoothedGain (T grDb, int ch) noexcept |
| One frame of what stands between the ballistics and the gain on a channel (dB): the landing of the release, the network of the control path and the two smoothing sections, those that are on. | |
| void | syncGainSmoothing (bool) noexcept |
| Seats each of those stages on the gain as it stands when it engages. Audio thread only. | |
| T | computeGainUpward (T inputDb, T thresh, T ratio, T knee, T guardDb) const noexcept |
| Upward compression curve calculation. | |
| FeedbackLaw | computeGainFeedback (T outDb, T thresh, T ratio, T knee, Character charType) const noexcept |
| Feedback target for detectors with memory (explicit path). | |
| FeedbackSolve | solveFeedbackGain (T inDb, T k, T effB, T thresh, T ratio, T knee, Character charType) const noexcept |
| Solves one feedback ballistics step against the current input. | |
| T | applyBallisticsFeedbackImplicit (T inDb, int ch, Character charType, T thresh, T ratio, T knee) noexcept |
| Feedback ballistics with the loop resolved semi-implicitly. | |
| T | stepImplicit (T inDb, int ch, Character charType, T thresh, T ratio, T knee, const LoopCoeffs &coeffs) noexcept |
| One step of the semi-implicit loop on the channel's envelopes: the blended gain it leaves, before hold and range. | |
| T | boundImplicit (T shown, int ch) noexcept |
| Hold and range of the semi-implicit loop. | |
| T | applyBallistics (T targetGrDb, int ch, bool splitAdaptive, T loopSlope=T(-1), double loopDelay=0.0) noexcept |
| Smooths the static gain target with the active character's ballistics. | |
| double | ballisticsStep (double tgt, double &fast, double &slow, double &mid, double &deep, double attCoeff, double relCoeff) const noexcept |
| Branching ballistics on explicit state (shared by both block paths): the fast envelope, plus the Opto/FET memory stage. | |
| double | ballisticsCore (double tgt, double &fast, double &slow, double &mid, double &deep, double attCoeff, double relCoeff, double chargeCoeff, double slowRelCoeff, double midChargeCoeff, double midRelCoeff) const noexcept |
| ballisticsStep() with the coefficients of the memory stage given too. | |
| void | syncAdaptiveMakeup (bool adaptive) noexcept |
| The adaptive makeup envelope only runs while adaptive makeup is active; when it engages it starts from the current gain change (the settled value of a tracker that had kept running). Audio thread only. | |
| double | feedbackDetectorDelay (DetectorType detType) const noexcept |
| Delay of the detector as an explicit feedback loop sees it, in samples: the RMS window (its reading of a level step completes one window later). The other detectors respond within a few samples, which the base cap of the loop advance already covers. | |
| bool | useDecoupled (Character charType, Topology topoEff) const noexcept |
| The Clean character in feed-forward runs the decoupled detector when setCleanBallistics() selected it. | |
| void | syncDecoupledState (bool decoupled) noexcept |
| Seats the decoupled hold stage on the current gain when the decoupled path engages (character or topology change), so the switch does not replay a stale hold value. Audio thread only. | |
| T | applyBallisticsDecoupled (T targetGrDb, int ch, bool splitAdaptive) noexcept |
| Decoupled ballistics for the Clean character in feed-forward operation (after the smooth decoupled peak detector of Giannoulis, Massberg and Reiss, JAES 2012). | |
| double | decoupledStep (double tgt, double &hold, double &fast, double holdCoeff) const noexcept |
| One decoupled step on explicit state (see applyBallisticsDecoupled). | |
| bool | usePrecision (Topology topoEff, bool fbImplicit, bool splitAdaptive) const noexcept |
| Whether the control signal runs at Precision::High with this routing: feed-forward, and feedback solved against the input. | |
| void | syncPrecisionState (bool precise) noexcept |
| Seats the history of the precise path when it engages: it starts from the gain that is sounding and from silence at the detector. Audio thread only. | |
| void | detectorPoints (T sample, int ch, T *points) noexcept |
| The rectified key at kDetectorPoints points per sample. | |
| T | heldBack (T grDb, int g, double delay, bool run) noexcept |
| The gain as it is heard with a latency kept for the lookahead: older by the difference (see setMaxLookahead()). | |
| double | slideGainDelay (int target) noexcept |
| The delay of the gain line this frame. It slides to its target kGainDelaySlide of a sample per sample, so a lookahead that moves inside the latency kept for it leaves no step in the gain (the first frame after prepare() or reset() starts at the target). | |
| T | gainPathPrecise (const T *levelDb, int count, int ch, const GainPathConfig &cfg, T thresh, T ratio, T knee) noexcept |
| The gain of one frame at Precision::High, for one gain computer. | |
| ProgramTiming | programTiming (Character charType, Topology topoEff, bool decoupled, bool splitAdaptive) const noexcept |
| The weights for this routing: the Clean and Varimu characters in feed-forward with Branching ballistics. | |
| void | syncProgramState (bool active) noexcept |
| Seats the measures on the gain that is sounding when the programme-dependent timing engages. Audio thread only. | |
| void | balanceBands (T key, int ch, double &lowSq, double &highSq) noexcept |
| Feeds one channel's key to the two bands of the balance and adds their squares to the frame's. | |
| double | balanceAdvance (double lowSq, double highSq) noexcept |
| Smooths the frame's two powers and returns the balance of the key: -1 all low, +1 all high, 0 the same in both (or silence). | |
| ProgramCoeffs | programCoeffs (double target, double fast, ProgramState &state, double balance, double share) const noexcept |
| The attack and release coefficients of a frame under programme-dependent timing, and the advance of its measures. | |
| double | programShape (double gain, ProgramState &state) const noexcept |
| The gain with the emphasis of the attack: what it is under its own smoothed course while it falls, added again (or taken off). | |
| double | programStep (double target, double &fast, ProgramState &state, double balance) const noexcept |
| One step of the branching follower with programme-dependent timing (the single envelope of Clean and Varimu). | |
| T | analyticMakeupDb (Character charType, Mode modeType, DetectorType detType, bool decoupled, bool loop) noexcept |
| Target of the analytic makeup, in dB, for a routing that is already known (the solve only runs when a setting changed). | |
| T | analyticTarget () noexcept |
| Target of the analytic makeup for the settings as they stand (0 dB when another makeup mode is selected). | |
| T | solveMakeupModel (const MakeupModelKey &key) const noexcept |
| The analytic makeup: minus the gain the ballistics settle on over dense programme. | |
| void | updateHpfCoefficients () noexcept |
| Updates the normalized DC-blocker / High-pass filter coefficients. | |
| T | applySidechainHPF (T input, int ch) noexcept |
| Applies sidechain filtering for a specific channel. | |
| void | updateRmsWindow () noexcept |
| Safely recalculates the RMS window size ensuring zero heap allocations. | |
Static Protected Member Functions | |
| template<typename E > | |
| static E | clampEnum (E value, E last) noexcept |
| Clamps an enum to its valid [first, last] range. | |
| static T | weightedGain (T g, T w) noexcept |
| A linear gain with its decibels scaled by w: 1 at w = 0, itself at w = 1. | |
| static T | holdAndRange (T targetGR_Db, T range, int holdSamples, T &held, int &counter, int soft=0, SlidingDeepest *window=nullptr, int perSample=1) noexcept |
| Hold and range on explicit state (shared by both block paths). | |
| static T | detectorSafe (T x) noexcept |
| A non-finite sample reads as silence in the detector: it would otherwise latch in the recursive detector, filter and envelope state. | |
| static T | dominantLevel (T levelL, T levelR, double rho2) noexcept |
| static constexpr CharacterProfile | profileOf (Character type) noexcept |
| The profile of a character. | |
| static constexpr Topology | topologyFor (const CharacterProfile &profile, Topology asked) noexcept |
| The topology a character runs in when the user asks for one. | |
| static constexpr bool | isLayered (const CharacterProfile &profile, Mode modeType) noexcept |
| Whether a character runs its two layers: it has them, and the mode is Downward. | |
| static constexpr DetectorType | detectorFor (const CharacterProfile &profile, DetectorType asked) noexcept |
| The detector a character reads with when the user asks for one. | |
| static T | effectiveRatioFor (Character charType, T ratio, T excessDb) noexcept |
| Level-dependent effective ratio of the character (Varimu grows). | |
| static T | effectiveKneeFor (Character charType, T knee) noexcept |
| Physical knee floor of the character (dB). | |
| static constexpr Mode | modeIn (Mode asked, Topology topoEff) noexcept |
| The mode a routing runs: the two-way and the levelling curves are feed-forward ones, and in a loop the curve is the ratio's. | |
| static constexpr bool | reducesOnly (Mode modeType) noexcept |
| Whether a mode only ever takes level off (the automatic makeups that add it back apply). | |
| static T | levelerCurve (T inputDb, T thresh) noexcept |
| The levelling curve: the gain 1 / (1 + level / threshold), in decibels. Nothing far under the threshold, 6 dB at it, and all that the level is over it far above. | |
| static T | downwardCurve (T inputDb, T thresh, T ratio, T knee, Character charType) noexcept |
| Downward static curve with the character's knee floor and ratio law (see computeGain). | |
| static T | kneeCurve (T inputDb, T thresh, T slope, T knee) noexcept |
| A threshold, a slope (1 - 1/ratio) and a quadratic knee: the gain change at a level, in decibels. | |
| static Layers | layeredCurve (T inputDb, T thresh, T ratio, T knee, const CharacterProfile &profile) noexcept |
| The curves of the two layers. | |
| static double | pacedStep (double envelope, double target, double attackRate, double releaseRate, double attackPace, double releasePace) noexcept |
| One step of a follower whose time grows with the distance to its target: far away it moves at a steady pace, close by like a one-pole. | |
| static T | pushPullElement (T input, T gain, T amount) noexcept |
| The gain of a variable-mu stage applied by its own curve: two halves in push-pull, biased so that the slope of the pair at rest is the gain asked for. | |
| static bool | rectifies (DetectorType detType) noexcept |
| Whether a detector rectifies the key (the ones an asymmetry makes sense for). | |
| static double | driftUniform (std::uint32_t &s) noexcept |
| A uniform draw in [-1, 1) (xorshift32). | |
| static FeedbackLaw | elementLaw (T eOut, T r, T w) noexcept |
| Downward element law for feedback detection, per output level. | |
| static FeedbackLaw | computeGainFeedbackUpward (T outDb, T thresh, T ratio, T knee, T guardDb) noexcept |
| Upward element law for feedback detection, per output level. | |
| static bool | atRest (double envelope, double target) noexcept |
| An envelope within 1e-4 dB of no gain change, heading there: it is put on it, to end the asymptotic tail of a release. | |
| static double | branchingStep (double y, double tgt, double cDown, double cUp) noexcept |
Branch-free branching one-pole step toward tgt: coefficient cDown while the state is above the target (the gain falls), cUp otherwise. | |
| static double | decoupledCore (double tgt, double &hold, double &fast, double holdCoeff, double attCoeff, double smoothCoeff) noexcept |
| decoupledStep() with the coefficients of the smoothing stage given too. | |
| static double | decoupledHoldTau (double releaseMs, double smoothMs) noexcept |
Time constant of the decoupled hold stage (ms) so that the series release of the hold stage and the smoothing pole passes t63 at releaseMs. | |
| static bool | readsBetweenSamples (DetectorType detType) noexcept |
| The detectors that rectify: at Precision::High they read the key between the samples too. | |
| static double | restingGain (const double *target, const double *weight, int count, double attackRate, double releaseRate) noexcept |
| Where a branching follower rests over a set of weighted targets. | |
| static double | windowSpreadDb (double windowMs) noexcept |
| Spread of what an RMS window reads over dense programme: the standard deviation of its level, in dB. | |
| static double | referenceOverRmsDb (const MakeupModelKey &key) noexcept |
| How far over the RMS of dense programme the reference of the automatic threshold rests, for each detector (dB). | |
Protected Attributes | |
| AudioSpec | spec_ {} |
| Active audio environment specification. | |
| double | sampleRate_ = 0 |
| Cached operating sample rate. | |
| std::atomic< T > | threshold_ { T(-20) } |
| Threshold in dB. | |
| std::atomic< T > | ratio_ { T(4) } |
| Ratio (e.g., 4 = 4:1). | |
| std::atomic< T > | attackMs_ { T(5) } |
| Attack time in milliseconds. | |
| std::atomic< T > | releaseMs_ { T(100) } |
| Release time in milliseconds. | |
| std::atomic< T > | kneeWidth_ { T(0) } |
| Knee width in dB. | |
| std::atomic< T > | makeupGain_ { T(0) } |
| Static makeup gain in dB. | |
| std::atomic< T > | stereoLink_ { T(1) } |
| Stereo linking amount (0 to 1). | |
| std::atomic< LinkMode > | linkMode_ { LinkMode::Loudest } |
| What the linked level reads. | |
| double | linkCoeff_ = 0.0 |
| One-pole coefficient of the key's covariance (20 ms). | |
| double | linkLL_ = 0.0 |
| double | linkRR_ = 0.0 |
| double | linkLR_ = 0.0 |
| The key's covariance (dominant link). | |
| std::atomic< T > | mix_ { T(1) } |
| Wet/Dry mix (1 = full wet). | |
| std::atomic< T > | lookaheadMs_ { T(0) } |
| Lookahead latency target in ms. | |
| std::atomic< T > | characterColor_ { T(0) } |
| Character harmonic amount (0 to 1). | |
| std::atomic< AutoMakeupMode > | autoMakeupMode_ { AutoMakeupMode::Off } |
| Auto-makeup behavior. | |
| std::atomic< DetectorType > | detectorType_ { DetectorType::Peak } |
| Selected detection method. | |
| std::atomic< Topology > | topology_ { Topology::FeedForward } |
| Selected topology. | |
| std::atomic< Character > | character_ { Character::Clean } |
| Selected ballistics. | |
| std::atomic< OptoCell > | optoCell_ { OptoCell::TwoStage } |
| Cell of the Opto character. | |
| std::atomic< CleanBallistics > | cleanBallistics_ { CleanBallistics::Branching } |
| Clean feed-forward ballistics. | |
| std::atomic< Mode > | mode_ { Mode::Downward } |
| Selected compression mode. | |
| T | autoMakeupCoeff_ = T(0.9995) |
| Auto-makeup tracking factor. | |
| T | autoMakeupEnv_ = T(0) |
| Smoothed internal auto-makeup envelope. | |
| T | cachedMakeupDb_ = T(0) |
| Last makeup converted by makeupToGain(). | |
| T | cachedMakeupLin_ = T(1) |
| Its linear gain. | |
| std::atomic< bool > | timeConstantsDirty_ { true } |
| Coefficients need a recompute. | |
| double | charAttCoeff_ = 0.0 |
| Attack coefficient of the fast envelope. | |
| double | charRelCoeff_ = 0.0 |
| Release coefficient (fast stage). | |
| double | charSlowRelCoeff_ = 0.0 |
| Release coefficient of the memory stage. | |
| double | charMidRelCoeff_ = 0.0 |
| Release coefficient of the medium memory (three-stage cell). | |
| double | charMidChargeCoeff_ = 0.0 |
| Charge coefficient of the medium memory. | |
| bool | threeStage_ = false |
| The audio thread runs the three-stage cell. | |
| double | charChargeCoeff_ = 0.0 |
| History charge coefficient of the memory stage. | |
| T | charFastWeight_ = T(1) |
| Fast/slow blend (1 = single envelope). | |
| SmoothedValue< T > | thresholdSmooth_ |
| De-zippered threshold. | |
| SmoothedValue< T > | ratioSmooth_ |
| De-zippered ratio. | |
| SmoothedValue< T > | kneeSmooth_ |
| De-zippered knee. | |
| SmoothedValue< T > | makeupSmooth_ |
| De-zippered makeup gain (dB). | |
| SmoothedValue< T > | mixSmooth_ |
| De-zippered parallel mix. | |
| SmoothedValue< T > | colorSmooth_ |
| De-zippered character colour amount. | |
| T | fetDcCoeff_ = T(0) |
| ~10 Hz DC-tracking coefficient. | |
| std::array< T, kMaxChannels > | fetDcState_ {} |
| Per-channel DC estimate of wet^2. | |
| std::array< double, kMaxChannels > | envFastDb_ {} |
| Fast gain envelope per channel (dB). | |
| std::array< double, kMaxChannels > | envSlowDb_ {} |
| Slow memory envelope per channel (dB). | |
| std::array< double, kMaxChannels > | envMidDb_ {} |
| Medium memory of the three-stage cell per channel (dB). | |
| std::array< double, kMaxChannels > | envDeepDb_ {} |
| Deep memory of the three-stage cell per channel (dB). | |
| std::array< double, kMaxChannels > | envHoldDb_ {} |
| Decoupled hold stage per channel (dB). | |
| double | decHoldCoeff_ = 0.0 |
| Decoupled hold-stage release coefficient. | |
| double | decSmoothCoeff_ = 0.0 |
| Decoupled smoothing pole, release side. | |
| bool | decoupledActive_ = false |
| The decoupled path ran last (audio thread). | |
| std::array< double, kMaxChannels > | layerLevelDb_ {} |
| std::array< double, kMaxChannels > | layerPeakDb_ {} |
| double | layerAttRate_ = 0.0 |
| double | layerRelRate_ = 0.0 |
| double | peakAttRate_ = 0.0 |
| double | peakRelRate_ = 0.0 |
| bool | layeredActive_ = false |
| The layers ran last (audio thread). | |
| std::atomic< T > | gainSmoothMs_ { T(0) } |
| Smoothing of the gain (0: off). | |
| double | gainSmoothRate_ = 0.0 |
| Coefficient of each of its two sections (0: off). | |
| std::array< double, kMaxChannels > | gainSmoothA_ {} |
| std::array< double, kMaxChannels > | gainSmoothB_ {} |
| bool | gainSmoothActive_ = false |
| The smoothing ran last (audio thread). | |
| std::atomic< T > | landingMs_ { T(0) } |
| Landing of the release (0: off). | |
| double | landingRate_ = 0.0 |
| Its coefficient when it is on the gain it follows (0: off). | |
| std::array< double, kMaxChannels > | landingDb_ {} |
| bool | landingActive_ = false |
| std::atomic< T > | networkDepthDb_ { T(0) } |
| Depth of the network of the control path (0: off). | |
| std::atomic< T > | networkCornerHz_ { T(10) } |
| Its corner. | |
| double | networkShare_ = 1.0 |
| Share of a fast move applied at once (1: off). | |
| double | networkRate_ = 0.0 |
| Coefficient of its low-pass. | |
| std::array< double, kMaxChannels > | networkLow_ {} |
| bool | networkActive_ = false |
| std::atomic< T > | toneLowDb_ { T(0) } |
| std::atomic< T > | toneHighDb_ { T(0) } |
| setReductionTone(). | |
| std::atomic< T > | controlLeak_ { T(0) } |
| setControlLeak(). | |
| std::atomic< T > | detectorAsymmetry_ { T(0) } |
| setDetectorAsymmetry(). | |
| Biquad< T, kMaxChannels > | toneLow_ {} |
| Biquad< T, kMaxChannels > | toneHigh_ {} |
| The filter F of the tone (audio thread). | |
| T | toneLowIn_ = T(0) |
| T | toneHighIn_ = T(0) |
| The gains those were designed for. | |
| bool | toneActive_ = false |
| The tone is in the path. | |
| T | leakAmount_ = T(0) |
| The leak as the audio thread took it. | |
| T | leakCoeff_ = T(0) |
| std::array< T, kMaxChannels > | leakBase_ {} |
| The slow copy of each channel's gain. | |
| T | asymAmount_ = T(0) |
| The asymmetry as the audio thread took it. | |
| T | asymDecay_ = T(0) |
| std::array< T, kMaxChannels > | asymCrest_ {} |
| The crest of each channel's key. | |
| std::atomic< T > | detectorDrift_ { T(0) } |
| setDetectorDrift(). | |
| T | driftAmount_ = T(0) |
| The drift as the audio thread took it. | |
| double | asymDriftRate_ = 0.0 |
| double | asymDriftScale_ = 1.0 |
| std::array< AsymDrift, kMaxChannels > | asymDrift_ {} |
| std::array< T, kMaxChannels > | asymNow_ {} |
| Each channel's asymmetry with its drift. | |
| bool | audioExtras_ = false |
| The gain is not a plain product (tone or leak). | |
| std::atomic< Route > | route_ { Route::Stereo } |
| std::atomic< T > | midSideFocus_ { T(0) } |
| std::array< T, 2 > | partFrom_ { T(1), T(1) } |
| std::array< T, 2 > | partTo_ { T(1), T(1) } |
| bool | parted_ = false |
| Route | routeIn_ = Route::Stereo |
| The route the states carry (audio thread). | |
| bool | routeWas_ = false |
| The last block ran a route. | |
| int | routeBlock_ = 0 |
| int | routeReach_ = 0 |
| AudioBuffer< T > | routeKey_ |
| A key given apart, as its middle and its sides. | |
| RingBuffer< T > | routeDelay_ |
| The part that is not treated waits here. | |
| std::atomic< T > | liftBelow_ { T(30) } |
| std::atomic< T > | liftRatio_ { T(2) } |
| std::atomic< T > | liftRange_ { T(6) } |
| T | liftBelowDb_ = T(30) |
| T | liftRatioIn_ = T(2) |
| T | liftRangeDb_ = T(6) |
| bool | adaptiveMakeupActive_ = false |
| Adaptive makeup ran last (audio thread). | |
| std::array< T, kMaxChannels > | upwardGuardDb_ {} |
| Peak-held sustained level (Upward guard). | |
| T | upwardGuardDecay_ = T(0.00125) |
| Guard decay per sample (60 dB/s). | |
| std::array< T, kMaxChannels > | fbLastOutput_ {} |
| std::array< std::array< T, 4 >, kMaxChannels > | pointLevelDb_ {} |
| Detected level per channel and point of the frame (dB). | |
| std::array< RingBuffer< T >, kMaxChannels > | lookaheadBuffers_ {} |
| Lookahead delay lines. | |
| int | lookaheadSamples_ = 0 |
| Active lookahead latency in samples. | |
| std::array< HilbertIIR< double >, kMaxChannels > | hilbertDetectors_ {} |
| Zero-latency analytic pairs for detection. | |
| std::atomic< bool > | scHpfEnabled_ { false } |
| HPF toggle. | |
| std::atomic< T > | scHpfFreq_ { T(80) } |
| HPF Cutoff frequency. | |
| std::atomic< bool > | scHpfDirty_ { true } |
| Coefficients need a recompute. | |
| T | scHpfB1_ = T(0) |
| HPF internal feedback coefficient. | |
| T | scHpfA0_ = T(0) |
| HPF normalized feedforward coefficient. | |
| std::array< T, kMaxChannels > | scHpfState_ {} |
| HPF y[n-1] state. | |
| std::array< T, kMaxChannels > | scHpfPrev_ {} |
| HPF x[n-1] state. | |
| KeyEq | keyEq_ |
| Equalizer of the key, after the high-pass. | |
| KeyMonitor< T, 16 > | keyMonitor_ |
| The listened key: late by the latency, under full scale. | |
| std::atomic< bool > | scListen_ { false } |
| The key goes out instead of the audio. | |
| std::atomic< bool > | removalListen_ { false } |
| The output is what the compression takes out. | |
| std::array< T, kMaxChannels > | splitPosEnv_ {} |
| Positive half-wave tracking. | |
| std::array< T, kMaxChannels > | splitNegEnv_ {} |
| Negative half-wave tracking. | |
| T | splitDetAttCoeff_ = T(0.6) |
| Detector attack coefficient (sample-rate derived). | |
| T | splitDetRelCoeff_ = T(0.99) |
| Detector release coefficient (sample-rate derived). | |
| T | rmsWindowMs_ = T(10) |
| Active RMS length in ms (audio-thread copy). | |
| std::atomic< T > | rmsWindowMsAtomic_ { T(10) } |
| Control-thread published target. | |
| std::atomic< bool > | rmsWindowDirty_ { false } |
| Applied at the next block. | |
| int | rmsWindowSamples_ = 0 |
| Active RMS length in samples. | |
| std::array< std::vector< T >, kMaxChannels > | rmsBuffers_ |
| Pre-allocated RMS sliding windows. | |
| std::array< T, kMaxChannels > | rmsSums_ {} |
| Running sums for RMS. | |
| std::array< int, kMaxChannels > | rmsIndices_ {} |
| Write heads for RMS buffers. | |
| std::array< int, kMaxChannels > | rmsRecomputeCounters_ {} |
| Re-summation counters. | |
| TruePeakDetector< T, kMaxChannels > | truePeak_ |
| std::atomic< T > | holdMs_ { T(0) } |
| Gain-hold time in ms (0 = off). | |
| std::atomic< T > | rangeDb_ { T(100) } |
| Max |gain change| in dB. | |
| int | holdSamples_ = 0 |
| std::array< int, kMaxChannels > | holdCounters_ {} |
| std::array< T, kMaxChannels > | heldGrDb_ {} |
| std::atomic< HoldMode > | holdMode_ { HoldMode::Deepest } |
| std::unique_ptr< SlidingDeepest[]> | holdWindows_ |
| One window per gain computer (HoldMode::EveryPeak). | |
| int | holdWindowFor_ = -1 |
| The hold length the windows are set for. | |
| bool | holdEveryPeak_ = false |
| The hold mode as the audio thread took it. | |
| std::atomic< bool > | autoThreshold_ { false } |
| The threshold counts from the key's own recent peak. | |
| std::atomic< T > | thresholdInUseDb_ { T(0) } |
| With the automatic threshold, the threshold of the last sample (metering). | |
| std::array< double, kMaxChannels > | autoRefDb_ {} |
| That reference per channel (the linked one in slot 0), in dB. | |
| double | autoRefFall_ = 0.0 |
| Its fall per sample, in dB. | |
| std::atomic< T > | maxLookaheadMs_ { T(0) } |
| Latency kept for the lookahead (0: the lookahead itself). | |
| int | latencySamples_ = 0 |
| Delay of the audio in feed-forward (audio thread). | |
| std::array< RingBuffer< T >, kMaxChannels > | gainDelay_ {} |
| Holds the gain back while the lookahead is shorter than the latency. | |
| double | gainDelayNow_ = -1.0 |
| The gain line's delay now, in samples (negative: not started). | |
| bool | latencyKept_ = false |
| A latency is kept for the lookahead (audio thread). | |
| std::atomic< LookaheadShape > | lookaheadShape_ { LookaheadShape::Lead } |
| std::atomic< bool > | feedbackKeyed_ { false } |
| A feedback loop runs on the key ahead of the audio. | |
| std::vector< LookaheadRamp > | lookaheadRamps_ |
| One ramp per gain computer of the layout (LookaheadShape::Ramp). | |
| int | rampCount_ = 0 |
| Ramps prepared. | |
| bool | rampShape_ = false |
| The shape as the audio thread took it. | |
| bool | rampActive_ = false |
| The ramp ran in the last block. | |
| std::atomic< T > | amount_ { T(1) } |
| Share of the gain change that is applied, in dB. | |
| SmoothedValue< T > | amountSmooth_ |
| De-zippered amount. | |
| std::atomic< int > | rangeShape_ { 0 } |
| How the gain change meets the range (a RangeShape). | |
| std::atomic< Precision > | precision_ { Precision::Standard } |
| How finely the control signal is computed. | |
| bool | precisionActive_ = false |
| The precise path ran last (audio thread). | |
| std::atomic< StagePosition > | stagePosition_ { StagePosition::Off } |
| CharacterStage< T > | stageBefore_ |
| The input amplifier. | |
| CharacterStage< T > | stageAfter_ |
| The output amplifier. | |
| AudioBuffer< T > | stageScratch_ |
| The coloured copy while a place fades. | |
| std::vector< double > | stageFade_ |
| The share of the colour, per sample of the fade. | |
| double | stageFadeStep_ = 0.0 |
| Its change per sample (20 ms end to end). | |
| double | stageWeightBefore_ = 0.0 |
| Share of the input stage (audio thread). | |
| double | stageWeightAfter_ = 0.0 |
| Share of the output stage (audio thread). | |
| T | interpPhase_ [kDetectorPoints - 1][kInterpTaps] = {} |
| Interpolation phases (prepare()). | |
| std::array< InterpHistory, kMaxChannels > | interp_ {} |
| Their history per channel. | |
| std::array< double, kMaxChannels > | precLevel_ {} |
| Last level of the solved loop (dB). | |
| std::array< double, kMaxChannels > | precTarget_ {} |
| Last gain target, after hold and range (dB). | |
| double | rawAttCoeff_ = 0.0 |
| Attack coefficient as it is observed (before a loop's own speed). | |
| double | subAttCoeff_ = 0.0 |
| Attack coefficient of an eighth of a sample. | |
| double | subRelCoeff_ = 0.0 |
| Release coefficient of an eighth of a sample. | |
| double | subSlowRelCoeff_ = 0.0 |
| Memory-stage release coefficient of an eighth of a sample. | |
| double | subChargeCoeff_ = 0.0 |
| Memory-stage charge coefficient of an eighth of a sample. | |
| double | subMidRelCoeff_ = 0.0 |
| Medium-memory release coefficient of an eighth of a sample. | |
| double | subMidChargeCoeff_ = 0.0 |
| Medium-memory charge coefficient of an eighth of a sample. | |
| double | subDecHoldCoeff_ = 0.0 |
| Decoupled hold coefficient of an eighth of a sample. | |
| double | subDecSmoothCoeff_ = 0.0 |
| Decoupled smoothing coefficient of an eighth of a sample. | |
| std::atomic< T > | programRelease_ { T(0) } |
| Weight of the sustained reduction on the release. | |
| std::atomic< T > | adaptiveAttack_ { T(0) } |
| Weight of the closeness of the target on the attack. | |
| std::atomic< T > | spectralTiming_ { T(0) } |
| Weight of the balance of the key on both times. | |
| std::atomic< T > | attackEmphasis_ { T(0) } |
| Emphasis of the attack. | |
| ProgramTiming | program_ {} |
| The weights of the block (audio thread). | |
| bool | programActive_ = false |
| They acted last (audio thread). | |
| std::array< ProgramState, kMaxChannels > | programState_ {} |
| Measures per gain computer. | |
| std::array< BalanceBands, kMaxChannels > | balanceBands_ {} |
| Bands of the key per channel. | |
| double | balanceLow_ = 0.0 |
| Smoothed power of the low band. | |
| double | balanceHigh_ = 0.0 |
| Smoothed power of the high band. | |
| double | balance_ = 0.0 |
| Their balance, -1 to +1. | |
| double | attackX_ = 0.0 |
| The attack as a decay per sample (-ln of its coefficient). | |
| double | releaseX_ = 0.0 |
| The release as a decay per sample. | |
| double | subRate_ = 0.0 |
| Pole of the split at kBalanceFloorHz. | |
| double | lowRate_ = 0.0 |
| Pole of the split at kBalanceLowHz. | |
| double | midRate_ = 0.0 |
| Pole of the split at kBalanceHighHz. | |
| double | highRate_ = 0.0 |
| Pole of the split at kBalanceCeilingHz. | |
| double | balanceRate_ = 0.0 |
| Pole of the smoothing of the two powers. | |
| double | sustainRate_ = 0.0 |
| Pole of the follower of the depth. | |
| double | emphasisRate_ = 0.0 |
| Pole of the smoothing the emphasis measures against. | |
| std::array< double, kMaxChannels > | hybridMeanSq_ {} |
| Mean square of the key. | |
| double | hybridRate_ = 0.0 |
| Its pole (the time of the RMS window). | |
| SmoothedValue< T > | analyticSmooth_ |
| De-zippered analytic makeup (dB). | |
| MakeupModelKey | makeupKey_ {} |
| Settings of the cached result. | |
| T | makeupModelDb_ = T(0) |
| The cached result (dB). | |
| std::atomic< T > | gainReductionDb_ { T(0) } |
| Publicly readable Gain Reduction meter. | |
Static Protected Attributes | |
| static constexpr int | kMaxChannels = 16 |
| static constexpr int | kChunk = 32 |
| Frames per pass of the feed-forward path. | |
| static constexpr T | kNoLimit = std::numeric_limits<T>::infinity() |
| static constexpr double | kOptoThreeFastRelease = 0.725 |
| static constexpr double | kOptoMidShare = 0.625 |
| static constexpr double | kOptoMidRelease = 5.0 |
| static constexpr double | kOptoMidCharge = 1.0 |
| static constexpr double | kOptoMidChargeFloorMs = 30.0 |
| static constexpr double | kOptoMidChargeCeilMs = 1000.0 |
| static constexpr std::array< CharacterProfile, 5 > | kProfiles |
| The characters, in the order of Character. | |
| static constexpr T | kFetColorH2 = T(0.028) |
| static constexpr double | kPushPullRest = 0.98 |
| static constexpr double | kPushPullDrive = 2.0 |
| static constexpr double | kLandingPaceDb = 0.5 |
| Decibels behind that make the landing e times faster. | |
| static constexpr double | kLeakCornerHz = 5.0 |
| High-pass the gain leaks through. | |
| static constexpr double | kLeakLevel = 0.05 |
| What a gain that moves by 1 leaks, at an amount of 1. | |
| static constexpr double | kAsymCrestSeconds = 0.05 |
| Fall of the crest the asymmetric detector adds. | |
| static constexpr double | kAsymDrift = 0.1 |
| Deviation of the asymmetry at full drift. | |
| static constexpr double | kAsymDriftHz = 0.25 |
| Corner of each of the walk's two smoothings. | |
| static constexpr int | kAsymDriftTick = 64 |
| Frames between draws. | |
| static constexpr int | kStageKeyRoom = 64 |
| Samples kept for the colour stage's latency in the listened key. | |
| static constexpr int | kRmsRecomputePeriod = 4096 |
| Re-summation interval to halt drift. | |
| static constexpr double | kAutoRefFallDb = 1.0 |
| dB per second the reference of the automatic threshold falls. | |
| static constexpr double | kGainDelaySlide = 0.25 |
| Samples per sample the gain line's delay moves to a new lookahead. | |
| static constexpr double | kLocalRangeStretchDb = 6.0 |
| Width of the bend of RangeShape::Local, at most. | |
| static constexpr int | kSubsteps = 8 |
| Steps of the ballistics per sample at Precision::High. | |
| static constexpr int | kDetectorPoints = 4 |
| Points the rectifying detectors read per sample there. | |
| static constexpr int | kInterpTaps = 16 |
| Samples each point between samples is read from. | |
| static constexpr int | kDetectorDelay = kInterpTaps / 2 - 1 |
| Samples those points are late. | |
| static constexpr double | kInterpBeta = 6.5 |
| Kaiser window of the interpolation. | |
| static constexpr double | kSustainReleases = 15.0 |
| Follower of the depth of the gain change, in release times. | |
| static constexpr double | kSustainFloorSeconds = 0.1 |
| It is never shorter than this,. | |
| static constexpr double | kSustainCeilSeconds = 60.0 |
| nor longer than this. | |
| static constexpr double | kSustainFloorDb = 0.5 |
| Depth under which a reduction does not count as sustained. | |
| static constexpr double | kReleaseStretch = 7.0 |
| The release grows up to 1 + this. | |
| static constexpr double | kAttackStretch = 3.0 |
| The attack grows up to 1 + this. | |
| static constexpr double | kFullAttackDb = 6.0 |
| Distance to the target from which the attack is the knob's. | |
| static constexpr double | kEmphasisAttacks = 6.0 |
| Smoothing the emphasis of the attack measures against, in attack times. | |
| static constexpr double | kEmphasisFloorSeconds = 0.002 |
| It is never shorter than this,. | |
| static constexpr double | kEmphasisCeilSeconds = 0.5 |
| nor longer than this. | |
| static constexpr double | kBalanceFloorHz = 30.0 |
| The low band of the balance starts here. | |
| static constexpr double | kBalanceLowHz = 200.0 |
| And ends here. | |
| static constexpr double | kBalanceHighHz = 2500.0 |
| The high band starts here. | |
| static constexpr double | kBalanceCeilingHz = 16000.0 |
| And ends here. | |
| static constexpr double | kBalanceSeconds = 0.05 |
| Smoothing of the two powers. | |
| static constexpr double | kBalanceSilence = 1e-24 |
| Summed power under which the balance is 0. | |
| static constexpr int | kMakeupNodes = 48 |
| Levels of the programme that are weighed. | |
| static constexpr double | kMakeupReach = 4.8 |
| They reach this many times its RMS. | |
| static constexpr double | kNominalRmsDb = -18.0 |
| RMS the programme is taken at (dBFS). | |
| static constexpr double | kSustainedOverRmsDb = 10.0 |
| Its sustained level over the RMS (Upward guard, dB). | |
| static constexpr double | kPeakReferenceDb = 12.35 |
| Automatic-threshold reference over the RMS, rectified. | |
| static constexpr double | kTruePeakReferenceDb = 12.5 |
| The same for TruePeak. | |
| static constexpr double | kEnvelopeReferenceDb = 13.2 |
| The same for the Hilbert detector. | |
| static constexpr double | kTruePeakSamples = 2.6 |
| Independent samples the TruePeak reading is the largest of. | |
| static constexpr double | kEnvelopeLiftDb = 0.6 |
| What the Hilbert detector reads over the envelope (dB). | |
| static constexpr double | kMakeupLimitDb = 40.0 |
| Bound of the result (dB). | |
High-fidelity modular compressor designed for real-time applications.
This class avoids virtual dispatch entirely by utilizing branch-predicted enum switches on pre-cached atomic states. Parameter changes are internally smoothed to prevent audio artifacts. Processing is strictly allocation-free after the initial prepare() call.
| T | Floating-point sample type (float or double). |
Definition at line 103 of file Compressor.h.
| using dspark::Compressor< T >::KeyBand = typename KeyEq::Band |
The settings of one band of the key equalizer.
Definition at line 1777 of file Compressor.h.
| using dspark::Compressor< T >::KeyEq = KeyEqualizer<T, 16> |
The equalizer of the key (see setSidechainBand()).
Definition at line 1775 of file Compressor.h.
| using dspark::Compressor< T >::KeyPlacement = typename KeyEq::Placement |
The part of a two-channel key a band of the key equalizer acts on.
Definition at line 1781 of file Compressor.h.
| using dspark::Compressor< T >::KeyShape = typename KeyEq::Shape |
What a band of the key equalizer does.
Definition at line 1779 of file Compressor.h.
| using dspark::Compressor< T >::StageSettings = typename CharacterStage<T>::Settings |
The settings of the colour stage (Core/CharacterStage.h).
Definition at line 1222 of file Compressor.h.
|
strong |
Automatic makeup-gain behavior (Static and Adaptive apply in Downward mode).
| Enumerator | |
|---|---|
| Off | Manual makeup only (setMakeupGain). |
| Static | Textbook auto makeup (Giannoulis, Massberg & Reiss, JAES 2012): a constant offset equal to half the static gain reduction of a 0 dBFS signal, derived from the (smoothed) threshold/ratio/knee. Being constant it never pumps and follows curve automation without clicks - and, by the same token, it lifts material that never reaches the threshold (+7.5 dB at -20 dB / 4:1 / hard knee, even on a -40 dBFS passage). That is the defined behaviour, not a side effect: to add makeup only where gain is actually reduced, choose Adaptive. |
| Adaptive | Loudness matching: tracks the smoothed gain reduction (~300 ms) and compensates it in full, keeping the average output level matched to the input (quiet passages are lifted). |
| Analytic | Worked out, not measured: the gain the ballistics settle on over dense programme (the levels of a Gaussian signal as the selected detector reads them, weighed by attack and release as the follower weighs them), taken back in full. A constant, so it never pumps, and it follows the curve, the times, the character, the detector and the amount. The programme is taken at -18 dBFS RMS; with setAutoThreshold() the threshold counts from the programme's own peak and the result holds at any level. Both modes (in Upward it takes the boost back). See setAutoMakeup(). |
Definition at line 229 of file Compressor.h.
|
strong |
Time-constant behavior and release curve shape.
All characters smooth the gain reduction in dB (log domain), so attack and release knobs read as the t63 time constant of the dB envelope.
| Enumerator | |
|---|---|
| Clean | Modern transparent design: a branching one-pole on the gain target. In feed-forward, setCleanBallistics(Decoupled) selects an instant peak hold that releases, then a smoothing stage, so the gain does not ride the waveform of a tone (THD+N of a 1 kHz tone 14 dB into 4:1 at 5/100 ms: -102 dB, against -65.5 dB for the one-pole); attack and release t63 stay on the knobs in both. |
| Opto | T4 optical cell model (LA-2A lineage), calibrated to the Teletronix spec: ~50% recovers in one release time (the spec's "0.06 s to 50%" is release = 60 ms), complete release 0.5-5 s depending on how long the compressor was engaged (the slow memory stage only charges under sustained compression), and a 10 ms attack floor (the cell's published attack time). The knee has the same 10 dB physical floor as Varimu: a photocell's resistance curve is gradual and cannot form a hard corner. |
| FET | 1176 lineage. Always detects in FeedBack topology with the hardware's peak rectifier (the Topology and Detector settings are ignored and lookahead is unavailable while selected). Attack clamps to the hardware range 0.02-0.8 ms and release to 50-1100 ms; release is two-stage with a program-dependent slow tail (~t63 at the knob value). The panel ratio is the observed curve, like the hardware: 4/8 compress, 12/20 limit. setCharacterColor() adds the FET's 2nd-order channel-modulation harmonics, calibrated at 1.0 to the 1176 THD spec (< 0.5% while limiting). |
| Varimu | Variable-mu tube lineage (Fairchild). The effective ratio grows with level above the threshold and the knee has a 10 dB floor (a remote-cutoff tube cannot produce a hard corner). Log-domain ballistics with the user's time constants. setCharacterColor() applies the gain through the curve of a push-pull pair biased by it, so the harmonics grow with the reduction. |
| Layered | Two layers in feed-forward (Topology is ignored): one that levels, with half the slope of the ratio from 6 dB under the threshold and times several times the knobs', under one that catches what rises over it, with the other half from 6 dB over the threshold and the knobs' times. Far over the threshold the curve is the ratio's own; around it, a knee 18 dB wide or more. Both layers take longer the farther they are from their target, so a deep reduction comes back at a steady pace instead of rushing. In Upward mode it is one envelope on the knobs, like Clean; Precision::High does not apply. |
Definition at line 149 of file Compressor.h.
|
strong |
Ballistics of the Clean character in feed-forward (see setCleanBallistics).
Definition at line 218 of file Compressor.h.
|
strongprotected |
The harmonic signature a character can add (setCharacterColor()).
| Enumerator | |
|---|---|
| None | |
| SecondOrder | Second-order modulation of the element by the signal across it. |
| PushPull | The gain applied by the curve of a push-pull pair biased by it. |
Definition at line 3946 of file Compressor.h.
|
strong |
Level detection methodologies.
| Enumerator | |
|---|---|
| Peak | Instantaneous absolute value tracking. Fast and standard. |
| Rms | Sliding-window Root-Mean-Square. Smoother, responds to average energy. |
| TruePeak | 4x oversampled peak detection (ITU-R BS.1770-4 compliant). |
| SplitPolarity | Separate envelopes for the positive and negative half-waves. |
| Hilbert | Analytic-signal magnitude from a zero-latency allpass pair (HilbertIIR): a ripple-free envelope on sustained tones from 20 Hz up, so the static curve holds exactly and low tones are not modulated at their own frequency (THD+N of a 30 Hz tone 14 dB into 4:1 at 5/100 ms: -96 dB, against -35 dB with Peak). The larger of that magnitude and the rectified input is used, so an onset is caught as fast as with Peak. Adds no latency. |
| Hybrid | RMS for what is steady and peak for what jumps: the larger of the root of twice the mean square (a one-pole mean over the time of setRmsWindow()) and the rectified sample. A steady tone reads its peak with next to no ripple, like Hilbert at a fraction of its cost, and whatever rises over the running level is caught in the same sample, like Peak. |
Definition at line 109 of file Compressor.h.
|
strong |
What the hold keeps (see setHoldMode()).
Definition at line 1396 of file Compressor.h.
|
strong |
What the linked level of a stereo pair reads (see setLinkMode()).
| Enumerator | |
|---|---|
| Loudest | The louder channel's level (the default). |
| Dominant | The level of the pair's dominant component, wherever it sits in the image. |
Definition at line 884 of file Compressor.h.
|
strong |
How the lookahead brings a reduction in (see setLookaheadShape()).
Definition at line 1013 of file Compressor.h.
|
strong |
Processing direction.
| Enumerator | |
|---|---|
| Downward | Standard: Reduces dynamic range by attenuating signals above the threshold. |
| Upward | Upward: Reduces dynamic range by boosting signals below the threshold. The boost fades out when the SUSTAINED level (peak-held, falling 60 dB/s) drops 40 to 60 dB below the threshold, so pauses and the noise floor are not amplified; setRange() bounds the boost. |
| Both | Downward over the threshold and upward under a second, lower one, from the same detector: what is loud comes down and what is quiet comes up (see setLift()). The rise fades in silence as in Upward. A feed-forward curve: in FeedBack (and so with the FET character) the mode is Downward. A layered character runs one envelope, as in Upward, and the automatic makeups other than Analytic are off. |
| Leveler | No ratio and no knee: the gain is 1 / (1 + level / threshold). It takes 6 dB at the threshold and hardens by itself, until the output stays at the threshold however loud the input gets; setRange() bounds it. A feed-forward curve, like Both; the automatic makeups count it as Downward does its own curve. |
Definition at line 197 of file Compressor.h.
|
strong |
The optical cell of the Opto character (see setOptoCell()).
| Enumerator | |
|---|---|
| TwoStage | A fast stage and one memory stage (default). |
| ThreeStage | A fast stage, a medium memory and a deep memory. |
Definition at line 1451 of file Compressor.h.
|
strong |
How finely the control signal is computed (see setPrecision()).
| Enumerator | |
|---|---|
| Standard | One value of the gain per sample (default). |
| High | The control signal is worked out between the samples too: the detectors that rectify read the key at four points per sample and the ballistics take eight steps per sample. See setPrecision(). |
Definition at line 256 of file Compressor.h.
|
strong |
How the gain change meets the range (see setRangeShape()).
| Enumerator | |
|---|---|
| Corner | Cut at the range (default). |
| Asymptotic | It bends from afar and never quite arrives: the curve of setSoftRange(). |
| Local | A bend in a stretch around the range; exact under it and over it. |
Definition at line 1132 of file Compressor.h.
|
strong |
What of a stereo pair the compressor works on (see setRoute()).
| Enumerator | |
|---|---|
| Stereo | Left and right (default). |
| MidSide | The middle and the sides, each with its gain; setStereoLink() links the two. |
| Mid | The middle only: the sides pass untouched. |
| Side | The sides only: the middle passes untouched. |
| MidKeysSide | The sides, with the gain the middle of the key asks for. |
| SideKeysMid | The middle, with the gain the sides of the key ask for. |
Definition at line 915 of file Compressor.h.
|
strong |
Where the analog colour stage sits (see setCharacterStage()).
| Enumerator | |
|---|---|
| Off | No colour stage (the default). |
| Before | The input amplifier: coloured before it is compressed (and detected). |
| After | The output amplifier: the compressed signal is coloured. |
Definition at line 1214 of file Compressor.h.
|
strong |
Signal routing topology for the detector sidechain.
Definition at line 132 of file Compressor.h.
|
default |
|
inlineprotectednoexcept |
Target of the analytic makeup, in dB, for a routing that is already known (the solve only runs when a setting changed).
Definition at line 5528 of file Compressor.h.
|
inlineprotectednoexcept |
Target of the analytic makeup for the settings as they stand (0 dB when another makeup mode is selected).
Definition at line 5568 of file Compressor.h.
|
inlineprotectednoexcept |
Smooths the static gain target with the active character's ballistics.
Operates on the gain change in dB. Varimu, and Clean with Branching ballistics or in feedback, run a branching one-pole (attack while the gain moves away from unity, release while it recovers). Opto/FET blend a fast envelope with a slow one that charges with compression history, producing the two-stage program-dependent release of the modeled hardware: brief peaks release fast because the slow stage never charged, sustained compression leaves a long tail.
| targetGrDb | Static gain change target in dB (negative = reduction). |
| ch | Channel index. |
| splitAdaptive | True when the EFFECTIVE detector is SplitPolarity (the callers derive it once per block/sample: it must follow the detector actually in use, which the FET character overrides). |
| loopSlope | Incremental loop gain when driven from a feedback detector with memory (explicit loop): both coefficients get a stability floor, which caps the per-sample loop advance at 0.5 and keeps the one-sample-delay iteration from ringing at extreme ratio/time combinations. It applies at any slope, 0 included: below the knee the loop is flat, but a release faster than the detector's delay still overshoots the settled gain. Negative = no loop (default). |
| loopDelay | Delay of the detector inside that loop, in samples (see feedbackDetectorDelay()). A loop that advances faster than its detector can report the result overshoots and rings, so the floor also caps the release advance at 1 / (e (1 + delay)), the critically damped limit of a first-order loop around a delay, and the attack advance at twice that. |
Definition at line 4892 of file Compressor.h.
|
inlineprotectednoexcept |
Decoupled ballistics for the Clean character in feed-forward operation (after the smooth decoupled peak detector of Giannoulis, Massberg and Reiss, JAES 2012).
A hold stage follows a deeper target at once and releases toward a shallower one; a smoothing stage then follows the held envelope with the attack pole while it deepens and a release-side pole (a tenth of the release, see updateTimeConstants) while it recovers. Branching ballistics release toward every dip of a rectified waveform (each zero crossing of a tone), so the gain rides the waveform; here the dips only shave the held level by its slow release, and the smoothing stage filters that small sawtooth in both directions. A 1 kHz tone 14 dB over a 4:1 threshold: THD+N -65.5 dB branching against -102 dB here at 5/100 ms (-54 against -80 dB at 1/30 ms, -57 against -84 dB at 0.1/50 ms), and the gain sits on the peak-referenced static curve instead of up to 0.8 dB above it.
Timing contract: the attack is the attack pole alone (the hold stage is instant), so its t63 is the knob. On release the two stages are in series; updateTimeConstants() solves the hold stage's time constant so the series release still passes t63 at the release knob. The series rounds the first part of the release (at 5/100 ms the curve stays within 0.8 dB of the exponential on a 12 dB release). When the attack is longer than half the release, the release-side pole is capped at half the release, so a release can still be shorter than the attack.
| targetGrDb | Static gain change target in dB (negative = reduction). |
| ch | Channel index. |
| splitAdaptive | True when the effective detector is SplitPolarity (its level-adaptive release then shortens the hold stage). |
Definition at line 5081 of file Compressor.h.
|
inlineprotectednoexcept |
Feedback ballistics with the loop resolved semi-implicitly.
Runs the same branching envelopes as applyBallistics, but the step toward the target is solved simultaneously with the level the detector will read. Hold and range act on the OBSERVED gain after the step (see the inline note), and the memory stage tracks the real static curve.
| inDb | Input level in dB (post link and sidechain filter). |
| ch | Processing channel index. |
| charType | Compressor character whose ballistics are applied. |
| thresh | Threshold parameter in dB. |
| ratio | Configured compression ratio. |
| knee | Soft-knee width parameter in dB. |
Definition at line 4742 of file Compressor.h.
|
inlineprotectednoexcept |
Applies the frame's gain to one channel: lookahead, FET colour, feedback history, makeup and the parallel mix.
Definition at line 3206 of file Compressor.h.
|
inlineprotectednoexcept |
Applies the hold and range stages to the static gain target (dB).
Hold keeps the deepest recent gain change for holdSamples_ before the ballistics may relax; range bounds |gain change| to the configured dB.
Definition at line 3498 of file Compressor.h.
|
inlineprotectednoexcept |
Applies sidechain filtering for a specific channel.
| input | Raw sidechain sample. |
| ch | Channel index. |
Definition at line 5763 of file Compressor.h.
|
inlineprotectednoexcept |
The key with a share of its own crest added, scaled so that the half the share favours still reads the crest.
Definition at line 4392 of file Compressor.h.
|
inlinestaticprotectednoexcept |
An envelope within 1e-4 dB of no gain change, heading there: it is put on it, to end the asymptotic tail of a release.
The target has to be at rest too. Asking only the envelope (as this did) also caught an envelope leaving zero in steps shorter than that: with a slow attack or a slow charge of the memory stage and a shallow target, each step was undone and the gain never moved (100 ms of attack at 96 kHz ignored any target under 1 dB; the memory stage of Opto with a release of 500 ms, any under 9.6 dB at 48 kHz).
Definition at line 4853 of file Compressor.h.
|
inlineprotectednoexcept |
Smooths the frame's two powers and returns the balance of the key: -1 all low, +1 all high, 0 the same in both (or silence).
Definition at line 5432 of file Compressor.h.
|
inlineprotectednoexcept |
Feeds one channel's key to the two bands of the balance and adds their squares to the frame's.
One-pole splits: what a low-pass at kBalanceFloorHz keeps is taken out, and the rest goes through a low-pass at kBalanceLowHz (the low band); what a low-pass at kBalanceHighHz leaves out goes through one at kBalanceCeilingHz (the high band). The bands are equally wide on a logarithmic axis, so a key with the same power in every octave gives the two the same.
Definition at line 5418 of file Compressor.h.
|
inlineprotectednoexcept |
ballisticsStep() with the coefficients of the memory stage given too.
Definition at line 4969 of file Compressor.h.
|
inlineprotectednoexcept |
Branching ballistics on explicit state (shared by both block paths): the fast envelope, plus the Opto/FET memory stage.
Attack acts while the gain FALLS (louder signal: deeper reduction, or less upward boost); release acts while it recovers upward. A magnitude comparison would invert the two in Upward mode and make the envelope chase the huge boosts of the waveform's zero crossings.
Definition at line 4961 of file Compressor.h.
|
inlineprotectednoexcept |
Hold and range of the semi-implicit loop.
They act on the OBSERVED gain: the element's internal target is loop-amplified by up to (R - 1) during transients, so clamping THAT to the user's range would throttle the attack, and holding it would compare mismatched domains. When they override, the fast stage is rewritten so the blend lands on the bound.
Definition at line 4830 of file Compressor.h.
|
inlinestaticprotectednoexcept |
Branch-free branching one-pole step toward tgt: coefficient cDown while the state is above the target (the gain falls), cUp otherwise.
The two candidate steps are ordered by the coefficients: with cDown <= cUp the falling step is the smaller one when the state is above the target and the rising step the smaller one when it is below, so min() selects the right branch (max() when cDown > cUp). Same value as the branch, without a data-dependent jump per sample.
Definition at line 4944 of file Compressor.h.
|
inlinestaticprotectednoexcept |
Clamps an enum to its valid [first, last] range.
Wild values (a cast integer, a corrupted state blob) would otherwise fall through every switch case: updateTimeConstants() would keep its zero-initialized coefficients (instant ballistics, i.e. a waveshaper) and the getters would report an impossible value.
Definition at line 2180 of file Compressor.h.
|
inlineprotectednoexcept |
Calculates static target gain reduction based on knee and ratio.
| inputDb | Detected level in decibels. |
| thresh | Threshold parameter in dB. |
| ratio | Ratio parameter. |
| knee | Soft-knee width parameter in dB. |
| charType | Applies the character's knee floor and ratio law. |
| modeType | Upward or Downward processing mode. |
| guardDb | Sustained level used to suppress upward gain in silence. |
Definition at line 4099 of file Compressor.h.
|
inlineprotectednoexcept |
Feedback target for detectors with memory (explicit path).
Varimu's level-dependent ratio is a function of the INPUT level, which a feedback detector does not see; two fixed-point passes reconstruct it from the output level (the law is smooth, so this lands well within 0.1 dB of the exact curve).
| outDb | Detected output level (dB). |
| thresh | Threshold parameter in dB. |
| ratio | Configured compression ratio. |
| knee | Soft-knee width parameter in dB. |
| charType | Compressor character whose static law is applied. |
Definition at line 4607 of file Compressor.h.
|
inlinestaticprotectednoexcept |
Upward element law for feedback detection, per output level.
The inverse of the feed-forward upward curve, as elementLaw() is for the downward one: with the detector on the output, a raw feed-forward law could never observe more than 2:1. Below the knee the boost is (R - 1) * (threshold - out), so the settled loop lands on the panel ratio; the soft knee is inverted in closed form. The silence guard reads the (output) level the detector sees.
| outDb | Detected output level (dB). |
| thresh | Threshold in dB. |
| ratio | Configured ratio (>= 1). |
| knee | Knee width in dB (>= 0). |
| guardDb | Sustained level for the silence guard. |
Definition at line 4641 of file Compressor.h.
|
inlineprotectednoexcept |
Upward compression curve calculation.
The boost fades to zero when guardDb falls 40 to 60 dB below the threshold: without that guard, pauses and the noise floor (which the detector reads at its -100 dB floor) would receive the largest boost of all. guardDb is the peak-held sustained level, NOT the instantaneous one: gating on the instantaneous level would punch boost holes at every zero crossing of the waveform.
Definition at line 4515 of file Compressor.h.
|
inlineprotectednoexcept |
Copies channel 0's gain-computer state to channels [1, nCh).
Definition at line 2954 of file Compressor.h.
|
inlinestaticprotectednoexcept |
decoupledStep() with the coefficients of the smoothing stage given too.
Definition at line 5103 of file Compressor.h.
|
inlinestaticprotectednoexcept |
Time constant of the decoupled hold stage (ms) so that the series release of the hold stage and the smoothing pole passes t63 at releaseMs.
Series step-down response of two one-poles tau1, tau2: (tau1 e^(-t/tau1) - tau2 e^(-t/tau2)) / (tau1 - tau2), increasing in tau1; bisected (setup rate, not per sample).
Definition at line 5129 of file Compressor.h.
|
inlineprotectednoexcept |
One decoupled step on explicit state (see applyBallisticsDecoupled).
Definition at line 5096 of file Compressor.h.
|
inlineprotectednoexcept |
Computes level detection in Decibels.
| sample | Input sample. |
| ch | Channel index (for state tracking). |
| detType | Selected detector methodology. |
Definition at line 3805 of file Compressor.h.
|
inlineprotectednoexcept |
Computes the detected level as a linear magnitude (>= 0).
| sample | Input sample. |
| ch | Channel index (for state tracking). |
| detType | Selected detector methodology. |
Definition at line 3817 of file Compressor.h.
|
inlinestaticconstexprprotectednoexcept |
The detector a character reads with when the user asks for one.
Definition at line 4055 of file Compressor.h.
|
inlineprotectednoexcept |
The rectified key at kDetectorPoints points per sample.
Feeds the channel's history and writes, in time order, the magnitude of the key at a quarter, a half and three quarters of the way from one sample to the next (a windowed-sinc interpolation of kInterpTaps samples) and at that next sample itself, which is kDetectorDelay samples old.
| sample | The key (after the sidechain filter). |
| ch | Channel whose history is advanced. |
| points | Receives kDetectorPoints magnitudes. |
Definition at line 5198 of file Compressor.h.
|
inlinestaticprotectednoexcept |
A non-finite sample reads as silence in the detector: it would otherwise latch in the recursive detector, filter and envelope state.
Definition at line 3760 of file Compressor.h.
|
inlinestaticprotectednoexcept |
The level of the pair's dominant component from the two detector levels and the squared correlation of the key: the larger eigenvalue of their covariance, halved, so a source in both channels reads its level in each and an equal-power pan reads alike anywhere.
Definition at line 3793 of file Compressor.h.
|
inlinestaticprotectednoexcept |
Downward static curve with the character's knee floor and ratio law (see computeGain).
Definition at line 4145 of file Compressor.h.
|
inlinestaticprotectednoexcept |
A uniform draw in [-1, 1) (xorshift32).
Definition at line 4422 of file Compressor.h.
|
inlinestaticprotectednoexcept |
Physical knee floor of the character (dB).
Definition at line 4079 of file Compressor.h.
|
inlinestaticprotectednoexcept |
Level-dependent effective ratio of the character (Varimu grows).
| charType | Compressor character whose ratio law is applied. |
| ratio | Configured compression ratio. |
| excessDb | Input level above the threshold in dB. |
Definition at line 4068 of file Compressor.h.
|
inlinestaticprotectednoexcept |
Downward element law for feedback detection, per output level.
The detector reads the compressed output, so a raw feed-forward law in the loop settles far off the requested curve (its observed ratio can never pass 2:1). This is the closed-form inverse instead: gel(out) = grFF(in(out)), where in(out) inverts out = in + grFF(in). The settled loop then reproduces the user's static curve exactly. Piecewise: silence, quadratic knee (cancellation-free root), and a linear region of slope (R - 1), the classic loop gain that makes a feedback compressor observe ratio R.
| eOut | Detected output level relative to the threshold (dB). |
| r | Effective ratio (>= 1). |
| w | Effective knee width (dB, >= 0). |
Definition at line 4571 of file Compressor.h.
|
inlineprotectednoexcept |
Delay of the detector as an explicit feedback loop sees it, in samples: the RMS window (its reading of a level step completes one window later). The other detectors respond within a few samples, which the base cap of the loop advance already covers.
Definition at line 5021 of file Compressor.h.
|
inlineprotectednoexcept |
The covariance decays toward zero in silence: flushed before it reaches the subnormal range (once per block).
Definition at line 3782 of file Compressor.h.
|
inlineprotectednoexcept |
The gain on one sample of a channel when it is not a plain product: through the tone that follows the reduction, and with what leaks of the control.
Definition at line 4363 of file Compressor.h.
|
inlineprotectednoexcept |
Static curve plus character ballistics for one channel's state.
Runs the Upward guard, the topology's gain law, hold/range and the ballistics on channel ch's state, and returns the smoothed gain change in dB.
| inputDb | Detected (linked) level in dB. |
| ch | Channel whose state is advanced. |
| cfg | Routing derived once per block. |
| thresh | Threshold in dB. |
| ratio | Ratio. |
| knee | Knee width in dB. |
Definition at line 3137 of file Compressor.h.
|
inlineprotectednoexcept |
The gain of one frame at Precision::High, for one gain computer.
The frame brings count levels in time order (kDetectorPoints from a detector read between the samples, one otherwise). The ballistics take kSubsteps steps in all, with the coefficients of that share of a sample: in feed-forward towards a target that moves along the line from one level's target to the next; in the loop solved against the input, with the level moving along that line and the loop solved at each step. The gain is the mean of the steps. Hold and range act once per level in feed-forward and once per frame, on the gain the last step leaves, in the loop.
| levelDb | Levels in dB, oldest first. |
| count | How many (1 or kDetectorPoints). |
| ch | Channel whose state is advanced. |
| cfg | Routing derived once per block. |
| thresh | Threshold in dB. |
| ratio | Ratio. |
| knee | Knee width in dB. |
Definition at line 5261 of file Compressor.h.
|
inlinenoexcept |
Weight of the target-dependent attack (see setAdaptiveAttack()).
Definition at line 1318 of file Compressor.h.
|
inlinenoexcept |
The share of the gain change that is applied (setAmount()).
Definition at line 1109 of file Compressor.h.
|
inlinenoexcept |
Emphasis of the attack (see setAttackEmphasis()).
Definition at line 1370 of file Compressor.h.
|
inlinenoexcept |
Returns the currently active character.
Definition at line 1885 of file Compressor.h.
|
inlinenoexcept |
Returns the character colour amount (see setCharacterColor).
Definition at line 1750 of file Compressor.h.
|
inlinenoexcept |
Where the colour stage sits (see setCharacterStage()).
Definition at line 1251 of file Compressor.h.
|
inlinenoexcept |
The settings of the colour stage.
Definition at line 1261 of file Compressor.h.
|
inlinenoexcept |
Returns the Clean character's feed-forward ballistics.
Definition at line 1744 of file Compressor.h.
|
inlinenoexcept |
How much of the moves of the gain leaks into the audio (setControlLeak()).
Definition at line 1660 of file Compressor.h.
|
inlinenoexcept |
Corner of the network in the control path, in Hz (setControlNetwork()).
Definition at line 1593 of file Compressor.h.
|
inlinenoexcept |
Depth of the network in the control path, in dB (setControlNetwork()).
Definition at line 1590 of file Compressor.h.
|
inlinenoexcept |
Returns the currently active detector type.
Definition at line 1879 of file Compressor.h.
|
inlinenoexcept |
How differently the detector reads the two halves of the wave (setDetectorAsymmetry()).
Definition at line 1688 of file Compressor.h.
|
inlinenoexcept |
How far the detector's asymmetry wanders (setDetectorDrift()).
Definition at line 1715 of file Compressor.h.
|
inlinenoexcept |
Returns current active gain reduction in dB (negative value).
Definition at line 1876 of file Compressor.h.
|
inlinenoexcept |
The smoothing of the gain after the ballistics, in milliseconds.
Definition at line 1532 of file Compressor.h.
|
inlinenoexcept |
Definition at line 1419 of file Compressor.h.
|
inlinenoexcept |
Returns total processing latency in samples.
The lookahead. Feedback operation (Topology::FeedBack, or the FET character, which always detects in feedback) disables it, so latency is 0 there, unless the loop runs on the key (setFeedbackKeyed()). With setPrecision(High), the Peak and TruePeak detectors read 7 samples late and the audio waits for them, in feed-forward and in the feedback loops that mode covers. A colour stage in place (setCharacterStage()) adds its few samples. The plugin layer re-reads this after parameter changes and re-notifies the host when it moves.
Definition at line 1898 of file Compressor.h.
|
inlinenoexcept |
Distance of the lower threshold of Mode::Both under the main one, in dB (setLift()).
Definition at line 868 of file Compressor.h.
|
inlinenoexcept |
The most Mode::Both raises, in dB (setLift()).
Definition at line 874 of file Compressor.h.
|
inlinenoexcept |
Ratio of the rise of Mode::Both (setLift()).
Definition at line 871 of file Compressor.h.
|
inlinenoexcept |
Definition at line 912 of file Compressor.h.
|
inlinenoexcept |
Definition at line 1042 of file Compressor.h.
|
inlinenoexcept |
The latency kept for the lookahead, in ms (0: none; see setMaxLookahead()).
Definition at line 1010 of file Compressor.h.
|
inlinenoexcept |
Definition at line 969 of file Compressor.h.
|
inlinenoexcept |
Definition at line 1479 of file Compressor.h.
|
inlinenoexcept |
How finely the control signal is computed (see setPrecision()).
Definition at line 1210 of file Compressor.h.
|
inlinenoexcept |
Weight of the programme-dependent release (see setProgramRelease()).
Definition at line 1294 of file Compressor.h.
|
inlinenoexcept |
How the gain change meets the range (setRangeShape()).
Definition at line 1159 of file Compressor.h.
|
inlinenoexcept |
Its gain over 4 kHz, in dB.
Definition at line 1635 of file Compressor.h.
|
inlinenoexcept |
Gain under 200 Hz of the tone that follows the reduction, in dB (setReductionTone()).
Definition at line 1632 of file Compressor.h.
|
inlinenoexcept |
The landing of the release, in milliseconds (setReleaseLanding()).
Definition at line 1558 of file Compressor.h.
|
inlinenoexcept |
What of a stereo pair is compressed (setRoute()).
Definition at line 950 of file Compressor.h.
|
inlinenoexcept |
The settings of a band of the key equalizer.
Definition at line 1813 of file Compressor.h.
|
inlinenoexcept |
The curve of the key equalizer, for a display: build it when the bands change and read each frequency from it.
Definition at line 1819 of file Compressor.h.
|
inlinenoexcept |
Weight of the spectral balance on the times (see setSpectralTiming()).
Definition at line 1345 of file Compressor.h.
|
inline |
Serializes the parameter state (setup/UI threads; allocates).
Definition at line 2028 of file Compressor.h.
|
inlinenoexcept |
The threshold in use, in dBFS (metering; any thread): the set one, or with setAutoThreshold() the key's recent peak plus it.
Definition at line 1086 of file Compressor.h.
|
inlinenoexcept |
Returns the currently active topology.
Definition at line 1882 of file Compressor.h.
|
inlineprotectednoexcept |
The gain as it is heard with a latency kept for the lookahead: older by the difference (see setMaxLookahead()).
Definition at line 5214 of file Compressor.h.
|
inlinestaticprotectednoexcept |
Hold and range on explicit state (shared by both block paths).
| targetGR_Db | Static gain change target in dB. |
| range | Maximum |gain change| in dB. |
| holdSamples | Hold length in samples (0 = off). |
| held | Held gain change (state). |
| counter | Remaining hold samples (state). |
| soft | How the target meets the range: a RangeShape, as its number. |
| window | The sliding window that holds instead (HoldMode::EveryPeak), or nullptr. |
| perSample | Targets given per sample (the window counts samples). |
Definition at line 3693 of file Compressor.h.
|
inlineprotectednoexcept |
Definition at line 3677 of file Compressor.h.
|
inlinenoexcept |
Whether the threshold counts from the key's recent peak (setAutoThreshold()).
Definition at line 1080 of file Compressor.h.
|
inlinenoexcept |
Definition at line 1066 of file Compressor.h.
|
inlinestaticconstexprprotectednoexcept |
Whether a character runs its two layers: it has them, and the mode is Downward.
Definition at line 4049 of file Compressor.h.
|
inlinenoexcept |
Definition at line 1846 of file Compressor.h.
|
inlinenoexcept |
Whether the key is being played instead of the audio.
Definition at line 1837 of file Compressor.h.
|
inlinenoexcept |
Whether the gain change meets the range without a corner (setSoftRange(), setRangeShape()).
Definition at line 1126 of file Compressor.h.
|
inlinestaticprotectednoexcept |
A threshold, a slope (1 - 1/ratio) and a quadratic knee: the gain change at a level, in decibels.
Definition at line 4162 of file Compressor.h.
|
inlinestaticprotectednoexcept |
The curves of the two layers.
The levelling layer takes its share of the slope from levelLeadDb under the threshold, over a knee twice that wide; the other layer takes the rest from as far over the threshold as leaves the sum, far above, on the curve of the ratio itself.
Definition at line 4196 of file Compressor.h.
|
inlineprotectednoexcept |
One frame of a layered character: hold and range on the whole target, each layer towards its part of it, and their sum.
The levelling layer never asks for more than the bounded whole; the other layer takes what is left of it, so a held or a limited target is shared out without a division.
Definition at line 4236 of file Compressor.h.
|
inlinestaticprotectednoexcept |
The levelling curve: the gain 1 / (1 + level / threshold), in decibels. Nothing far under the threshold, 6 dB at it, and all that the level is over it far above.
Definition at line 4128 of file Compressor.h.
|
inlineprotectednoexcept |
The upward half of Mode::Both: the rise under the lower threshold, up to its range.
Definition at line 4136 of file Compressor.h.
|
inlineprotectednoexcept |
One frame of the key's covariance for the dominant link; returns the squared correlation of the pair (0 when either side is silent).
Definition at line 3769 of file Compressor.h.
|
inlineprotectednoexcept |
Whether the detector reads the two halves of the wave differently (an asymmetry or its drift).
Definition at line 4356 of file Compressor.h.
|
inlineprotectednoexcept |
Makeup dB to linear, cached: the makeup is shared by every channel of a frame and constant unless automated or adaptive. Same value as a direct decibelsToGain() call.
| makeupDb | Makeup gain in dB. |
Definition at line 3746 of file Compressor.h.
|
inlinestaticconstexprprotectednoexcept |
The mode a routing runs: the two-way and the levelling curves are feed-forward ones, and in a loop the curve is the ratio's.
Definition at line 4112 of file Compressor.h.
|
inlinestaticprotectednoexcept |
One step of a follower whose time grows with the distance to its target: far away it moves at a steady pace, close by like a one-pole.
| envelope | The follower (dB). |
| target | Where it is going (dB). |
| attackRate | Share of the distance per sample while the gain falls. |
| releaseRate | The same while it recovers. |
| attackPace | Decibels of distance that double the attack time. |
| releasePace | Decibels of distance that double the release time. |
Definition at line 4218 of file Compressor.h.
|
inlineprotectednoexcept |
The weight of a part's heard gain at sample idx of a block of n (MidSide with a focus): from the block's first weight to its last.
Definition at line 3188 of file Compressor.h.
|
inline |
Allocates buffers and initializes internal DSP state.
An invalid spec (non-positive/NaN sample rate or no channels) is ignored: the previous prepared state, if any, stays intact.
| spec | Audio environment specification (sample rate, block size, channels). |
Definition at line 275 of file Compressor.h.
|
inlinenoexcept |
Prepares the compressor using sample rate only (backward compatibility).
| sampleRate | The operating sample rate. |
Definition at line 381 of file Compressor.h.
|
inlinenoexcept |
Processes audio with an independent external sidechain.
The detector analyzes the sidechain buffer, but gain reduction is applied to the audio buffer.
| audio | Audio buffer to be compressed (modified in-place). |
| sidechain | Key/Sidechain signal (read-only). |
Definition at line 408 of file Compressor.h.
|
inlinenoexcept |
Processes an audio buffer in-place using its own signal as the sidechain.
| buffer | Mutable reference to the audio block. |
Definition at line 391 of file Compressor.h.
|
inlineprotectednoexcept |
Core DSP loop executing sidechain detection, linking, ballistics, and gain application.
No-op before prepare(). A sidechain view with fewer samples than the audio view is ignored (the detector falls back to the audio itself) rather than read out of bounds.
| audio | Buffer to modify. |
| sidechain | Buffer to read for level detection. |
Definition at line 2196 of file Compressor.h.
|
inlineprotectednoexcept |
Feed-forward block path, run in passes over chunks of frames.
In feed-forward the detector never reads the output, so detection, the level conversion, the gain recursion, the gain conversion and its application can run as separate passes. Only the ballistics recursion is then serial: the log, static curve and exp of different frames overlap freely, and the envelope state stays in registers. Each frame performs the same arithmetic as the per-sample path (processSample() on a mono stream is bit-identical).
Definition at line 2643 of file Compressor.h.
|
inlinenoexcept |
Processes a single sample on one channel.
Bypasses block-level features like stereo linking, parallel mix, and lookahead. Ideal for modular routing, synth voices, or per-sample environments.
| input | Audio sample to process. Returned unchanged (with no state touched) before prepare() or for a channel outside [0, 16). |
| channel | Index of the audio channel (used for state tracking). |
Definition at line 445 of file Compressor.h.
|
inlinestaticconstexprprotectednoexcept |
The profile of a character.
Definition at line 4036 of file Compressor.h.
|
inlineprotectednoexcept |
The attack and release coefficients of a frame under programme-dependent timing, and the advance of its measures.
| target | Gain target of the frame (dB). |
| fast | The gain now (dB). |
| state | Measures of this gain computer. |
| balance | Spectral balance of the key. |
| share | Share of a sample each step of the follower covers. |
Definition at line 5451 of file Compressor.h.
|
inlineprotectednoexcept |
The gain with the emphasis of the attack: what it is under its own smoothed course while it falls, added again (or taken off).
Definition at line 5473 of file Compressor.h.
|
inlineprotectednoexcept |
One step of the branching follower with programme-dependent timing (the single envelope of Clean and Varimu).
Definition at line 5481 of file Compressor.h.
|
inlineprotectednoexcept |
The weights for this routing: the Clean and Varimu characters in feed-forward with Branching ballistics.
Definition at line 5382 of file Compressor.h.
|
inlinestaticprotectednoexcept |
The gain of a variable-mu stage applied by its own curve: two halves in push-pull, biased so that the slope of the pair at rest is the gain asked for.
Each half follows a softplus (the smooth cutoff of a remote-cutoff stage); the pair, half their difference, has the slope of a logistic of the bias. The bias is the one whose slope is the gain (times the slope the pair has at no reduction, kPushPullRest, taken back at the output), so a small signal gets the gain exactly and a large one gets the curve: compression where the pair is biased open, expansion once it nears cutoff, and odd harmonics from both.
| input | Sample the gain applies to. |
| gain | Linear gain asked for (over 1 it is applied past the pair). |
| amount | Level into the pair: at 1 full scale is kPushPullDrive times the scale of the curve. |
Definition at line 4293 of file Compressor.h.
|
inlineprotectednoexcept |
A gain change through the lookahead's ramp of its gain computer, or as it came.
Definition at line 3668 of file Compressor.h.
|
inlinestaticprotectednoexcept |
The detectors that rectify: at Precision::High they read the key between the samples too.
Definition at line 5159 of file Compressor.h.
|
inlinestaticprotectednoexcept |
Whether a detector rectifies the key (the ones an asymmetry makes sense for).
Definition at line 4312 of file Compressor.h.
|
inlinestaticconstexprprotectednoexcept |
Whether a mode only ever takes level off (the automatic makeups that add it back apply).
Definition at line 4118 of file Compressor.h.
|
inlinestaticprotectednoexcept |
How far over the RMS of dense programme the reference of the automatic threshold rests, for each detector (dB).
Measured on pink noise with the reference's own law (it rises at once and falls 1 dB per second). The RMS window's rests about three of its spreads up while the window is short; a long window moves its level as slowly as the reference falls, and the reference then rests lower.
Definition at line 5643 of file Compressor.h.
|
inlinenoexcept |
Resets all internal DSP history, states, and buffers to neutral.
Definition at line 645 of file Compressor.h.
|
inlinestaticprotectednoexcept |
Where a branching follower rests over a set of weighted targets.
Each sample it moves towards the target by a share of the distance: attackRate while the target is below it, releaseRate while it is above. Over targets that change much faster than it moves, it rests where the two pulls cancel: attackRate x mean distance to the targets below = releaseRate x mean distance to those above. That point (an expectile of the targets) is found by bisection.
| target | Gain changes (dB). |
| weight | How often each one is met. |
| count | How many there are. |
| attackRate | 1 - attack coefficient. |
| releaseRate | 1 - release coefficient. |
Definition at line 5595 of file Compressor.h.
|
inlineprotectednoexcept |
The serial part of the feed-forward path for one gain channel: Upward guard, static curve, hold/range and ballistics over a chunk, with the channel's state held in locals.
| inDb | Linked level per frame (dB). |
| out | Smoothed gain change per frame (dB). |
| m | Frames in the chunk. |
| ch | Channel whose state is advanced. |
| ff | Block routing. |
| thr | Threshold per frame. |
| rat | Ratio per frame. |
| kn | Knee per frame. |
| dryIn | SplitPolarity only: the (delayed) input the gain applies to. The recursion then also writes the linear gain into inDb (each frame's level is consumed before it is overwritten). nullptr otherwise. |
| balance | Spectral balance of the key per frame (see setSpectralTiming()), read by programme-dependent timing. |
Definition at line 3000 of file Compressor.h.
|
inlineprotectednoexcept |
Runs one place of the colour stage over a block, fading its share towards whether it is wanted (20 ms). Idle, it costs nothing; it starts from clean memory when it comes in.
Definition at line 3907 of file Compressor.h.
|
inlinenoexcept |
Makes the attack depend on how far the target is.
A target 6 dB or more past the gain is met with the knob's attack; one that is only just past it, with an attack up to four times longer. A transient is still caught at the nominal speed, while the last decibels of every attack, and the small swells of dense programme, are taken gently (less of the waveform ends up in the gain). amount weighs it (0, the default, is the fixed attack). Same scope as setProgramRelease().
State key "adaptiveAttack" (absent = 0).
| amount | 0 to 1. Non-finite values are ignored. |
Definition at line 1311 of file Compressor.h.
|
inlinenoexcept |
Sets how much of the gain change is applied, as a scale of its decibels.
1 (the default) applies it all; 0.5 turns 8 dB of reduction into 4 at every instant, with the same timing. Unlike the parallel mix it does not add the unprocessed signal back, so there is nothing to cancel against: it is the same compressor at a gentler ratio. In FeedBack the loop keeps hearing the full reduction. Smoothed.
| amount | Share of the gain change, 0 to 1. |
Definition at line 1102 of file Compressor.h.
|
inlinenoexcept |
Sets the attack time in milliseconds.
Reads as the t63 time constant of the OBSERVED gain-reduction envelope in dB. Character models clamp it to their hardware's physical range: Opto floors it at 10 ms (the T4 cell's published attack time), FET clamps it to 0.02-0.8 ms. In FeedBack operation the loop multiplies the raw ballistics speed by its gain; the coefficient is re-derived so the observed t63 stays on the knob (the 1176's 20-800 us figures are measured results, not raw RC values).
Definition at line 761 of file Compressor.h.
|
inlinenoexcept |
Deepens or softens the gain change while it attacks.
After the ballistics, the difference between the gain and a copy of it smoothed over six times the attack (30 ms at the default attack of 5 ms) is added back while the gain is falling: at +1 the leading edge of every reduction goes as far again past its smoothed course (more bite on the transient), at -1 the attack follows the smoothed copy (the transient is let through and the body is held). It only acts while the gain falls; a settled gain and a release are left as they are. 0 (default) is off. Same scope as setProgramRelease().
State key "attackEmphasis" (absent = 0).
| amount | -1 to +1. Non-finite values are ignored. |
Definition at line 1363 of file Compressor.h.
|
inlinenoexcept |
Selects the automatic makeup behavior (default: Off).
Static is the textbook auto makeup: a constant, program-independent offset of half the static gain reduction of a full-scale signal. Adaptive is loudness matching: it tracks the smoothed gain reduction (~300 ms) and compensates it in full, so the average output level stays matched to the input and quiet passages are lifted accordingly (macro-dynamics are reduced). Analytic works the gain out of the settings instead of measuring it: where the ballistics come to rest over dense programme, for the curve, the times, the character and the detector selected; it is a constant between edits of those, and moves to its new value over a few tens of milliseconds after one. It takes the programme at -18 dBFS RMS unless setAutoThreshold() is on, which makes it hold at any level. Measured on pink noise at that level, as the level left over the input's: within 0.1 dB with the Peak detector over thresholds from -30 to -10 dB, ratios from 2 to 10, attacks from 0.5 to 100 ms and releases from 20 ms to 1 s (the Static mode leaves -2.4 to +6.1 dB there), 0.2 dB decoupled and in feedback, 0.3 dB with the RMS, Hilbert and TruePeak detectors and with Opto, 0.5 dB with FET; the same figures at -36 and -6 dBFS with the automatic threshold. The RMS window reads the low end of the programme: on white noise it is off by up to 1.3 dB. For a fixed offset use setMakeupGain().
Definition at line 822 of file Compressor.h.
|
inlinenoexcept |
Convenience overload: true selects Adaptive, false turns auto makeup off.
Definition at line 829 of file Compressor.h.
|
inlinenoexcept |
Makes the threshold count from the key's own recent peak instead of from full scale.
A reference follows the level the detector reads: it rises at once and falls 1 dB per second, and the threshold is added to it. The compressor then acts the same on a take recorded 20 dB lower: what it hears is how far the level is from its own recent maximum. In FeedBack the reference follows the input. Off by default.
Definition at line 1077 of file Compressor.h.
|
inlinenoexcept |
Changes ballistics and envelope behavior character.
Definition at line 1444 of file Compressor.h.
|
inlinenoexcept |
Sets the amount of the character's harmonic signature (0 to 1).
Currently shapes the FET character: 2nd-order channel modulation of the 1176's gain-reduction FET (the drain-source resistance bends with the signal across it), scaled with the active gain reduction and AC-coupled like the hardware's output stage. At 1.0 it is calibrated to the published 1176 THD spec (< 0.5% while limiting, measured at -6 dBFS program level); it only distorts while the FET conducts, so no gain reduction means no added colour. The squared term doubles the signal bandwidth: on synthetic full-scale HF material wrap the compressor in an oversampled section (see docs/cookbook.md) if the folded 2nd harmonic matters.
With the Varimu character the gain is applied by the curve of a push-pull pair of remote-cutoff stages: the bias that sets the gain also bends the curve, so compression and colour come from the same element. The harmonics are odd, grow with the level and with the reduction (through a minimum near 6 dB of it), and at 1.0 a tone at -6 dBFS carries 0.08 % of them at rest, 1.4 % under 12 dB of reduction and 2.8 % under 20 dB. While it is on, the block runs frame by frame.
Other characters ignore it. Default 0 (clean).
Definition at line 1505 of file Compressor.h.
|
inlinenoexcept |
Puts an analog colour stage before or after the compression.
The stage (Core/CharacterStage.h) is the circuit around the gain element: an emphasis shelf, two static saturators and the de-emphasis that undoes the shelf, with slow random drift, a sag that lowers the clipping point with the level and a noise floor that follows the signal; it runs oversampled to about 176 kHz and has unity gain at low levels. Before, the compressor (and its detector, unless an external key is given) hears the coloured input; After, the compressed output is coloured. A change of position crossfades over 20 ms, both ways and between the two positions. The stage adds its delay (a few samples, the polyphase IIR half-bands', 4 samples at 48 kHz) to getLatency() while it is in. With it the compressor costs 172 to 534 ns per stereo frame at 48 kHz (14 to 30 without). It runs in processBlock(); processSample() leaves it out. Safe from any thread.
State keys "stage", "stageDrive", "stageEmphasis", "stageAsymmetry", "stageDrift", "stageSag" and "stageNoise" (absent = off and the defaults of StageSettings).
Definition at line 1245 of file Compressor.h.
|
inlinenoexcept |
Sets drive, emphasis, asymmetry, drift, sag and noise of the colour stage. Any thread.
Definition at line 1254 of file Compressor.h.
|
inlinenoexcept |
Selects the Clean character's feed-forward ballistics.
Branching (default) is a single branching one-pole on the gain target. Decoupled holds the gain target's peaks and smooths the held envelope, so a sustained tone is compressed without its waveform riding the gain: THD+N of a 1 kHz tone 14 dB into 4:1 at 5/100 ms measures -102 dB, against -65.5 dB for Branching, and the gain lands on the peak-referenced static curve (Branching reads up to 0.8 dB less reduction on tones). Both honour the attack and release knobs as t63; Decoupled rounds the first part of the release (within 0.8 dB of the exponential on a 12 dB release at 5/100 ms).
Decoupled follows the peaks of dense material, so the same settings compress more: on a drum programme at the default settings the output sits 1.9 dB lower than with Branching, on a noise-like programme at -24 dB, 3:1 it sits 4.5 dB lower. Compare by ear (and retune the threshold) before switching a preset. Other characters and feedback operation are not affected; the state key is "cleanBallistics" (absent = Branching).
Definition at line 1738 of file Compressor.h.
|
inlinenoexcept |
Lets the moves of the gain leak into the audio as low thumps (0, the default, is off).
What a gain element lets through of its own control: the gain, through a high-pass of 5 Hz, is added to the output of the element. A settled gain adds nothing; every attack and every release leaves a thump under the programme, in proportion to how far the gain moved. At 1 a gain that falls at once from 1 to a half leaves a thump that starts at -32 dBFS. A feedback loop keeps reading the plain gain. While it is on, processBlock() runs frame by frame.
State key "controlLeak" (absent = 0).
| amount | 0 to 1. Non-finite values are ignored. |
Definition at line 1653 of file Compressor.h.
|
inlinenoexcept |
A lead-lag network in the control path: only a part of each fast move of the gain is applied at once.
The gain change in decibels, after the ballistics, passes through a first-order shelf that takes depthDb off what moves faster than cornerHz and leaves what is slower as it is. Its gain at 0 Hz is 1 by construction, so the static curve does not move. Of a sudden move of the gain, 10^(-depthDb / 20) arrives at once and the rest with the time constant of the corner: an attack bites less, a release goes in two stretches, and the ripple a fast release leaves on a low tone falls by the depth, with none of the delay a low-pass adds (setGainSmoothing()). A feedback loop reads the gain before the network. A depth of 0 (the default) is off.
State keys "networkDepth" and "networkCorner" (absent = 0 and 10).
| depthDb | 0 to 12 dB. Non-finite values are ignored. |
| cornerHz | 1 to 100 Hz. Non-finite values keep the corner in use. |
Definition at line 1580 of file Compressor.h.
|
inlinenoexcept |
Changes the level detection algorithm (Peak, RMS, TruePeak, SplitPolarity, Hilbert, Hybrid).
Definition at line 1373 of file Compressor.h.
|
inlinenoexcept |
Makes the detector read the two halves of the wave differently (0, the default, is off).
A share of the key's own crest (its peak, held for 50 ms) is added to the key before it is rectified, and the sum is scaled back so that the half the share favours still reads the crest: the other half reads (1 - |a|) / (1 + |a|) of it. The gain then moves at the frequency of the signal and not at twice it, which gives the modulation the colour of a second harmonic, as an unbalanced rectifier does, and a signal that is not symmetric is read differently from its inverse. The level a held tone settles on is the same. It acts with the detectors that rectify the key (Peak, TruePeak and Hybrid); positive values favour the positive half. While it is on, processBlock() runs frame by frame.
State key "detectorAsymmetry" (absent = 0).
| amount | -1 to +1. Non-finite values are ignored. |
Definition at line 1681 of file Compressor.h.
|
inlinenoexcept |
Lets the detector's asymmetry wander slowly at random, as the balance of a rectifier does with its temperature (0, the default, holds it still).
Each channel's asymmetry moves around the one set with setDetectorAsymmetry() along a random walk smoothed twice at 0.25 Hz, by about 0.1 (one deviation) at full drift: the second harmonic of the modulation and the reading of a lopsided signal against its inverse come and go over seconds. It acts where the asymmetry does (Peak, TruePeak and Hybrid), also with the asymmetry at 0. Each channel has its own seed and the walk starts again at every reset(), so a render repeats. While it is on, processBlock() runs frame by frame.
State key "detectorDrift" (absent = 0).
| amount | 0 to 1. Non-finite values are ignored. |
Definition at line 1708 of file Compressor.h.
|
inlinenoexcept |
In FeedBack, runs the loop on the key ahead of the audio.
A feedback compressor reads its own output, which leaves no room for a lookahead or for a key of its own: by default FeedBack (and the characters that always detect in feedback) runs without lookahead and ignores an external key. With this on, the loop is closed around the key instead (the external key when one is given, the programme otherwise, before any delay): the detector reads that key times the gain, as it would read the output, and the gain the loop settles on is applied to the audio. With the programme as the key and no lookahead that is the same compressor; and the lookahead (with its latency, its shape and the latency kept for it) and an external key now act in feedback too. Off by default.
Definition at line 1059 of file Compressor.h.
|
inlinenoexcept |
Smooths the gain after the ballistics (milliseconds; 0, the default, is off).
The gain change in decibels passes through two equal one-pole sections before it becomes gain: a second-order smoothing that rounds the corners the ballistics leave (the start of an attack, the turn into a release) and takes the ripple of the detector off the gain. The step of the two sections reaches 63 % in about the time given, so the gain arrives that much later (a lookahead of the same length puts it back). A feedback loop reads the gain before the smoothing. Values are held to [0, 50] ms; a value that is not finite is ignored.
Definition at line 1524 of file Compressor.h.
|
inlinenoexcept |
Chooses what the hold keeps (Deepest by default).
Definition at line 1412 of file Compressor.h.
|
inlinenoexcept |
Sets the gain-reduction hold time.
The deepest gain reduction is held for this long before the release stage may recover, the classic tool against pumping on dense material.
| ms | Hold time in milliseconds (0 = off, mastering range 0-500). |
Definition at line 1388 of file Compressor.h.
|
inlinenoexcept |
Sets knee width in dB (0 = hard knee, >0 = soft knee).
Definition at line 785 of file Compressor.h.
|
inlinenoexcept |
Sets the upward half of Mode::Both: what lies under a second, lower threshold is raised.
The lower threshold sits belowDb under the main one and moves with it; under it the level is raised with ratio (2: half the distance) up to rangeDb, with the knee of the main curve. Between the two thresholds the gain is 0 dB. A range of 0 leaves Mode::Both the same as Downward, bit for bit.
State keys "liftBelow", "liftRatio" and "liftRange" (absent = 30, 2 and 6).
| belowDb | Distance of the lower threshold under the main one, 0 to 80 dB. |
| ratio | Ratio of the rise, 1 (none) to 20. |
| rangeDb | The most it raises, 0 to 40 dB. Non-finite values keep the one in use. |
Definition at line 859 of file Compressor.h.
|
inlinenoexcept |
Chooses how a stereo pair is linked.
Loudest links to the louder channel. Dominant links to the level of the pair's dominant component: the larger eigenvalue of the covariance of the two detector levels, the correlation taken from the key over 20 ms. A source panned anywhere with an equal-power law reads the same level (a centred source reads its level in each channel, as Loudest does; panned hard it reads 3 dB less than Loudest), and two uncorrelated channels read the louder one 3 dB down, so wide ambience pushes less than a solid source of the same level. It applies to two-channel blocks with some link; other channel counts link to the loudest. Setup or any thread.
| mode | Loudest (default) or Dominant. |
Definition at line 906 of file Compressor.h.
|
inlinenoexcept |
Sets lookahead time in ms (0 = off, max = 10ms).
Definition at line 982 of file Compressor.h.
|
inlinenoexcept |
Chooses how the lookahead brings a reduction in (Lead by default).
Feed-forward, with a lookahead above 0; the ramp follows a lookahead that moves inside a latency kept for it (setMaxLookahead()). The ramp runs for the channels given to prepare().
Definition at line 1035 of file Compressor.h.
|
inlinenoexcept |
Sets manual static makeup gain in dB.
Definition at line 792 of file Compressor.h.
|
inlinenoexcept |
Keeps a latency of its own for the lookahead, so the lookahead can move without the latency changing.
With a maximum above 0 the audio is always that late (getLatency() reports it) and setLookahead() moves inside it: the gain is held back by the difference (which slides to its new value a quarter of a sample per sample, with no step in the gain), so the lookahead can be automated while the host keeps one delay compensation. 0 (the default) is the behaviour of before: the latency is the lookahead. FeedBack runs without lookahead and without latency either way.
| ms | Latency kept for the lookahead, 0 to 10 ms. |
Definition at line 1002 of file Compressor.h.
|
inlinenoexcept |
In Route::MidSide, how the compression leans to the middle or to the sides, -1 to 1: at 0 (the default) each part takes its whole gain; toward -1 the sides take less of theirs (their reduction and makeup in decibels scaled by 1 + focus), at -1 only the middle is compressed and the sides come out as they went in; toward 1 the same for the middle. The detectors and the gain loop are those of the route, so the focus sweeps without a step: it moves across each block, sample by sample. Non-finite values are ignored. State key "midSideFocus" (absent = 0).
Definition at line 963 of file Compressor.h.
|
inlinenoexcept |
Sets dry/wet balance for parallel (New York) compression (1.0 = fully wet).
Definition at line 972 of file Compressor.h.
|
inlinenoexcept |
Sets the curve of the gain computer (Downward, Upward, Both or Leveler).
Definition at line 835 of file Compressor.h.
|
inlinenoexcept |
Chooses how the cell of the Opto character remembers.
ThreeStage puts a medium memory between the fast stage and the deep one: it charges over one release time (30 ms to 1 s) and lets go over five, so a phrase of a second or two leaves a tail between the quick recovery of a short peak and the long one of sustained compression. The fast stage then releases over 0.725 release times so that, fully charged, half the reduction still recovers in one release time, and the deep stage keeps the complete release of 0.5 to 5 s. The three shares of the gain are 0.6 (fast), 0.25 (medium) and 0.15 (deep). Only Opto uses it. Thread-safe; applied at the next block.
| cell | TwoStage (default) or ThreeStage. |
Definition at line 1472 of file Compressor.h.
|
inlinenoexcept |
Selects how finely the control signal is computed (default: Standard).
A gain that moves within a cycle of the signal has a spectrum far wider than the audio band; computed once per sample, what lies above half the rate folds back and ends as lines that are not harmonics of the signal. High works the control signal out between the samples too, the audio being left at its rate:
It applies in processBlock(), in feed-forward and in the feedback loops solved against the input (the Peak detector, Downward: the FET character among them); the SplitPolarity detector and the other feedback loops stay as they are. The interpolated detectors read 7 samples late and the audio waits for them: getLatency() reports those 7 samples more with Peak or TruePeak, none with RMS or Hilbert. Change it while stopped (the delay of the audio moves at once).
Measured at 48 kHz on a tone 12 dB over the threshold of a 4:1 curve, as the largest line that is no harmonic of the tone (Standard to High). Peak detector, attack 0.1 ms, release 50 ms: -77 to -111 dBc at 1 kHz, -66 to -86 at 5 kHz, -51 to -85 at 15 kHz, -38 to -66 at 18 kHz. FET character at its 20 us attack, ratio 20, 30 dB over: -68 to -91, -50 to -66, -49 to -70 and -37 to -66. Hilbert detector: -124 to -153 at 1 kHz. The level the detector reads does not move: the gain of the tone stays within 0.1 dB in every case. The cost of a stereo frame goes from 17 to 125 ns in feed-forward and from 52 to 190 with the FET character (x64 server core).
State key "precision" (absent = Standard).
Definition at line 1204 of file Compressor.h.
|
inlinenoexcept |
Makes the release depend on how long the compressor has been working.
The release time becomes the knob's after a brief reduction and up to eight times the knob's after a sustained one. What tells them apart is a slow follower of the depth of the gain change against the depth itself, fifteen times as slow as the release (1.5 s at the default release of 100 ms), so that "sustained" means the same at any release: a peak that comes and goes leaves it near zero and releases at the knob's time; a passage that has kept the compressor down for ten release times or more releases slowly, so the level does not pump back up between phrases. amount weighs it (0, the default, is the fixed release).
This and the three settings that follow act on the Clean and Varimu characters in feed-forward with Branching ballistics, in every path (processBlock(), processSample() and Precision::High). Opto and FET have a memory of their own; Decoupled, feedback and the SplitPolarity detector keep fixed times.
State key "programRelease" (absent = 0).
| amount | 0 to 1. Non-finite values are ignored. |
Definition at line 1287 of file Compressor.h.
|
inlinenoexcept |
Limits the maximum gain change the compressor may apply.
Classic "range" control: gain reduction (or upward boost) never exceeds this many dB regardless of how far the signal passes the threshold.
| dB | Maximum |gain change| in dB (default 100 = unlimited in practice). |
Definition at line 1429 of file Compressor.h.
|
inlinenoexcept |
Selects how the gain change meets the range.
Local bends the target over a stretch centred on the range, 6 dB wide (or as wide as the range, when the range is less than that): under the stretch the target is left as it is, over it it is the range exactly, and the slope is continuous at both ends. A target on the range comes out an eighth of the stretch short of it. Asymptotic, the curve of setSoftRange(), bends from much farther away: 16 % short at the range and never on it (a target of 12 dB under a range of 6 gives 5.9). The semi-implicit FeedBack loop (Peak detector) keeps the corner.
State key "rangeShape" (absent: Asymptotic or Corner, as "softRange" says).
Definition at line 1153 of file Compressor.h.
|
inlinenoexcept |
Sets the compression ratio (1.0 = off, >20.0 = limiting).
Definition at line 742 of file Compressor.h.
|
inlinenoexcept |
Makes the tone change with the reduction.
The gain then acts on a copy of the signal that has passed a nearly flat filter F, and what that copy loses is taken off the signal: y = x - (1 - g) F(x). With no reduction the output is the input, bit for bit; as the gain falls the response leans in proportion to what is taken off, as it does with a gain element that sits inside a network that depends on frequency. F is a low shelf at 200 Hz and a high shelf at 4 kHz, each with its own gain. Where F is over 0 dB the reduction is deeper than the gain asked for, and where it is under, shallower: with 12 dB of reduction, +1 dB makes it 3.9 dB deeper and -1 dB 2.4 dB shallower. A negative highDb keeps the top while the compressor works, and a negative lowDb the weight. Both at 0 (the default): off.
It does not act with the push-pull element (setCharacterColor() on Varimu), which applies the gain through its own curve, and a feedback loop keeps reading the plain gain. While it is on, processBlock() runs frame by frame instead of in the passes of the feed-forward path.
State keys "toneLow" and "toneHigh" (absent = 0).
| lowDb | Gain of F under 200 Hz, -3 to +3 dB. Non-finite values are ignored. |
| highDb | Gain of F over 4 kHz, -3 to +3 dB. Non-finite values are ignored. |
Definition at line 1625 of file Compressor.h.
|
inlinenoexcept |
Sets the release time in milliseconds (clamped to >= 1 ms: below that the envelope stops smoothing at all and the gain path degenerates into a waveshaper).
Reads as the t63 time constant of the dB envelope for Clean/Varimu. For Opto it is the time to ~50% recovery (the slow memory tail extends up to ~35x longer); for FET it clamps to the 1176 range 50-1100 ms.
Definition at line 777 of file Compressor.h.
|
inlinenoexcept |
Makes the last decibels of a release come back slowly (milliseconds; 0, the default, is off).
After the ballistics, the gain that is heard follows them at once while the gain change deepens, and on the way back with a time that grows as it gets near: ms once it is within tenths of a decibel of the gain it follows, e times shorter for each half decibel it is behind, so that several decibels behind it is the ballistics themselves. A release starts as it did and lands softly instead of arriving with the slope of its exponential, which is where a fast release is heard to pump. A feedback loop reads the gain before it. Values are held to [0, 2000] ms; a value that is not finite is ignored.
State key "releaseLanding" (absent = 0).
Definition at line 1550 of file Compressor.h.
|
inlinenoexcept |
Removal listen: the output is what the compression takes out, the aligned input minus the compressed signal before the makeup gain (the mix does not apply). A monitoring control, not in the state.
Definition at line 1844 of file Compressor.h.
|
inlinenoexcept |
Sets the RMS analysis window size in milliseconds.
Published atomically; the audio thread applies the new window (and resets the sliding state) at its next block, so no control-thread write ever races the per-sample RMS accumulators.
In FeedBack the RMS window sits inside the loop, which cannot settle faster than its detector reports: release faster than about e x (1 + window) samples, and attack faster than half of that, settle at those bounds, the critically damped limit (observed t63 with the default 10 ms window: release 22 ms, attack 14 ms). Faster settings would overshoot and ring.
Definition at line 1864 of file Compressor.h.
|
inlinenoexcept |
Chooses what of a stereo pair is compressed, and from which part of the key.
The pair is taken as its middle, (L + R) / 2, and its sides, (L - R) / 2, compressed as the route says and put back as left and right. A key given apart is split the same way. In the routes that treat one of the two, the other waits for it (it comes out late by the latency of the gain path, so the pair stays in time) and is otherwise untouched, and the makeup acts on the part that is treated. In the two crossed routes the detector reads one part and the gain is applied to the other, as with a key given apart: a feedback loop, which reads its own output, treats that part by itself. While the key or what is removed is listened to, the part that is not treated is left out.
It acts in processBlock() on buffers of exactly two channels; any other width, and processSample(), run as Stereo. The audio thread takes a change at the next block and starts clean there (it may click: choose the route before playback).
State key "route" (absent = Stereo).
Definition at line 947 of file Compressor.h.
|
inlinenoexcept |
Sets a band of the equalizer of the key.
Six bands shape what the detector weighs, after the sidechain high-pass: low and high cuts from 6 to 48 dB per octave, bells, shelves and a tilt, each designed from its analog curve. They act on whatever the detector reads (the programme, the external key or, in FeedBack, the compressed output) and never on the audio. A band that keeps its form glides to a new setting over 20 ms, designed again on the way; a change of shape crosses to a second bank of filters over the same time; a band that is Off costs nothing. The timing that follows the spectral balance (setSpectralTiming()) and the analytic makeup read the key before the equalizer.
With a two-channel key a band can sit on both channels, on the middle of the pair or on its sides (KeyBand::placement): a low cut on the middle keeps a centred kick from moving the gain while what is wide still does. The placement is that of the pair the detector reads, so under a route that already works on the middle and the sides (setRoute()) leave the bands on both. processSample() has the key one channel at a time and takes every band on every channel.
| band | Band index in [0, kKeyBands); others are ignored. |
| settings | Shape, frequency, gain, q, slope and placement of the band. |
Definition at line 1810 of file Compressor.h.
|
inlinenoexcept |
Toggles the internal sidechain high-pass filter.
An invalid cutoff (non-positive or non-finite) keeps the previous frequency and only applies the toggle: a negative cutoff would make the one-pole coefficient exceed 1 (an unstable, runaway filter).
| enabled | True to activate HPF. |
| cutoffHz | Cutoff frequency in Hz (Default: 80Hz). |
Definition at line 1765 of file Compressor.h.
|
inlinenoexcept |
Plays the key instead of the compressed audio.
The output of each channel is what its detector hears, after the sidechain high-pass and the equalizer: the programme, the external key or, in FeedBack with a detector that keeps a memory, the compressed output of the previous sample. Through processBlock() it leaves late by the latency the compressor reports, so the track keeps its place when the listen is switched, and it is held under full scale (an equalized key can be far louder than the programme: KeyMonitor). The compressor keeps working underneath (the meter still reads). It is a monitoring switch: it is not part of the state.
Definition at line 1834 of file Compressor.h.
|
inlinenoexcept |
Makes the gain change approach the range without a corner.
With it on, a target of g dB under a range of R becomes g / (1 + (g / R)^4)^(1/4): the same as g while it is small (1.5 % less at half the range), 16 % less at the range, and never more than the range. Off (the default) the target is cut at the range. The semi-implicit FeedBack loop (Peak detector) keeps the corner.
Definition at line 1120 of file Compressor.h.
|
inlinenoexcept |
Makes attack and release follow the spectral balance of the key.
The key is measured in two bands of the same width on a logarithmic axis, 30 to 200 Hz and 2.5 to 16 kHz (what lies under 30 Hz is left out, so rumble and DC do not count), and their balance, between -1 (all low) and +1 (all high), moves both times: at full weight a bright key is followed three times faster and a dark one three times slower, and programme with the same power in every octave stays on the knobs. Short times suit a snare and long ones a bass; this sets them from what is playing. The key is the one the detector reads, before the sidechain filter. amount weighs it (0, the default, is off). Same scope as setProgramRelease().
State key "spectralTiming" (absent = 0).
| amount | 0 to 1. Non-finite values are ignored. |
Definition at line 1338 of file Compressor.h.
|
inline |
Restores parameters from a blob (tolerant; rejects foreign ids).
Definition at line 2100 of file Compressor.h.
|
inlinenoexcept |
Sets stereo linking amount (0.0 = unlinked dual mono, 1.0 = fully linked).
Definition at line 877 of file Compressor.h.
|
inlinenoexcept |
Sets the compression threshold in dB.
Definition at line 735 of file Compressor.h.
|
inlinenoexcept |
Changes signal routing topology (FeedForward or FeedBack).
Definition at line 1436 of file Compressor.h.
|
inlineprotectednoexcept |
Whether anything stands between the ballistics and the gain: the landing, the network or the smoothing.
Definition at line 4429 of file Compressor.h.
|
inlineprotectednoexcept |
The delay of the gain line this frame. It slides to its target kGainDelaySlide of a sample per sample, so a lookahead that moves inside the latency kept for it leaves no step in the gain (the first frame after prepare() or reset() starts at the target).
Definition at line 5231 of file Compressor.h.
|
inlineprotectednoexcept |
One frame of what stands between the ballistics and the gain on a channel (dB): the landing of the release, the network of the control path and the two smoothing sections, those that are on.
Definition at line 4439 of file Compressor.h.
|
inlineprotectednoexcept |
Solves one feedback ballistics step against the current input.
With the peak detector the level the loop will read is a known function of the gain (out = in + G), so the one-pole step G = k + effB * gel(in + G) is solved simultaneously with it, piece by piece: the element law is linear or quadratic per piece and F(G) = G - k - effB * gel(in + G) is strictly monotonic, so a piece whose solution verifies its own range IS the unique solution. This is the backward-Euler view of the analog loop (a first-order system): unconditionally stable at any attack, unlike the explicit iteration whose one-sample delay rings once the loop gain (R - 1) exceeds the ballistics speed.
| inDb | Input level in dB (post link and sidechain filter). |
| k | Explicit part of the ballistics step (coeff-weighted history). |
| effB | Implicit weight: (1 - coeff) times the fast-stage blend. |
| thresh | Threshold parameter in dB. |
| ratio | Configured compression ratio. |
| knee | Soft-knee width parameter in dB. |
| charType | Compressor character whose static law is applied. |
Definition at line 4694 of file Compressor.h.
|
inlineprotectednoexcept |
The analytic makeup: minus the gain the ballistics settle on over dense programme.
The programme is a Gaussian signal as the detector reads it. For the detectors that rectify, the magnitudes of its samples (a half normal); for TruePeak the largest of kTruePeakSamples of them (the four points between samples are not independent); for Hybrid those magnitudes held over the root of twice the mean square; for Hilbert its envelope (a Rayleigh, kEnvelopeLiftDb higher since the detector also takes the rectified sample); for the RMS window a log-normal about the RMS with the spread of windowSpreadDb(). Each level gives a target on the static curve (with the range), and the followers rest among those targets as restingGain() says: the fast stage with attack and release, the memory stage of Opto and FET with its charge and its release, the decoupled hold with an attack of one sample. A feedback loop works against the lag of the memory stage with its own gain, w (R - 1), so there that stage only counts for (1 - w) / (1 + w (R - 1)). With the automatic threshold the levels count from the peak its reference rests on; without it the programme is at kNominalRmsDb.
Definition at line 5679 of file Compressor.h.
|
inlineprotectednoexcept |
One step of the semi-implicit loop on the channel's envelopes: the blended gain it leaves, before hold and range.
Definition at line 4763 of file Compressor.h.
|
inlineprotectednoexcept |
The adaptive makeup envelope only runs while adaptive makeup is active; when it engages it starts from the current gain change (the settled value of a tracker that had kept running). Audio thread only.
Definition at line 5008 of file Compressor.h.
|
inlineprotectednoexcept |
Takes the settings of the audio path that are not the plain gain (the tone that follows the reduction, the leak of the control, the asymmetry of the detector). Audio thread only.
Definition at line 4323 of file Compressor.h.
|
inlineprotectednoexcept |
Seats the decoupled hold stage on the current gain when the decoupled path engages (character or topology change), so the switch does not replay a stale hold value. Audio thread only.
Definition at line 5040 of file Compressor.h.
|
inlineprotectednoexcept |
Seats each of those stages on the gain as it stands when it engages. Audio thread only.
Definition at line 4486 of file Compressor.h.
|
inlineprotectednoexcept |
Seats the two layers on the gain as it stands when a layered character engages. Audio thread only.
Definition at line 4258 of file Compressor.h.
|
inlineprotectednoexcept |
Seats the history of the precise path when it engages: it starts from the gain that is sounding and from silence at the detector. Audio thread only.
Definition at line 5169 of file Compressor.h.
|
inlineprotectednoexcept |
Seats the measures on the gain that is sounding when the programme-dependent timing engages. Audio thread only.
Definition at line 5399 of file Compressor.h.
|
inlinestaticconstexprprotectednoexcept |
The topology a character runs in when the user asks for one.
Definition at line 4043 of file Compressor.h.
|
inlineprotectednoexcept |
Updates the normalized DC-blocker / High-pass filter coefficients.
Definition at line 5746 of file Compressor.h.
|
inlineprotectednoexcept |
Safely recalculates the RMS window size ensuring zero heap allocations.
Definition at line 5776 of file Compressor.h.
|
inlineprotectednoexcept |
Pre-calculates recursive exponential decay coefficients.
| fs | Current sample rate. |
Definition at line 3261 of file Compressor.h.
|
inlineprotectednoexcept |
The Clean character in feed-forward runs the decoupled detector when setCleanBallistics() selected it.
Definition at line 5029 of file Compressor.h.
|
inlineprotectednoexcept |
Whether the control signal runs at Precision::High with this routing: feed-forward, and feedback solved against the input.
Definition at line 5151 of file Compressor.h.
|
inlinestaticprotectednoexcept |
A linear gain with its decibels scaled by w: 1 at w = 0, itself at w = 1.
Definition at line 3195 of file Compressor.h.
|
inlinestaticprotectednoexcept |
Spread of what an RMS window reads over dense programme: the standard deviation of its level, in dB.
A fit to pink noise (equal power per octave), whose low end a short window cannot average: 1.6 dB for 10 ms, falling with the cube root of the length (measured 2.1, 1.6, 1.1, 0.7 and 0.5 dB at 3, 10, 30, 100 and 300 ms).
Definition at line 5629 of file Compressor.h.
|
protected |
Weight of the closeness of the target on the attack.
Definition at line 6107 of file Compressor.h.
|
protected |
Adaptive makeup ran last (audio thread).
Definition at line 5969 of file Compressor.h.
|
protected |
Share of the gain change that is applied, in dB.
Definition at line 6044 of file Compressor.h.
|
protected |
De-zippered amount.
Definition at line 6045 of file Compressor.h.
|
protected |
De-zippered analytic makeup (dB).
Definition at line 6142 of file Compressor.h.
|
protected |
The asymmetry as the audio thread took it.
Definition at line 5930 of file Compressor.h.
|
protected |
The crest of each channel's key.
Definition at line 5932 of file Compressor.h.
|
protected |
Definition at line 5931 of file Compressor.h.
|
protected |
Definition at line 5949 of file Compressor.h.
|
protected |
Definition at line 5948 of file Compressor.h.
|
protected |
Definition at line 5948 of file Compressor.h.
|
protected |
Each channel's asymmetry with its drift.
Definition at line 5950 of file Compressor.h.
|
protected |
Emphasis of the attack.
Definition at line 6109 of file Compressor.h.
|
protected |
Attack time in milliseconds.
Definition at line 5823 of file Compressor.h.
|
protected |
The attack as a decay per sample (-ln of its coefficient).
Definition at line 6117 of file Compressor.h.
|
protected |
The gain is not a plain product (tone or leak).
Definition at line 5951 of file Compressor.h.
|
protected |
Auto-makeup tracking factor.
Definition at line 5844 of file Compressor.h.
|
protected |
Smoothed internal auto-makeup envelope.
Definition at line 5845 of file Compressor.h.
|
protected |
Auto-makeup behavior.
Definition at line 5834 of file Compressor.h.
|
protected |
That reference per channel (the linked one in slot 0), in dB.
Definition at line 6030 of file Compressor.h.
|
protected |
Its fall per sample, in dB.
Definition at line 6031 of file Compressor.h.
|
protected |
The threshold counts from the key's own recent peak.
Definition at line 6028 of file Compressor.h.
|
protected |
Their balance, -1 to +1.
Definition at line 6116 of file Compressor.h.
|
protected |
Bands of the key per channel.
Definition at line 6113 of file Compressor.h.
|
protected |
Smoothed power of the high band.
Definition at line 6115 of file Compressor.h.
|
protected |
Smoothed power of the low band.
Definition at line 6114 of file Compressor.h.
|
protected |
Pole of the smoothing of the two powers.
Definition at line 6123 of file Compressor.h.
|
protected |
Last makeup converted by makeupToGain().
Definition at line 5846 of file Compressor.h.
|
protected |
Its linear gain.
Definition at line 5847 of file Compressor.h.
|
protected |
Selected ballistics.
Definition at line 5838 of file Compressor.h.
|
protected |
Character harmonic amount (0 to 1).
Definition at line 5833 of file Compressor.h.
|
protected |
Attack coefficient of the fast envelope.
Definition at line 5853 of file Compressor.h.
|
protected |
History charge coefficient of the memory stage.
Definition at line 5859 of file Compressor.h.
|
protected |
Fast/slow blend (1 = single envelope).
Definition at line 5860 of file Compressor.h.
|
protected |
Charge coefficient of the medium memory.
Definition at line 5857 of file Compressor.h.
|
protected |
Release coefficient of the medium memory (three-stage cell).
Definition at line 5856 of file Compressor.h.
|
protected |
Release coefficient (fast stage).
Definition at line 5854 of file Compressor.h.
|
protected |
Release coefficient of the memory stage.
Definition at line 5855 of file Compressor.h.
|
protected |
Clean feed-forward ballistics.
Definition at line 5840 of file Compressor.h.
|
protected |
De-zippered character colour amount.
Definition at line 5867 of file Compressor.h.
|
protected |
Definition at line 5922 of file Compressor.h.
|
protected |
Decoupled hold-stage release coefficient.
Definition at line 5883 of file Compressor.h.
|
protected |
The decoupled path ran last (audio thread).
Definition at line 5885 of file Compressor.h.
|
protected |
Decoupled smoothing pole, release side.
Definition at line 5884 of file Compressor.h.
|
protected |
Definition at line 5923 of file Compressor.h.
|
protected |
Definition at line 5946 of file Compressor.h.
|
protected |
Selected detection method.
Definition at line 5836 of file Compressor.h.
|
protected |
The drift as the audio thread took it.
Definition at line 5947 of file Compressor.h.
|
protected |
Pole of the smoothing the emphasis measures against.
Definition at line 6125 of file Compressor.h.
|
protected |
Deep memory of the three-stage cell per channel (dB).
Definition at line 5881 of file Compressor.h.
|
protected |
Fast gain envelope per channel (dB).
Definition at line 5878 of file Compressor.h.
|
protected |
Decoupled hold stage per channel (dB).
Definition at line 5882 of file Compressor.h.
|
protected |
Medium memory of the three-stage cell per channel (dB).
Definition at line 5880 of file Compressor.h.
|
protected |
Slow memory envelope per channel (dB).
Definition at line 5879 of file Compressor.h.
|
protected |
Feedback topology history buffer.
Definition at line 5972 of file Compressor.h.
|
protected |
A feedback loop runs on the key ahead of the audio.
Definition at line 6039 of file Compressor.h.
|
protected |
~10 Hz DC-tracking coefficient.
Definition at line 5873 of file Compressor.h.
|
protected |
Per-channel DC estimate of wet^2.
Definition at line 5874 of file Compressor.h.
|
protected |
Holds the gain back while the lookahead is shorter than the latency.
Definition at line 6034 of file Compressor.h.
|
protected |
The gain line's delay now, in samples (negative: not started).
Definition at line 6036 of file Compressor.h.
|
protected |
Publicly readable Gain Reduction meter.
Definition at line 6146 of file Compressor.h.
|
protected |
Definition at line 5902 of file Compressor.h.
|
protected |
The smoothing ran last (audio thread).
Definition at line 5904 of file Compressor.h.
|
protected |
Definition at line 5903 of file Compressor.h.
|
protected |
Smoothing of the gain (0: off).
Definition at line 5900 of file Compressor.h.
|
protected |
Coefficient of each of its two sections (0: off).
Definition at line 5901 of file Compressor.h.
|
protected |
Definition at line 6020 of file Compressor.h.
|
protected |
Pole of the split at kBalanceCeilingHz.
Definition at line 6122 of file Compressor.h.
|
protected |
Zero-latency analytic pairs for detection.
Definition at line 5979 of file Compressor.h.
|
protected |
Definition at line 6019 of file Compressor.h.
|
protected |
The hold mode as the audio thread took it.
Definition at line 6024 of file Compressor.h.
|
protected |
Definition at line 6021 of file Compressor.h.
|
protected |
Gain-hold time in ms (0 = off).
Definition at line 6016 of file Compressor.h.
|
protected |
Definition at line 6018 of file Compressor.h.
|
protected |
The hold length the windows are set for.
Definition at line 6023 of file Compressor.h.
|
protected |
One window per gain computer (HoldMode::EveryPeak).
Definition at line 6022 of file Compressor.h.
|
protected |
Mean square of the key.
Definition at line 6128 of file Compressor.h.
|
protected |
Its pole (the time of the RMS window).
Definition at line 6129 of file Compressor.h.
|
protected |
Their history per channel.
Definition at line 6076 of file Compressor.h.
|
protected |
Interpolation phases (prepare()).
Definition at line 6075 of file Compressor.h.
|
staticconstexprprotected |
Fall of the crest the asymmetric detector adds.
Definition at line 5920 of file Compressor.h.
|
staticconstexprprotected |
Deviation of the asymmetry at full drift.
Definition at line 5934 of file Compressor.h.
|
staticconstexprprotected |
Corner of each of the walk's two smoothings.
Definition at line 5935 of file Compressor.h.
|
staticconstexprprotected |
Frames between draws.
Definition at line 5936 of file Compressor.h.
|
staticconstexprprotected |
The attack grows up to 1 + this.
Definition at line 6095 of file Compressor.h.
|
staticconstexprprotected |
dB per second the reference of the automatic threshold falls.
Definition at line 6027 of file Compressor.h.
|
staticconstexprprotected |
And ends here.
Definition at line 6103 of file Compressor.h.
|
staticconstexprprotected |
The low band of the balance starts here.
Definition at line 6100 of file Compressor.h.
|
staticconstexprprotected |
The high band starts here.
Definition at line 6102 of file Compressor.h.
|
staticconstexprprotected |
And ends here.
Definition at line 6101 of file Compressor.h.
|
staticconstexprprotected |
Smoothing of the two powers.
Definition at line 6104 of file Compressor.h.
|
staticconstexprprotected |
Summed power under which the balance is 0.
Definition at line 6105 of file Compressor.h.
|
staticconstexprprotected |
Frames per pass of the feed-forward path.
Definition at line 2630 of file Compressor.h.
|
staticconstexprprotected |
Samples those points are late.
Definition at line 6054 of file Compressor.h.
|
staticconstexprprotected |
Points the rectifying detectors read per sample there.
Definition at line 6052 of file Compressor.h.
|
staticconstexprprotected |
Smoothing the emphasis of the attack measures against, in attack times.
Definition at line 6097 of file Compressor.h.
|
staticconstexprprotected |
nor longer than this.
Definition at line 6099 of file Compressor.h.
|
staticconstexprprotected |
It is never shorter than this,.
Definition at line 6098 of file Compressor.h.
|
staticconstexprprotected |
What the Hilbert detector reads over the envelope (dB).
Definition at line 6140 of file Compressor.h.
|
staticconstexprprotected |
The same for the Hilbert detector.
Definition at line 6138 of file Compressor.h.
|
protected |
Equalizer of the key, after the high-pass.
Definition at line 5989 of file Compressor.h.
|
protected |
The listened key: late by the latency, under full scale.
Definition at line 5990 of file Compressor.h.
|
staticconstexprprotected |
Definition at line 5872 of file Compressor.h.
|
staticconstexprprotected |
Distance to the target from which the attack is the knob's.
Definition at line 6096 of file Compressor.h.
|
staticconstexprprotected |
Samples per sample the gain line's delay moves to a new lookahead.
Definition at line 6035 of file Compressor.h.
|
staticconstexprprotected |
Kaiser window of the interpolation.
Definition at line 6055 of file Compressor.h.
|
staticconstexprprotected |
Samples each point between samples is read from.
Definition at line 6053 of file Compressor.h.
|
staticconstexpr |
Bands of the key equalizer.
Definition at line 1783 of file Compressor.h.
|
staticconstexprprotected |
Decibels behind that make the landing e times faster.
Definition at line 5905 of file Compressor.h.
|
staticconstexprprotected |
High-pass the gain leaks through.
Definition at line 5918 of file Compressor.h.
|
staticconstexprprotected |
What a gain that moves by 1 leaks, at an amount of 1.
Definition at line 5919 of file Compressor.h.
|
staticconstexprprotected |
Width of the bend of RangeShape::Local, at most.
Definition at line 6047 of file Compressor.h.
|
staticconstexprprotected |
Bound of the result (dB).
Definition at line 6141 of file Compressor.h.
|
staticconstexprprotected |
Levels of the programme that are weighed.
Definition at line 6132 of file Compressor.h.
|
staticconstexprprotected |
They reach this many times its RMS.
Definition at line 6133 of file Compressor.h.
|
staticconstexprprotected |
Definition at line 2169 of file Compressor.h.
|
protected |
De-zippered knee.
Definition at line 5864 of file Compressor.h.
|
protected |
Knee width in dB.
Definition at line 5825 of file Compressor.h.
|
staticconstexprprotected |
Definition at line 3985 of file Compressor.h.
|
staticconstexprprotected |
RMS the programme is taken at (dBFS).
Definition at line 6134 of file Compressor.h.
|
staticconstexprprotected |
Definition at line 3996 of file Compressor.h.
|
staticconstexprprotected |
Definition at line 3998 of file Compressor.h.
|
staticconstexprprotected |
Definition at line 3997 of file Compressor.h.
|
staticconstexprprotected |
Definition at line 3995 of file Compressor.h.
|
staticconstexprprotected |
Definition at line 3994 of file Compressor.h.
|
staticconstexprprotected |
Definition at line 3993 of file Compressor.h.
|
staticconstexprprotected |
Automatic-threshold reference over the RMS, rectified.
Definition at line 6136 of file Compressor.h.
|
staticconstexprprotected |
The characters, in the order of Character.
Definition at line 4001 of file Compressor.h.
|
staticconstexprprotected |
Definition at line 5897 of file Compressor.h.
|
staticconstexprprotected |
Definition at line 5896 of file Compressor.h.
|
staticconstexpr |
Corner of its high shelf, in Hz.
Definition at line 1598 of file Compressor.h.
|
staticconstexpr |
Corner of the low shelf of the tone that follows the reduction, in Hz (setReductionTone()).
Definition at line 1596 of file Compressor.h.
|
staticconstexprprotected |
The release grows up to 1 + this.
Definition at line 6094 of file Compressor.h.
|
staticconstexprprotected |
Re-summation interval to halt drift.
Definition at line 6009 of file Compressor.h.
|
staticconstexprprotected |
Samples kept for the colour stage's latency in the listened key.
Definition at line 5991 of file Compressor.h.
|
staticconstexprprotected |
Steps of the ballistics per sample at Precision::High.
Definition at line 6051 of file Compressor.h.
|
staticconstexprprotected |
nor longer than this.
Definition at line 6092 of file Compressor.h.
|
staticconstexprprotected |
Its sustained level over the RMS (Upward guard, dB).
Definition at line 6135 of file Compressor.h.
|
staticconstexprprotected |
Depth under which a reduction does not count as sustained.
Definition at line 6093 of file Compressor.h.
|
staticconstexprprotected |
It is never shorter than this,.
Definition at line 6091 of file Compressor.h.
|
staticconstexprprotected |
Follower of the depth of the gain change, in release times.
Definition at line 6090 of file Compressor.h.
|
staticconstexprprotected |
The same for TruePeak.
Definition at line 6137 of file Compressor.h.
|
staticconstexprprotected |
Independent samples the TruePeak reading is the largest of.
Definition at line 6139 of file Compressor.h.
|
protected |
Definition at line 5909 of file Compressor.h.
|
protected |
Definition at line 5908 of file Compressor.h.
|
protected |
Landing of the release (0: off).
Definition at line 5906 of file Compressor.h.
|
protected |
Its coefficient when it is on the gain it follows (0: off).
Definition at line 5907 of file Compressor.h.
|
protected |
A latency is kept for the lookahead (audio thread).
Definition at line 6037 of file Compressor.h.
|
protected |
Delay of the audio in feed-forward (audio thread).
Definition at line 6033 of file Compressor.h.
|
protected |
Definition at line 5891 of file Compressor.h.
|
protected |
The layers ran last (audio thread).
Definition at line 5892 of file Compressor.h.
|
protected |
Definition at line 5889 of file Compressor.h.
|
protected |
Definition at line 5890 of file Compressor.h.
|
protected |
Definition at line 5891 of file Compressor.h.
|
protected |
The leak as the audio thread took it.
Definition at line 5927 of file Compressor.h.
|
protected |
The slow copy of each channel's gain.
Definition at line 5929 of file Compressor.h.
|
protected |
Definition at line 5928 of file Compressor.h.
|
protected |
Definition at line 5967 of file Compressor.h.
|
protected |
Definition at line 5968 of file Compressor.h.
|
protected |
Definition at line 5967 of file Compressor.h.
|
protected |
Definition at line 5968 of file Compressor.h.
|
protected |
Definition at line 5967 of file Compressor.h.
|
protected |
Definition at line 5968 of file Compressor.h.
|
protected |
One-pole coefficient of the key's covariance (20 ms).
Definition at line 5829 of file Compressor.h.
|
protected |
Definition at line 5830 of file Compressor.h.
|
protected |
The key's covariance (dominant link).
Definition at line 5830 of file Compressor.h.
|
protected |
What the linked level reads.
Definition at line 5828 of file Compressor.h.
|
protected |
Definition at line 5830 of file Compressor.h.
|
protected |
Lookahead delay lines.
Definition at line 5976 of file Compressor.h.
|
protected |
Lookahead latency target in ms.
Definition at line 5832 of file Compressor.h.
|
protected |
One ramp per gain computer of the layout (LookaheadShape::Ramp).
Definition at line 6040 of file Compressor.h.
|
protected |
Active lookahead latency in samples.
Definition at line 5977 of file Compressor.h.
|
protected |
Definition at line 6038 of file Compressor.h.
|
protected |
Pole of the split at kBalanceLowHz.
Definition at line 6120 of file Compressor.h.
|
protected |
Static makeup gain in dB.
Definition at line 5826 of file Compressor.h.
|
protected |
Settings of the cached result.
Definition at line 6143 of file Compressor.h.
|
protected |
The cached result (dB).
Definition at line 6144 of file Compressor.h.
|
protected |
De-zippered makeup gain (dB).
Definition at line 5865 of file Compressor.h.
|
protected |
Latency kept for the lookahead (0: the lookahead itself).
Definition at line 6032 of file Compressor.h.
|
protected |
Pole of the split at kBalanceHighHz.
Definition at line 6121 of file Compressor.h.
|
protected |
Definition at line 5955 of file Compressor.h.
|
protected |
Wet/Dry mix (1 = full wet).
Definition at line 5831 of file Compressor.h.
|
protected |
De-zippered parallel mix.
Definition at line 5866 of file Compressor.h.
|
protected |
Selected compression mode.
Definition at line 5841 of file Compressor.h.
|
protected |
Definition at line 5915 of file Compressor.h.
|
protected |
Its corner.
Definition at line 5911 of file Compressor.h.
|
protected |
Depth of the network of the control path (0: off).
Definition at line 5910 of file Compressor.h.
|
protected |
Definition at line 5914 of file Compressor.h.
|
protected |
Coefficient of its low-pass.
Definition at line 5913 of file Compressor.h.
|
protected |
Share of a fast move applied at once (1: off).
Definition at line 5912 of file Compressor.h.
|
protected |
Cell of the Opto character.
Definition at line 5839 of file Compressor.h.
|
protected |
Definition at line 5959 of file Compressor.h.
|
protected |
Definition at line 5958 of file Compressor.h.
|
protected |
Definition at line 5958 of file Compressor.h.
|
protected |
Definition at line 5891 of file Compressor.h.
|
protected |
Definition at line 5891 of file Compressor.h.
|
protected |
Detected level per channel and point of the frame (dB).
Definition at line 5974 of file Compressor.h.
|
protected |
How finely the control signal is computed.
Definition at line 6063 of file Compressor.h.
|
protected |
The precise path ran last (audio thread).
Definition at line 6064 of file Compressor.h.
|
protected |
Last level of the solved loop (dB).
Definition at line 6077 of file Compressor.h.
|
protected |
Last gain target, after hold and range (dB).
Definition at line 6078 of file Compressor.h.
|
protected |
The weights of the block (audio thread).
Definition at line 6110 of file Compressor.h.
|
protected |
They acted last (audio thread).
Definition at line 6111 of file Compressor.h.
|
protected |
Weight of the sustained reduction on the release.
Definition at line 6106 of file Compressor.h.
|
protected |
Measures per gain computer.
Definition at line 6112 of file Compressor.h.
|
protected |
The ramp ran in the last block.
Definition at line 6043 of file Compressor.h.
|
protected |
Ramps prepared.
Definition at line 6041 of file Compressor.h.
|
protected |
The shape as the audio thread took it.
Definition at line 6042 of file Compressor.h.
|
protected |
Max |gain change| in dB.
Definition at line 6017 of file Compressor.h.
|
protected |
How the gain change meets the range (a RangeShape).
Definition at line 6046 of file Compressor.h.
|
protected |
Ratio (e.g., 4 = 4:1).
Definition at line 5822 of file Compressor.h.
|
protected |
De-zippered ratio.
Definition at line 5863 of file Compressor.h.
|
protected |
Attack coefficient as it is observed (before a loop's own speed).
Definition at line 6079 of file Compressor.h.
|
protected |
Release time in milliseconds.
Definition at line 5824 of file Compressor.h.
|
protected |
The release as a decay per sample.
Definition at line 6118 of file Compressor.h.
|
protected |
The output is what the compression takes out.
Definition at line 5993 of file Compressor.h.
|
protected |
Pre-allocated RMS sliding windows.
Definition at line 6006 of file Compressor.h.
|
protected |
Write heads for RMS buffers.
Definition at line 6008 of file Compressor.h.
|
protected |
Re-summation counters.
Definition at line 6010 of file Compressor.h.
|
protected |
Running sums for RMS.
Definition at line 6007 of file Compressor.h.
|
protected |
Applied at the next block.
Definition at line 6004 of file Compressor.h.
|
protected |
Active RMS length in ms (audio-thread copy).
Definition at line 6002 of file Compressor.h.
|
protected |
Control-thread published target.
Definition at line 6003 of file Compressor.h.
|
protected |
Active RMS length in samples.
Definition at line 6005 of file Compressor.h.
|
protected |
Definition at line 5954 of file Compressor.h.
|
protected |
Definition at line 5962 of file Compressor.h.
|
protected |
The part that is not treated waits here.
Definition at line 5964 of file Compressor.h.
|
protected |
The route the states carry (audio thread).
Definition at line 5960 of file Compressor.h.
|
protected |
A key given apart, as its middle and its sides.
Definition at line 5963 of file Compressor.h.
|
protected |
Definition at line 5962 of file Compressor.h.
|
protected |
The last block ran a route.
Definition at line 5961 of file Compressor.h.
|
protected |
Cached operating sample rate.
Definition at line 5818 of file Compressor.h.
|
protected |
HPF normalized feedforward coefficient.
Definition at line 5986 of file Compressor.h.
|
protected |
HPF internal feedback coefficient.
Definition at line 5985 of file Compressor.h.
|
protected |
Coefficients need a recompute.
Definition at line 5984 of file Compressor.h.
|
protected |
HPF toggle.
Definition at line 5982 of file Compressor.h.
|
protected |
HPF Cutoff frequency.
Definition at line 5983 of file Compressor.h.
|
protected |
HPF x[n-1] state.
Definition at line 5988 of file Compressor.h.
|
protected |
HPF y[n-1] state.
Definition at line 5987 of file Compressor.h.
|
protected |
The key goes out instead of the audio.
Definition at line 5992 of file Compressor.h.
|
protected |
Active audio environment specification.
Definition at line 5817 of file Compressor.h.
|
protected |
Weight of the balance of the key on both times.
Definition at line 6108 of file Compressor.h.
|
protected |
Detector attack coefficient (sample-rate derived).
Definition at line 5998 of file Compressor.h.
|
protected |
Detector release coefficient (sample-rate derived).
Definition at line 5999 of file Compressor.h.
|
protected |
Negative half-wave tracking.
Definition at line 5997 of file Compressor.h.
|
protected |
Positive half-wave tracking.
Definition at line 5996 of file Compressor.h.
|
protected |
The output amplifier.
Definition at line 6069 of file Compressor.h.
|
protected |
The input amplifier.
Definition at line 6068 of file Compressor.h.
|
protected |
The share of the colour, per sample of the fade.
Definition at line 6071 of file Compressor.h.
|
protected |
Its change per sample (20 ms end to end).
Definition at line 6072 of file Compressor.h.
|
protected |
Definition at line 6067 of file Compressor.h.
|
protected |
The coloured copy while a place fades.
Definition at line 6070 of file Compressor.h.
|
protected |
Share of the output stage (audio thread).
Definition at line 6074 of file Compressor.h.
|
protected |
Share of the input stage (audio thread).
Definition at line 6073 of file Compressor.h.
|
protected |
Stereo linking amount (0 to 1).
Definition at line 5827 of file Compressor.h.
|
protected |
Attack coefficient of an eighth of a sample.
Definition at line 6080 of file Compressor.h.
|
protected |
Memory-stage charge coefficient of an eighth of a sample.
Definition at line 6083 of file Compressor.h.
|
protected |
Decoupled hold coefficient of an eighth of a sample.
Definition at line 6086 of file Compressor.h.
|
protected |
Decoupled smoothing coefficient of an eighth of a sample.
Definition at line 6087 of file Compressor.h.
|
protected |
Medium-memory charge coefficient of an eighth of a sample.
Definition at line 6085 of file Compressor.h.
|
protected |
Medium-memory release coefficient of an eighth of a sample.
Definition at line 6084 of file Compressor.h.
|
protected |
Pole of the split at kBalanceFloorHz.
Definition at line 6119 of file Compressor.h.
|
protected |
Release coefficient of an eighth of a sample.
Definition at line 6081 of file Compressor.h.
|
protected |
Memory-stage release coefficient of an eighth of a sample.
Definition at line 6082 of file Compressor.h.
|
protected |
Pole of the follower of the depth.
Definition at line 6124 of file Compressor.h.
|
protected |
The audio thread runs the three-stage cell.
Definition at line 5858 of file Compressor.h.
|
protected |
Threshold in dB.
Definition at line 5821 of file Compressor.h.
|
protected |
With the automatic threshold, the threshold of the last sample (metering).
Definition at line 6029 of file Compressor.h.
|
protected |
De-zippered threshold.
Definition at line 5862 of file Compressor.h.
|
protected |
Coefficients need a recompute.
Definition at line 5852 of file Compressor.h.
|
protected |
The tone is in the path.
Definition at line 5926 of file Compressor.h.
|
protected |
The filter F of the tone (audio thread).
Definition at line 5924 of file Compressor.h.
|
protected |
Definition at line 5921 of file Compressor.h.
|
protected |
The gains those were designed for.
Definition at line 5925 of file Compressor.h.
|
protected |
Definition at line 5924 of file Compressor.h.
|
protected |
Definition at line 5921 of file Compressor.h.
|
protected |
Definition at line 5925 of file Compressor.h.
|
protected |
Selected topology.
Definition at line 5837 of file Compressor.h.
|
protected |
Definition at line 6013 of file Compressor.h.
|
protected |
Peak-held sustained level (Upward guard).
Definition at line 5970 of file Compressor.h.
|
protected |
Guard decay per sample (60 dB/s).
Definition at line 5971 of file Compressor.h.