
Home Information Classes Download Usage Mail List Requirements Links FAQ Tutorial
20 const int maxDelay = 5024;
35 StkFloat
lastOut(
void )
const {
return lastFrame_[0]; };
38 StkFloat
tick( StkFloat input );
68 unsigned long delayLength_;
69 unsigned long halfLength_;
78 while ( delay_[0] > maxDelay-12 ) delay_[0] -= delayLength_;
79 while ( delay_[0] < 12 ) delay_[0] += delayLength_;
81 delay_[1] = delay_[0] + halfLength_;
82 while ( delay_[1] > maxDelay-12 ) delay_[1] -= delayLength_;
83 while ( delay_[1] < 12 ) delay_[1] += delayLength_;
90 env_[1] = fabs( ( delay_[0] - halfLength_ + 12 ) * ( 1.0 / (halfLength_ + 12 ) ) );
91 env_[0] = 1.0 - env_[1];
94 lastFrame_[0] = env_[0] * delayLine_[0].
tick( input );
95 lastFrame_[0] += env_[1] * delayLine_[1].
tick( input );
98 lastFrame_[0] *= effectMix_;
99 lastFrame_[0] += ( 1.0 - effectMix_ ) * input;
101 return lastFrame_[0];
PitShift(void)
Class constructor.
STK linear interpolating delay line class.
Definition: DelayL.h:27
STK abstract effects parent class.
Definition: Effect.h:21
An STK class to handle vectorized audio data.
Definition: Stk.h:275
STK simple pitch shifter effect class.
Definition: PitShift.h:22
void setShift(StkFloat shift)
Set the pitch shift factor (1.0 produces no shift).
void clear(void)
Reset and clear all internal state.
StkFloat tick(StkFloat input)
Input one sample to the filter and return one output.
Definition: DelayL.h:163
StkFloat lastOut(void) const
Return the last computed output value.
Definition: PitShift.h:35
void setDelay(StkFloat delay)
Set the delay-line length.
Definition: DelayL.h:136
The STK namespace.
Definition: ADSR.h:6
StkFloat tick(StkFloat input)
Input one sample to the effect and return one output.
Definition: PitShift.h:73