Home Information Classes Download Usage Mail List Requirements Links FAQ Tutorial

# stk::Modal Class Reference

STK resonance model abstract base class. More...

`#include <Modal.h>`

Inheritance diagram for stk::Modal:

List of all members.

## Public Member Functions
| Modal (unsigned int modes=4)
| Class constructor, taking the desired number of modes to create.
virtual | ~Modal (void)
| Class destructor.
void | clear (void)
| Reset and clear all internal state.
virtual void | setFrequency (StkFloat frequency)
| Set instrument parameters for a particular frequency.
void | setRatioAndRadius (unsigned int modeIndex, StkFloat ratio, StkFloat radius)
| Set the ratio and radius for a specified mode filter.
void | setMasterGain (StkFloat aGain)
| Set the master gain.
void | setDirectGain (StkFloat aGain)
| Set the direct gain.
void | setModeGain (unsigned int modeIndex, StkFloat gain)
| Set the gain for a specified mode filter.
virtual void | strike (StkFloat amplitude)
| Initiate a strike with the given amplitude (0.0 - 1.0).
void | damp (StkFloat amplitude)
| Damp modes with a given decay factor (0.0 - 1.0).
void | noteOn (StkFloat frequency, StkFloat amplitude)
| Start a note with the given frequency and amplitude.
void | noteOff (StkFloat amplitude)
| Stop a note with the given amplitude (speed of decay).
virtual void | controlChange (int number, StkFloat value)=0
| Perform the control change specified by number and value (0.0 - 128.0).
StkFloat | tick (unsigned int channel=0)
| Compute and return one output sample.

## Detailed Description

STK resonance model abstract base class.

This class contains an excitation wavetable, an envelope, an oscillator, and N resonances (non-sweeping BiQuad filters), where N is set during instantiation.

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

## Constructor & Destructor Documentation

stk::Modal::Modal | ( | unsigned int | modes = `4` | ) |

Class constructor, taking the desired number of modes to create.

An StkError will be thrown if the rawwave path is incorrectly set.

The documentation for this class was generated from the following file:

- Modal.h

The Synthesis ToolKit in C++ (STK)
©1995-2010 Perry R. Cook and Gary P. Scavone. All Rights Reserved.