Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   Tutorial


PluckTwo Class Reference

#include <PluckTwo.h>

Inheritance diagram for PluckTwo:

Instrmnt Stk Mandolin List of all members.

Detailed Description

STK enhanced plucked string model class.

This class implements an enhanced two-string, plucked physical model, a la Jaffe-Smith, Smith, and others.

PluckTwo is an abstract class, with no excitation specified. Therefore, it can't be directly instantiated.

This is a digital waveguide model, making its use possibly subject to patents held by Stanford University, Yamaha, and others.

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

Definition at line 29 of file PluckTwo.h.

Public Member Functions

 PluckTwo (StkFloat lowestFrequency)
 Class constructor, taking the lowest desired playing frequency.

virtual ~PluckTwo ()
 Class destructor.

void clear ()
 Reset and clear all internal state.

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

void setDetune (StkFloat detune)
 Detune the two strings by the given factor. A value of 1.0 produces unison strings.

void setFreqAndDetune (StkFloat frequency, StkFloat detune)
 Efficient combined setting of frequency and detuning.

void setPluckPosition (StkFloat position)
 Set the pluck or "excitation" position along the string (0.0 - 1.0).

void setBaseLoopGain (StkFloat aGain)
 Set the base loop gain.

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

virtual StkFloat tick ()=0
 Virtual (abstract) tick function is implemented by subclasses.

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.


Member Function Documentation

void PluckTwo::setBaseLoopGain StkFloat  aGain  ) 
 

Set the base loop gain.

The actual loop gain is set according to the frequency. Because of high-frequency loop filter roll-off, higher frequency settings have greater loop gains.

virtual StkFrames& PluckTwo::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 Mandolin.


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.