00001 // 00002 // BasicWhiteNoiseInstrument.h -- Simple filtered noise instrument class. 00003 // See the copyright notice and acknowledgment of authors in the file COPYRIGHT 00004 // 00005 00006 #ifndef INCLUDE_WhiteNoise_Instrument_H 00007 #define INCLUDE_WhiteNoise_Instrument_H 00008 00009 #include "Instrument.h" 00010 #include "CSL_All.h" 00011 00012 namespace csl { 00013 00014 enum { 00015 // Global 00016 kNumParameters = 16, 00017 00018 // Parameters Tags 00019 kThresh = 0, // Spectral filtering threshhold 00020 kWindowSize, // Size of the FFT filtering window 00021 kNumBins, // Number of spectral bins 00022 kOut, // Output gain 00023 00024 kNumParams 00025 }; 00026 00027 class BasicWhiteNoiseInstrument : public Instrument { 00028 00029 protected: // These are the UGens of the DSP graph (i.e., the FM instrument) 00030 ADSR _a_env; // amplitude & filter frequency envelopes 00031 WhiteNoise _sig; // White Noise signal 00032 Butter _lpfilter; // This filters the white noise 00033 MulOp _a_mul; // the output and frequency value multiplier guys 00034 00035 public: 00036 BasicWhiteNoiseInstrument(); 00037 ~BasicWhiteNoiseInstrument(); 00038 00039 // Plug functions 00040 00041 unsigned num_accessors(); 00042 void get_accessors(Accessor **); 00043 void set_parameter(unsigned selector, void * value); 00044 void play_osc_note(char * types, void * args, char * endOfArgs); 00045 00046 }; 00047 00048 } 00049 00050 #endif
1.4.5-20051010