Home Information Classes Download Usage Mail List Requirements Links FAQ Tutorial
STK abstract FM synthesis base class. More...
#include <FM.h>
Public Member Functions | |
FM (unsigned int operators=4) | |
Class constructor, taking the number of wave/envelope operators to control. | |
virtual | ~FM (void) |
Class destructor. | |
void | clear (void) |
Reset and clear all wave and envelope states. | |
void | loadWaves (const char **filenames) |
Load the rawwave filenames in waves. | |
virtual void | setFrequency (StkFloat frequency) |
Set instrument parameters for a particular frequency. | |
void | setRatio (unsigned int waveIndex, StkFloat ratio) |
Set the frequency ratio for the specified wave. | |
void | setGain (unsigned int waveIndex, StkFloat gain) |
Set the gain for the specified wave. | |
void | setModulationSpeed (StkFloat mSpeed) |
Set the modulation speed in Hz. | |
void | setModulationDepth (StkFloat mDepth) |
Set the modulation depth. | |
void | setControl1 (StkFloat cVal) |
Set the value of control1. | |
void | setControl2 (StkFloat cVal) |
Set the value of control1. | |
void | keyOn (void) |
Start envelopes toward "on" targets. | |
void | keyOff (void) |
Start envelopes toward "off" targets. | |
void | noteOff (StkFloat amplitude) |
Stop a note with the given amplitude (speed of decay). | |
virtual void | controlChange (int number, StkFloat value) |
Perform the control change specified by number and value (0.0 - 128.0). | |
virtual StkFloat | tick (unsigned int)=0 |
Compute and return one output sample. | |
virtual StkFrames & | tick (StkFrames &frames, unsigned int channel=0)=0 |
Fill a channel of the StkFrames object with computed outputs. |
STK abstract FM synthesis base class.
This class controls an arbitrary number of waves and envelopes, determined via a constructor argument.
Control Change Numbers:
The basic Chowning/Stanford FM patent expired in 1995, but there exist follow-on patents, mostly assigned to Yamaha. If you are of the type who should worry about this (making money) worry away.
by Perry R. Cook and Gary P. Scavone, 1995-2012.
stk::FM::FM | ( | unsigned int | operators = 4 |
) |
Class constructor, taking the number of wave/envelope operators to control.
An StkError will be thrown if the rawwave path is incorrectly set.
Fill a channel of the StkFrames object with computed outputs.
The channel
argument must be less than the number of channels in the StkFrames argument (the first channel is specified by 0). However, range checking is only performed if _STK_DEBUG_ is defined during compilation, in which case an out-of-range value will trigger an StkError exception.
Implements stk::Instrmnt.
Implemented in stk::BeeThree, stk::FMVoices, stk::HevyMetl, stk::PercFlut, stk::Rhodey, stk::TubeBell, and stk::Wurley.
The Synthesis ToolKit in C++ (STK) |
©1995-2012 Perry R. Cook and Gary P. Scavone. All Rights Reserved. |