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];