104inline StkFloat NRev :: tick( StkFloat input,
unsigned int channel )
106#if defined(_STK_DEBUG_)
108 oStream_ <<
"NRev::tick(): channel argument must be less than 2!";
113 StkFloat temp, temp0, temp1, temp2, temp3;
117 for ( i=0; i<6; i++ ) {
118 temp = input + (combCoefficient_[i] * combDelays_[i].lastOut());
119 temp0 += combDelays_[i].tick(temp);
122 for ( i=0; i<3; i++ ) {
123 temp = allpassDelays_[i].lastOut();
124 temp1 = allpassCoefficient_ * temp;
126 allpassDelays_[i].tick(temp1);
127 temp0 = -(allpassCoefficient_ * temp1) + temp;
131 lowpassState_ = 0.7 * lowpassState_ + 0.3 * temp0;
132 temp = allpassDelays_[3].
lastOut();
133 temp1 = allpassCoefficient_ * temp;
134 temp1 += lowpassState_;
135 allpassDelays_[3].tick( temp1 );
136 temp1 = -( allpassCoefficient_ * temp1 ) + temp;
138 temp = allpassDelays_[4].lastOut();
139 temp2 = allpassCoefficient_ * temp;
141 allpassDelays_[4].tick( temp2 );
142 lastFrame_[0] = effectMix_*( -( allpassCoefficient_ * temp2 ) + temp );
144 temp = allpassDelays_[5].lastOut();
145 temp3 = allpassCoefficient_ * temp;
147 allpassDelays_[5].tick( temp3 );
148 lastFrame_[1] = effectMix_*( - ( allpassCoefficient_ * temp3 ) + temp );
150 temp = ( 1.0 - effectMix_ ) * input;
151 lastFrame_[0] += temp;
152 lastFrame_[1] += temp;
154 return lastFrame_[channel];
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.
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 NRev.h:104
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 ...