 
    
   
Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial
   32   virtual void noteOn( StkFloat frequency, StkFloat amplitude ) = 0;
 
   35   virtual void noteOff( StkFloat amplitude ) = 0;
 
   58   StkFloat 
lastOut( 
unsigned int channel = 0 );
 
   64   virtual StkFloat 
tick( 
unsigned int channel = 0 ) = 0;
 
   84   oStream_ << 
"Instrmnt::setFrequency: virtual setFrequency function call!";
 
   90 #if defined(_STK_DEBUG_) 
   91   if ( channel >= lastFrame_.
channels() ) {
 
   92     oStream_ << 
"Instrmnt::lastOut(): channel argument is invalid!";
 
   97   return lastFrame_[channel];
 
  102   oStream_ << 
"Instrmnt::controlChange: virtual function call!";
 
  
virtual void noteOn(StkFloat frequency, StkFloat amplitude)=0
Start a note with the given frequency and amplitude.
const StkFrames & lastFrame(void) const
Return an StkFrames reference to the last output sample frame.
Definition: Instrmnt.h:47
void resize(size_t nFrames, unsigned int nChannels=1)
Resize self to represent the specified number of channels and frames.
unsigned int channelsOut(void) const
Return the number of output channels for the class.
Definition: Instrmnt.h:44
An STK class to handle vectorized audio data.
Definition: Stk.h:276
virtual void controlChange(int number, StkFloat value)
Perform the control change specified by number and value (0.0 - 128.0).
Definition: Instrmnt.h:100
virtual void clear(void)
Reset and clear all internal state (for subclasses).
Definition: Instrmnt.h:29
unsigned int channels(void) const
Return the number of channels represented by the data.
Definition: Stk.h:404
static void handleError(const char *message, StkError::Type type)
Static function for error reporting and handling using c-strings.
virtual void setFrequency(StkFloat frequency)
Set instrument parameters for a particular frequency.
Definition: Instrmnt.h:82
Instrmnt(void)
Class constructor.
Definition: Instrmnt.h:23
virtual StkFrames & tick(StkFrames &frames, unsigned int channel=0)=0
Fill the StkFrames object with computed sample frames, starting at the specified channel.
virtual StkFloat tick(unsigned int channel=0)=0
Compute one sample frame and return the specified channel value.
The STK namespace.
Definition: ADSR.h:6
STK instrument abstract base class.
Definition: Instrmnt.h:20
StkFloat lastOut(unsigned int channel=0)
Return the specified channel value of the last computed frame.
Definition: Instrmnt.h:88
virtual void noteOff(StkFloat amplitude)=0
Stop a note with the given amplitude (speed of decay).
STK base class.
Definition: Stk.h:133