JUCE  v6.1.6 (6.0.8-1114)
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::dsp::DryWetMixer< SampleType > Class Template Reference

A processor to handle dry/wet mixing of two audio signals, where the wet signal may have additional latency. More...

#include <juce_DryWetMixer.h>

Collaboration diagram for juce::dsp::DryWetMixer< SampleType >:

Public Types

using MixingRule = DryWetMixingRule
 

Public Member Functions

 DryWetMixer ()
 Default constructor. More...
 
 DryWetMixer (int maximumWetLatencyInSamples)
 Constructor. More...
 
void mixWetSamples (AudioBlock< SampleType > wetSamples)
 Mixes the supplied wet samples with the latency-compensated dry samples from pushDrySamples. More...
 
void prepare (const ProcessSpec &spec)
 Initialises the processor. More...
 
void pushDrySamples (const AudioBlock< const SampleType > drySamples)
 Copies the dry path samples into an internal delay line. More...
 
void reset ()
 Resets the internal state variables of the processor. More...
 
void setMixingRule (MixingRule newRule)
 Sets the mix rule. More...
 
void setWetLatency (SampleType wetLatencyInSamples)
 Sets the relative latency of the wet signal path compared to the dry signal path, and thus the amount of latency compensation that will be added to the dry samples in this processor. More...
 
void setWetMixProportion (SampleType newWetMixProportion)
 Sets the current dry/wet mix proportion, with 0.0 being full dry and 1.0 being fully wet. More...
 

Private Member Functions

void update ()
 

Private Attributes

AudioBuffer< SampleType > bufferDry
 
MixingRule currentMixingRule = MixingRule::linear
 
DelayLine< SampleType, DelayLineInterpolationTypes::ThirandryDelayLine
 
SmoothedValue< SampleType, ValueSmoothingTypes::LineardryVolume
 
SingleThreadedAbstractFifo fifo
 
int maximumWetLatencyInSamples = 0
 
SampleType mix = 1.0
 
double sampleRate = 44100.0
 
SmoothedValue< SampleType, ValueSmoothingTypes::LinearwetVolume
 

Detailed Description

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

A processor to handle dry/wet mixing of two audio signals, where the wet signal may have additional latency.

Once a DryWetMixer object is configured, push the dry samples using pushDrySamples and mix into the fully wet samples using mixWetSamples.

@tags{DSP}

Member Typedef Documentation

◆ MixingRule

template<typename SampleType >
using juce::dsp::DryWetMixer< SampleType >::MixingRule = DryWetMixingRule

Constructor & Destructor Documentation

◆ DryWetMixer() [1/2]

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

Default constructor.

◆ DryWetMixer() [2/2]

template<typename SampleType >
juce::dsp::DryWetMixer< SampleType >::DryWetMixer ( int  maximumWetLatencyInSamples)
explicit

Constructor.

Member Function Documentation

◆ mixWetSamples()

template<typename SampleType >
void juce::dsp::DryWetMixer< SampleType >::mixWetSamples ( AudioBlock< SampleType >  wetSamples)

Mixes the supplied wet samples with the latency-compensated dry samples from pushDrySamples.

Parameters
wetSamplesInput: The AudioBlock references fully wet samples. Output: The AudioBlock references the wet samples mixed with the latency compensated dry samples.
See also
pushDrySamples

◆ prepare()

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

Initialises the processor.

◆ pushDrySamples()

template<typename SampleType >
void juce::dsp::DryWetMixer< SampleType >::pushDrySamples ( const AudioBlock< const SampleType >  drySamples)

Copies the dry path samples into an internal delay line.

◆ reset()

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

Resets the internal state variables of the processor.

◆ setMixingRule()

template<typename SampleType >
void juce::dsp::DryWetMixer< SampleType >::setMixingRule ( MixingRule  newRule)

Sets the mix rule.

◆ setWetLatency()

template<typename SampleType >
void juce::dsp::DryWetMixer< SampleType >::setWetLatency ( SampleType  wetLatencyInSamples)

Sets the relative latency of the wet signal path compared to the dry signal path, and thus the amount of latency compensation that will be added to the dry samples in this processor.

◆ setWetMixProportion()

template<typename SampleType >
void juce::dsp::DryWetMixer< SampleType >::setWetMixProportion ( SampleType  newWetMixProportion)

Sets the current dry/wet mix proportion, with 0.0 being full dry and 1.0 being fully wet.

◆ update()

template<typename SampleType >
void juce::dsp::DryWetMixer< SampleType >::update ( )
private

Member Data Documentation

◆ bufferDry

template<typename SampleType >
AudioBuffer<SampleType> juce::dsp::DryWetMixer< SampleType >::bufferDry
private

◆ currentMixingRule

template<typename SampleType >
MixingRule juce::dsp::DryWetMixer< SampleType >::currentMixingRule = MixingRule::linear
private

◆ dryDelayLine

template<typename SampleType >
DelayLine<SampleType, DelayLineInterpolationTypes::Thiran> juce::dsp::DryWetMixer< SampleType >::dryDelayLine
private

◆ dryVolume

template<typename SampleType >
SmoothedValue<SampleType, ValueSmoothingTypes::Linear> juce::dsp::DryWetMixer< SampleType >::dryVolume
private

◆ fifo

template<typename SampleType >
SingleThreadedAbstractFifo juce::dsp::DryWetMixer< SampleType >::fifo
private

◆ maximumWetLatencyInSamples

template<typename SampleType >
int juce::dsp::DryWetMixer< SampleType >::maximumWetLatencyInSamples = 0
private

◆ mix

template<typename SampleType >
SampleType juce::dsp::DryWetMixer< SampleType >::mix = 1.0
private

◆ sampleRate

template<typename SampleType >
double juce::dsp::DryWetMixer< SampleType >::sampleRate = 44100.0
private

◆ wetVolume

template<typename SampleType >
SmoothedValue<SampleType, ValueSmoothingTypes::Linear> juce::dsp::DryWetMixer< SampleType >::wetVolume
private

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