17 #ifndef __TT_AVERAGE_H__
18 #define __TT_AVERAGE_H__
35 TTDelayBufferVector mBins;
185 #endif // __TT_AVERAGE_H__
TTSampleVector mAccumulator
An accumulator used for calculation of running averages.
TTErr updateMaxNumChannels(const TTValue &anOldMaxNumChannels, TTValue &aNotUsed)
This method gets called when the inherited maxNumChannels attribute is changed.
std::uint64_t TTUInt64
64 bit unsigned integer
TTErr setInterval(const TTValue &aNewInterval)
Set the interval to use when averaging.
TTAudioObjectBase is the base class for all audio generating and processing objects in Jamoma DSP...
TTErr clear()
Reset (clear) the history used in the analysis.
TTUInt64 mInterval
The interval to do running averaging over.
double TTFloat64
64 bit floating point number
Audio delay buffer object.
virtual TTErr test(TTValue &returnedTestInfo)
Unit test.
#define TTCLASS_SETUP(className)
TODO Doxygen: need more comments here.
TTErr setMode(const TTValue &newValue)
Set the mode attribute that controlles what averaging mode to use.
TTErr updateSampleRate(const TTValue &aNotUsed1, TTValue &aNotUsed2)
Receives notifications when there are changes to the inherited sr attribute.
std::vector< TTSampleValue > TTSampleVector
A TTSampleVector is simply a pointer to the first of an array of TTSampleValues.
The TTSymbol class is used to represent a string and efficiently pass and compare that string...
TTAverage - measuring averaged and RMS signal energy.
TTErr setMaxInterval(const TTValue &aNewMaxInterval)
Set the maximum interval that can be used when averaging.
TTErr processBipolarAverage(TTAudioSignalArrayPtr anInputs, TTAudioSignalArrayPtr anOutputs)
Audio process method to use when doing bipolar averaging.
TTErr calculateBipolarValue(const TTFloat64 &anInput, TTFloat64 &anOutput, TTDelayBufferPtr aDelayBuffer, TTPtrSizedInt aChannel)
An inline method for single sample calculation of bipolar average value.
TTSymbol mMode
Averaging mode, options are absolute, bipolar and rms.
TTErr init(TTUInt64 newDelayMaxInSamples)
Internal method - set up the buffer memory.
TTFloat64 mIntervalReciprocal
The inverse of mInterval. Calculated and stored for conviniency and efficiency.
TTErr processRmsAverage(TTAudioSignalArrayPtr anInputs, TTAudioSignalArrayPtr anOutputs)
Audio process method to use when doing root-mean-square averaging.
A simple container for an array of TTAudioSignal pointers.
long TTPtrSizedInt
An integer that is the same size as a pointer.
TTErr processAbsoluteAverage(TTAudioSignalArrayPtr anInputs, TTAudioSignalArrayPtr anOutputs)
Audio process method to use when doing absolute value averaging.
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
TTErr calculateAbsoluteValue(const TTFloat64 &anInput, TTFloat64 &anOutput, TTDelayBufferPtr aDelayBuffer, TTPtrSizedInt aChannel)
An inline method for single sample calculation of absolute average value.
void reset()
Internal method - Position the buffer pointers.
[doxygenAppendixC_copyExample]
TTUInt64 mMaxInterval
The largest possible interval or window to do running averaging over.
TTDelayBuffer is a container object that holds some audio in a chunk of memory, with accessors for us...
TTErr calculateRmsValue(const TTFloat64 &anInput, TTFloat64 &anOutput, TTDelayBufferPtr aDelayBuffer, TTPtrSizedInt aChannel)
An inline method for single sample calculation of rms (root mean square) average value.