112inline StkFloat JCRev :: tick( StkFloat input,
unsigned int channel )
114#if defined(_STK_DEBUG_)
116 oStream_ <<
"JCRev::tick(): channel argument must be less than 2!";
121 StkFloat temp, temp0, temp1, temp2, temp3, temp4, temp5, temp6;
124 temp = allpassDelays_[0].
lastOut();
125 temp0 = allpassCoefficient_ * temp;
127 allpassDelays_[0].tick(temp0);
128 temp0 = -(allpassCoefficient_ * temp0) + temp;
130 temp = allpassDelays_[1].lastOut();
131 temp1 = allpassCoefficient_ * temp;
133 allpassDelays_[1].tick(temp1);
134 temp1 = -(allpassCoefficient_ * temp1) + temp;
136 temp = allpassDelays_[2].lastOut();
137 temp2 = allpassCoefficient_ * temp;
139 allpassDelays_[2].tick(temp2);
140 temp2 = -(allpassCoefficient_ * temp2) + temp;
142 temp3 = temp2 + ( combFilters_[0].tick( combCoefficient_[0] * combDelays_[0].
lastOut() ) );
143 temp4 = temp2 + ( combFilters_[1].tick( combCoefficient_[1] * combDelays_[1].
lastOut() ) );
144 temp5 = temp2 + ( combFilters_[2].tick( combCoefficient_[2] * combDelays_[2].
lastOut() ) );
145 temp6 = temp2 + ( combFilters_[3].tick( combCoefficient_[3] * combDelays_[3].
lastOut() ) );
147 combDelays_[0].tick(temp3);
148 combDelays_[1].tick(temp4);
149 combDelays_[2].tick(temp5);
150 combDelays_[3].tick(temp6);
152 filtout = temp3 + temp4 + temp5 + temp6;
154 lastFrame_[0] = effectMix_ * (outLeftDelay_.tick(filtout));
155 lastFrame_[1] = effectMix_ * (outRightDelay_.tick(filtout));
156 temp = (1.0 - effectMix_) * input;
157 lastFrame_[0] += temp;
158 lastFrame_[1] += temp;
160 return 0.7 * lastFrame_[channel];
StkFrames & tick(StkFrames &frames, unsigned int channel=0)
Take a channel of the StkFrames object as inputs to the effect and replace with stereo outputs.
StkFrames & tick(StkFrames &iFrames, StkFrames &oFrames, unsigned int iChannel=0, unsigned int oChannel=0)
Take a channel of the iFrames object as inputs to the effect and write stereo outputs to the oFrames ...
StkFloat tick(StkFloat input, unsigned int channel=0)
Input one sample to the effect and return the specified channel value of the computed stereo frame.
Definition JCRev.h:112