Performs a simple reverb effect on a stream of audio data. More...
#include <juce_Reverb.h>
Classes | |
class | AllPassFilter |
class | CombFilter |
struct | Parameters |
Holds the parameters being used by a Reverb object. More... | |
Public Member Functions | |
Reverb () | |
const Parameters & | getParameters () 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< float > | damping |
SmoothedValue< float > | dryGain |
SmoothedValue< float > | feedback |
float | gain |
Parameters | parameters |
SmoothedValue< float > | wetGain1 |
SmoothedValue< float > | wetGain2 |
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.
@tags{Audio}
|
inline |
References setParameters(), and setSampleRate().
|
inlinenoexcept |
Returns the reverb's current parameters.
References parameters.
Referenced by juce::dsp::Reverb::getParameters().
Referenced by setParameters(), and updateDamping().
Applies the reverb to a single mono channel of audio data.
References allPass, comb, damping, dryGain, feedback, gain, juce::SmoothedValue< FloatType, SmoothingType >::getNextValue(), juce::gl::input, juce::gl::j, jassert, JUCE_BEGIN_IGNORE_WARNINGS_MSVC, JUCE_END_IGNORE_WARNINGS_MSVC, numAllPasses, numCombs, juce::gl::output, juce::gl::samples, and wetGain1.
Referenced by juce::dsp::Reverb::process().
|
inlinenoexcept |
Applies the reverb to two stereo channels of audio data.
References allPass, comb, damping, dryGain, feedback, gain, juce::SmoothedValue< FloatType, SmoothingType >::getNextValue(), juce::gl::input, juce::gl::j, jassert, JUCE_BEGIN_IGNORE_WARNINGS_MSVC, JUCE_END_IGNORE_WARNINGS_MSVC, juce::gl::left, numAllPasses, numCombs, juce::Reverb::CombFilter::process(), juce::Reverb::AllPassFilter::process(), juce::gl::right, wetGain1, and wetGain2.
Referenced by juce::dsp::Reverb::process().
|
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().
|
inlineprivatenoexcept |
References damping, feedback, and juce::SmoothedValue< FloatType, SmoothingType >::setTargetValue().
Referenced by updateDamping().
|
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().
|
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().
|
inlineprivatenoexcept |
References juce::Reverb::Parameters::damping, juce::gl::f, juce::Reverb::Parameters::freezeMode, isFrozen(), parameters, juce::Reverb::Parameters::roomSize, and setDamping().
Referenced by setParameters().
|
private |
Referenced by processMono(), processStereo(), reset(), and setSampleRate().
|
private |
Referenced by processMono(), processStereo(), reset(), and setSampleRate().
|
private |
Referenced by processMono(), processStereo(), setDamping(), and setSampleRate().
|
private |
Referenced by processMono(), processStereo(), setParameters(), and setSampleRate().
|
private |
Referenced by processMono(), processStereo(), setDamping(), and setSampleRate().
|
private |
Referenced by processMono(), processStereo(), and setParameters().
|
private |
Referenced by getParameters(), setParameters(), and updateDamping().
|
private |
Referenced by processMono(), processStereo(), setParameters(), and setSampleRate().
|
private |
Referenced by processStereo(), setParameters(), and setSampleRate().