home *** CD-ROM | disk | FTP | other *** search
/ PC Musician 2000 / PC_Musician_2000.iso / PCMUSIC / NOTATION / SILENCE / SINGWAVE.H < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-18  |  1.4 KB  |  52 lines

  1. /*******************************************/
  2. /*  "Singing" Looped Soundfile Class,      */
  3. /*  by Perry R. Cook, 1995-96              */ 
  4. /*  This Object contains all that's needed */
  5. /*  to make a pitched musical sound, like  */
  6. /*  a simple voice or violin.  In general, */  
  7. /*  it will not be used alone (because of  */
  8. /*  of munchinification effects from pitch */
  9. /*  shifting.  It will be used as an       */
  10. /*  excitation source for other instruments*/
  11. /*******************************************/
  12.  
  13. #if !defined(__SingWave_h)
  14. #define __SingWave_h
  15.  
  16. #include "Object.h"
  17. #include "Modulatr.h"
  18. #include "Envelope.h"
  19.  
  20. class SingWave : public Object
  21. {
  22.   protected:  
  23.     Modulatr *modulator;
  24.     Envelope *envelope;
  25.     Envelope *pitchEnvelope;
  26.     long length;
  27.     MY_FLOAT *data;
  28.     MY_FLOAT rate;
  29.     MY_FLOAT sweepRate;
  30.     MY_FLOAT mytime;
  31.     MY_FLOAT lastOutput;
  32.   public:
  33.     SingWave(char *fileName);
  34.     ~SingWave();
  35.     void reset();
  36.     void normalize();
  37.     void normalize(MY_FLOAT newPeak);
  38.     void setFreq(MY_FLOAT aFreq);    
  39.     void setVibFreq(MY_FLOAT vibFreq);
  40.     void setVibAmt(MY_FLOAT vibAmt);
  41.     void setRndAmt(MY_FLOAT rndVib);
  42.     void setSweepRate(MY_FLOAT swpRate);
  43.     void setGainRate(MY_FLOAT gainRate);    
  44.     void setGainTarget(MY_FLOAT aTarget);
  45.     void noteOn();
  46.     void noteOff();
  47.     MY_FLOAT tick();
  48.     MY_FLOAT lastOut();
  49. };
  50.  
  51. #endif
  52.