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 BasicFMInstrument : public Instrument {
00041 public:
00042 BasicFMInstrument();
00043 ~BasicFMInstrument();
00045 virtual void setParameter(unsigned selector, int argc, void **argv, const char *types);
00047 void parseArgs(int argc, void **argv, const char *types);
00048 virtual void playOSC(int argc, void **argv, const char *types);
00049
00050 void playNote(float dur = 1, float ampl = 1,
00051 float c_fr = 110, float m_fr = 110, float ind = 1, float pos = 0,
00052 float att = 0.1, float dec = 0.1, float sus = 0.5, float rel = 0.1,
00053 float i_att = 0.1, float i_dec = 0.1, float i_sus = 0.5, float i_rel = 0.1);
00054
00056 ADSR mAEnv, mIEnv;
00057 Sine mCar, mMod;
00058 Panner mPanner;
00059 };
00060
00064 class FancyFMInstrument : public BasicFMInstrument {
00065 public:
00066 FancyFMInstrument();
00067 ~FancyFMInstrument();
00068
00069 void setParameter(unsigned selector, int argc, void **argv, const char *types);
00070 void playOSC(int argc, void **argv, const char *types);
00072 Envelope mVibEnv;
00073 ADSR mChiffEnv;
00074 Sine mVibrato;
00075 WhiteNoise mChiff;
00076 Butter mChFilter;
00077 Freeverb mReverb;
00078 };
00079
00080 }
00081
00082 #endif