00001
00012
00013
00014 #ifndef OSCILLATOR_H
00015 #define OSCILLATOR_H
00016
00017 #include "GenTable.h"
00018 #include "Phasor.h"
00019
00020 class Oscillator : public Phasor
00021 {
00022 public:
00024
00030 Oscillator (const float &sr, GenTable* wave, const INTERPOLATION& interp=LINEAR);
00031
00033 virtual ~Oscillator ();
00034
00036 void setWave (GenTable* wave);
00037
00039 void inArg (const float &=1, const float &freq=440, const float &phi=0);
00040
00042 void setAmplitude (const float &=1);
00043
00045
00051 void setInterp (const INTERPOLATION &type=LINEAR);
00052
00054
00059 virtual float outSig ();
00060
00061 protected:
00062 GenTable* _Wave;
00063 float _amp;
00064 float (GenTable::*_interpPtr) (const double &);
00065 };
00066 #endif