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];
100inline StkFloat JCRev :: lastOut(
unsigned int channel )
102#if defined(_STK_DEBUG_)
104 oStream_ <<
"JCRev::lastOut(): channel argument must be less than 2!";
105 handleError( StkError::FUNCTION_ARGUMENT );
109 return lastFrame_[channel];
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!";
117 handleError( StkError::FUNCTION_ARGUMENT );
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];
STK non-interpolating delay line class.
Definition Delay.h:25
STK abstract effects parent class.
Definition Effect.h:22
John Chowning's reverberator class.
Definition JCRev.h:32
StkFloat lastOut(unsigned int channel=0)
Return the specified channel value of the last computed stereo frame.
Definition JCRev.h:100
JCRev(StkFloat T60=1.0)
Class constructor taking a T60 decay time argument (one second default value).
void setT60(StkFloat T60)
Set the reverberation T60 decay time.
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.
void clear(void)
Reset and clear all internal state.
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
STK one-pole filter class.
Definition OnePole.h:21
An STK class to handle vectorized audio data.
Definition Stk.h:279
The STK namespace.
Definition ADSR.h:6