Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   Tutorial


Sampler Class Reference

#include <Sampler.h>

Inheritance diagram for Sampler:

Instrmnt Stk Moog List of all members.

Detailed Description

STK sampling synthesis abstract base class.

This instrument provides an ADSR envelope, a one-pole filter, and structures for an arbitrary number of attack and loop waves.

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

Definition at line 21 of file Sampler.h.

Public Member Functions

 Sampler ()
 Default constructor.

virtual ~Sampler ()
 Class destructor.

void clear ()
 Reset and clear all internal state.

virtual void setFrequency (StkFloat frequency)=0
 Set instrument parameters for a particular frequency.

void keyOn ()
 Initiate the envelopes with a key-on event and reset the attack waves.

void keyOff ()
 Signal a key-off event to the envelopes.

virtual void noteOff (StkFloat amplitude)
 Stop a note with the given amplitude (speed of decay).

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

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

virtual StkFramestick (StkFrames &frames, unsigned int channel=1)=0
 Fill a channel of the StkFrames object with computed outputs.

virtual void controlChange (int number, StkFloat value)=0
 Perform the control change specified by number and value (0.0 - 128.0).


Member Function Documentation

virtual StkFrames& Sampler::tick StkFrames frames,
unsigned int  channel = 1
[pure 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 from Instrmnt.

Implemented in Moog.


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.