Debian Codegraph @

lib-src/libnyquist/nyquist/nyqstk/include/PitShift.h

raw
1 /***************************************************/
2 /*! \class PitShift
3 \brief STK simple pitch shifter effect class.
4
5 This class implements a simple pitch shifter
6 using delay lines.
7
8 by Perry R. Cook and Gary P. Scavone, 1995 - 2005.
9 */
10 /***************************************************/
11
12 #ifndef STK_PITSHIFT_H
13 #define STK_PITSHIFT_H
14
15 #include "Effect.h"
16 #include "DelayL.h"
17
18 namespace Nyq
19 {
20
21 class PitShift : public Effect
22 {
23 public:
24 //! Class constructor.
25 PitShift();
26
27 //! Class destructor.
28 ~PitShift();
29
30 //! Reset and clear all internal state.
31 void clear();
32
33 //! Set the pitch shift factor (1.0 produces no shift).
34 void setShift(StkFloat shift);
35
36 protected:
37
38 StkFloat computeSample( StkFloat input );
39
40 DelayL delayLine_[2];
41 StkFloat delay_[2];
42 StkFloat env_[2];
43 StkFloat rate_;
44 unsigned long delayLength;
45 unsigned long halfLength;
46
47 };
48
49 } // namespace Nyq
50
51 #endif
52