SimpleSines.h

Go to the documentation of this file.
00001 //
00002 //  SimpleSines.h -- specification of the simple waveform generators used as CSL tutorial examples
00003 //  See the copyright notice and acknowledgment of authors in the file COPYRIGHT
00004 //
00005 // What's here:
00006 //  SimpleSine -- the simplest sine oscillator class, this version has no dynamic controls
00007 //  SineAsPhased -- same as the above, except that it inherits its freq/phase members from Phased
00008 //  SineAsScaled -- this version has dynamic scale/offset controls, like most CSL UGens
00009 
00010 #ifndef CSL_SIMPLESINE_H
00011 #define CSL_SIMPLESINE_H
00012 
00013 #include "CSL_Core.h"           // include the main CSL header; this includes CSL_Types.h and CGestalt.h
00014 
00015 namespace csl {             // All these classes live in their own C++ namespace
00016 
00020 
00021 class SimpleSine : public UnitGenerator {
00022 
00023 public:
00024     SimpleSine();           
00025     SimpleSine(float frequency);
00026     SimpleSine(float frequency, float phase);
00027     ~SimpleSine();          
00028 
00030     void nextBuffer(Buffer & outputBuffer, unsigned outBufNum) throw (CException);
00031 
00032 protected:
00033     float mFrequency;       
00034     float mPhase;           
00035 };
00036 
00041 
00042 class SineAsPhased : public UnitGenerator, public Phased {
00043 
00044 public:
00045     SineAsPhased();         
00046     SineAsPhased(float frequency);
00047     SineAsPhased(float frequency, float phase);
00048     ~SineAsPhased();            
00049     
00051     void nextBuffer(Buffer & outputBuffer, unsigned outBufNum) throw (CException);
00052     void dump();                
00053 };
00054 
00059 
00060 class SineAsScaled : public UnitGenerator, public Phased, public Scalable {
00061 
00062 public:
00063     SineAsScaled();         
00064     SineAsScaled(float frequency);
00065     SineAsScaled(float frequency, float phase);
00066     SineAsScaled(float frequency, float phase, float ampl, float offset);
00067     ~SineAsScaled();            
00068     
00070     void nextBuffer(Buffer & outputBuffer, unsigned outBufNum) throw (CException);
00071     void dump();                
00072 };
00073 
00074 }
00075 
00076 #endif

Generated on Thu Sep 17 23:14:16 2009 for CSL by  doxygen 1.5.8