CSL  5.2
csl::GrainCloud Class Reference

GrainCloud – routine for playing clouds under GUI control. This could be called a cloud or a stream. You could also add a few more variables to make more flexible clouds. More...

#include <Granulator.h>

List of all members.

Public Member Functions

 GrainCloud ()
 simple constructor
 ~GrainCloud ()
void startThreads ()
 method to start-up the create/reap threads
void reset ()
 reset all grains to silent

Public Attributes

float mRateBase
 grain rate base
float mRateRange
 rate random range
float mOffsetBase
 starting index offset base
float mOffsetRange
 offset range
float mDensityBase
 grain density base
float mDensityRange
 grain density range
float mDurationBase
 grain duration base
float mDurationRange
 grain duration range
float mWidthBase
 stereo width
float mWidthRange
 stereo width
float mVolumeBase
 amplitude scale
float mVolumeRange
 amplitude range
float mEnvelopeBase
 envelope base: 0 = perc, 0.5 = triangle, 1 = reverse perc
float mEnvelopeRange
 envelope range
float * mSamples
 sample buffer pointer
unsigned numSamples
 

of samples in buffer


bool isPlaying
 whether I'm on or off
GrainmSilentGrains
 shared grain lists - ptr to the free pool (silent)
GrainmPlayingGrains
 ptr to the list of active grains
GrainulatorState gState
 granulator state flag
long gNow
 clock for accurate timing
float sampsPerTick
 resolution of hi-res clock(s-rate / 1 billion)

Protected Attributes

CThreadspawnerThread
 thread to create grains
CThreadreaperThread
 thread to kill finished grains
bool threadOn
 if the thread's running

Detailed Description

GrainCloud – routine for playing clouds under GUI control. This could be called a cloud or a stream. You could also add a few more variables to make more flexible clouds.

Definition at line 47 of file Granulator.h.


Constructor & Destructor Documentation

GrainCloud::~GrainCloud ( )

Definition at line 110 of file Granulator.cpp.


Member Function Documentation

void GrainCloud::startThreads ( )
void GrainCloud::reset ( )

reset all grains to silent

Definition at line 232 of file Granulator.cpp.

References mPlayingGrains, mSilentGrains, and csl::Grain::nextGrain.


Member Data Documentation

float csl::GrainCloud::mRateBase

grain rate base

Definition at line 55 of file Granulator.h.

Referenced by createGrains(), and testGrainCloud().

float csl::GrainCloud::mRateRange

rate random range

Definition at line 56 of file Granulator.h.

Referenced by createGrains(), and testGrainCloud().

float csl::GrainCloud::mOffsetBase

starting index offset base

Definition at line 57 of file Granulator.h.

Referenced by createGrains(), and testGrainCloud().

float csl::GrainCloud::mOffsetRange

offset range

Definition at line 58 of file Granulator.h.

Referenced by createGrains(), and testGrainCloud().

float csl::GrainCloud::mDensityBase

grain density base

Definition at line 59 of file Granulator.h.

Referenced by createGrains(), and testGrainCloud().

float csl::GrainCloud::mDensityRange

grain density range

Definition at line 60 of file Granulator.h.

Referenced by createGrains(), and testGrainCloud().

float csl::GrainCloud::mDurationBase

grain duration base

Definition at line 61 of file Granulator.h.

Referenced by createGrains(), and testGrainCloud().

float csl::GrainCloud::mDurationRange

grain duration range

Definition at line 62 of file Granulator.h.

Referenced by createGrains(), and testGrainCloud().

float csl::GrainCloud::mWidthBase

stereo width

Definition at line 63 of file Granulator.h.

Referenced by createGrains(), and testGrainCloud().

float csl::GrainCloud::mWidthRange

stereo width

Definition at line 64 of file Granulator.h.

Referenced by createGrains(), and testGrainCloud().

float csl::GrainCloud::mVolumeBase

amplitude scale

Definition at line 65 of file Granulator.h.

Referenced by createGrains(), and testGrainCloud().

float csl::GrainCloud::mVolumeRange

amplitude range

Definition at line 66 of file Granulator.h.

Referenced by createGrains(), and testGrainCloud().

float csl::GrainCloud::mEnvelopeBase

envelope base: 0 = perc, 0.5 = triangle, 1 = reverse perc

Definition at line 67 of file Granulator.h.

Referenced by createGrains(), and testGrainCloud().

float csl::GrainCloud::mEnvelopeRange

envelope range

Definition at line 68 of file Granulator.h.

Referenced by createGrains(), and testGrainCloud().

float* csl::GrainCloud::mSamples

sample buffer pointer

Definition at line 70 of file Granulator.h.

Referenced by createGrains(), GrainCloud(), and testGrainCloud().

unsigned csl::GrainCloud::numSamples

of samples in buffer

Definition at line 71 of file Granulator.h.

Referenced by createGrains(), and testGrainCloud().

bool csl::GrainCloud::isPlaying

whether I'm on or off

Definition at line 72 of file Granulator.h.

Referenced by createGrains(), GrainCloud(), reapGrains(), startThreads(), and testGrainCloud().

Grain* csl::GrainCloud::mSilentGrains

shared grain lists - ptr to the free pool (silent)

Definition at line 74 of file Granulator.h.

Referenced by createGrains(), GrainCloud(), reapGrains(), and reset().

Grain* csl::GrainCloud::mPlayingGrains

ptr to the list of active grains

Definition at line 75 of file Granulator.h.

Referenced by createGrains(), GrainCloud(), reapGrains(), and reset().

GrainulatorState csl::GrainCloud::gState

granulator state flag

Definition at line 76 of file Granulator.h.

Referenced by createGrains(), GrainCloud(), and reapGrains().

long csl::GrainCloud::gNow

clock for accurate timing

Definition at line 77 of file Granulator.h.

Referenced by createGrains(), and startThreads().

float csl::GrainCloud::sampsPerTick

resolution of hi-res clock(s-rate / 1 billion)

Definition at line 78 of file Granulator.h.

Referenced by createGrains(), and startThreads().

CThread* csl::GrainCloud::spawnerThread
protected

thread to create grains

Definition at line 81 of file Granulator.h.

Referenced by GrainCloud(), and startThreads().

CThread* csl::GrainCloud::reaperThread
protected

thread to kill finished grains

Definition at line 82 of file Granulator.h.

Referenced by GrainCloud(), and startThreads().

bool csl::GrainCloud::threadOn
protected

if the thread's running

Definition at line 83 of file Granulator.h.

Referenced by GrainCloud(), and startThreads().


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