Home Information Classes Download Usage Mail List Requirements Links Tutorial

# PluckTwo.h

    00001 /***************************************************/
    00019 /***************************************************/
    00020
    00021 #if !defined(__PLUCKTWO_H)
    00022 #define __PLUCKTWO_H
    00023
    00024 #include "Instrmnt.h"
    00025 #include "DelayL.h"
    00026 #include "DelayA.h"
    00027 #include "OneZero.h"
    00028
    00029 class PluckTwo : public Instrmnt
    00030 {
    00031  public:
    00033   PluckTwo(MY_FLOAT lowestFrequency);
    00034
    00036   virtual ~PluckTwo();
    00037
    00039   void clear();
    00040
    00042   virtual void setFrequency(MY_FLOAT frequency);
    00043
    00045   void setDetune(MY_FLOAT detune);
    00046
    00048   void setFreqAndDetune(MY_FLOAT frequency, MY_FLOAT detune);
    00049
    00051   void setPluckPosition(MY_FLOAT position);
    00052
    00054
    00059   void setBaseLoopGain(MY_FLOAT aGain);
    00060
    00062   virtual void noteOff(MY_FLOAT amplitude);
    00063
    00065   virtual MY_FLOAT tick() = 0;
    00066
    00067   protected:
    00068     DelayA *delayLine;
    00069     DelayA *delayLine2;
    00070     DelayL *combDelay;
    00071     OneZero *filter;
    00072     OneZero *filter2;
    00073     long length;
    00074     MY_FLOAT loopGain;
    00075     MY_FLOAT baseLoopGain;
    00076     MY_FLOAT lastFrequency;
    00077     MY_FLOAT lastLength;
    00078     MY_FLOAT detuning;
    00079     MY_FLOAT pluckAmplitude;
    00080     MY_FLOAT pluckPosition;
    00081
    00082 };
    00083
    00084 #endif

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