Loading...
Searching...
No Matches
juce::dsp::Compressor< SampleType > Class Template Reference

Detailed Description

template<typename SampleType>
class juce::dsp::Compressor< SampleType >

A simple compressor with standard threshold, ratio, attack time and release time controls.

Public Member Functions

 Compressor ()
 Constructor.
void setThreshold (SampleType newThreshold)
 Sets the threshold in dB of the compressor.
void setRatio (SampleType newRatio)
 Sets the ratio of the compressor (must be higher or equal to 1).
void setAttack (SampleType newAttack)
 Sets the attack time in milliseconds of the compressor.
void setRelease (SampleType newRelease)
 Sets the release time in milliseconds of the compressor.
void prepare (const ProcessSpec &spec)
 Initialises the processor.
void reset ()
 Resets the internal state variables of the processor.
template<typename ProcessContext>
void process (const ProcessContext &context) noexcept
 Processes the input and output samples supplied in the processing context.
SampleType processSample (int channel, SampleType inputValue)
 Performs the processing operation on a single sample at a time.

Constructors and Destructors

◆ Compressor()

template<typename SampleType>
juce::dsp::Compressor< SampleType >::Compressor ( )

Constructor.

Member Functions

◆ setThreshold()

template<typename SampleType>
void juce::dsp::Compressor< SampleType >::setThreshold ( SampleType newThreshold)

Sets the threshold in dB of the compressor.

◆ setRatio()

template<typename SampleType>
void juce::dsp::Compressor< SampleType >::setRatio ( SampleType newRatio)

Sets the ratio of the compressor (must be higher or equal to 1).

◆ setAttack()

template<typename SampleType>
void juce::dsp::Compressor< SampleType >::setAttack ( SampleType newAttack)

Sets the attack time in milliseconds of the compressor.

◆ setRelease()

template<typename SampleType>
void juce::dsp::Compressor< SampleType >::setRelease ( SampleType newRelease)

Sets the release time in milliseconds of the compressor.

◆ prepare()

template<typename SampleType>
void juce::dsp::Compressor< SampleType >::prepare ( const ProcessSpec & spec)

Initialises the processor.

◆ reset()

template<typename SampleType>
void juce::dsp::Compressor< SampleType >::reset ( )

Resets the internal state variables of the processor.

◆ process()

template<typename SampleType>
template<typename ProcessContext>
void juce::dsp::Compressor< SampleType >::process ( const ProcessContext & context)
noexcept

Processes the input and output samples supplied in the processing context.

References processSample().

◆ processSample()

template<typename SampleType>
SampleType juce::dsp::Compressor< SampleType >::processSample ( int channel,
SampleType inputValue )

Performs the processing operation on a single sample at a time.

Referenced by process().

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram