CSL  6.0
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>

Public Member Functions

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

Public Attributes

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

of samples in buffer

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

Protected Attributes

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

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 ( )

Member Function Documentation

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

reset all grains to silent

Definition at line 237 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(), testGrainCloud(), and csl::GrainPlayer::~GrainPlayer().

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(), startThreads(), and ~GrainCloud().

CThread* csl::GrainCloud::reaperThread
protected

thread to kill finished grains

Definition at line 82 of file Granulator.h.

Referenced by GrainCloud(), startThreads(), and ~GrainCloud().

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: