00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __CL_PitchShift__
00022 #define __CL_PitchShift__
00023
00024 #include "CL_API.h"
00025 #include "CL_SlidingWindow.h"
00026
00027 class CL_API CL_PitchShift : public CL_SlidingWindow
00028 {
00029 public:
00030
00031 CL_PitchShift(int chunk, int oversample);
00032 virtual ~CL_PitchShift();
00033
00034 void setPitchShift(float shift);
00035 void setOversample(int oversample);
00036 void setChunkSize(int chunk);
00037
00038 virtual void reset(float val =0.0F);
00039
00040 private:
00041
00042 void makeBlendCurve();
00043 void pitchShiftUp();
00044 void pitchShiftDown();
00045
00046 virtual void doWindowOp(int nsamples,float *dest);
00047
00048 int myOversample;
00049 float myPitchShift;
00050 float *mySingleSample;
00051 float *myBlendCurve;
00052 float *myData;
00053 };
00054
00055 #endif