Jamoma API  0.6.0.a19
TTWavetable Class Reference

TTWavetable is a table-lookup oscillator. More...

#include <TTWavetable.h>

+ Inheritance diagram for TTWavetable:
+ Collaboration diagram for TTWavetable:

Protected Member Functions

TTErr updateSampleRate (const TTValue &, TTValue &)
 This method gets called when the inherited sample-rate attribute is changed. More...
 
TTErr processAsLFO (TTAudioSignalArrayPtr, TTAudioSignalArrayPtr outputs)
 Process method.
 
TTErr processWithNoInterpolation (TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs)
 Process method.
 
TTErr processWithLinearInterpolation (TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs)
 Process method.
 
TTErr setMode (const TTValue &value)
 Setter for the mode attribute. More...
 
TTErr setFrequency (const TTValue &value)
 Setter for the frequency attribute in Hz. More...
 
TTErr setGain (const TTValue &value)
 Setter for the gain attribute in dB. More...
 
TTErr setInterpolation (const TTValue &value)
 Setter for the interpolation attribute. More...
 
TTErr setSize (const TTValue &newSize)
 Setter for the size attribute. More...
 

Protected Attributes

TTSymbol mInterpolation
 should be none, linear, or eventually something better...
 
TTUInt32 mSize
 how many samples in the wave table
 

Detailed Description

TTWavetable is a table-lookup oscillator.

The wavetable is implemented as a TTBuffer.

Definition at line 27 of file TTWavetable.h.

Member Function Documentation

TTErr TTWavetable::setFrequency ( const TTValue value)
protected

Setter for the frequency attribute in Hz.

Definition at line 66 of file TTWavetable.cpp.

References kTTErrNone, mSize, TTAudioObjectBase::sr, and TTAudioObjectBase::srInv.

Referenced by setSize().

TTErr TTWavetable::setGain ( const TTValue value)
protected

Setter for the gain attribute in dB.

Definition at line 115 of file TTWavetable.cpp.

References kTTErrNone, and TTDecibelsToLinearGain().

+ Here is the call graph for this function:

TTErr TTWavetable::setInterpolation ( const TTValue value)
protected

Setter for the interpolation attribute.

This determines the process method that is used.

Definition at line 102 of file TTWavetable.cpp.

References kTTErrNone, mInterpolation, processAsLFO(), processWithLinearInterpolation(), processWithNoInterpolation(), and setProcessMethod.

+ Here is the call graph for this function:

TTErr TTWavetable::setMode ( const TTValue value)
protected

Setter for the mode attribute.

This is a symbol that names the waveform that fills the buffer. If the symbol is the string "externalBuffer", then a second symbol names the buffer to use in the buffer hash.

Definition at line 74 of file TTWavetable.cpp.

References kTTErrWrongNumValues, TTValue::size(), and TT.

+ Here is the call graph for this function:

TTErr TTWavetable::setSize ( const TTValue newSize)
protected

Setter for the size attribute.

Size is set as the number of samples in the table.

Definition at line 123 of file TTWavetable.cpp.

References mSize, TTObject::set(), and setFrequency().

+ Here is the call graph for this function:

TTErr TTWavetable::updateSampleRate ( const TTValue ,
TTValue  
)
protected

This method gets called when the inherited sample-rate attribute is changed.

Definition at line 59 of file TTWavetable.cpp.

References kTTErrNone, and TTObjectBase::setAttributeValue().

+ Here is the call graph for this function:


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