JUCE  v5.4.1-191-g0ab5e696f
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::Reverb Class Reference

Performs a simple reverb effect on a stream of audio data. More...

#include <juce_Reverb.h>

Collaboration diagram for juce::Reverb:

Classes

class  AllPassFilter
 
class  CombFilter
 
struct  Parameters
 Holds the parameters being used by a Reverb object. More...
 

Public Member Functions

 Reverb ()
 
const ParametersgetParameters () const noexcept
 Returns the reverb's current parameters. More...
 
void processMono (float *const samples, const int numSamples) noexcept
 Applies the reverb to a single mono channel of audio data. More...
 
void processStereo (float *const left, float *const right, const int numSamples) noexcept
 Applies the reverb to two stereo channels of audio data. More...
 
void reset ()
 Clears the reverb's buffers. More...
 
void setParameters (const Parameters &newParams)
 Applies a new set of parameters to the reverb. More...
 
void setSampleRate (const double sampleRate)
 Sets the sample rate that will be used for the reverb. More...
 

Private Types

enum  {
  numCombs = 8,
  numAllPasses = 4,
  numChannels = 2
}
 

Private Member Functions

void setDamping (const float dampingToUse, const float roomSizeToUse) noexcept
 
void updateDamping () noexcept
 

Static Private Member Functions

static bool isFrozen (const float freezeMode) noexcept
 

Private Attributes

AllPassFilter allPass [numChannels][numAllPasses]
 
CombFilter comb [numChannels][numCombs]
 
LinearSmoothedValue< floatdamping
 
LinearSmoothedValue< floatdryGain
 
LinearSmoothedValue< floatfeedback
 
float gain
 
Parameters parameters
 
LinearSmoothedValue< floatwetGain1
 
LinearSmoothedValue< floatwetGain2
 

Detailed Description

Performs a simple reverb effect on a stream of audio data.

This is a simple stereo reverb, based on the technique and tunings used in FreeVerb. Use setSampleRate() to prepare it, and then call processStereo() or processMono() to apply the reverb to your audio data.

See also
ReverbAudioSource

{Audio}

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
numCombs 
numAllPasses 
numChannels 

Constructor & Destructor Documentation

◆ Reverb()

juce::Reverb::Reverb ( )
inline

References setParameters(), and setSampleRate().

Member Function Documentation

◆ getParameters()

const Parameters& juce::Reverb::getParameters ( ) const
inlinenoexcept

Returns the reverb's current parameters.

References parameters.

Referenced by juce::dsp::Reverb::getParameters().

◆ isFrozen()

static bool juce::Reverb::isFrozen ( const float  freezeMode)
inlinestaticprivatenoexcept

◆ processMono()

void juce::Reverb::processMono ( float *const  samples,
const int  numSamples 
)
inlinenoexcept

◆ processStereo()

void juce::Reverb::processStereo ( float *const  left,
float *const  right,
const int  numSamples 
)
inlinenoexcept

◆ reset()

void juce::Reverb::reset ( )
inline

Clears the reverb's buffers.

References allPass, comb, numAllPasses, numChannels, and numCombs.

Referenced by juce::dsp::Reverb::reset().

◆ setDamping()

void juce::Reverb::setDamping ( const float  dampingToUse,
const float  roomSizeToUse 
)
inlineprivatenoexcept

◆ setParameters()

void juce::Reverb::setParameters ( const Parameters newParams)
inline

Applies a new set of parameters to the reverb.

Note that this doesn't attempt to lock the reverb, so if you call this in parallel with the process method, you may get artifacts.

References dryGain, juce::Reverb::Parameters::dryLevel, juce::Reverb::Parameters::freezeMode, gain, isFrozen(), parameters, juce::LinearSmoothedValue< FloatType >::setValue(), updateDamping(), wetGain1, wetGain2, juce::Reverb::Parameters::wetLevel, and juce::Reverb::Parameters::width.

Referenced by Reverb(), and juce::dsp::Reverb::setParameters().

◆ setSampleRate()

void juce::Reverb::setSampleRate ( const double  sampleRate)
inline

Sets the sample rate that will be used for the reverb.

You must call this before the process methods, in order to tell it the correct sample rate.

References allPass, comb, juce::Reverb::Parameters::damping, dryGain, feedback, int(), jassert, numAllPasses, numCombs, juce::LinearSmoothedValue< FloatType >::reset(), juce::Reverb::CombFilter::setSize(), juce::Reverb::AllPassFilter::setSize(), wetGain1, and wetGain2.

Referenced by juce::dsp::Reverb::prepare(), and Reverb().

◆ updateDamping()

void juce::Reverb::updateDamping ( )
inlineprivatenoexcept

Member Data Documentation

◆ allPass

AllPassFilter juce::Reverb::allPass[numChannels][numAllPasses]
private

◆ comb

CombFilter juce::Reverb::comb[numChannels][numCombs]
private

◆ damping

LinearSmoothedValue<float> juce::Reverb::damping
private

◆ dryGain

LinearSmoothedValue<float> juce::Reverb::dryGain
private

◆ feedback

LinearSmoothedValue<float> juce::Reverb::feedback
private

◆ gain

float juce::Reverb::gain
private

◆ parameters

Parameters juce::Reverb::parameters
private

◆ wetGain1

LinearSmoothedValue<float> juce::Reverb::wetGain1
private

◆ wetGain2

LinearSmoothedValue<float> juce::Reverb::wetGain2
private

The documentation for this class was generated from the following file: