| 1 |
/***************************************************/ |
| 2 |
/*! \class PRCRev |
| 3 |
\brief Perry's simple reverberator class. |
| 4 |
|
| 5 |
This class is based on some of the famous |
| 6 |
Stanford/CCRMA reverbs (NRev, KipRev), which |
| 7 |
were based on the Chowning/Moorer/Schroeder |
| 8 |
reverberators using networks of simple allpass |
| 9 |
and comb delay filters. This class implements |
| 10 |
two series allpass units and two parallel comb |
| 11 |
filters. |
| 12 |
|
| 13 |
by Perry R. Cook and Gary P. Scavone, 1995 - 2005. |
| 14 |
*/ |
| 15 |
/***************************************************/ |
| 16 |
|
| 17 |
#ifndef STK_PRCREV_H |
| 18 |
#define STK_PRCREV_H |
| 19 |
|
| 20 |
#include "Effect.h" |
| 21 |
#include "Delay.h" |
| 22 |
|
| 23 |
namespace Nyq |
| 24 |
{ |
| 25 |
|
| 26 |
class PRCRev : public Effect |
| 27 |
{ |
| 28 |
public: |
| 29 |
//! Class constructor taking a T60 decay time argument (one second default value). |
| 30 |
PRCRev( StkFloat T60 = 1.0 ); |
| 31 |
|
| 32 |
//! Class destructor. |
| 33 |
~PRCRev(); |
| 34 |
|
| 35 |
//! Reset and clear all internal state. |
| 36 |
void clear(); |
| 37 |
|
| 38 |
//! Set the reverberation T60 decay time. |
| 39 |
void setT60( StkFloat T60 ); |
| 40 |
|
| 41 |
protected: |
| 42 |
|
| 43 |
StkFloat computeSample( StkFloat input ); |
| 44 |
|
| 45 |
Delay allpassDelays_[2]; |
| 46 |
Delay combDelays_[2]; |
| 47 |
StkFloat allpassCoefficient_; |
| 48 |
StkFloat combCoefficient_[2]; |
| 49 |
|
| 50 |
}; |
| 51 |
|
| 52 |
} // namespace Nyq |
| 53 |
|
| 54 |
#endif |
| 55 |
|