home *** CD-ROM | disk | FTP | other *** search
/ PC Musician 2000 / PC_Musician_2000.iso / PCMUSIC / NOTATION / SILENCE / CLARINET.H < prev    next >
Encoding:
C/C++ Source or Header  |  1996-03-16  |  1.5 KB  |  54 lines

  1. /******************************************/
  2. /*  Clarinet model ala Smith              */
  3. /*  after McIntyre, Schumacher, Woodhouse */
  4. /*  by Perry Cook, 1995-96                */
  5. /*                                        */
  6. /*  This is a waveguide model, and thus   */
  7. /*  relates to various Stanford Univ.     */
  8. /*  and possibly Yamaha and other patents.*/
  9. /*                                        */
  10. /*   Controls:    CONTROL1 = reedStiffns  */
  11. /*                CONTROL2 = noiseGain    */
  12. /*          CONTROL3 = vibFreq      */
  13. /*          MOD_WHEEL= vibAmt       */
  14. /******************************************/
  15.  
  16. #if !defined(__Clarinet_h)
  17. #define __Clarinet_h
  18.  
  19. #include "Instrmnt.h"
  20. #include "DLineL.h"
  21. #include "ReedTabl.h"
  22. #include "OneZero.h"
  23. #include "Envelope.h"
  24. #include "Noise.h"
  25. #include "RawLoop.h"
  26.  
  27. class Clarinet : public Instrmnt
  28. {
  29.   protected:  
  30.     DLineL *delayLine;
  31.     ReedTabl *reedTable;
  32.     OneZero *filter;
  33.     Envelope *envelope;
  34.     Noise *noise;
  35.     RawLoop *vibr;
  36.     long length;
  37.     MY_FLOAT outputGain;
  38.     MY_FLOAT noiseGain;
  39.     MY_FLOAT vibrGain;
  40.   public:
  41.     Clarinet(MY_FLOAT lowestFreq);
  42.     ~Clarinet();
  43.     void clear();
  44.     virtual void setFreq(MY_FLOAT frequency);
  45.     void startBlowing(MY_FLOAT amplitude,MY_FLOAT rate);
  46.     void stopBlowing(MY_FLOAT rate);
  47.     virtual void noteOn(MY_FLOAT freq, MY_FLOAT amp);
  48.     virtual void noteOff(MY_FLOAT amp);
  49.     virtual MY_FLOAT tick();
  50.     virtual void controlChange(int number, MY_FLOAT value);
  51. };
  52.  
  53. #endif
  54.