80 StkFloat
lastOut(
unsigned int channel = 0 );
90 StkFloat
tick( StkFloat inputL, StkFloat inputR = 0.0,
unsigned int channel = 0 );
131 static const int nCombs = 8;
132 static const int nAllpasses = 4;
133 static const int stereoSpread = 23;
134 static const StkFloat fixedGain;
135 static const StkFloat scaleWet;
136 static const StkFloat scaleDry;
137 static const StkFloat scaleDamp;
138 static const StkFloat scaleRoom;
139 static const StkFloat offsetRoom;
142 static int cDelayLengths[nCombs];
143 static int aDelayLengths[nAllpasses];
147 StkFloat roomSizeMem_, roomSize_;
148 StkFloat dampMem_, damp_;
149 StkFloat wet1_, wet2_;
155 Delay combDelayL_[nCombs];
156 Delay combDelayR_[nCombs];
161 Delay allPassDelayL_[nAllpasses];
162 Delay allPassDelayR_[nAllpasses];
167 #if defined(_STK_DEBUG_)
169 oStream_ <<
"FreeVerb::lastOut(): channel argument must be less than 2!";
174 return lastFrame_[channel];
177 inline StkFloat
FreeVerb::tick( StkFloat inputL, StkFloat inputR,
unsigned int channel )
179 #if defined(_STK_DEBUG_)
181 oStream_ <<
"FreeVerb::tick(): channel argument must be less than 2!";
186 StkFloat fInput = (inputL + inputR) * gain_;
191 for (
int i = 0; i < nCombs; i++ ) {
194 StkFloat yn = fInput + (roomSize_ * combLPL_[i].
tick( combDelayL_[i].nextOut() ) );
195 combDelayL_[i].
tick(yn);
200 yn = fInput + (roomSize_ * combLPR_[i].
tick( combDelayR_[i].nextOut() ) );
201 combDelayR_[i].
tick(yn);
206 for (
int i = 0; i < nAllpasses; i++ ) {
209 StkFloat vn_m = allPassDelayL_[i].
nextOut();
210 StkFloat vn = outL + (g_ * vn_m);
211 allPassDelayL_[i].
tick(vn);
214 outL = -vn + (1.0 + g_)*vn_m;
218 vn_m = allPassDelayR_[i].
nextOut();
219 vn = outR + (g_ * vn_m);
220 allPassDelayR_[i].
tick(vn);
223 outR = -vn + (1.0 + g_)*vn_m;
227 lastFrame_[0] = outL*wet1_ + outR*wet2_ + inputL*dry_;
228 lastFrame_[1] = outR*wet1_ + outL*wet2_ + inputR*dry_;
246 return lastFrame_[channel];
STK non-interpolating delay line class.
Definition: Delay.h:25
StkFloat nextOut(void)
Return the value that will be output by the next call to tick().
Definition: Delay.h:87
StkFloat tick(StkFloat input)
Input one sample to the filter and return one output.
Definition: Delay.h:124
STK abstract effects parent class.
Definition: Effect.h:22
Jezar at Dreampoint's FreeVerb, implemented in STK.
Definition: FreeVerb.h:27
StkFloat tick(StkFloat inputL, StkFloat inputR=0.0, unsigned int channel=0)
Input one or two samples to the effect and return the specified channel value of the computed stereo ...
Definition: FreeVerb.h:177
void clear(void)
Clears delay lines, etc.
StkFrames & tick(StkFrames &frames, unsigned int channel=0)
Take two channels of the StkFrames object as inputs to the effect and replace with stereo outputs.
void update(void)
Update interdependent parameters.
StkFloat getDamping(void)
Get the damping parameter.
void setRoomSize(StkFloat value)
Set the room size (comb filter feedback gain) parameter [0,1].
StkFloat getMode(void)
Get the current freeze mode [frozen = 1, unfrozen = 0].
void setWidth(StkFloat value)
Set the width (left-right mixing) parameter [0,1].
void setDamping(StkFloat value)
Set the damping parameter [0=low damping, 1=higher damping].
StkFloat lastOut(unsigned int channel=0)
Return the specified channel value of the last computed stereo frame.
Definition: FreeVerb.h:165
FreeVerb()
FreeVerb Constructor.
StkFloat getWidth(void)
Get the width (left-right mixing) parameter.
void setMode(bool isFrozen)
Set the mode [frozen = 1, unfrozen = 0].
void setEffectMix(StkFloat mix)
Set the effect mix [0 = mostly dry, 1 = mostly wet].
StkFrames & tick(StkFrames &iFrames, StkFrames &oFrames, unsigned int iChannel=0, unsigned int oChannel=0)
Take one or two channels of the iFrames object as inputs to the effect and write stereo outputs to th...
StkFloat getRoomSize(void)
Get the room size (comb filter feedback gain) parameter.
STK one-pole filter class.
Definition: OnePole.h:21
StkFloat tick(StkFloat input)
Input one sample to the filter and return one output.
Definition: OnePole.h:80
An STK class to handle vectorized audio data.
Definition: Stk.h:287
static void handleError(const char *message, StkError::Type type)
Static function for error reporting and handling using c-strings.
The STK namespace.
Definition: ADSR.h:8