/  Synthesis Toolkit (STK) UGens

JCRev

NRev

PRCRev

Chorus

Modulate

PitShift

SubNoise

BLT

Blit

BlitSaw

BlitSquare

FilterStk

WvIn

WaveLoop

WvOut

WvOut2

StkInstrument

BandedWG

BlowBotl

BlowHole

Bowed

Brass

Clarinet

Flute

Mandolin

ModalBar

Moog

Saxofony

Shakers

Sitar

StifKarp

VoicForm

KrstlChr

FM

BeeThree

FMVoices

HevyMetl

HnkyTonk

FrencHrn

PercFlut

Rhodey

TubeBell

Wurley

Utilities and physical models from the Synthesis Toolkit (STK) by Perry R. Cook and Gary Scavone.

JCRev

inherits : UGen : Object

John Chowning's reverberator class. This class is derived from the CLM NRev function, which is based on the use of networks of simple allpass and comb delay filters. This particular arrangement consists of 6 comb filters in parallel, followed by 3 allpass filters, a lowpass filter, and another allpass in series, followed by two allpass filters in parallel with corresponding right and left outputs. by Perry R. Cook and Gary P. Scavone, 1995 - 2002.

examples

constructors

JCRev()

Default constructor for JCRev.

member functions

float mix(float value)

Set mix level.

float mix()

Get mix level.


NRev

inherits : UGen : Object

CCRMA's NRev reverberator class. This class is derived from the CLM NRev function, which is based on the use of networks of simple allpass and comb delay filters. This particular arrangement consists of 6 comb filters in parallel, followed by 3 allpass filters, a lowpass filter, and another allpass in series, followed by two allpass filters in parallel with corresponding rightand left outputs. by Perry R. Cook and Gary P. Scavone, 1995 - 2002.

examples

constructors

NRev()

Default constructor for NRev.

member functions

float mix(float value)

Set mix level.

float mix()

Get mix level.


PRCRev

inherits : UGen : Object

Perry's simple reverberator class. This class is based on some of the famous Stanford/CCRMA reverbs (NRev, KipRev), which were based on the Chowning/Moorer/Schroeder reverberators using networks of simple allpass and comb delay filters. This class implements two series allpass units and two parallel comb filters. by Perry R. Cook and Gary P. Scavone, 1995 - 2002.

examples

constructors

PRCRev()

Default constructor for PRCRev.

member functions

float mix(float value)

Set mix level.

float mix()

Get mix level.


Chorus

inherits : UGen : Object

A chorus effect. by Perry R. Cook and Gary P. Scavone, 1995 - 2002.

examples

constructors

Chorus()

Default constructor for Chorus.

member functions

dur baseDelay(dur value)

Set base delay.

dur baseDelay()

Get base delay.

void max(dur baseDelay, float modDepth)

No description available

float mix(float value)

Set effect mix.

float mix()

Get effect mix.

float modDepth(float value)

Set modulation depth.

float modDepth()

Get modulation depth.

float modFreq(float value)

Set modulation frequency.

float modFreq()

Get modulation frequency.


Modulate

inherits : UGen : Object

This class combines random and periodic modulations to give a nice, natural human modulation function. by Perry R. Cook and Gary P. Scavone, 1995 - 2002.

examples

constructors

Modulate()

Default constructor for Modulate.

member functions

float randomGain(float value)

Set gain for random contribution.

float randomGain()

Get gain for random contribution.

float vibratoGain(float value)

Set gain for vibrato.

float vibratoGain()

Get gain for vibrato.

float vibratoRate(float value)

Set rate for vibrato.

float vibratoRate()

Get rate for vibrato.


PitShift

inherits : UGen : Object

This class implements a simple pitch shifter using delay lines. by Perry R. Cook and Gary P. Scavone, 1995 - 2002.

examples

constructors

PitShift()

Default constructor for PitShift.

member functions

float effectMix(float value)

Set effect mix level.

float effectMix()

Get effect mix level.

float mix(float value)

Set mix level.

float mix()

Get mix level.

float shift(float value)

Set degree of pitch shifting.

float shift()

Get degree of pitch shifting.


SubNoise

inherits : UGen : Object

Generates a new random number every 'rate' ticks using the C `rand()` function. The quality of the r`and()` function varies from one OS to another. by Perry R. Cook and Gary P. Scavone, 1995 - 2002.

examples

constructors

SubNoise()

Default constructor for SubNoise.

member functions

int rate(int value)

Set subsampling rate.

int rate()

Get subsampling rate.


BLT

inherits : UGen : Object

Super-class for band-limited oscillators.

constructors

BLT()

Default constructor for BLT.

member functions

float freq(float value)

Set frequency.

float freq()

Set frequency.

int harmonics(int value)

Set harmonics.

int harmonics()

Get harmonics.

float phase(float value)

Set phase.

float phase()

Get phase.


Blit

inherits : BLT : UGen : Object

This class generates a band-limited impulse train using a closed-form algorithm reported by Stilson and Smith in 'Alias-Free Digital Synthesis of Classic Analog Waveforms', 1996. The user can specify both the fundamental frequency of the impulse train and the number of harmonics contained in the resulting signal. The signal is normalized so that the peak value is +/-1.0. If `nHarmonics` is 0, then the signal will contain all harmonics up to half the sample rate. Note, however, that this setting may produce aliasing in the signal when the frequency is changing (no automatic modification of the number of harmonics is performed by the `setFrequency()` function). Original code by Robin Davies, 2005. Revisions by Gary Scavone for STK, 2005.

examples

constructors

Blit()

Default constructor for Blit.


BlitSaw

inherits : BLT : UGen : Object

This class generates a band-limited sawtooth waveform using a closed-form algorithm reported by Stilson and Smith in 'Alias-Free Digital Synthesis of Classic Analog Waveforms', 1996. The user can specify both the fundamental frequency of the sawtooth and the number of harmonics contained in the resulting signal. If `nHarmonics` is 0, then the signal will contain all harmonics up to half the sample rate. Note, however, that this setting may produce aliasing in the signal when the frequency is changing (no automatic modification of the number of harmonics is performed by the `setFrequency()` function). Based on initial code of Robin Davies, 2005. Modified algorithm code by Gary Scavone, 2005.

constructors

BlitSaw()

Default constructor for BlitSaw.


BlitSquare

inherits : BLT : UGen : Object

This class generates a band-limited square wave signal. It is derived in part from the approach reported by Stilson and Smith in 'Alias-Free Digital Synthesis of Classic Analog Waveforms', 1996. The algorithm implemented in this class uses a SincM function with an even M value to achieve a bipolar bandlimited impulse train. This signal is then integrated to achieve a square waveform. The integration process has an associated DC offset but that is subtracted off the output signal. The user can specify both the fundamental frequency of the waveform and the number of harmonics contained in the resulting signal. If `nHarmonics` is 0, then the signal will contain all harmonics up to half the sample rate. Note, however, that this setting may produce aliasing in the signal when the frequency is changing (no automatic modification of the number of harmonics is performed by the `setFrequency()` function). Based on initial code of Robin Davies, 2005. Modified algorithm code by Gary Scavone, 2005.

constructors

BlitSquare()

Default constructor for BlitSquare.


FilterStk

inherits : UGen : Object

FilterStk is an STK Filter base class inherited by all Stk Filter UGens such as BiQuad, TwoZero, PoleZero, etc. You should NOT need to use this UGen directly. Please refer to the documentation on other filter types instead.

constructors

FilterStk()

Default constructor for FilterStk.

member functions

string coefs(string value)

No description available


WvIn

inherits : UGen : Object

This class provides input support for various audio file formats. It also serves as a base class for 'realtime' streaming subclasses. WvIn loads the contents of an audio file for subsequent output. Linear interpolation is used for fractional 'read rates'. WvIn supports multi-channel data in interleaved format. It is important to distinguish the `tick()` methods, which return samples produced by averaging across sample frames, from the `tickFrame()` methods, which return pointers to multi-channel sample frames. For single-channel data, these methods return equivalent values. Small files are completely read into local memory during instantiation. Large files are read incrementally from disk. The file size threshold and the increment size values are defined in WvIn.h. WvIn currently supports WAV, AIFF, SND (AU), MAT-file (Matlab), and STK RAW file formats. Signed integer (8-, 16-, and 32-bit) and floating-point (32- and 64-bit) data types are supported. Uncompressed data types are not supported. If using MAT-files, data should be saved in an array with each data channel filling a matrix row. by Perry R. Cook and Gary P. Scavone, 1995 - 2002.

constructors

WvIn()

Default constructor for WvIn.

member functions

string path(string value)

Set file to be played.

string path()

Get file to be played.

float rate(float value)

Set playback rate.

float rate()

Get playback rate.


WaveLoop

inherits : WvIn : UGen : Object

This class inherits from WvIn and provides audio file looping functionality. WaveLoop supports multi-channel data in interleaved format. It is important to distinguish the `tick()` methods, which return samples produced by averaging across sample frames, from the `tickFrame()` methods, which return pointers to multi-channel sample frames. For single-channel data, these methods return equivalent values. by Perry R. Cook and Gary P. Scavone, 1995 - 2002.

constructors

WaveLoop()

Default constructor for WaveLoop.

member functions

float addPhase(float value)

Set offset by phase.

float addPhase()

Get offset by phase.

float addPhaseOffset(float value)

Set phase offset.

float addPhaseOffset()

Get phase offset.

float freq(float value)

Set frequency of playback (loops/second).

float freq()

Get frequency of playback (loops/second).


WvOut

inherits : UGen : Object

This class provides output support for various audio file formats. It also serves as a base class for 'realtime' streaming subclasses. WvOut writes samples to an audio file. It supports multi-channel data in interleaved format. It is important to distinguish the `tick()` methods, which output single samples to all channels in a sample frame, from the `tickFrame()` method, which takes a pointer to multi-channel sample frame data. WvOut currently supports WAV, AIFF, AIFC, SND (AU), MAT-file (Matlab), and STK RAW file formats. Signed integer (8-, 16-, and 32-bit) and floating- point (32- and 64-bit) data types are supported. STK RAW files use 16-bit integers by definition. MAT-files will always be written as 64-bit floats. If a data type specification does not match the specified file type, the data type will automatically be modified. Uncompressed data types are not supported. Currently, WvOut is non-interpolating and the output rate is always `Stk::sampleRate()`. by Perry R. Cook and Gary P. Scavone, 1995 - 2002.

examples

constructors

WvOut()

Default constructor for WvOut.

member functions

string aifFilename(string value)

Open an AIFF file for writing (with default datatype IO.INT16).

string aifFilename(string value, int datatype)

Open an AIFF file for writing, with datatype (e.g., IO.INT16, IO.INT24, IO.INT32, IO.FLOAT32, IO.FLOAT64).

string autoPrefix(string value)

Set auto prefix string for "special:auto" filename generation.

string autoPrefix()

Get auto prefix string for "special:auto" filename generation.

string closeFile(string value)

Close the file properly.

string closeFile()

Close the file properly.

float fileGain(float value)

Set file gain.

float fileGain()

Get file gain.

string filename()

Get filename.

string matFilename(string value)

Open MATLAB file for writing (with default datatype IO.FLOAT64).

string matFilename(string value, int datatype)

Open MATLAB file for writing; datatype for MATLAB files can only be IO.FLOAT64.

string rawFilename(string value)

Open a RAW file for writing (note: raw audio files are mono and 16-bit).

string rawFilename(string value, int datatype)

Open a RAW file for writing; datatype for raw files can only be IO.INT16.

int record(int value)

Start/stop output.

int record()

Start/stop output.

string sndFilename(string value)

Open SND file for writing (with default datatype IO.INT16).

string sndFilename(string value, int datatype)

Open SND file for writing, with datatype (e.g., IO.INT16, IO.INT24, IO.INT32, IO.FLOAT32, IO.FLOAT64).

string wavFilename(string value)

Open WAVE file for writing (with default datatype IO.INT16).

string wavFilename(string value, int datatype)

Open WAVE file for writing, with datatype (e.g., IO.INT16, IO.INT24, IO.INT32, IO.FLOAT32, IO.FLOAT64).


WvOut2

inherits : WvOut : UGen : Object

WvOut2 is the stereo version of WvOut; opens and writes a 2-channel audio file; see WvOut for usage.

examples

constructors

WvOut2()

Default constructor for WvOut2.


StkInstrument

inherits : UGen : Object

Super-class for STK instruments.

constructors

StkInstrument()

Default constructor for StkInstrument.

member functions

void controlChange(int ctrl, float value)

Assert control change; numbers are instrument specific; value range [0.0 - 127.0].

float freq(float value)

Set frequency.

float freq()

Get frequency.

float noteOff(float value)

Trigger note off.

float noteOn(float value)

Trigger note on.


BandedWG

inherits : StkInstrument : UGen : Object

This class uses banded waveguide techniques to model a variety of sounds, including bowed bars, glasses, and bowls. For more information, see Essl, G. and Cook, P. 'Banded Waveguides: Towards Physical Modelling of Bar Percussion Instruments', Proceedings of the 1999 International Computer Music Conference. Control Change Numbers: - Bow Pressure = 2 - Bow Motion = 4 - Strike Position = 8 (not implemented) - Vibrato Frequency = 11 - Gain = 1 - Bow Velocity = 128 - Instrument Presets = 16 - Uniform Bar = 0 - Tuned Bar = 1 - Glass Harmonica = 2 - Tibetan Bowl = 3 by Georg Essl, 1999 - 2002. Modified for Stk 4.0 by Gary Scavone.

examples

constructors

BandedWG()

Default constructor for BandedWG.

member functions

float bowMotion(float value)

Set bow motion, [0.0-1.0].

float bowMotion()

Get bow motion, [0.0-1.0].

float bowPressure(float value)

Set bow pressure, [0.0-1.0].

float bowPressure()

Get bow pressure, [0.0-1.0].

float bowRate(float value)

Set bowing rate (seconds).

float bowRate()

Get bowing rate (seconds).

float integrationConstant(float value)

Set integration constant, vibrato frequency.

float integrationConstant()

Get integration constant, vibrato frequency.

float modesGain(float value)

Set amplitude for modes.

float modesGain()

Get amplitude for modes.

float pluck(float value)

Pluck instrument, [0.0-1.0].

int preset(int value)

Set instrument preset, (0-3, see above).

int preset()

Get instrument preset, (0-3, see above).

float startBowing(float value)

Start bowing, [0.0-1.0].

float stopBowing(float value)

Stop bowing, [0.0-1.0].

float strikePosition(float value)

Set strike position, [0.0-1.0].

float strikePosition()

Get strike position, [0.0-1.0].


BlowBotl

inherits : StkInstrument : UGen : Object

This class implements a helmholtz resonator (biquad filter) with a polynomial jet excitation (a la Cook). Control Change Numbers: - Noise Gain = 4 - Vibrato Frequency = 11 - Vibrato Gain = 1 - Volume = 128 by Perry R. Cook and Gary P. Scavone, 1995 - 2002.

examples

constructors

BlowBotl()

Default constructor for BlowBotl.

member functions

float noiseGain(float value)

Set noise component gain, [0.0-1.0].

float noiseGain()

Get noise component gain, [0.0-1.0].

float rate(float value)

Set rate of attack.

float rate()

Get rate of attack.

float startBlowing(float value)

Start blowing, [0.0-1.0].

float stopBlowing(float value)

Stop blowing, [0.0-1.0].

float vibratoFreq(float value)

Set vibrato frequency (Hz).

float vibratoFreq()

Get vibrato frequency (Hz).

float vibratoGain(float value)

Set vibrato gain, [0.0-1.0].

float vibratoGain()

Get vibrato gain, [0.0-1.0].

float volume(float value)

Set volume, [0.0-1.0].

float volume()

Get volume, [0.0-1.0].


BlowHole

inherits : StkInstrument : UGen : Object

This class is based on the clarinet model, with the addition of a two-port register hole and a three-port dynamic tonehole implementation, as discussed by Scavone and Cook (1998). In this implementation, the distances between the reed/register hole and tonehole/bell are fixed. As a result, both the tonehole and register hole will have variable influence on the playing frequency, which is dependent on the length of the air column. In addition, the highest playing freqeuency is limited by these fixed lengths. This is a digital waveguide model, making its use possibly subject to patents held by Stanford University, Yamaha, and others. Control Change Numbers: - Reed Stiffness = 2 - Noise Gain = 4 - Tonehole State = 11 - Register State = 1 - Breath Pressure = 128 Perry R. Cook and Gary P. Scavone, 1995 - 2002.

examples

constructors

BlowHole()

Default constructor for BlowHole.

member functions

float noiseGain(float value)

Set noise component gain, [0.0-1.0].

float noiseGain()

Get noise component gain, [0.0-1.0].

float pressure(float value)

Set pressure, [0.0-1.0].

float pressure()

Get pressure, [0.0-1.0].

float rate(float value)

Set rate of attack, [0.0-1.0].

float rate()

Get rate of attack, [0.0-1.0].

float reed(float value)

Set reed stiffness, [0.0-1.0].

float reed()

Get reed stiffness, [0.0-1.0].

float startBlowing(float value)

Start blowing, [0.0-1.0].

float stopBlowing(float value)

Stop blowing, [0.0-1.0].

float tonehole(float value)

Set tonehole size, [0.0-1.0].

float tonehole()

Get tonehole size, [0.0-1.0].

float vent(float value)

Set vent frequency, [0.0-1.0].

float vent()

Get vent frequency, [0.0-1.0].


Bowed

inherits : StkInstrument : UGen : Object

This class implements a bowed string model, a la Smith (1986), after McIntyre, Schumacher, Woodhouse (1983). This is a digital waveguide model, making its use possibly subject to patents held by Stanford University, Yamaha, and others. Control Change Numbers: - Bow Pressure = 2 - Bow Position = 4 - Vibrato Frequency = 11 - Vibrato Gain = 1 - Volume = 128 by Perry R. Cook and Gary P. Scavone, 1995 - 2002.

examples

constructors

Bowed()

Default constructor for Bowed.

member functions

float bowPosition(float value)

Set bow position, [0.0-1.0].

float bowPosition()

Get bow position, [0.0-1.0].

float bowPressure(float value)

Set bow pressure, [0.0-1.0].

float bowPressure()

Get bow pressure, [0.0-1.0].

float startBowing(float value)

Start bowing, [0.0-1.0].

float stopBowing(float value)

Stop bowing, [0.0-1.0].

float vibratoFreq(float value)

Set vibrato frequency (Hz).

float vibratoFreq()

Get vibrato frequency (Hz).

float vibratoGain(float value)

Set vibrato gain, [0.0-1.0].

float vibratoGain()

Get vibrato gain, [0.0-1.0].

float volume(float value)

Set volume, [0.0-1.0].

float volume()

Get volume, [0.0-1.0].


Brass

inherits : StkInstrument : UGen : Object

This class implements a simple brass instrument waveguide model, a la Cook (TBone, HosePlayer). This is a digital waveguide model, making its use possibly subject to patents held by Stanford University, Yamaha, and others. Control Change Numbers: - Lip Tension = 2 - Slide Length = 4 - Vibrato Frequency = 11 - Vibrato Gain = 1 - Volume = 128 by Perry R. Cook and Gary P. Scavone, 1995 - 2002.

examples

constructors

Brass()

Default constructor for Brass.

member functions

float clear(float value)

Clear instrument.

float lip(float value)

Set lip tension, [0.0-1.0].

float lip()

Get lip tension, [0.0-1.0].

float rate(float value)

Set rate of attack (seconds).

float rate()

Get rate of attack (seconds).

float slide(float value)

Set slide length, [0.0-1.0].

float slide()

Get slide length, [0.0-1.0].

float startBlowing(float value)

Start blowing, [0.0-1.0].

float stopBlowing(float value)

Stop blowing, [0.0-1.0].

float vibratoFreq(float value)

Set vibrato frequency (Hz).

float vibratoFreq()

Get vibrato frequency (Hz).

float vibratoGain(float value)

Set vibrato gain, [0.0-1.0].

float vibratoGain()

Get vibrato gain, [0.0-1.0].

float volume(float value)

Set volume, [0.0-1.0].

float volume()

Get volume, [0.0-1.0].


Clarinet

inherits : StkInstrument : UGen : Object

This class implements a simple clarinet physical model, as discussed by Smith (1986), McIntyre, Schumacher, Woodhouse (1983), and others. This is a digital waveguide model, making its use possibly subject to patents held by Stanford University, Yamaha, and others. Control Change Numbers: - Reed Stiffness = 2 - Noise Gain = 4 - Vibrato Frequency = 11 - Vibrato Gain = 1 - Breath Pressure = 128 by Perry R. Cook and Gary P. Scavone, 1995 - 2002.

examples

constructors

Clarinet()

Default constructor for Clarinet.

member functions

float clear(float value)

Clear instrument.

float noiseGain(float value)

Set noise component gain, [0.0-1.0].

float noiseGain()

Get noise component gain, [0.0-1.0].

float pressure(float value)

Set pressure, [0.0-1.0].

float pressure()

Get pressure, [0.0-1.0].

float rate(float value)

Set rate of attack (seconds).

float rate()

Get rate of attack (seconds).

float reed(float value)

Set reed stiffness, [0.0-1.0].

float reed()

Get reed stiffness, [0.0-1.0].

float startBlowing(float value)

Start blowing, [0.0-1.0].

float stopBlowing(float value)

Stop blowing, [0.0-1.0].

float vibratoFreq(float value)

Set vibrato frequency (Hz).

float vibratoFreq()

Get vibrato frequency (Hz).

float vibratoGain(float value)

Set vibrato gain, [0.0-1.0].

float vibratoGain()

Get vibrato gain, [0.0-1.0].


Flute

inherits : StkInstrument : UGen : Object

This class implements a simple flute physical model, as discussed by Karjalainen, Smith, Waryznyk, etc. The jet model uses a polynomial, a la Cook. This is a digital waveguide model, making its use possibly subject to patents held by Stanford University, Yamaha, and others. Control Change Numbers: - Jet Delay = 2 - Noise Gain = 4 - Vibrato Frequency = 11 - Vibrato Gain = 1 - Breath Pressure = 128 by Perry R. Cook and Gary P. Scavone, 1995 - 2002.

examples

constructors

Flute()

Default constructor for Flute.

member functions

float clear(float value)

Clear instrument.

float endReflection(float value)

Set end reflection.

float endReflection()

Get end reflection.

float jetDelay(float value)

Set jet delay.

float jetDelay()

Get jet delay.

float jetReflection(float value)

Set jet reflection.

float jetReflection()

Get jet reflection.

float noiseGain(float value)

Set noise component gain, [0.0-1.0].

float noiseGain()

Get noise component gain, [0.0-1.0].

float pressure(float value)

Set pressure, [0.0-1.0].

float pressure()

Get pressure, [0.0-1.0].

float rate(float value)

Set rate of attack (seconds).

float rate()

Get rate of attack (seconds).

float startBlowing(float value)

Start blowing, [0.0-1.0].

float stopBlowing(float value)

Stop blowing, [0.0-1.0].

float vibratoFreq(float value)

Set vibrato frequency (Hz).

float vibratoFreq()

Get vibrato frequency (Hz).

float vibratoGain(float value)

Set vibrato gain, [0.0-1.0].

float vibratoGain()

Get vibrato gain, [0.0-1.0].


Mandolin

inherits : StkInstrument : UGen : Object

This class inherits from PluckTwo and uses 'commuted synthesis' techniques to model a mandolin instrument. This is a digital waveguide model, making its use possibly subject to patents held by Stanford University, Yamaha, and others. Commuted Synthesis, in particular, is covered by patents, granted, pending, and/or applied-for. All are assigned to the Board of Trustees, Stanford University. For information, contact the Office of Technology Licensing, Stanford University. Control Change Numbers: - Body Size = 2 - Pluck Position = 4 - String Sustain = 11 - String Detuning = 1 - Microphone Position = 128 by Perry R. Cook and Gary P. Scavone, 1995 - 2002.

examples

constructors

Mandolin()

Default constructor for Mandolin.

member functions

float afterTouch(float value)

Set aftertouch (currently unsupported).

string bodyIR(string path)

Set body impulse response.

string bodyIR()

Get body impulse response.

float bodySize(float value)

Set body size (percentage).

float bodySize()

Get body size (percentage).

float pluck(float value)

Pluck instrument, [0.0-1.0].

float pluckPos(float value)

Set pluck position, [0.0-1.0].

float pluckPos()

Get pluck position, [0.0-1.0].

float stringDamping(float value)

Set string damping, [0.0-1.0].

float stringDamping()

Get string damping, [0.0-1.0].

float stringDetune(float value)

Set detuning of string pair, [0.0-1.0].

float stringDetune()

Get detuning of string pair, [0.0-1.0].


ModalBar

inherits : StkInstrument : UGen : Object

This class implements a number of different struck bar instruments. It inherits from the Modal class. Control Change Numbers: - Stick Hardness = 2 - Stick Position = 4 - Vibrato Gain = 11 - Vibrato Frequency = 7 - Direct Stick Mix = 1 - Volume = 128 - Modal Presets = 16 - Marimba = 0 - Vibraphone = 1 - Agogo = 2 - Wood1 = 3 - Reso = 4 - Wood2 = 5 - Beats = 6 - Two Fixed = 7 - Clump = 8 by Perry R. Cook and Gary P. Scavone, 1995 - 2002.

examples

constructors

ModalBar()

Default constructor for ModalBar.

member functions

float clear(float value)

Clear instrument.

float damp(float value)

Damp bar, [0.0-1.0].

float directGain(float value)

Set direct gain, [0.0-1.0].

float directGain()

Get direct gain, [0.0-1.0].

float masterGain(float value)

Set master gain, [0.0-1.0].

float masterGain()

Get master gain, [0.0-1.0].

int mode(int value)

Set mode.

int mode()

Get mode.

float modeGain(float value)

Set gain for selected mode, [0.0-1.0].

float modeGain()

Get gain for selected mode, [0.0-1.0].

float modeRadius(float value)

Set radius for selected mode, [0.0-1.0].

float modeRadius()

Get radius for selected mode, [0.0-1.0].

float modeRatio(float value)

Set ratio for selected mode.

float modeRatio()

Get ratio for selected mode.

int preset(int value)

Set preset (see above).

int preset()

Get preset.

float stickHardness(float value)

Set stick hardness, [0.0-1.0].

float stickHardness()

Get stick hardness, [0.0-1.0].

float strike(float value)

Strike bar, [0.0-1.0].

float strikePosition(float value)

Set strike position, [0.0-1.0].

float strikePosition()

Get strike position, [0.0-1.0].

float vibratoFreq(float value)

Set vibrato frequency (Hz).

float vibratoFreq()

Get vibrato frequency (Hz).

float vibratoGain(float value)

Set vibrato gain, [0.0-1.0].

float vibratoGain()

Get vibrato gain, [0.0-1.0].

float volume(float value)

Set volume, [0.0-1.0].

float volume()

Get volume, [0.0-1.0].


Moog

inherits : StkInstrument : UGen : Object

This instrument uses one attack wave, one looped wave, and an ADSR envelope (inherited from the Sampler class) and adds two sweepable formant (FormSwep) filters. Control Change Numbers: - Filter Q = 2 - Filter Sweep Rate = 4 - Vibrato Frequency = 11 - Vibrato Gain = 1 - Gain = 128 by Perry R. Cook and Gary P. Scavone, 1995 - 2002.

examples

constructors

Moog()

Default constructor for Moog.

member functions

float afterTouch(float value)

Set aftertouch, [0.0-1.0].

float filterQ(float value)

Set filter Q value, [0.0-1.0].

float filterQ()

Get filter Q value, [0.0-1.0].

float filterStartFreq(float freq)

Set filter starting frequency.

float filterStartFreq()

Get filter starting frequency.

float filterSweepRate(float value)

Set filter sweep rate, [0.0-1.0].

float filterSweepRate()

Get filter sweep rate, [0.0-1.0].

float lfoDepth(float value)

Set LFO modulation depth.

float lfoDepth()

Get LFO modulation depth.

float lfoSpeed(float value)

Set LFO modulation speed.

float lfoSpeed()

Get LFO modulation speed.

float modDepth(float value)

Set modulation depth.

float modDepth()

Get modulation depth.

float modSpeed(float value)

Set modulation speed.

float modSpeed()

Get modulation speed.

float vibratoFreq(float value)

Set vibrato frequency (Hz).

float vibratoFreq()

Get vibrato frequency (Hz).

float vibratoGain(float value)

Set vibrato gain, [0.0-1.0].

float vibratoGain()

Get vibrato gain, [0.0-1.0].

float volume(float value)

Set volume.

float volume()

Get volume.


Saxofony

inherits : StkInstrument : UGen : Object

This class implements a 'hybrid' digital waveguide instrument that can generate a variety of wind-like sounds. It has also been referred to as the 'blowed string' model. The waveguide section is essentially that of a string, with one rigid and one lossy termination. The non-linear function is a reed table. The string can be 'blown' at any point between the terminations, though just as with strings, it is impossible to excite the system at either end. If the excitation is placed at the string mid-point, the sound is that of a clarinet. At points closer to the 'bridge', the sound is closer to that of a saxophone. See Scavone (2002) for more details. This is a digital waveguide model, making its use possibly subject to patents held by Stanford University, Yamaha, and others. Control Change Numbers: - Reed Stiffness = 2 - Reed Aperture = 26 - Noise Gain = 4 - Blow Position = 11 - Vibrato Frequency = 29 - Vibrato Gain = 1 - Breath Pressure = 128 by Perry R. Cook and Gary P. Scavone, 1995 - 2002.

examples

constructors

Saxofony()

Default constructor for Saxofony.

member functions

float aperture(float value)

Set reed aperture, [0.0-1.0].

float aperture()

Get reed aperture, [0.0-1.0].

float blowPosition(float value)

Set lip stiffness, [0.0-1.0].

float blowPosition()

Get lip stiffness, [0.0-1.0].

float clear(float value)

Clear instrument.

float noiseGain(float value)

Set noise component gain, [0.0-1.0].

float noiseGain()

Get noise component gain, [0.0-1.0].

float pressure(float value)

Set pressure, [0.0-1.0].

float pressure()

Get pressure, [0.0-1.0].

float rate(float value)

Set rate of attack (seconds).

float rate()

Get rate of attack (seconds).

float startBlowing(float value)

Start blowing, [0.0-1.0].

float stiffness(float value)

Set reed stiffness, [0.0-1.0].

float stiffness()

Get reed stiffness, [0.0-1.0].

float stopBlowing(float value)

Stop blowing, [0.0-1.0].

float vibratoFreq(float value)

Set vibrato frequency (Hz).

float vibratoFreq()

Get vibrato frequency (Hz).

float vibratoGain(float value)

Set vibrato gain, [0.0-1.0].

float vibratoGain()

Get vibrato gain, [0.0-1.0].


Shakers

inherits : StkInstrument : UGen : Object

PhISEM (Physically Informed Stochastic Event Modeling) is an algorithmic approach for simulating collisions of multiple independent sound producing objects. This class is a meta-model that can simulate a Maraca, Sekere, Cabasa, Bamboo Wind Chimes, Water Drops, Tambourine, Sleighbells, and a Guiro. PhOLIES (Physically-Oriented Library of Imitated Environmental Sounds) is a similar approach for the synthesis of environmental sounds. This class implements simulations of breaking sticks, crunchy snow (or not), a wrench, sandpaper, and more. Control Change Numbers: - Shake Energy = 2 - System Decay = 4 - Number Of Objects = 11 - Resonance Frequency = 1 - Shake Energy = 128 - Instrument Selection = 1071 - Maraca = 0 - Cabasa = 1 - Sekere = 2 - Guiro = 3 - Water Drops = 4 - Bamboo Chimes = 5 - Tambourine = 6 - Sleigh Bells = 7 - Sticks = 8 - Crunch = 9 - Wrench = 10 - Sand Paper = 11 - Coke Can = 12 - Next Mug = 13 - Penny + Mug = 14 - Nickle + Mug = 15 - Dime + Mug = 16 - Quarter + Mug = 17 - Franc + Mug = 18 - Peso + Mug = 19 - Big Rocks = 20 - Little Rocks = 21 - Tuned Bamboo Chimes = 22 by Perry R. Cook, 1996 - 1999.

examples

constructors

Shakers()

Default constructor for Shakers.

member functions

float decay(float value)

Set system decay, [0.0-1.0].

float decay()

Get system decay, [0.0-1.0].

float energy(float value)

Set shake energy, [0.0-1.0].

float energy()

Get shake energy, [0.0-1.0].

float freq(float value)

Set frequency (Hz).

float freq()

Get frequency (Hz).

float noteOff(float value)

Trigger note off.

float noteOn(float value)

Trigger note on.

float objects(float value)

Set number of objects, [0.0-128.0].

float objects()

Get number of objects, [0.0-128.0].

int preset(int value)

Set instrument, [0-22] (see above).

int preset()

Get instrument, [0-22] (see above).

int which(int value)

Set instrument, [0-22] (see above).

int which()

Get instrument, [0-22] (see above).


Sitar

inherits : StkInstrument : UGen : Object

This class implements a sitar plucked string physical model based on the Karplus-Strong algorithm. This is a digital waveguide model, making its use possibly subject to patents held by Stanford University, Yamaha, and others. There exist at least two patents, assigned to Stanford, bearing the names of Karplus and/or Strong. by Perry R. Cook and Gary P. Scavone, 1995 - 2002.

examples

constructors

Sitar()

Default constructor for Sitar.

member functions

float clear(float value)

Clear instrument.

float pluck(float value)

Pluck string.


StifKarp

inherits : StkInstrument : UGen : Object

This class implements a simple plucked string algorithm (Karplus Strong) with enhancements (Jaffe-Smith, Smith, and others), including string stiffness and pluck position controls. The stiffness is modeled with allpass filters. This is a digital waveguide model, making its use possibly subject to patents held by Stanford University, Yamaha, and others. Control Change Numbers: - Pickup Position = 4 - String Sustain = 11 - String Stretch = 1 by Perry R. Cook and Gary P. Scavone, 1995 - 2002.

examples

constructors

StifKarp()

Default constructor for StifKarp.

member functions

float baseLoopGain(float value)

Set base loop gain, [0.0-1.0].

float baseLoopGain()

Get base loop gain, [0.0-1.0].

float clear(float value)

Clear instrument.

float pickupPosition(float value)

Set pickup position, [0.0-1.0].

float pickupPosition()

Get pickup position, [0.0-1.0].

float pluck(float value)

Pluck string.

float stretch(float value)

Set string stretch, [0.0-1.0].

float stretch()

Get string stretch, [0.0-1.0].

float sustain(float value)

Set string sustain, [0.0-1.0].

float sustain()

Get string sustain, [0.0-1.0].


VoicForm

inherits : StkInstrument : UGen : Object

This instrument contains an excitation singing wavetable (looping wave with random and periodic vibrato, smoothing on frequency, etc.), excitation noise, and four sweepable complex resonances. Measured formant data is included, and enough data is there to support either parallel or cascade synthesis. In the floating point case cascade synthesis is the most natural so that's what you'll find here. Control Change Numbers: Voiced/Unvoiced Mix = 2 Vowel/Phoneme Selection = 4 Vibrato Frequency = 11 Vibrato Gain = 1 Loudness (Spectral Tilt) = 128 by Perry R. Cook and Gary P. Scavone, 1995 - 2002. Phoneme Names: 'eee' 'ihh' 'ehh' 'aaa' 'ahh' 'aww' 'ohh' 'uhh' 'uuu' 'ooo' 'rrr' 'lll' 'mmm' 'nnn' 'nng' 'ngg' 'fff' 'sss' 'thh' 'shh' 'xxx' 'hee' 'hoo' 'hah' 'bbb' 'ddd' 'jjj' 'ggg' 'vvv' 'zzz' 'thz' 'zhh'

examples

constructors

VoicForm()

Default constructor for VoicForm.

member functions

float loudness(float value)

Set 'loudness' of voice, [0.0-1.0].

float loudness()

Get 'loudness' of voice, [0.0-1.0].

string phoneme(string value)

Set phoneme (see above).

string phoneme()

Get phoneme (see above).

int phonemeNum(int value)

Set phoneme by number, [0.0-128.0].

int phonemeNum()

Get phoneme by number, [0.0-128.0].

float pitchSweepRate(float value)

Set rate of pitch sweep, [0.0-1.0].

float pitchSweepRate()

Get rate of pitch sweep, [0.0-1.0].

float quiet(float value)

Stop singing, [0.0-1.0].

float speak(float value)

Start singing, [0.0-1.0].

float unVoiced(float value)

Set mix for unvoiced component, [0.0 - 1.0].

float unVoiced()

Get mix for unvoiced component, [0.0 - 1.0].

float vibratoFreq(float value)

Set vibrato frequency (Hz).

float vibratoFreq()

Get vibrato frequency (Hz).

float vibratoGain(float value)

Set vibrato gain (Hz), [0.0-1.0].

float vibratoGain()

Get vibrato gain (Hz), [0.0-1.0].

float voiceMix(float value)

Set voiced/unvoiced mix, [0.0-1.0].

float voiceMix()

Get voiced/unvoiced mix, [0.0-1.0].

float voiced(float value)

Set mix for voiced component, [0.0 - 1.0].

float voiced()

Get mix for voiced component, [0.0 - 1.0].


KrstlChr

inherits : FM : StkInstrument : UGen : Object

STK-style "Crystal Choir" FM synthesis instrument. This class implements 3 parallel operators with being modulated (feedback modulation), also referred to as algorithm 7 of the TX81Z. Algorithm 7 is : 1 -\ 2 - +-> Out 4-->3 -/ Control Change Numbers: - Total Modulator Index = 2 (.controlOne) - Modulator Crossfade = 4 (.controlTwo) - LFO Speed = 11 - LFO Depth = 1 - ADSR 2 & 4 Target = 128 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.

examples

constructors

KrstlChr()

Default constructor for KrstlChr.


FM

inherits : StkInstrument : UGen : Object

STK FM synthesis super class. You should NOT need to use this UGen directly. Please refer to the documentation on FM subclasses instead. This class controls an arbitrary number of waves and envelopes, determined via a constructor argument. Control Change Numbers: - Control One = 2 - Control Two = 4 - LFO Speed = 11 - LFO Depth = 1 - ADSR 2 & 4 Target = 128 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.

constructors

FM()

Default constructor for FM.

member functions

float afterTouch(float value)

Set aftertouch, [0.0-1.0].

float afterTouch()

Get aftertouch, [0.0-1.0].

float controlOne(float value)

Set control one [instrument specific].

float controlOne()

Get control one [instrument specific].

float controlTwo(float value)

Set control two [instrument specific].

float controlTwo()

Get control two [instrument specific].

float getFMTableGain(int index)

Get table gain lookup.

float getFMTableSusLevel(int index)

Get sustain level lookup.

float getFMTableTime(int index)

Get table time lookup.

float lfoDepth(float value)

Set modulation depth, [0.0-1.0].

float lfoDepth()

Get modulation depth, [0.0-1.0].

float lfoSpeed(float value)

Set modulation speed (Hz).

float lfoSpeed()

Get modulation speed (Hz).

float op4Feedback(float value)

Set operator 4 feedback.

float op4Feedback()

Get operator 4 feedback.

float opADSR(int opNum, float attack, float decay, float sustain, float release)

Set operator ADSR: attack (sec), decay (sec), sustain [0.0-1.0], release (sec).

float opAM(int opNum, float value)

Set operator amplitude modulation.

float opAM(int opNum)

Get operator amplitude modulation.

float opGain(int opNum, float value)

Set operator gain.

float opGain(int opNum)

Get gperator gain.

float opRatio(int opNum, float ratio)

Set operator frequency ratio.

float opRatio(int opNum)

Get operator frequency ratio.

float opWave(int opNum, int wave)

Set operator waveform [1-8].


BeeThree

inherits : FM : StkInstrument : UGen : Object

STK Hammond-oid organ FM synthesis instrument. This class implements a simple 4 operator topology, also referred to as algorithm 8 of the TX81Z. Algorithm 8 is : 1 --. 2 -\| +-> Out 3 -/| 4 --. Control Change Numbers: - Operator 4 (feedback) Gain = 2 (.controlOne) - Operator 3 Gain = 4 (.controlTwo) - LFO Speed = 11 - LFO Depth = 1 - ADSR 2 & 4 Target = 128 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.

examples

constructors

BeeThree()

Default constructor for BeeThree.


FMVoices

inherits : FM : StkInstrument : UGen : Object

STK singing FM synthesis instrument. This class implements 3 carriers and a common modulator, also referred to as algorithm 6 of the TX81Z. Algorithm 6 is : ___//->1 -\ 4-||-->2 - +-> Out ___\->3 -// Control Change Numbers: - Vowel = 2 (.controlOne) - Spectral Tilt = 4 (.controlTwo) - LFO Speed = 11 - LFO Depth = 1 - ADSR 2 & 4 Target = 128 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.

constructors

FMVoices()

Default constructor for FMVoices.

member functions

float adsrTarget(float value)

Set ADSR targets, [0.0-1.0].

float adsrTarget()

Get ADSR targets, [0.0-1.0].

float spectralTilt(float value)

Set spectral tilt, [0.0-1.0].

float spectralTilt()

Get spectral tilt, [0.0-1.0].

float vowel(float value)

Set vowel, [0.0-1.0].

float vowel()

Get vowel, [0.0-1.0].


HevyMetl

inherits : FM : StkInstrument : UGen : Object

A STK heavy metal FM synthesis instrument. This class implements 3 cascade operators with feedback modulation, also referred to as algorithm 3 of the TX81Z. Algorithm 3 is : ____4--\ 3-->2-- + -->1-->Out Control Change Numbers: - Total Modulator Index = 2 (.controlOne) - Modulator Crossfade = 4 (.controlTwo) - LFO Speed = 11 - LFO Depth = 1 - ADSR 2 & 4 Target = 128 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.

examples

constructors

HevyMetl()

Default constructor for HevyMetl.


HnkyTonk

inherits : FM : StkInstrument : UGen : Object

STK-style Honkey Tonk Piano FM synthesis instrument. This class implements 4 cascade operators with feedback modulation, also referred to as algorithm 1 of the TX81Z. Algorithm 1 is : ____4-->3-->2-->1-->Out Control Change Numbers: - Total Modulator Index = 2 (.controlOne) - Modulator Crossfade = 4 (.controlTwo) - LFO Speed = 11 - LFO Depth = 1 - ADSR 2 & 4 Target = 128 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.

examples

constructors

HnkyTonk()

Default constructor for HnkyTonk.


FrencHrn

inherits : FM : StkInstrument : UGen : Object

STK-style French Horn FM synthesis instrument. This class implements 3 cascade operators and a 4th modulator with feedback modulation, also referred to as algorithm 2 of the TX81Z. Algorithm 2 is : ____4--\ 3--+-->>2-->1-->Out Control Change Numbers: - Total Modulator Index = 2 (.controlOne) - Modulator Crossfade = 4 (.controlTwo) - LFO Speed = 11 - LFO Depth = 1 - ADSR 2 & 4 Target = 128 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.

examples

constructors

FrencHrn()

Default constructor for FrencHrn.


PercFlut

inherits : FM : StkInstrument : UGen : Object

STK percussive flute FM synthesis instrument. This class implements algorithm 4 of the TX81Z. Algorithm 4 is : 4->3--\ ___2-- + -->1-->Out Control Change Numbers: - Total Modulator Index = 2 (.controlOne) - Modulator Crossfade = 4 (.controlTwo) - LFO Speed = 11 - LFO Depth = 1 - ADSR 2 & 4 Target = 128 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.

examples

constructors

PercFlut()

Default constructor for PercFlut.


Rhodey

inherits : FM : StkInstrument : UGen : Object

STK Fender Rhodes-like electric piano FM synthesis instrument. This class implements two simple FM Pairs summed together, also referred to as algorithm 5 of the TX81Z. Algorithm 5 is : 4->3-- + --> Out 2->1-- Control Change Numbers: - Modulator Index One = 2 (.controlOne) - Crossfade of Outputs = 4 (.controlTwo) - LFO Speed = 11 - LFO Depth = 1 - ADSR 2 & 4 Target = 128 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.

examples

constructors

Rhodey()

Default constructor for Rhodey.


TubeBell

inherits : FM : StkInstrument : UGen : Object

STK tubular bell (orchestral chime) FM synthesis instrument. This class implements two simple FM Pairs summed together, also referred to as algorithm 5 of the TX81Z. Algorithm 5 is : 4->3-- + --> Out 2->1-- Control Change Numbers: - Modulator Index One = 2 (.controlOne) - Crossfade of Outputs = 4 (.controlTwo) - LFO Speed = 11 - LFO Depth = 1 - ADSR 2 & 4 Target = 128 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.

constructors

TubeBell()

Default constructor for TubeBell.


Wurley

inherits : FM : StkInstrument : UGen : Object

STK Wurlitzer electric piano FM synthesis instrument. This class implements two simple FM Pairs summed together, also referred to as algorithm 5 of the TX81Z. Algorithm 5 is : 4->3-- + --> Out 2->1-- Control Change Numbers: - Modulator Index One = 2 (.controlOne) - Crossfade of Outputs = 4 (.controlTwo) - LFO Speed = 11 - LFO Depth = 1 - ADSR 2 & 4 Target = 128 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.

examples

constructors

Wurley()

Default constructor for Wurley.