28 PRCRev( StkFloat T60 = 1.0 );
34 void setT60( StkFloat T60 );
45 StkFloat
lastOut(
unsigned int channel = 0 );
55 StkFloat
tick( StkFloat input,
unsigned int channel = 0 );
83 Delay allpassDelays_[2];
85 StkFloat allpassCoefficient_;
86 StkFloat combCoefficient_[2];
92 #if defined(_STK_DEBUG_) 94 oStream_ <<
"PRCRev::lastOut(): channel argument must be less than 2!";
99 return lastFrame_[channel];
104 #if defined(_STK_DEBUG_) 106 oStream_ <<
"PRCRev::tick(): channel argument must be less than 2!";
111 StkFloat temp, temp0, temp1, temp2, temp3;
113 temp = allpassDelays_[0].
lastOut();
114 temp0 = allpassCoefficient_ * temp;
116 allpassDelays_[0].
tick(temp0);
117 temp0 = -(allpassCoefficient_ * temp0) + temp;
119 temp = allpassDelays_[1].
lastOut();
120 temp1 = allpassCoefficient_ * temp;
122 allpassDelays_[1].
tick(temp1);
123 temp1 = -(allpassCoefficient_ * temp1) + temp;
125 temp2 = temp1 + ( combCoefficient_[0] * combDelays_[0].
lastOut() );
126 temp3 = temp1 + ( combCoefficient_[1] * combDelays_[1].
lastOut() );
128 lastFrame_[0] = effectMix_ * (combDelays_[0].
tick(temp2));
129 lastFrame_[1] = effectMix_ * (combDelays_[1].
tick(temp3));
130 temp = (1.0 - effectMix_) * input;
131 lastFrame_[0] += temp;
132 lastFrame_[1] += temp;
134 return lastFrame_[channel];
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:6
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: PRCRev.h:102
StkFloat tick(StkFloat input)
Input one sample to the filter and return one output.
Definition: Delay.h:124
StkFloat lastOut(void) const
Return the last computed output value.
Definition: Delay.h:81
STK abstract effects parent class.
Definition: Effect.h:21
STK non-interpolating delay line class.
Definition: Delay.h:24
Perry's simple reverberator class.
Definition: PRCRev.h:24
void clear(void)
Reset and clear all internal state.
An STK class to handle vectorized audio data.
Definition: Stk.h:275
void setT60(StkFloat T60)
Set the reverberation T60 decay time.
PRCRev(StkFloat T60=1.0)
Class constructor taking a T60 decay time argument (one second default value).
StkFloat lastOut(unsigned int channel=0)
Return the specified channel value of the last computed stereo frame.
Definition: PRCRev.h:90