Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   Tutorial


Stk Class Reference

#include <Stk.h>

Inheritance diagram for Stk:

Effect FileRead FileWrite Filter Function Generator Instrmnt Messager MidiFileIn Mutex Phonemes RtDuplex Skini Socket Sphere Thread Vector3D Voicer WvIn WvOut List of all members.

Detailed Description

STK base class.

Nearly all STK classes inherit from this class. The global sample rate and rawwave path variables can be queried and modified via Stk. In addition, this class provides error handling and byte-swapping functions.

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


Static Public Member Functions

static StkFloat sampleRate (void)
 Static method which returns the current STK sample rate.
static void setSampleRate (StkFloat rate)
 Static method which sets the STK sample rate.
static std::string rawwavePath (void)
 Static method which returns the current rawwave path.
static void setRawwavePath (std::string path)
 Static method which sets the STK rawwave path.
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 void sleep (unsigned long milliseconds)
 Static cross-platform method to sleep for a number of milliseconds.
static void handleError (const char *message, StkError::Type type)
 Static function for error reporting and handling using c-strings.
static void handleError (std::string message, StkError::Type type)
 Static function for error reporting and handling using c++ strings.
static void showWarnings (bool status)
 Toggle display of WARNING and STATUS messages.
static void printErrors (bool status)
 Toggle display of error messages before throwing exceptions.

Static Public Attributes

static const StkFormat STK_SINT8
static const StkFormat STK_SINT16
static const StkFormat STK_SINT24
static const StkFormat STK_SINT32
static const StkFormat STK_FLOAT32
static const StkFormat STK_FLOAT64

Protected Member Functions

 Stk (void)
 Default constructor.
virtual ~Stk (void)
 Class destructor.
void handleError (StkError::Type type)
 Internal function for error reporting which assumes message in errorString_ variable.


Member Function Documentation

static void Stk::setSampleRate StkFloat  rate  )  [inline, static]
 

Static method which sets the STK sample rate.

The sample rate set using this method is queried by all STK classes which depend on its value. It is initialized to the default SRATE set in Stk.h. Many STK classes use the sample rate during instantiation. Therefore, if you wish to use a rate which is different from the default rate, it is imperative that it be set BEFORE STK objects are instantiated.


Member Data Documentation

const StkFormat Stk::STK_SINT8 [static]
 

-128 to +127

const StkFormat Stk::STK_SINT16 [static]
 

-32768 to +32767

const StkFormat Stk::STK_SINT24 [static]
 

Upper 3 bytes of 32-bit signed integer.

const StkFormat Stk::STK_SINT32 [static]
 

-2147483648 to +2147483647.

const StkFormat Stk::STK_FLOAT32 [static]
 

Normalized between plus/minus 1.0.

const StkFormat Stk::STK_FLOAT64 [static]
 

Normalized between plus/minus 1.0.


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