#include <vector>#include <map>#include <string>Go to the source code of this file.
Classes | |
| struct | csl::testStruct |
Namespaces | |
| namespace | csl |
| < we use the STL vector, map, and string classes | |
Defines | |
| #define | CSL_Types_H |
| #define | CSL_ENUMS |
| #define | DO_TIMING |
| #define | CSL_mFrameRate 44100 |
| default sample rate (tested up to 96000) | |
| #define | CSL_mBlockSize 256 |
| normal hosts | |
| #define | CSL_mMaxBufferFrames 8192 |
| max block size (set large for zooming scopes) | |
| #define | CSL_mMaxSndFileFrames 128000000 |
| max file cache size = 128 MB (set to a large value) | |
| #define | DEFAULT_WTABLE_SIZE CGestalt::maxBufferFrames() |
| selected hardware interface at startup time | |
| #define | CSL_mVerbosity 3 |
| very verbose logging | |
| #define | CSL_mLoggingPeriod 10 |
| log CPU usage every N sec | |
| #define | CSL_LOG_PREFIX ":: " |
| prefix for log msgs (may be empty) | |
| #define | CSL_mOutPort 57123 |
| RFS output port. | |
| #define | CSL_mOSCPort 54321 |
| OSC input port. | |
| #define | CSL_NAME_LEN 256 |
| default string length | |
| #define | CSL_LINE_LEN 512 |
| default line length | |
| #define | CSL_DATA_DIR "~/Code/CSL/CSL_Data/" |
| folder where the CSL data can be found | |
| #define | SAMPS_TO_WRITE (4096 * 10 * 10) |
| record about 10 seconds by default | |
| #define | OUT_SFILE_NAME "XX_csl.aiff" |
| csl output file name temlpate | |
| #define | Osc WavetableOscillator |
| #define | cx_r(val) val[0] |
| #define | cx_i(val) val[1] |
| #define | ComplexPtr SampleBuffer |
| shorthand | |
| #define | CSL_SCALE 1 |
| #define | CSL_OFFSET 2 |
| #define | CSL_INPUT 3 |
| #define | CSL_OPERAND 4 |
| #define | CSL_OPERAND2 5 |
| #define | CSL_FREQUENCY 6 |
| #define | CSL_POSITION 7 |
| #define | CSL_POSITIONX 7 |
| #define | CSL_POSITIONY 8 |
| #define | CSL_POSITIONZ 9 |
| #define | CSL_FILTER_FREQUENCY 10 |
| #define | CSL_FILTER_AMOUNT 11 |
| #define | CSL_RATE 12 |
| #define | csl_min(a, b) (((a) < (b)) ? (a) : (b)) |
| #define | csl_max(a, b) (((a) > (b)) ? (a) : (b)) |
| #define | csl_between(a, b, c) (((a) >= (b)) && ((a) <= (c))) |
| #define | csl_max_r(a) (((a) > 1.0f) ? (a) : (1.0f/a)) |
| #define | csl_min_r(a) (((a) < 1.0f) ? (a) : (1.0f/a)) |
| #define | csl_abs(a) (((a) >= 0) ? (a) : (-a)) |
| #define | csl_max_d(a, b) ((a > b) ? (a / b) : (b / a)) |
| #define | csl_min_d(a, b) ((a < b) ? (a / b) : (b / a)) |
| #define | csl_ratio_rem(val1, val2, remainder) |
| #define | TRUE 1 |
| #define | FALSE 0 |
| #define | CSL_PI 3.1415926535897932f |
| #define | CSL_TWOPI 6.2831853071795865f |
| #define | CSL_PIHALF 1.570796326795f |
| #define | CSL_SQRT_TWO 1.414213562f |
| #define | CSL_SPEED_OF_SOUND 330.0f |
| #define | CSL_EXP_PER_DB 0.11512925464970228f |
| #define | CSL_SAMPS_PER_METER 133.63636363636364f |
| #define | CSL_DEGS_PER_RAD 57.295779513082321f |
Typedefs | |
| typedef float | csl::sample |
| < All of CSL takes place in the "csl" namespace | |
| typedef float | csl::Sample |
| (could be changed to int) | |
| typedef sample * | csl::SampleBuffer |
| 1-channel buffer data type, vector of (sample) | |
| typedef SampleBuffer * | csl::SampleBufferVector |
| Multi-channel buffer data type, vector of (SampleBuffer). | |
| typedef SampleBuffer * | csl::SampleBufferArray |
| Multi-channel buffer data type. | |
| typedef sample | csl::SampleComplex [2] |
| array-of-2 complex # type (like FFTW) | |
| typedef SampleComplex * | csl::SampleComplexVector |
| complex vector | |
| typedef SampleComplex * | csl::SampleComplexPtr |
| complex pointer | |
| typedef std::vector< CPoint * > | csl::PointVector |
| Forward declaration. | |
| typedef void * | csl::VOIDFCNPTR (void *arg) |
| the generic void fcn pointer | |
| typedef unsigned | csl::CSL_MAP_KEY |
| Forward declaration to IO Device model. | |
| typedef std::map< CSL_MAP_KEY, Port * > | csl::PortMap |
| typedef std::vector < UnitGenerator * > | csl::UGenVector |
| UGenVector: unit generator pointers (used for outputs). | |
| typedef std::map< std::string, UnitGenerator * > | csl::UGenMap |
| UGenMap: a named map of unit generators (used for GUIs). | |
| typedef std::vector< IODevice * > | csl::IODeviceVector |
| IOs hold onto device vectors. | |
| typedef unsigned long | csl::Timestamp |
| typedef signed long long | csl::INT64 |
| typedef unsigned long long | csl::UINT64 |
| #define CSL_Types_H |
CSL_Types.h -- the top-most include file for CSL 5.0 (September, 2009).
Central typedefs and platform-specific macros, also includes the model & observer classes. This is normally included via CSL_Core.h or CSL_Includes.h.
See the copyright notice and acknowledgment of authors in the file COPYRIGHT
CSL 4 Coding Conventions Naming Class, member, and method names are written in "camelCase" as in "UnitGenerator." Class names are capitalized, but members and methods are written lower-camel-case. Data members (instance variables) are written with initial "m" then camelCase as in "mOffset." Enumeration constants are written with initial "k" followed by embedded caps as in "kDone." Privacy In general data members are protected and have accessor functions where appropriate. The one exception is Buffer which is considered a record class and has public members.
Compile-time options (These are not set in this file so that different applications can share the source tree.)
SoundFile type: USE_JSND - use the JUCE-based sound file class (requires only JUCE) USE_LSND - use libSndFile-based sound file class (supports many file types) USE_CASND - use the CoreAudio version (runs on iPhone)
FFT implementation USE_FFTW - use FFTW 3 (faster but complicated to build) USE_FFTREAL - use FFTReal (smaller and simpler) CORE CSL Types sample(float), Sample, SampleBuffer, SampleBufferVector, SampleComplex, SampleComplexVector PortMap, UGenVector, UGenMap, IODeviceVector, Timestamp, VOIDFCNPTR
Constants CSL_PI, CSL_TWOPI, CSL_PIHALF, CSL_SQRT_TWO, CSL_SPEED_OF_SOUND, CSL_EXP_PER_DB, CSL_SAMPS_PER_METER, CSL_DEGS_PER_RAD
Many useful macros below
| #define CSL_ENUMS |
| #define DO_TIMING |
| #define CSL_mFrameRate 44100 |
default sample rate (tested up to 96000)
| #define CSL_mBlockSize 256 |
normal hosts
I/O block size (set to 64-2048 in typical usage)
| #define CSL_mMaxBufferFrames 8192 |
max block size (set large for zooming scopes)
| #define CSL_mMaxSndFileFrames 128000000 |
max file cache size = 128 MB (set to a large value)
| #define DEFAULT_WTABLE_SIZE CGestalt::maxBufferFrames() |
| #define CSL_mVerbosity 3 |
very verbose logging
| #define CSL_mLoggingPeriod 10 |
log CPU usage every N sec
| #define CSL_LOG_PREFIX ":: " |
| #define CSL_mOutPort 57123 |
RFS output port.
| #define CSL_mOSCPort 54321 |
OSC input port.
| #define CSL_NAME_LEN 256 |
default string length
Referenced by csl::BasicWhiteNoiseInstrument::BasicWhiteNoiseInstrument(), csl::CAIO::CAIO(), csl::CASoundFile::CASoundFile(), csl::HRTFDatabase::convertDB(), csl::HRTFDatabase::HRTFDatabase(), csl::HRTFDatabase::loadFromDB(), csl::HRTFDatabase::loadFromFile(), csl::HRTFDatabase::loadFromFolder(), and test_Binaural_horiz().
| #define CSL_LINE_LEN 512 |
| #define CSL_DATA_DIR "~/Code/CSL/CSL_Data/" |
folder where the CSL data can be found
| #define SAMPS_TO_WRITE (4096 * 10 * 10) |
record about 10 seconds by default
| #define OUT_SFILE_NAME "XX_csl.aiff" |
csl output file name temlpate
| #define Osc WavetableOscillator |
| #define cx_r | ( | val | ) | val[0] |
Referenced by csl::IFFT::binValue(), csl::IFFT::setBin(), csl::IFFT::setBins(), and csl::IFFT::setBinsMagPhase().
| #define cx_i | ( | val | ) | val[1] |
Referenced by csl::IFFT::setBin(), csl::IFFT::setBins(), and csl::IFFT::setBinsMagPhase().
| #define ComplexPtr SampleBuffer |
| #define CSL_SCALE 1 |
Referenced by csl::Controllable::dump(), csl::Scalable::Scalable(), and csl::Scalable::setScale().
| #define CSL_OFFSET 2 |
Referenced by csl::Controllable::dump(), csl::Scalable::Scalable(), and csl::Scalable::setOffset().
| #define CSL_INPUT 3 |
Referenced by csl::DistanceSimulator::DistanceSimulator(), csl::Controllable::dump(), csl::Effect::Effect(), csl::InOut::InOut(), csl::Effect::inPort(), csl::Effect::isActive(), csl::SpatialSource::nextBuffer(), csl::DistanceSimulator::nextBuffer(), csl::DelayLine::nextBuffer(), csl::NtoMPanner::nextBuffer(), csl::InOut::nextBuffer(), csl::Moog::nextBuffer(), csl::RingBuffer::nextBuffer(), csl::DistanceSimulator::positionChanged(), csl::Effect::pullInput(), csl::Effect::setInput(), and csl::SpatialSource::SpatialSource().
| #define CSL_OPERAND 4 |
Referenced by csl::BinaryOp::BinaryOp(), csl::BinaryOp::dump(), and csl::BinaryOp::operandIsFixed().
| #define CSL_OPERAND2 5 |
| #define CSL_FREQUENCY 6 |
| #define CSL_POSITION 7 |
Referenced by csl::Panner::nextBuffer(), csl::Panner::Panner(), and csl::Panner::setPosition().
| #define CSL_POSITIONX 7 |
Referenced by csl::NtoMPanner::nextBuffer(), csl::NtoMPanner::NtoMPanner(), and csl::NtoMPanner::setX().
| #define CSL_POSITIONY 8 |
Referenced by csl::NtoMPanner::nextBuffer(), csl::NtoMPanner::NtoMPanner(), and csl::NtoMPanner::setY().
| #define CSL_POSITIONZ 9 |
| #define CSL_FILTER_FREQUENCY 10 |
| #define CSL_FILTER_AMOUNT 11 |
| #define CSL_RATE 12 |
Referenced by csl::Abst_SoundFile::setRate().
| #define csl_min | ( | a, | |||
| b | ) | (((a) < (b)) ? (a) : (b)) |
| #define csl_max | ( | a, | |||
| b | ) | (((a) > (b)) ? (a) : (b)) |
| #define csl_between | ( | a, | |||
| b, | |||||
| c | ) | (((a) >= (b)) && ((a) <= (c))) |
| #define csl_max_r | ( | a | ) | (((a) > 1.0f) ? (a) : (1.0f/a)) |
| #define csl_min_r | ( | a | ) | (((a) < 1.0f) ? (a) : (1.0f/a)) |
| #define csl_abs | ( | a | ) | (((a) >= 0) ? (a) : (-a)) |
| #define csl_max_d | ( | a, | |||
| b | ) | ((a > b) ? (a / b) : (b / a)) |
| #define csl_min_d | ( | a, | |||
| b | ) | ((a < b) ? (a / b) : (b / a)) |
| #define csl_ratio_rem | ( | val1, | |||
| val2, | |||||
| remainder | ) |
| #define TRUE 1 |
Referenced by csl::RtpSender::createRtpSession(), csl::RtpReceiver::createRtpSession(), InitCallbackListNodes(), InitPackets(), InitQueuedData(), InsertBundleOrMessage(), csl::Instrument::isActive(), MatchBrackets(), MatchList(), csl::CPoint::operator!=(), OSCAcceptPacket(), OSCAddContainerAlias(), OSCBeProductiveWhileWaiting(), OSCGetAddressString(), OSCInitAddressSpace(), OSCInitReceive(), OSCInvokeMessagesThatAreReady(), OSCParseStringList(), OSCQueueInsert(), OSCRemoveContainerAlias(), OSCScheduleInternalMessages(), OSCSendInternalMessageWithRSVP(), ParseMessage(), PatternMatch(), csl::MIDIIn::poll(), and csl::RemoteIO_read_loop().
| #define FALSE 0 |
Referenced by InitCallbackListNodes(), InitPackets(), InitQueuedData(), InsertBundleOrMessage(), csl::Instrument::isActive(), main(), MatchBrackets(), MatchList(), NetworkSendReturnMessage(), csl::CPoint::operator==(), OSCAddContainerAlias(), OSCBeProductiveWhileWaiting(), OSCGetAddressString(), OSCInitReceive(), OSCInvokeMessagesThatAreReady(), OSCParseStringList(), OSCQueueInsert(), OSCRemoveContainerAlias(), OSCScheduleInternalMessages(), OSCSendInternalMessageWithRSVP(), ParseMessage(), PatternMatch(), and csl::MIDIIn::poll().
| #define CSL_PI 3.1415926535897932f |
Referenced by csl::SpeakerLayout::addSpeaker(), csl::AirAbsorptionCue::compute(), createRandFreqEnvPatch(), csl::Speaker::dump(), csl::NtoMPanner::init_5point1(), main(), csl::NtoMPanner::NtoMPanner(), csl::CPoint::phi(), csl::SpatialSource::setPosition(), csl::Butter::setupCoeffs(), csl::SpatialSource::SpatialSource(), testBigPanMix(), testManyDynamicFilters(), testN2MPan(), testPan(), testPanMix(), and csl::CPoint::theta().
| #define CSL_TWOPI 6.2831853071795865f |
Referenced by csl::WavetableOscillator::fillSine(), csl::BlackmanHarrisWindow::fillWindow(), csl::BlackmanWindow::fillWindow(), csl::HannWindow::fillWindow(), csl::HammingWindow::fillWindow(), csl::Window::fillWindow(), main(), csl::SineAsScaled::nextBuffer(), csl::SineAsPhased::nextBuffer(), csl::SimpleSine::nextBuffer(), csl::Sine::nextBuffer(), csl::SumOfSines::nextWaveInto(), csl::Notch::setupCoeffs(), csl::Formant::setupCoeffs(), testWavetableInterpolation(), and csl::CPoint::theta().
| #define CSL_PIHALF 1.570796326795f |
Referenced by test_Binaural_vertAxial().
| #define CSL_SQRT_TWO 1.414213562f |
Referenced by csl::Butter::setupCoeffs().
| #define CSL_SPEED_OF_SOUND 330.0f |
| #define CSL_EXP_PER_DB 0.11512925464970228f |
| #define CSL_SAMPS_PER_METER 133.63636363636364f |
| #define CSL_DEGS_PER_RAD 57.295779513082321f |
1.5.8