Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial


Instrmnt Class Reference

#include <Instrmnt.h>

Inheritance diagram for Instrmnt:

Stk BandedWG BlowBotl BlowHole Bowed Brass Clarinet Drummer Flute FM Mesh2D Modal Plucked PluckTwo Resonate Sampler Saxofony Shakers Simple Sitar StifKarp VoicForm Whistle List of all members.

Detailed Description

STK instrument abstract base class.

This class provides a common interface for all STK instruments.

by Perry R. Cook and Gary P. Scavone, 1995 - 2007.


Public Member Functions

 Instrmnt ()
 Default constructor.
virtual ~Instrmnt ()
 Class destructor.
virtual void noteOn (StkFloat frequency, StkFloat amplitude)=0
 Start a note with the given frequency and amplitude.
virtual void noteOff (StkFloat amplitude)=0
 Stop a note with the given amplitude (speed of decay).
virtual void setFrequency (StkFloat frequency)
 Set instrument parameters for a particular frequency.
StkFloat lastOut () const
 Return the last output value.
StkFloat lastOutLeft () const
 Return the last left output value.
StkFloat lastOutRight () const
 Return the last right output value.
StkFloat tick (void)
 Compute one sample and output.
StkFramestick (StkFrames &frames, unsigned int channel=0)
 Fill a channel of the StkFrames object with computed outputs.
virtual void controlChange (int number, StkFloat value)
 Perform the control change specified by number and value (0.0 - 128.0).


Member Function Documentation

StkFrames& Instrmnt::tick StkFrames frames,
unsigned int  channel = 0
 

Fill a channel of the StkFrames object with computed outputs.

The channel argument should be zero or greater (the first channel is specified by 0). An StkError will be thrown if the channel argument is equal to or greater than the number of channels in the StkFrames object.


The documentation for this class was generated from the following file:
The Synthesis ToolKit in C++ (STK)
©1995-2007 Perry R. Cook and Gary P. Scavone. All Rights Reserved.