| 1 |
/***************************************************/ |
| 2 |
/*! \class JCRev |
| 3 |
\brief John Chowning's reverberator class. |
| 4 |
|
| 5 |
This class is derived from the CLM JCRev |
| 6 |
function, which is based on the use of |
| 7 |
networks of simple allpass and comb delay |
| 8 |
filters. This class implements three series |
| 9 |
allpass units, followed by four parallel comb |
| 10 |
filters, and two decorrelation delay lines in |
| 11 |
parallel at the output. |
| 12 |
|
| 13 |
by Perry R. Cook and Gary P. Scavone, 1995 - 2005. |
| 14 |
*/ |
| 15 |
/***************************************************/ |
| 16 |
|
| 17 |
#ifndef STK_JCREV_H |
| 18 |
#define STK_JCREV_H |
| 19 |
|
| 20 |
#include "Effect.h" |
| 21 |
#include "Delay.h" |
| 22 |
|
| 23 |
namespace Nyq |
| 24 |
{ |
| 25 |
|
| 26 |
class JCRev : public Effect |
| 27 |
{ |
| 28 |
public: |
| 29 |
//! Class constructor taking a T60 decay time argument (one second default value). |
| 30 |
JCRev( StkFloat T60 = 1.0 ); |
| 31 |
|
| 32 |
//! Class destructor. |
| 33 |
~JCRev(); |
| 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_[3]; |
| 46 |
Delay combDelays_[4]; |
| 47 |
Delay outLeftDelay_; |
| 48 |
Delay outRightDelay_; |
| 49 |
StkFloat allpassCoefficient_; |
| 50 |
StkFloat combCoefficient_[4]; |
| 51 |
|
| 52 |
}; |
| 53 |
|
| 54 |
} // namespace Nyq |
| 55 |
|
| 56 |
#endif |
| 57 |
|