Jamoma API  0.6.0.a19
TTSampleMatrix Class Reference

Container object that holds some audio in a chunk of memory. More...

#include <TTSampleMatrix.h>

+ Inheritance diagram for TTSampleMatrix:
+ Collaboration diagram for TTSampleMatrix:

Public Member Functions

TTErr setNumChannels (const TTValue &newNumChannels)
 Attribute accessor: set the number of channels for this buffer. More...
 
TTErr setLengthInSeconds (const TTValue &newLength)
 Attribute accessor: set the buffer length specified in seconds. More...
 
TTErr setLengthInSamples (const TTValue &newLengthInSamples)
 Attribute accessor: set the buffer length specified as a number of samples. More...
 
TTErr adaptTo (const TTSampleMatrix &anotherMatrix)
 Set dimensions, element count, datatype, etc. More...
 
TTErr incrementUserCount ()
 Increase the user count by one. More...
 
TTErr decrementUserCount ()
 Decrease the user count by one. More...
 
TTUInt16 getUserCount ()
 Report the current user count. More...
 
TTBoolean isBufferPoolStage (TTBufferPoolStageEnum testValue)
 Test to see if current bufferPoolStage matches a test value. More...
 
TTErr setBufferPoolStage (TTBufferPoolStageEnum newValue)
 Set the current bufferPoolStage to a new value. More...
 
TTErr setValueAtIndex (const TTValue &index, TTValue &unusedOutput)
 Set the sample value for a given index. More...
 
TTErr fill (const TTValue &value, TTValue &unusedOutput)
 Set the contents of the buffer using a specified algorithm and, if appropriate, coefficients for that algorithm. More...
 
TTErr load (const TTValue &input, TTValue &unusedOutput)
 Load sample values from a soundfile into the TTSampleMatrix. More...
 
TTErr resizeThenLoad (const TTValue &input, TTValue &unusedOutput)
 First, resize the TTSampleMatrix to match the number of channels and length in seconds found in a soundfile. More...
 
TTErr normalize (const TTValue &aValue)
 Normalize the contents of a buffer. More...
 
virtual TTErr test (TTValue &returnedTestInfo)
 Unit testing.
 
- Public Member Functions inherited from TTMatrixBase
TTErr setRowCount (const TTValue &aNewRowCount)
 Attribute accessor. More...
 
TTErr setColumnCount (const TTValue &aNewColumnCount)
 Attribute accessor. More...
 
TTErr setElementCount (const TTValue &newElementCount)
 Attribute accessor. More...
 
TTErr setType (const TTValue &aType)
 Attribute accessor. More...
 
TTErr setDimensions (const TTValue &someNewDimensions)
 Attribute accessor. More...
 
TTErr setDimensionsWithVector (const std::vector< TTInt32 > &newDimensions)
 Alternative to attribute accessor. More...
 
TTRowID getRowCount ()
 Simple data accessor. More...
 
TTColumnID getColumnCount ()
 Simple data accessor. More...
 
TTElementID getElementCount ()
 Simple data accessor. More...
 
TTUInt32 getComponentCount ()
 Simple data accessor. More...
 
TTErr getType (TTValue &returnedType) const
 Attribute accessor. More...
 
TTDataType getTypeAsDataType ()
 Simple data accessor. More...
 
TTSymbol getTypeAsSymbol ()
 Simple data accessor. More...
 
TTDataInfoPtr getTypeAsDataInfo ()
 Simple data accessor. More...
 
TTUInt32 getDataCount ()
 Simple data accessor. More...
 
TTUInt32 getComponentStride ()
 Simple data accessor. More...
 
TTErr getDimensions (TTValue &returnedDimensions) const
 Legacy attribute accessor. More...
 
TTErr clear ()
 Set every element in the matrix to zero. More...
 
TTErr fill (const TTValue &anInputValue, TTValue &anOutputValue)
 Fill every component in the matrix with the same value. More...
 
TTBoolean makeRowIDInBounds (TTRowID &i, TTMatrixBaseOutOfBoundsHandler handler=outOfBoundsWrap) const
 Make sure a TTRowID is within the limits set by RowCount. More...
 
TTBoolean makeColumnIDInBounds (TTColumnID &j, TTMatrixBaseOutOfBoundsHandler handler=outOfBoundsWrap) const
 Make sure a TTColumnID is within the limits set by ColumnCount. More...
 
TTBoolean makeElementIDInBounds (TTElementID &e, TTMatrixBaseOutOfBoundsHandler handler=outOfBoundsWrap) const
 Make sure a TTElementID is within the limits set by ElementCount. More...
 
TTBoolean makeInBounds (TTRowID &i, TTColumnID &j, TTMatrixBaseOutOfBoundsHandler handler=outOfBoundsWrap) const
 Make sure an (i,j) pair is within the limits set by RowCount & ColumnCount. More...
 
TTBoolean makeInBounds (TTRowID &i, TTColumnID &j, TTElementID &e, TTMatrixBaseOutOfBoundsHandler handler=outOfBoundsWrap) const
 Make sure an (i,j,e) set is within the limits set by RowCount, ColumnCount & ElementCount. More...
 
TTErr get (const TTValue &anInputValue, TTValue &anOutputValue) const
 Get the value of a component located at any location in 2-dimensional matrix. More...
 
template<typename T >
TTErr get2d (TTRowID i, TTColumnID j, T &data) const
 Get the value of a component located at (i,j) in a 2-dimensional matrix. More...
 
template<typename T >
TTErr get2d (TTRowID i, TTColumnID j, TTElementID e, T &data) const
 Get the value of element e of the component located at (i,j) in a 2-dimensional matrix. More...
 
TTErr set (const TTValue &anInputValue, TTValue &anOutputValue)
 Set the value of a component located at any location in an 2-dimensional matrix. More...
 
template<typename T >
TTErr set2d (TTRowID i, TTColumnID j, T data)
 Set the value of a component located at (i,j) in a 2-dimensional matrix. More...
 
template<typename T >
TTErr set2d (TTRowID i, TTColumnID j, TTElementID e, T data)
 Set the value of element e of the component located at (i,j) in a 2-dimensional matrix. More...
 
void referenceExternalData (TTPtr aDataPointer)
 You must proceed to set the various attributes, dimensions, etc. More...
 
TTBytePtr getLockedPointer ()
 Return a pointer to the matrix data, and lock the matrix so that others cannot access the data. More...
 
void releaseLockedPointer ()
 Release a locked pointer obtained using getLockedPointer(). More...
 
TTBoolean allAttributesMatch (const TTMatrixBase &anotherMatrix) const
 Compare the attributes of this matrix to another to see if they all match. More...
 
TTErr adaptTo (const TTMatrixBase &anotherMatrix)
 Set dimensions, element count, datatype, etc. More...
 
TTMatrixBaseoperator+ (const TTMatrixBase &B) const
 Add two matrices to produce a third matrix. More...
 
TTMatrixBaseoperator- (const TTMatrixBase &B) const
 Subtract matrix B from matrix A to produce matrix C. More...
 
- Public Member Functions inherited from TTDataObjectBase
TTErr calculate (const TTMatrixArray *inputs, TTMatrixArray *outputs)
 
- Public Member Functions inherited from TTObjectBase
virtual ~TTObjectBase ()
 Destructor.
 
TTUInt16 getReferenceCount ()
 Query an object to get its current reference count. More...
 
TTUInt32 getObserverCount () const
 Query an object to get the number of observers. More...
 
TTErr registerAttribute (const TTSymbol name, const TTDataType type, void *address)
 Register an attribute. More...
 
TTErr extendAttribute (const TTSymbol name, const TTObjectBasePtr extendedObject, const TTSymbol extendedName)
 Extend the attribute of an existing TTObjectBase to this TTObjectBase (using another attribute name) More...
 
TTErr removeAttribute (const TTSymbol name)
 Remove an attribute. More...
 
TTErr findAttribute (const TTSymbol name, TTAttribute **attr)
 Find an attribute. More...
 
TTErr setAttributeValue (const TTSymbol name, TTValue &value)
 Set an attribute value for an object. More...
 
template<class T >
TTErr set (const TTSymbol aName, T aValue)
 Set an attribute value for an object This is the same as calling setAttributeValue(). More...
 
TTErr getAttributeValue (const TTSymbol name, TTValue &value)
 Get an attribute value for an object. More...
 
template<class T >
TTErr get (const TTSymbol aName, T &aReturnedValue)
 Get an attribute value for an object This is the same as calling getAttributeValue(). More...
 
TTSymbol getAttributeType (const TTSymbol name)
 Return the type of an attribute as a symbol. More...
 
TTErr getAttributeGetterFlags (const TTSymbol name, TTAttributeFlags &value)
 Get the getterFlags of an attribute. More...
 
TTErr setAttributeGetterFlags (const TTSymbol name, TTAttributeFlags &value)
 Set the getterFlags of an attribute. More...
 
TTErr getAttributeSetterFlags (const TTSymbol name, TTAttributeFlags &value)
 Get the setterFlags of an attribute. More...
 
TTErr setAttributeSetterFlags (const TTSymbol name, TTAttributeFlags &value)
 Set the setterFlags of an attribute. More...
 
TTErr registerAttributeProperty (const TTSymbol attributeName, const TTSymbol propertyName, const TTValue &initialValue, TTGetterMethod getter, TTSetterMethod setter)
 Register an attribute property. More...
 
TTErr registerMessageProperty (const TTSymbol messageName, const TTSymbol propertyName, const TTValue &initialValue, TTGetterMethod getter, TTSetterMethod setter)
 Register an message property. More...
 
TTErr getAttribute (const TTSymbol name, TTAttributePtr *attributeObject)
 Search for and locate an attribute. More...
 
TTErr getMessage (const TTSymbol name, TTMessagePtr *messageObject)
 Search for and locate a message. More...
 
void getAttributeNames (TTValue &attributeNameList)
 Return a list of names of the available attributes. More...
 
void getMessageNames (TTValue &messageNameList)
 Return a list of names of the available messages. More...
 
TTSymbol getName () const
 Return the name of this class. More...
 
TTErr registerMessage (const TTSymbol name, TTMethod method)
 Register a message with this object. More...
 
TTErr findMessage (const TTSymbol name, TTMessage **message)
 Find a message registered with this object. More...
 
TTErr removeMessage (const TTSymbol name)
 Remove a message. More...
 
TTErr sendMessage (const TTSymbol name)
 TODO: Document this function. More...
 
TTErr registerObserverForMessage (const TTObject &observingObject, const TTSymbol messageName)
 Register an observer for a message. More...
 
TTErr registerObserverForAttribute (const TTObject &observingObject, const TTSymbol attributeName)
 Register an observer for an attribute. More...
 
TTErr registerObserverForNotifications (const TTObject &observingObject)
 Register an observer. More...
 
TTErr unregisterObserverForMessage (const TTObject &observingObject, const TTSymbol messageName)
 Unregister an observer for a message. More...
 
TTErr unregisterObserverForAttribute (const TTObject &observingObject, const TTSymbol attributeName)
 Unregister an observer for an attribute. More...
 
TTErr unregisterObserverForNotifications (const TTObject &observingObject)
 Unregister an observer for notifications. More...
 
TTErr sendNotification (const TTSymbol name, const TTValue &arguments)
 Send a notification. More...
 
TTErr logMessage (TTImmutableCString fmtstring,...)
 Log messages scoped to this object instance. More...
 
TTErr logWarning (TTImmutableCString fmtstring,...)
 Log warnings scoped to this object instance. More...
 
TTErr logError (TTImmutableCString fmtstring,...)
 Log errors scoped to this object instance. More...
 
TTErr logDebug (TTImmutableCString fmtstring,...)
 Log messages (scoped to this object instance) to output only if the basic debugging flag is enabled in the environment. More...
 
TTErr lock ()
 Lock the object in order to ensure thread-safe processing. More...
 
TTErr unlock ()
 Unlock the object when thread-safe processing is no longer required. More...
 
TTBoolean isLocked ()
 Query if the object currently is locked for thread-safe processing. More...
 
TTBoolean waitForLock ()
 If the object is locked (e.g. More...
 

Protected Attributes

TTUInt16 mUserCount
 how many objects out there are currently using this TTSampleMatrix
 
- Protected Attributes inherited from TTMatrixBase
TTBytePtr mData
 memory used to store matrix values
 
TTRowID mRowCount
 How many rows of values the matrix should have. Uses an signed 32-bit integer which provides a maximum value of 2,147,483,647.
 
TTColumnID mColumnCount
 How many columns of values the matrix should have. Uses an signed 32-bit integer which provides a maximum value of 2,147,483,647.
 
TTElementID mElementCount
 How many elements (parts) per value (e.g. 2 for complex numbers, 4 for colors, default = 1). Uses an signed 16-bit integer which provides a maximum value of 32,767.
 
TTUInt32 mComponentCount
 mRowCount * mColumnCount
 
TTUInt32 mComponentStride
 how many bytes from one the beginning one matrix component to the next
 
TTUInt32 mDataCount
 mComponentCount * mElementCount (e.g. total number of floats or ints in the matrix)
 
TTDataType mType
 member of global enumerated list #TTBase::TTDataType (i.e., kTypeUInt8, kTypeUInt16, kTypeInt32, kTypeUInt64, kTypeFloat32, kTypeFloat64)
 
TTDataInfoPtr mTypeAsDataInfo
 pointer to info about the data type found in #TTBase::ttDataTypeInfo
 
TTSymbol mTypeAsSymbol
 symbol with data type name for the public interface
 
TTUInt8 mTypeSizeInBytes
 number of bytes present in mType
 
TTUInt32 mDataSize
 mTypeSizeInBytes * mDataCount
 
TTBoolean mDataIsLocallyOwned
 If false, then we are referencing outside memory which we don't own.
 
- Protected Attributes inherited from TTDataObjectBase
TTMatrixCalculateMethod mMatrixCalculateMethod
 This function pointer points to the active (non-bypass) calculate routine.
 
TTMatrixCalculateMethod mCurrentMatrixCalculateMethod
 This function pointer always points to the current calculate routine.
 
TTBoolean mBypass
 Are we bypassing the matrix calculation?
 
TTMatrixArraymInputArray
 If the calculate method is passed a matrix, rather than an array of matrices, we wrap it in this array.
 
TTMatrixArraymOutputArray
 If the calculate method is passed a matrix, rather than an array of matrices, we wrap it in this array.
 
TTFloat64 mStartProcessingTime
 The time at which this object's process method was last invoked (for benchmarking)
 
TTFloat64 mAccumulatedProcessingTime
 The amount of time spent in this object's process method (for benchmarking)
 
TTFloat64 mAccumulatedProcessingCalls
 The number of times the process method has been called (for benchmarking)
 
TTPtrSizedInt mReserved1
 Reserved – May be used for something in the future without changing the size of the struct.
 
TTPtrSizedInt mReserved2
 Reserved – May be used for something in the future without changing the size of the struct.
 
- Protected Attributes inherited from TTObjectBase
TTList observers
 List of all objects watching this object for life-cycle and other changes.
 

Additional Inherited Members

- Public Types inherited from TTMatrixBase
typedef TTInt32(* TTMatrixBaseOutOfBoundsHandler) (const TTInt32 index, const TTInt32 lowBound, const TTInt32 highBound)
 A function pointer for implementing handlers in the makeInBounds() method. More...
 
typedef void(* TTMatrixBaseIterator) (TTPtr c, const TTPtr a, const TTPtr b)
 A function pointer for implementing iterators used in the iterate() method. More...
 
- Static Public Member Functions inherited from TTMatrixBase
static TTInt32 outOfBoundsClip (const TTInt32 index, const TTInt32 lowBound, const TTInt32 highBound)
 In implementation of the TTMatrixBaseOutOfBoundsHandler that wraps #TTClip. More...
 
static TTInt32 outOfBoundsWrap (const TTInt32 index, const TTInt32 lowBound, const TTInt32 highBound)
 In implementation of the TTMatrixBaseOutOfBoundsHandler that wraps #TTInfWrap. More...
 
static TTInt32 outOfBoundsFold (const TTInt32 index, const TTInt32 lowBound, const TTInt32 highBound)
 In implementation of the TTMatrixBaseOutOfBoundsHandler that wraps #TTFold. More...
 
static TTErr copy (const TTMatrixBase &source, TTMatrixBase &dest)
 Copy the data from one matrix into another. More...
 
static TTErr iterate (TTMatrixBase *C, const TTMatrixBase *A, const TTMatrixBase *B, TTMatrixBaseIterator iterator)
 Step through every component in the matrix A and B to produce matrix C using the specified iterator method. More...
 
static TTErr iterateWhenAllAttributesMatch (TTMatrixBase *C, const TTMatrixBase *A, const TTMatrixBase *B, TTMatrixBaseIterator iterator)
 Only if all the attributes of matrix A and B match, then step through every component to produce matrix C using the specified iterator method. More...
 
- Public Attributes inherited from TTObjectBase
TTBoolean valid
 If the object isn't completely built, or is in the process of freeing, this will be false.
 
TTBoolean track
 enable the print of a log message to ease the track of reference counting mechanism on an instance More...
 
- Protected Member Functions inherited from TTMatrixBase
TTErr resize ()
 Internal method that resizes memory allocated when various attributes change. More...
 
TTBoolean setRowCountWithoutResize (TTRowID aNewRowCount)
 Internal method that sets the value for RowCount without resizing the matrix of values. More...
 
TTBoolean setColumnCountWithoutResize (TTColumnID aNewColumnCount)
 Internal method that sets the value for ColumnCount without resizing the matrix of values. More...
 
TTBoolean setElementCountWithoutResize (TTElementID aNewElementCount)
 Internal method that sets the value for ElementCount without resizing the matrix of values. More...
 
TTBoolean setTypeWithoutResize (TTDataType aNewType)
 Internal method that sets the values for type-related variables without resizing the matrix of values. More...
 
- Protected Member Functions inherited from TTDataObjectBase
 TTDataObjectBase (const TTValue &arguments)
 Object constructor. More...
 
virtual ~TTDataObjectBase ()
 Object destructor. More...
 
TTErr setMatrixCalculate (TTMatrixCalculateMethod newMatrixCalculateMethod)
 Set the sample calculate routine to point to a method that is defined as an arg to this function. More...
 
TTErr setBypass (const TTValue &value)
 Bypass the audio processing routine and copy all input samples to the output unchanged. More...
 
TTErr bypassMatrixCalculate (const TTMatrixArray *inputs, TTMatrixArray *outputs)
 Built-in method to be used when calculation is to bypassed. More...
 
TTErr defaultMatrixCalculateMethod (const TTMatrixArray *inputs, TTMatrixArray *outputs)
 The default calculation method to use. More...
 
TTErr resetBenchmarking ()
 Reset internal values used when benchmarking performance. More...
 
TTErr getProcessingBenchmark (TTValueRef v)
 Do performance benchmarking. More...
 
- Protected Member Functions inherited from TTObjectBase
 TTObjectBase (const TTValue arguments)
 Constructor. More...
 

Detailed Description

Container object that holds some audio in a chunk of memory.

SampleMatrix extends the Matrix class found in Foundation to provide support for loading audio into a chunk of memory. Each sample value is stored as a one-element component with a datatype of 64-bit Float. Locations for individual components in the matrix can be identified by (sample, channel) pairs where samples correspond to rows in the matrix and channels translate to columns.

@see TTAudioSignal, TTMatrix

Definition at line 50 of file TTSampleMatrix.h.

Member Function Documentation

TTErr TTSampleMatrix::adaptTo ( const TTSampleMatrix anotherMatrix)

Set dimensions, element count, datatype, etc.

(i.e. the metadata describing a matrix) to match the another matrix which is passed-in as an argument. Overrides the TTMatrix method so that sample rate is set as well.

Parameters
anotherMatrixsample matrix to which you would like to conform the attributes of this one
Returns
TTErr kTTErrInvalidValue if operation is not completed, otherwise kTTErrNone

Definition at line 118 of file TTSampleMatrix.cpp.

References TTMatrixBase::adaptTo().

+ Here is the call graph for this function:

TTErr TTSampleMatrix::decrementUserCount ( )

Decrease the user count by one.

The userCount member is used to track usage of an individual TTSampleMatrix. When another object makes use of a specific matrix, the code should use this method to decrease the reference counter at the conclusion of use.

Returns
TTErr returns kTTErrGeneric if UserCount is already 0, else kTTErrNone incrementUserCount

Definition at line 133 of file TTSampleMatrix.cpp.

References kTTErrGeneric, kTTErrNone, and mUserCount.

Referenced by test().

TTErr TTSampleMatrix::fill ( const TTValue value,
TTValue unusedOutput 
)

Set the contents of the buffer using a specified algorithm and, if appropriate, coefficients for that algorithm.

Definition at line 254 of file TTSampleMatrix.cpp.

References kTTErrNone, kTTTwoPi, and TTMatrixBase::set2d().

+ Here is the call graph for this function:

TTUInt16 TTSampleMatrix::getUserCount ( )
inline

Report the current user count.

The userCount member is used to track usage of an individual TTSampleMatrix.

Returns
TTUInt16 returns current UserCount is already 0, else kTTErrNone incrementUserCount

Definition at line 110 of file TTSampleMatrix.h.

TTErr TTSampleMatrix::incrementUserCount ( )

Increase the user count by one.

The userCount member is used to track usage of an individual TTSampleMatrix. When another object makes use of a specific matrix, the code should use this method to increase the user counter prior to the start of use.

Returns
TTErr always returns kTTErrNone decrementUserCount

Definition at line 125 of file TTSampleMatrix.cpp.

References kTTErrNone, and mUserCount.

Referenced by test().

TTBoolean TTSampleMatrix::isBufferPoolStage ( TTBufferPoolStageEnum  testValue)
inline

Test to see if current bufferPoolStage matches a test value.

The bufferPoolStage member is used when TTSampleMartix is part of a pool available in TTBuffer. This methods allows you to check the current stage against a test value. It is useful in setting up conditional statements.

Parameters
test_valueany option defined in the bufferPoolStageEnum
Returns
TTBoolean returns true if the they match, false if they do not bufferPoolStageEnum, setBufferPoolStage

Definition at line 121 of file TTSampleMatrix.h.

Referenced by test().

TTErr TTSampleMatrix::load ( const TTValue input,
TTValue unusedOutput 
)

Load sample values from a soundfile into the TTSampleMatrix.

This method is dependant on the SoundfileLib extension which handles operations on sound files using third-party libraries.

Parameters
[in]inputMulti-item TTValue used to set the copy parameters:
  1. TTSymbol containing the filepath
  2. (optional) channel to copy from source, default is 0
  3. (optional) frame to start copy from source, default is 0
  4. (optional) frame to stop copy from source, default is last
[out]unusedOutputnot used
Returns
TTErr kTTErrNone load was successful. kTTErrInstantiateFailed if the TTSoundfileLoader could not be instantiated. kTTErrInvalidFilepath if the filepath was invalid. kTTErrInvalidValue if the pointer to TTSampleMatrix was invalid.

Definition at line 337 of file TTSampleMatrix.cpp.

References kTTErrInstantiateFailed, TTValue::prepend(), and TTObject::send().

+ Here is the call graph for this function:

TTErr TTSampleMatrix::normalize ( const TTValue aValue)

Normalize the contents of a buffer.

If no arg is passed, then the buffer is normalized to 1.0. Otherwise it is normalized to the passed value.

Definition at line 386 of file TTSampleMatrix.cpp.

References TTMatrixBase::getLockedPointer(), kTTErrNone, TTMatrixBase::releaseLockedPointer(), and TTValue::size().

+ Here is the call graph for this function:

TTErr TTSampleMatrix::resizeThenLoad ( const TTValue input,
TTValue unusedOutput 
)

First, resize the TTSampleMatrix to match the number of channels and length in seconds found in a soundfile.

Then, load the soundfile into the TTSampleMatrix. Sample rate of the TTSampleMatrix is not changed by this operation and interpolation will be applied to the loaded soundfile to acheive the necessary sample rate.

Returns
TTErr kTTErrNone load was successful. kTTErrInstantiateFailed if the TTSoundfileLoader could not be instantiated.

Definition at line 364 of file TTSampleMatrix.cpp.

References kTTErrInstantiateFailed, TTValue::prepend(), and TTObject::send().

+ Here is the call graph for this function:

TTErr TTSampleMatrix::setBufferPoolStage ( TTBufferPoolStageEnum  newValue)
inline

Set the current bufferPoolStage to a new value.

The bufferPoolStage member is used when TTSampleMartix is part of a pool available in TTBuffer. This methods allows you to set the current stage with a new value.

Parameters
test_valueany option defined in the bufferPoolStageEnum
Returns
TTErr always returns kTTErrNone bufferPoolStageEnum, isBufferPoolStage

Definition at line 132 of file TTSampleMatrix.h.

References kTTErrNone.

Referenced by test().

TTErr TTSampleMatrix::setLengthInSamples ( const TTValue newLengthInSamples)

Attribute accessor: set the buffer length specified as a number of samples.

Returns
Returns a TTErr error code.

Definition at line 105 of file TTSampleMatrix.cpp.

References TTMatrixBase::setRowCount().

Referenced by test().

+ Here is the call graph for this function:

TTErr TTSampleMatrix::setLengthInSeconds ( const TTValue newLength)

Attribute accessor: set the buffer length specified in seconds.

Returns
Returns a TTErr error code.

Definition at line 91 of file TTSampleMatrix.cpp.

References TTMatrixBase::setRowCount().

+ Here is the call graph for this function:

TTErr TTSampleMatrix::setNumChannels ( const TTValue newNumChannels)

Attribute accessor: set the number of channels for this buffer.

Returns
Returns a TTErr error code.

Definition at line 78 of file TTSampleMatrix.cpp.

References TTMatrixBase::setColumnCount().

+ Here is the call graph for this function:

TTErr TTSampleMatrix::setValueAtIndex ( const TTValue index,
TTValue unusedOutput 
)

Set the sample value for a given index.

The first number passed in the index parameter will be interpreted as the sample index. If there are three numbers passed, then the second number, if passed, will designate the channel index (defaults to zero). The final value will be used as the sample value that will be copied to the designated index.

Definition at line 219 of file TTSampleMatrix.cpp.

References TTValue::size().

+ Here is the call graph for this function:


The documentation for this class was generated from the following files: