CSL
6.0
|
#include "CSL_Types.h"
#include "CSL_Exceptions.h"
#include <stdarg.h>
#include <string>
#include <sys/time.h>
Go to the source code of this file.
Classes | |
class | csl::CGestalt |
The CSL system defaults class. More... | |
class | csl::Model |
The Model/Observable/Subject class; instances of its subclasses should send themselves, this->changed(some_data); on "relevant" state changes; the code they inherit (from Model) manages updating the list of observer/dependent objects in that they each receive update(some_data); and can access the model-passed data (the model might pass "this"). More... | |
class | csl::Observer |
CSL Observer/Dependent/Monitor class – instances receive update() messages from "models" and handle some argument, which may be the model's "this" pointer, or any other data. More... | |
Namespaces | |
csl | |
AdditiveInstrument.h – Sum-of-sines synthesis instrument class. | |
Macros | |
#define | SAFE_MALLOC(ptr, type, len) |
Useful Macros. More... | |
#define | SAFE_MATMALLOC(ptr, mtype, num, type, len) |
Matrix allocate SAFE_MATMALLOC(mRealSpectrum, FloatArray, mNumFrames, float, mWinSize); SAFE_MATMALLOC(mSpectBands, FloatArray, mNumFrames, float, NUM_BANDS) More... | |
#define | SAFE_STRUCTMALLOC(ptr, mtype, num, type) |
Structure allocate SAFE_STRUCTMALLOC(mRealSpectrum, FloatArray, mNumFrames, float);. More... | |
#define | SAFE_FREE(ptr) |
#define | SAFE_MATFREE(ptr, num) |
#define | C_TIME juce::Time::getMillisecondCounter() |
Which kind of accurate timer to use? More... | |
Typedefs | |
typedef std::vector< Observer * > | csl::ObserverVector |
Forward declaration. More... | |
Enumerations | |
enum | csl::LogLevel { csl::kLogInfo, csl::kLogWarning, csl::kLogError, csl::kLogFatal } |
Logging functions are standard C functions. More... | |
Functions | |
void | csl::logMsg (const char *format,...) |
These are the public logging messages. More... | |
void | csl::logMsg (LogLevel level, const char *format,...) |
void | csl::logMsgNN (const char *format,...) |
no-newline versions More... | |
void | csl::logMsgNN (LogLevel level, const char *format,...) |
Log the file & line #. More... | |
void | csl::logLine () |
Log the file & line #. More... | |
void | csl::logURL () |
log file/line as a URL More... | |
void | csl::vlogMsg (bool cz, LogLevel level, const char *format, va_list args) |
bool | csl::sleepUsec (float dur) |
Misc. global functions in the csl namespace. More... | |
bool | csl::sleepMsec (float dur) |
bool | csl::sleepSec (float dur) |
Timestamp | csl::timeNow () |
high-accuracy system or IO time in ticks More... | |
float | csl::fTimeNow () |
system or IO time in seconds More... | |
float | csl::fRandZ (void) |
A variety of useful random-number functions. More... | |
float | csl::fRand1 (void) |
-1 - 1 (one) More... | |
float | csl::fRandV (float val) |
0 - v (val) More... | |
float | csl::fRandM (float minV, float maxV) |
min - max (min/max) More... | |
float | csl::fRandR (float base, float range) |
b +- (r * b) (range) More... | |
float | csl::fRandB (float base, float range) |
b +- r (base) More... | |
int | csl::iRandV (int val) |
Integer rands. More... | |
int | csl::iRandM (int minV, int maxV) |
min - max (min/max) More... | |
int | csl::iRandB (int base, int range) |
b +- r (base) More... | |
bool | csl::coin () |
Answer true or false. More... | |
bool | csl::coin (float bias) |
Answer with a bias (1 –> always true) More... | |
float | csl::keyToFreq (unsigned midiKey) |
MIDI Conversions. More... | |
unsigned | csl::freqToKey (float frequency) |
freqToKey – converts from frequency in Hz to MIDI key # More... | |
#define SAFE_MALLOC | ( | ptr, | |
type, | |||
len | |||
) |
Useful Macros.
SAFE_MALLOC = safe malloc using new operator used like: SAFE_MALLOC(mSampleBuffer, sample, mWindowSize);
Definition at line 103 of file CGestalt.h.
Referenced by csl::Buffer::allocateBuffers(), csl::BinauralPanner::BinauralPanner(), csl::BinauralSourceCache::BinauralSourceCache(), csl::Convolver2::checkBuffers(), csl::Convolver::checkBuffers(), csl::GrainCloud::GrainCloud(), csl::HRTF::HRTF(), csl::IFFT::IFFT(), load_filter_data(), and csl::LSoundFile::readBufferFromFile().
#define SAFE_MATMALLOC | ( | ptr, | |
mtype, | |||
num, | |||
type, | |||
len | |||
) |
Matrix allocate SAFE_MATMALLOC(mRealSpectrum, FloatArray, mNumFrames, float, mWinSize); SAFE_MATMALLOC(mSpectBands, FloatArray, mNumFrames, float, NUM_BANDS)
Definition at line 112 of file CGestalt.h.
#define SAFE_STRUCTMALLOC | ( | ptr, | |
mtype, | |||
num, | |||
type | |||
) |
Structure allocate SAFE_STRUCTMALLOC(mRealSpectrum, FloatArray, mNumFrames, float);.
Definition at line 125 of file CGestalt.h.
#define SAFE_FREE | ( | ptr | ) |
Definition at line 137 of file CGestalt.h.
Referenced by csl::Convolver::free_buffers(), csl::Convolver2::free_buffers(), csl::LSoundFile::readBufferFromFile(), csl::BinauralPanner::~BinauralPanner(), csl::BinauralSourceCache::~BinauralSourceCache(), csl::HRTF::~HRTF(), and csl::IFFT::~IFFT().
#define SAFE_MATFREE | ( | ptr, | |
num | |||
) |
Definition at line 141 of file CGestalt.h.
#define C_TIME juce::Time::getMillisecondCounter() |
Which kind of accurate timer to use?
Definition at line 202 of file CGestalt.h.
Referenced by createGrains(), csl::GrainPlayer::nextBuffer(), and csl::GrainCloud::startThreads().