Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   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 - 2004.

Definition at line 17 of file Instrmnt.h.

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.

virtual StkFloat tick ()=0
 Compute one output sample.

virtual StkFloat * tick (StkFloat *vector, unsigned int vectorSize)
 Computer vectorSize outputs and return them in vector.

virtual StkFramestick (StkFrames &frames, unsigned int channel=1)
 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

virtual StkFrames& Instrmnt::tick StkFrames frames,
unsigned int  channel = 1
[virtual]
 

Fill a channel of the StkFrames object with computed outputs.

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

Reimplemented in BandedWG, BeeThree, BlowBotl, BlowHole, Bowed, Brass, Clarinet, Drummer, Flute, FM, FMVoices, HevyMetl, Mandolin, Mesh2D, Modal, Moog, PercFlut, Plucked, PluckTwo, Resonate, Rhodey, Sampler, Saxofony, Shakers, Simple, Sitar, StifKarp, TubeBell, VoicForm, Whistle, and Wurley.


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