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

  1. /******************************************/
  2. /*  Simple Brass Instrument Model ala     */
  3. /*  Cook (TBone, HosePlayer)              */
  4. /*  by Perry R. 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 = lipTension   */
  11. /*                CONTROL2 = slideLength  */
  12. /*          CONTROL3 = vibFreq      */
  13. /*          MOD_WHEEL= vibAmt       */
  14. /******************************************/
  15.  
  16. #if !defined(__Brass_h)
  17. #define __Brass_h
  18.  
  19. #include "Instrmnt.h"
  20. #include "DLineA.h"
  21. #include "LipFilt.h"
  22. #include "DCBlock.h"
  23. #include "ADSR.h"
  24. #include "RawLoop.h"
  25.  
  26. class Brass: public Instrmnt
  27. {
  28.   protected:  
  29.     DLineA *delayLine;
  30.     LipFilt *lipFilter;
  31.     DCBlock *dcBlock;
  32.     ADSR *adsr;
  33.     RawLoop *vibr;
  34.     long length;
  35.     MY_FLOAT lipTarget;
  36.     MY_FLOAT slideTarget;
  37.     MY_FLOAT vibrGain;
  38.     MY_FLOAT maxPressure;
  39.   public:
  40.     Brass(MY_FLOAT lowestFreq);
  41.     ~Brass();
  42.     void clear();
  43.     virtual void setFreq(MY_FLOAT frequency);
  44.     void setLip(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 void controlChange(int number, MY_FLOAT value);
  50.     virtual MY_FLOAT tick();
  51. };
  52.  
  53. #endif
  54.