Logo Search packages:      
Sourcecode: csound version File versions  Download package

Clarinet Class Reference

#include <Clarinet.h>

Inheritance diagram for Clarinet:

Instrmnt Stk

List of all members.

Detailed Description

STK clarinet physical model class.

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:

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

Definition at line 36 of file Clarinet.h.

Public Types

typedef unsigned long StkFormat

Public Member Functions

 Clarinet (StkFloat lowestFrequency)
 Class constructor, taking the lowest desired playing frequency.
void clear ()
 Reset and clear all internal state.
void controlChange (int number, StkFloat value)
 Perform the control change specified by number and value (0.0 - 128.0).
StkFloat lastOut () const
 Return the last output value.
StkFloat lastOutLeft () const
 Return the last left output value.
StkFloat lastOutRight () const
 Return the last right output value.
void noteOff (StkFloat amplitude)
 Stop a note with the given amplitude (speed of decay).
void noteOn (StkFloat frequency, StkFloat amplitude)
 Start a note with the given frequency and amplitude.
void setFrequency (StkFloat frequency)
 Set instrument parameters for a particular frequency.
void startBlowing (StkFloat amplitude, StkFloat rate)
 Apply breath pressure to instrument with given amplitude and rate of increase.
void stopBlowing (StkFloat rate)
 Decrease breath pressure with given rate of decrease.
StkFramestick (StkFrames &frames, unsigned int channel=0)
 Fill a channel of the StkFrames object with computed outputs.
StkFloat tick (void)
 Compute one sample and output.
 ~Clarinet ()
 Class destructor.

Static Public Member Functions

static void handleError (std::string message, StkError::Type type)
 Static function for error reporting and handling using c++ strings.
static void handleError (const char *message, StkError::Type type)
 Static function for error reporting and handling using c-strings.
static void printErrors (bool status)
 Toggle display of error messages before throwing exceptions.
static std::string rawwavePath (void)
 Static method which returns the current rawwave path.
static StkFloat sampleRate (void)
 Static method which returns the current STK sample rate.
static void setRawwavePath (std::string path)
 Static method which sets the STK rawwave path.
static void setSampleRate (StkFloat rate)
 Static method which sets the STK sample rate.
static void showWarnings (bool status)
 Toggle display of WARNING and STATUS messages.
static void sleep (unsigned long milliseconds)
 Static cross-platform method to sleep for a number of milliseconds.
static void swap16 (unsigned char *ptr)
 Static method which byte-swaps a 16-bit data type.
static void swap32 (unsigned char *ptr)
 Static method which byte-swaps a 32-bit data type.
static void swap64 (unsigned char *ptr)
 Static method which byte-swaps a 64-bit data type.

Static Public Attributes

static const StkFormat STK_FLOAT32 = 0x10
static const StkFormat STK_FLOAT64 = 0x20
static const StkFormat STK_SINT16 = 0x2
static const StkFormat STK_SINT24 = 0x4
static const StkFormat STK_SINT32 = 0x8
static const StkFormat STK_SINT8 = 0x1

Protected Member Functions

StkFloat computeSample (void)
void handleError (StkError::Type type)
 Internal function for error reporting which assumes message in errorString_ variable.

Protected Attributes

DelayL delayLine_
Envelope envelope_
std::ostringstream errorString_
OneZero filter_
StkFloat lastOutput_
long length_
Noise noise_
StkFloat noiseGain_
StkFloat outputGain_
ReedTable reedTable_
SineWave vibrato_
StkFloat vibratoGain_

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

Generated by  Doxygen 1.6.0   Back to index