Class thl::dsp::utils::MultibandLimiterImpl#

class MultibandLimiterImpl : public thl::dsp::utils::BandSplitter#

Inheritance diagram for thl::dsp::utils::MultibandLimiterImpl:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "3" [label="thl::dsp::BaseProcessor" tooltip="thl::dsp::BaseProcessor"] "2" [label="thl::dsp::utils::BandSplitter" tooltip="thl::dsp::utils::BandSplitter"] "1" [label="thl::dsp::utils::MultibandLimiterImpl" tooltip="thl::dsp::utils::MultibandLimiterImpl" fillcolor="#BFBFBF"] "2" -> "3" [dir=forward tooltip="public-inheritance"] "1" -> "2" [dir=forward tooltip="public-inheritance"] }

Collaboration diagram for thl::dsp::utils::MultibandLimiterImpl:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "3" [label="thl::dsp::BaseProcessor" tooltip="thl::dsp::BaseProcessor"] "2" [label="thl::dsp::utils::BandSplitter" tooltip="thl::dsp::utils::BandSplitter"] "1" [label="thl::dsp::utils::MultibandLimiterImpl" tooltip="thl::dsp::utils::MultibandLimiterImpl" fillcolor="#BFBFBF"] "2" -> "3" [dir=forward tooltip="public-inheritance"] "1" -> "2" [dir=forward tooltip="public-inheritance"] }

Splits the signal with BandSplitter, limits every band with its own limiter and sums the bands.

process_with_dry() also writes the sum of the bands before limiting: the input through the crossovers’ all-passes, so in phase with the output (a dry signal matches the phase only, never the latency: BaseProcessor::process_with_dry()).

A derived class implements get_band_parameter_float() to give every band its own threshold, attack and release, and may implement get_crossover_parameter_float() (BandSplitter) for the crossover frequencies, read at every process() call at modulation_offset; otherwise they are set with set_frequency() or set_frequencies().

Public Functions

explicit MultibandLimiterImpl(size_t num_bands, size_t order)#
virtual void prepare(const double &sample_rate, const size_t &samples_per_block, const size_t &num_channels) override#
virtual void process(thl::core::BufferView buffer, uint32_t modulation_offset = 0) override#
virtual void reset() override#

Clears the crossovers and releases every band’s limiter.

virtual void process_with_dry(thl::core::BufferView buffer, uint32_t modulation_offset, thl::core::BufferView dry) override#

process(), also writing the dry signal into dry: the input with the phase response of process() but without its effect, so wet and dry can be blended.

It matches the phase only, never the latency. Undelayed: a processor with latency_samples() leaves aligning the dry signal to its latency to whoever mixes it (a Graph delays a node’s dry path by it). The default copies buffer into dry; override it if process() changes the phase. An empty dry means no dry signal.

Protected Types

enum BandParameter#

Values:

enumerator Threshold#
enumerator Attack#
enumerator Release#
enumerator NumBandParameters#

Protected Functions

virtual float get_band_parameter_float(BandParameter parameter, size_t band, uint32_t modulation_offset = 0) = 0#