JUCE  v5.1.1-3-g1a0b28c73
JUCE API
Reverb Class Reference

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

#include <juce_Reverb.h>

Collaboration diagram for 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< float > damping
 
LinearSmoothedValue< float > dryGain
 
LinearSmoothedValue< float > feedback
 
float gain
 
Parameters parameters
 
LinearSmoothedValue< float > wetGain1
 
LinearSmoothedValue< float > wetGain2
 

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

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
numCombs 
numAllPasses 
numChannels 

Constructor & Destructor Documentation

◆ Reverb()

Reverb::Reverb ( )
inline

References setParameters(), and setSampleRate().

Member Function Documentation

◆ getParameters()

const Parameters& Reverb::getParameters ( ) const
inlinenoexcept

Returns the reverb's current parameters.

References parameters.

◆ isFrozen()

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

◆ processMono()

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

◆ processStereo()

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

◆ reset()

void Reverb::reset ( )
inline

Clears the reverb's buffers.

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

◆ setDamping()

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

◆ setParameters()

void 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, Reverb::Parameters::dryLevel, Reverb::Parameters::freezeMode, gain, isFrozen(), parameters, juce::LinearSmoothedValue< FloatType >::setValue(), updateDamping(), wetGain1, wetGain2, Reverb::Parameters::wetLevel, and Reverb::Parameters::width.

Referenced by Reverb().

◆ setSampleRate()

void 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, Reverb::Parameters::damping, dryGain, feedback, jassert, numAllPasses, numCombs, juce::LinearSmoothedValue< FloatType >::reset(), Reverb::CombFilter::setSize(), Reverb::AllPassFilter::setSize(), wetGain1, and wetGain2.

Referenced by Reverb().

◆ updateDamping()

void Reverb::updateDamping ( )
inlineprivatenoexcept

Member Data Documentation

◆ allPass

◆ comb

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

◆ damping

LinearSmoothedValue<float> Reverb::damping
private

◆ dryGain

LinearSmoothedValue<float> Reverb::dryGain
private

◆ feedback

LinearSmoothedValue<float> Reverb::feedback
private

◆ gain

float Reverb::gain
private

◆ parameters

Parameters Reverb::parameters
private

◆ wetGain1

LinearSmoothedValue<float> Reverb::wetGain1
private

◆ wetGain2

LinearSmoothedValue<float> Reverb::wetGain2
private

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