00001 // 00002 // OscillatorBL.h -- Band-limited oscillators -- these can use on-demand sine summation, or store their wavetables 00003 // (the latter choice might be dangerous with dynamic frequency control, of course) 00004 // See the copyright notice and acknowledgment of authors in the file COPYRIGHT 00005 // 00006 00007 #ifndef INCLUDE_OscillatorBL_H 00008 #define INCLUDE_OscillatorBL_H 00009 00010 #include "Oscillator.h" 00011 00012 namespace csl { 00013 00017 00018 class SquareBL : public SumOfSines { 00019 public: 00020 SquareBL(); 00021 SquareBL(float frequency); 00022 SquareBL(float frequency, float phase); 00023 00024 // void nextBuffer(Buffer & outputBuffer, unsigned outBufNum) throw (CException); 00025 void nextWaveInto(sample * dest, unsigned count, bool oneHz); 00026 00027 }; 00028 00029 /* 00030 class ImpulseBL : public SumOfSines { 00031 protected: 00032 void nextWaveInto(sample * dest, unsigned count, bool oneHz); 00033 00034 public: 00035 ImpulseBL(); 00036 ImpulseBL(float frequency); 00037 ImpulseBL(float frequency, float phase); 00038 }; 00039 00040 class TriangleBL : public SumOfSines { 00041 protected: 00042 void nextWaveInto(sample * dest, unsigned count, bool oneHz); 00043 00044 public: 00045 TriangleBL(); 00046 TriangleBL(float frequency); 00047 TriangleBL(float frequency, float phase); 00048 }; 00049 00050 class SawtoothBL : public SumOfSines { 00051 protected: 00052 void nextWaveInto(sample * dest, unsigned count, bool oneHz); 00053 00054 public: 00055 SawtoothBL(); 00056 SawtoothBL(float frequency); 00057 SawtoothBL(float frequency, float phase); 00058 }; 00059 00060 */ 00061 00062 } 00063 00064 #endif
1.5.8