Instrument.h

Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 #ifndef INCLUDE_Instrument_H
00010 #define INCLUDE_Instrument_H
00011 
00012 #include "CSL_Includes.h"
00013 #include "Accessor.h"
00014 
00015 #define MAX_ACCESSORS 64            // max number of instrument accessors
00016 
00017 namespace csl  {
00018 
00022 class Instrument : public UnitGenerator {
00023 public:
00025     Instrument();
00026     ~Instrument();
00028     UnitGenerator * graph() { return mGraph; };         
00029     UGenMap * genMap() { return & mUGens; };            
00030     UGenVector * envelopes() { return & mEnvelopes; };  
00031 
00032     const string name() { return mName; };              
00033 
00034     UnitGenerator * genNamed(string name);          
00035     
00037     AccessorVector getAccessors() { return mAccessors; };           
00038     unsigned numAccessors() { return mAccessors.size(); };          
00039     virtual void setParameter(unsigned selector, void * value) { };     
00040 //  virtual float getParameter(unsigned selector);
00041     
00043     virtual void nextBuffer(Buffer & outputBuffer) throw (CException);
00044     
00046     virtual bool isActive();
00047     virtual void play();        
00048     virtual void playOSC(const char * types, void * args) {};       
00049     virtual void playNote(void * args) {};      
00050     virtual void release(); 
00051 
00052 protected:          
00053     UnitGenerator * mGraph;         
00054     string mName;                   
00055     UGenMap mUGens;             
00056     UGenVector mEnvelopes;          
00057     AccessorVector mAccessors;
00058 };
00059 
00063 
00064 #define set_duration_f  1
00065 #define set_amplitude_f 2
00066 #define set_position_f  3
00067 
00068 #define  set_attack_f       4
00069 #define  set_decay_f        5
00070 #define  set_sustain_f  6
00071 #define  set_release_f  7
00072 
00073 }
00074 
00075 #endif

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