Home   Information   Classes   Download   Usage   Mail List   Requirements   Tutorial


FM Class Reference

STK abstract FM synthesis base class. More...

#include <FM.h>

Inheritance diagram for FM::

Instrmnt Stk BeeThree FMVoices HevyMetl PercFlut Rhodey TubeBell Wurley List of all members.

Public Methods

 FM (int operators=4)
 Class constructor, taking the number of wave/envelope operators to control.

virtual ~FM ()
 Class destructor.

void clear ()
 Reset and clear all wave and envelope states.

void loadWaves (const char **filenames)
 Load the rawwave filenames in waves.

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

void setRatio (int waveIndex, MY_FLOAT ratio)
 Set the frequency ratio for the specified wave.

void setGain (int waveIndex, MY_FLOAT gain)
 Set the gain for the specified wave.

void setModulationSpeed (MY_FLOAT mSpeed)
 Set the modulation speed in Hz.

void setModulationDepth (MY_FLOAT mDepth)
 Set the modulation depth.

void setControl1 (MY_FLOAT cVal)
 Set the value of control1.

void setControl2 (MY_FLOAT cVal)
 Set the value of control1.

void keyOn ()
 Start envelopes toward "on" targets.

void keyOff ()
 Start envelopes toward "off" targets.

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

virtual MY_FLOAT tick ()=0
 Pure virtual function ... must be defined in subclasses.

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


Detailed Description

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 - 2002.


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