JUCE  v6.1.6 (6.0.8-1114)
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]
 
SmoothedValue< floatdamping
 
SmoothedValue< floatdryGain
 
SmoothedValue< floatfeedback
 
float gain
 
Parameters parameters
 
SmoothedValue< floatwetGain1
 
SmoothedValue< 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

@tags{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

Referenced by setParameters(), and updateDamping().

◆ processMono()

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

◆ processStereo()

◆ reset()

void juce::Reverb::reset ( )
inline

Clears the reverb's buffers.

References allPass, juce::VariantHelpers::clear(), comb, juce::gl::j, 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::gl::f, juce::Reverb::Parameters::freezeMode, gain, isFrozen(), parameters, juce::SmoothedValue< FloatType, SmoothingType >::setTargetValue(), 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, damping, dryGain, feedback, int(), jassert, numAllPasses, numCombs, juce::SmoothedValue< FloatType, SmoothingType >::reset(), juce::Reverb::CombFilter::setSize(), juce::Reverb::AllPassFilter::setSize(), wetGain1, and wetGain2.

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

◆ updateDamping()

Member Data Documentation

◆ allPass

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

◆ comb

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

◆ damping

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

◆ dryGain

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

◆ feedback

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

◆ gain

float juce::Reverb::gain
private

◆ parameters

Parameters juce::Reverb::parameters
private

◆ wetGain1

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

◆ wetGain2

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

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