Jamoma API  0.6.0.a19

Jamoma's lowest-level base class and related infrastructure. More...

#include "TTBase.h"
#include "TTEnvironment.h"
#include "MersenneTwister.h"
+ Include dependency graph for TTBase.cpp:

Go to the source code of this file.

Functions

void TTLogMessage (TTImmutableCString message,...)
 Platform and host independent method for posting log messages. More...
 
void TTLogWarning (TTImmutableCString message,...)
 Platform and host independent method for posting warnings. More...
 
void TTLogError (TTImmutableCString message,...)
 Platform and host independent method for posting errors. More...
 
void TTLogDebug (TTImmutableCString message,...)
 Platform and host independent method for posting messages only when debugging is enabled in the environment. More...
 
TTFloat64 TTRandom64 ()
 Produces a random-valued 64-bit floating-point number in the range [0.0, 1.0].
 
TTPtr TTMalloc16 (size_t numBytes)
 Allocate memory from the heap aligned to 16-byte boundaries. More...
 
void TTFree16 (TTPtr ptr)
 Free memory allocated using TTMalloc16(). More...
 

Variables

const TTFloat64 kTTPi = 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117068
 [doxygenAppendixC_constExample] More...
 
const TTFloat64 kTTTwoPi = kTTPi * 2.0
 Pre-calculated value of pi * 2.
 
const TTFloat64 kTTSqrt2 = sqrt(2.0)
 Pre-calculated square-root of 2 (1.4142).
 
const TTFloat64 kTTHalfSqrt2 = kTTSqrt2 / 2.0
 Pre-calculated value of sqrt(2)/2 (0.701).
 
const TTFloat64 kTTTwoSqrt2 = 2.0 * kTTSqrt2
 Pre-calculated value of 2 * sqrt(2) (2.8284).
 
const TTFloat64 kTTHalfPi = kTTPi / 2.0
 Pre-calculated value of pi/2.
 
const TTFloat64 kTTQuarterPi = kTTPi / 4.0
 [doxygenAppendixC_constExample] More...
 
const TTFloat64 kTTAntiDenormalValue = 1e-18
 Constant used by the ttantidenormal function.
 
const TTFloat64 kTTEpsilon = 1e-21
 A very very small value, used for float equality comaprisments.
 
const TTFloat64 kTTRadiansToDegrees = 180.0 / kTTPi
 Factor constant for converting radians to degrees.
 
const TTFloat64 kTTDegreesToRadians = kTTPi / 180.0
 Factor constant for converting degrees to radians.
 
const TTFloat64 kTTGainMidiPower = log(pow(10.,10./20.))/log(127./100.)
 Power constant used when calculating MID gain.
 
const TTFloat64 kTTGainMidiPowerInv = 1./kTTGainMidiPower
 Invverse power constant used when calculating MID gain.
 
const TTFloat64 kTTInv255 = 1./255.
 Constant for color representation when converting from char8 to float representation.
 
const TTFloat32 kTTLookupEqualPower []
 Equal Power lookup table, 512 elements.
 
const TTFloat32 kTTLookupEqualPowerSymetric []
 Equal Power lookup table with 0.701 at element 256.
 
const TTFloat32 kTTLookupSquareRoot []
 Square Root lookup table, 512 elements.
 
const TTFloat32 kTTLookupSquareRootSymetric []
 Square Root lookup table with 0.701 at element 256.
 
const TTFloat32 kTTLookupHalfPaddedwWelch []
 256 point window table (the first half of it)
 
const TTFloat32 kTTLookupQuarterSine []
 Quarter Sine lookup table.
 
TTDataInfoPtr ttDataTypeInfo [kNumTTDataTypes]
 An array, indexed by values from TTDataType, containing information about those data types. More...
 

Detailed Description

Jamoma's lowest-level base class and related infrastructure.

The Jamoma base class.

Author
Timothy Place, Trond Lossius, Nils Peters

Definition in file TTBase.cpp.

Function Documentation

void TTFree16 ( TTPtr  ptr)

Free memory allocated using TTMalloc16().

Free 16-byte aligned memory alloc'd by TTMalloc16().

Definition at line 647 of file TTBase.cpp.

Referenced by TTAudioSignal::alloc(), TTAudioSignal::allocWithNewChannelCount(), TTElement::operator delete(), TTAudioUnit::processAudio(), and TTAudioSignal::setVector().

void TTLogDebug ( TTImmutableCString  message,
  ... 
)

Platform and host independent method for posting messages only when debugging is enabled in the environment.

Parameters
messageThe message to post.

Definition at line 591 of file TTBase.cpp.

References TTEnvironment::mDebugBasic, and ttEnvironment.

Referenced by TTObjectBase::logDebug(), and TTEnvironment::registerClass().

void TTLogError ( TTImmutableCString  message,
  ... 
)
void TTLogMessage ( TTImmutableCString  message,
  ... 
)

Platform and host independent method for posting log messages.

Parameters
messageThe message to post.

Definition at line 534 of file TTBase.cpp.

Referenced by TTSymbolTable::dump(), TTObjectBase::logMessage(), TTEnvironment::referenceInstance(), TTEnvironment::releaseInstance(), TTSoundfilePlayer::setFilePath(), TTSoundfile::setFilePath(), TTUiInfo::setHighlight(), TTDSPInit(), and TTModularInit().

void TTLogWarning ( TTImmutableCString  message,
  ... 
)

Platform and host independent method for posting warnings.

Parameters
messageThe message to post.

Definition at line 553 of file TTBase.cpp.

Referenced by TTObjectBase::logWarning(), and TTUiInfo::setHighlight().

TTPtr TTMalloc16 ( size_t  numBytes)

Variable Documentation

TTDataInfoPtr ttDataTypeInfo[kNumTTDataTypes]

An array, indexed by values from TTDataType, containing information about those data types.

Definition at line 424 of file TTBase.cpp.

Referenced by TTObjectBase::getAttributeType(), TTTrajectory::ramp(), TTAudioObjectBaseArray::set(), and TTMatrixBase::setTypeWithoutResize().