Home Information Classes Download Usage Mail List Requirements Links FAQ Tutorial

# Sampler.h

    00001 #ifndef STK_SAMPLER_H
    00002 #define STK_SAMPLER_H
    00003
    00004 #include "Instrmnt.h"
    00005 #include "ADSR.h"
    00006 #include "FileLoop.h"
    00007 #include "OnePole.h"
    00008
    00009 namespace stk {
    00010
    00011 /***************************************************/
    00020 /***************************************************/
    00021
    00022 class Sampler : public Instrmnt
    00023 {
    00024  public:
    00026   Sampler( void );
    00027
    00029   virtual ~Sampler( void );
    00030
    00032   void clear( void );
    00033
    00035   virtual void setFrequency( StkFloat frequency ) = 0;
    00036
    00038   void keyOn( void );
    00039
    00041   void keyOff( void );
    00042
    00044   virtual void noteOff( StkFloat amplitude );
    00045
    00047   virtual void controlChange( int number, StkFloat value ) = 0;
    00048
    00050   virtual StkFloat tick( unsigned int channel = 0 ) = 0;
    00051
    00052  protected:
    00053
    00054   ADSR adsr_;
    00055   std::vector<FileWvIn *> attacks_;
    00056   std::vector<FileLoop *> loops_;
    00057   OnePole filter_;
    00058   StkFloat baseFrequency_;
    00059   std::vector<StkFloat> attackRatios_;
    00060   std::vector<StkFloat> loopRatios_;
    00061   StkFloat attackGain_;
    00062   StkFloat loopGain_;
    00063
    00064 };
    00065
    00066 } // stk namespace
    00067
    00068 #endif

The Synthesis ToolKit in C++ (STK)
©1995-2010 Perry R. Cook and Gary P. Scavone. All Rights Reserved.