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

Noise Class Reference

#include <Noise.h>

Inheritance diagram for Noise:

Generator Stk SubNoise

List of all members.


Detailed Description

STK noise generator.

Generic random number generation using the C rand() function. The quality of the rand() function varies from one OS to another.

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

Definition at line 18 of file Noise.h.


Public Types

typedef unsigned long StkFormat

Public Member Functions

virtual StkFloat lastOut (void) const
 Return the last output value.
 Noise (unsigned int seed)
 Constructor which seeds the random number generator with a given seed.
 Noise ()
 Default constructor which seeds the random number generator with the system time.
void setSeed (unsigned int seed=0)
 Seed the random number generator with a specific seed value.
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.
virtual ~Noise ()
 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

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

Protected Attributes

std::ostringstream errorString_
StkFloat lastOutput_

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

Generated by  Doxygen 1.6.0   Back to index