float * mSamples
sample buffer pointer
The PThreads CSL Thread class.
float mWidthBase
stereo width
GrainPlayer(GrainCloud *cloud)
AdditiveInstrument.h – Sum-of-sines synthesis instrument class.
float pan
stereo pan 0 - 1
float mDurationBase
grain duration base
Grain * mSilentGrains
shared grain lists - ptr to the free pool (silent)
float sampsPerTick
resolution of hi-res clock(s-rate / 1 billion)
float mVolumeBase
amplitude scale
float mOffsetRange
offset range
float * samples
sample buffer pointer
void startThreads()
method to start-up the create/reap threads
GrainPlayer – low-level granular synthesis generator, uses a list of current grains.
float time
current time (index) in samples
float rate
playback rate (1.0 for normal pitch, < 0 reads backwards)
GrainCloud * mCloud
the cloud I play
float mOffsetBase
starting index offset base
calculating audio samples
void reset()
reset all grains to silent
Grain * nextGrain
A pointer to the next grain in the linked list.
float mEnvelopeRange
envelope range
Grain * mPlayingGrains
ptr to the list of active grains
float mWidthRange
stereo width
float position
running sample index
CThread * spawnerThread
thread to create grains
float mRateBase
grain rate base
float mDensityBase
grain density base
unsigned delay
initial delay in samples
float mEnvelopeBase
envelope base: 0 = perc, 0.5 = triangle, 1 = reverse perc
unsigned numSamples
of samples in buffer
Grain data structure This implementation uses a linked list data structure. You might want to add a f...
float mVolumeRange
amplitude range
GrainulatorState gState
granulator state flag
Buffer – the multi-channel sample buffer class (passed around between generators and IO guys)...
float mDensityRange
grain density range
struct csl::Grain Grain
Grain data structure This implementation uses a linked list data structure. You might want to add a f...
void nextBuffer(Buffer &outputBuffer)
this sums up the list of live grains – very simple
float duration
duration in samples
GrainCloud()
simple constructor
long gNow
clock for accurate timing
float mRateRange
rate random range
GrainCloud – routine for playing clouds under GUI control. This could be called a cloud or a stream...
float mDurationRange
grain duration range
unsigned numSamples
length of sample vector
bool isPlaying
whether I'm on or off
CThread * reaperThread
thread to kill finished grains
GrainulatorState
This flag is for the app state, so that we don't change the grain lists while calculating samples...
bool threadOn
if the thread's running
float amplitude
amplitude scale (0 - 1)
Base class of CSL exceptions (written upper-case). Has a string message.
float env
envelope: 0 = perc, 0.5 = triangle, 1 = reverse perc