35 JCRev( StkFloat T60 = 1.0 );
41 void setT60( StkFloat T60 );
52 StkFloat
lastOut(
unsigned int channel = 0 );
62 StkFloat
tick( StkFloat input,
unsigned int channel = 0 );
90 Delay allpassDelays_[3];
95 StkFloat allpassCoefficient_;
96 StkFloat combCoefficient_[4];
102 #if defined(_STK_DEBUG_)
104 oStream_ <<
"JCRev::lastOut(): channel argument must be less than 2!";
109 return lastFrame_[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];