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 00014 // Band-limited square, impulse, and triangle waveform oscillators 00015 00016 class SquareBL : public CompOrCacheOscillator { 00017 00018 protected: 00019 status next_wave_into(sample * dest, unsigned count, bool oneHz); 00020 00021 public: 00022 SquareBL(); 00023 SquareBL(float frequency); 00024 SquareBL(float frequency, float phase); 00025 }; 00026 00027 class ImpulseBL : public CompOrCacheOscillator { 00028 00029 protected: 00030 status next_wave_into(sample * dest, unsigned count, bool oneHz); 00031 00032 public: 00033 ImpulseBL(); 00034 ImpulseBL(float frequency); 00035 ImpulseBL(float frequency, float phase); 00036 }; 00037 00038 class TriangleBL : public CompOrCacheOscillator { 00039 00040 protected: 00041 status next_wave_into(sample * dest, unsigned count, bool oneHz); 00042 00043 public: 00044 TriangleBL(); 00045 TriangleBL(float frequency); 00046 TriangleBL(float frequency, float phase); 00047 }; 00048 00049 } 00050 00051 #endif
1.4.5-20051010