BasicFMInstrument.h

Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 #ifndef INCLUDE_Basic_FM_Instrument_H
00030 #define INCLUDE_Basic_FM_Instrument_H
00031 
00032 #include "Instrument.h"
00033 #include "Mixer.h"
00034 
00035 namespace csl  {
00036 
00040 class FMInstrument : public Instrument {
00041 public:
00042     FMInstrument();         
00043     FMInstrument(FMInstrument&);                            
00044     ~FMInstrument();
00046     virtual void setParameter(unsigned selector, int argc, void **argv, const char *types);
00048     void parseArgs(int argc, void **argv, const char *types);
00049     virtual void playOSC(int argc, void **argv, const char *types); 
00050     
00051     void playNote(float dur = 1, float ampl = 1, 
00052                 float c_fr = 110, float m_fr = 110, float ind = 1, float pos = 0,
00053                 float att = 0.1, float dec = 0.1, float sus = 0.5, float rel = 0.1, 
00054                 float i_att = 0.1, float i_dec = 0.1, float i_sus = 0.5, float i_rel = 0.1);
00055     void playMIDI(float dur, int chan, int key, int vel);   
00056 
00058     ADSR mAEnv, mIEnv;          
00059     Osc mCar, mMod;             
00060     Panner mPanner;             
00061 };
00062 
00067 class FancyFMInstrument : public FMInstrument {
00068 public:
00069     FancyFMInstrument();            
00070     ~FancyFMInstrument();
00071     
00072     void setParameter(unsigned selector, int argc, void **argv, const char *types);
00073     void playOSC(int argc, void **argv, const char *types); 
00074     void playMIDI(float dur, int chan, int key, int vel);   
00076     Envelope mVibEnv;               
00077     ADSR mChiffEnv;                 
00078     Osc mVibrato;                   
00079     WhiteNoise mChiff;              
00080     Butter mChFilter;               
00081     Freeverb mReverb;
00082 };
00083 
00084 }
00085 
00086 #endif

Generated on Sat Oct 17 14:12:30 2009 for CSL by  doxygen 1.4.5-20051010