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 class SimpleSine : public UnitGenerator {
00021 
00022 public:
00023     SimpleSine();           
00024     SimpleSine(float frequency);
00025     SimpleSine(float frequency, float phase);
00026     ~SimpleSine();          
00027 
00029     void nextBuffer(Buffer & outputBuffer, unsigned outBufNum) throw (CException);
00030 
00031 protected:
00032     float mFrequency;       
00033     float mPhase;           
00034 };
00035 
00040 class SineAsPhased : public UnitGenerator, public Phased {
00041 
00042 public:
00043     SineAsPhased();         
00044     SineAsPhased(float frequency);
00045     SineAsPhased(float frequency, float phase);
00046     ~SineAsPhased();            
00047     
00049     void nextBuffer(Buffer & outputBuffer, unsigned outBufNum) throw (CException);
00050 };
00051 
00056 class SineAsScaled : public UnitGenerator, public Phased, public Scalable {
00057 
00058 public:
00059     SineAsScaled();         
00060     SineAsScaled(float frequency);
00061     SineAsScaled(float frequency, float phase);
00062     SineAsScaled(float frequency, float phase, float ampl, float offset);
00063     ~SineAsScaled();            
00064     
00066     void nextBuffer(Buffer & outputBuffer, unsigned outBufNum) throw (CException);
00067     void dump();                
00068 };
00069 
00070 }
00071 
00072 #endif

Generated on Fri Apr 6 20:18:13 2007 for CSL by  doxygen 1.4.5-20051010