MEAP The Library

MOZZI
MEAP The Class
C++ tips
Mozzi Reworks
mOscil
mSample
Generators
mDust
mNoise
mOperator
mSineLFO
mEnvSection
Effects
mBitcrusher
mChorus
mDigitalDelay
mFlanger
mPlateReverb
mSchroederReverb
DSP
mDelayLine
mFeedbackComb
mFeedforwardComb
mFIR
mIIR
mNaturalComb
mOnePoleLPF
mResonz
mRingz
mSchroederAllpass
mInstruments
mDrumRack
mFM4Instrument
mMarimbaInstrument
mPopInstrument
mRompler
mStringInstrument
mStringSynthInstrument
Composition
mMML
mTransitionTable
Utilities
mEventDelayMicros
mRandomDistribution

class: mChorus


stereo chorus effect

Description

mono-in, stereo-out chorus effect

Template Parameters

template <class T = int32_t>

T: data type used internally in delay lines

Class Methods

Constructor

mChorus(float mod_freq = 0.2; float mod_depth = 0.05; float mix = 0.5)

mod_freq: frequency (in Hz) of modulation oscillators.

mod_depth: depth of modulation (0 to 1.0 but close to zero sounds best)

mix: dry/wet mix of effect (0 to 1.0)


void setModFreq(float freq)

Sets frequency (in Hz) of modulation oscillators.


void setModDepth(float mod_depth)

Sets depth of modulation (0 to 1, but close to zero sounds best)

void setMix(float mix)

mix: dry/wet mix of effect (0 to 1.0)


T next(T in_sample)

Send a sample of audio into the effect and return a sample back.

Example

// global declaration
mChorus my_chorus;

// in updateAudio
out_sample = my_chorus.next(oscillator_output); // where oscillator_output is the output of some previous sound-generating object

Relevant Tutorials