Home   Information   Classes   Download   Usage   Mail List   Requirements   Tutorial


Stk Class Reference

STK base class. More...

#include <Stk.h>

Inheritance diagram for Stk::

BowTabl Chorus Echo Envelope Filter Instrmnt JetTabl Messager Modulate Noise PitShift ReedTabl Reverb RtDuplex RtMidi SKINI Socket Table Thread WvIn WvOut List of all members.

Static Public Methods

MY_FLOAT sampleRate (void)
 Static method which returns the current STK sample rate.

void setSampleRate (MY_FLOAT newRate)
 Static method which sets the STK sample rate. More...

void swap16 (unsigned char *ptr)
 Static method which byte-swaps a 16-bit data type.

void swap32 (unsigned char *ptr)
 Static method which byte-swaps a 32-bit data type.

void swap64 (unsigned char *ptr)
 Static method which byte-swaps a 64-bit data type.

void sleep (unsigned long milliseconds)
 Static cross-platform method to sleep for a number of milliseconds.


Static Public Attributes

const STK_FORMAT STK_SINT8
const STK_FORMAT STK_SINT16
const STK_FORMAT STK_SINT32
const STK_FORMAT STK_FLOAT32
const STK_FORMAT STK_FLOAT64

Protected Methods

 Stk (void)
 Default constructor.

virtual ~Stk (void)
 Class destructor.


Static Protected Methods

void handleError (const char *message, StkError::TYPE type)
 Function for error reporting and handling.


Detailed Description

STK base class.

Nearly all STK classes inherit from this class. The global sample rate 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 - 2002.


Member Function Documentation

void Stk::setSampleRate ( MY_FLOAT newRate ) [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 STK_FORMAT Stk::STK_SINT8 [static]
 

-128 to +127

const STK_FORMAT Stk::STK_SINT16 [static]
 

-32768 to +32767

const STK_FORMAT Stk::STK_SINT32 [static]
 

-2147483648 to +2147483647.

const STK_FORMAT Stk::STK_FLOAT32 [static]
 

Normalized between plus/minus 1.0.

const STK_FORMAT 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-2002 Perry R. Cook and Gary P. Scavone. All Rights Reserved.