Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   Tutorial


SingWave Class Reference

#include <SingWave.h>

Inheritance diagram for SingWave:

Generator Stk List of all members.

Detailed Description

STK "singing" looped soundfile class.

This class contains all that is needed to make a pitched musical sound, like a simple voice or violin. In general, it will not be used alone because of munchkinification effects from pitch shifting. It will be used as an excitation source for other instruments.

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

Definition at line 23 of file SingWave.h.

Public Member Functions

 SingWave (std::string fileName, bool raw=false)
 Class constructor taking filename argument.

 ~SingWave ()
 Class destructor.

void reset ()
 Reset file to beginning.

void normalize ()
 Normalize the file to a maximum of +-1.0.

void normalize (StkFloat peak)
 Normalize the file to a maximum of +- peak.

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

void setVibratoRate (StkFloat rate)
 Set the vibrato frequency in Hz.

void setVibratoGain (StkFloat gain)
 Set the vibrato gain.

void setRandomGain (StkFloat gain)
 Set the random-ness amount.

void setSweepRate (StkFloat rate)
 Set the sweep rate.

void setGainRate (StkFloat rate)
 Set the gain rate.

void setGainTarget (StkFloat target)
 Set the gain target value.

void noteOn ()
 Start a note.

void noteOff ()
 Stop a note.

StkFloat tick ()
 Compute one output sample.

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

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


Constructor & Destructor Documentation

SingWave::SingWave std::string  fileName,
bool  raw = false
 

Class constructor taking filename argument.

An StkError will be thrown if the file is not found, its format is unknown, a read error occurs, or the rawwave path is incorrectly set.


Member Function Documentation

StkFrames& SingWave::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 from Generator.


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.