Jamoma API  0.6.0.a19
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup dspFilterLib
4  *
5  * @brief #TTAllpass is a generalized allpass filter wrapper
6  *
7  * @details
8  *
9  * @authors Timothy Place, Trond Lossius
10  *
11  * @copyright Copyright © 2010, Timothy Place @n
12  * This code is licensed under the terms of the "New BSD License" @n
13  * http://creativecommons.org/licenses/BSD/
14  */
17 #ifndef __TT_ALLPASS_H__
18 #define __TT_ALLPASS_H__
20 #include "TTDSP.h"
23 /** Generalized Allpass Filter Wrapper. */
24 class TTAllpass : public TTAudioObjectBase {
27 protected:
29  TTSymbol mFilter; ///< Name of the filter to use
30  TTAudioObjectBasePtr mFilterObject; ///< The actual filter object for mFilter
33  // Notifications
34  TTErr updateMaxNumChannels(const TTValue& oldMaxNumChannels, TTValue&);
35  TTErr updateSampleRate(const TTValue& oldSampleRate, TTValue&);
37  /** This algorithm uses an IIR filter, meaning that it relies on feedback. If the filter should
38  not be producing any signal (such as turning audio off and then back on in a host) or if the
39  feedback has become corrupted (such as might happen if a NaN is fed in) then it may be
40  neccesary to clear the filter by calling this method.
41  @return Returns a TTErr error code. */
42  TTErr clear();
44  /** return a list of all the available filters */
45  //TTErr getFilters(TTValue& listOfFilterTypesToReturn);
46  TTErr getFilters(const TTValue&, TTValue& listOfFiltersToReturn)
47  {
48  return TTObject::GetRegisteredClassNamesForTags(listOfFiltersToReturn, TT("allpass"));
49  }
53  // Attribute:
54  TTErr setFilter(const TTValue& filter);
56  TTErr setCoefficients(const TTValue& coefficients, TTValue&);
58  /** y = f(x) for a single value */
61  /** A standard audio processing method as used by Jamoma DSP objects. */
64  /** Unit Tests
65  @param returnedTestInfo Used to return test information
66  @return #TTErr error code if the method fails to execute, else #kTTErrNone.
67  */
68  virtual TTErr test(TTValue& returnedTestInfo);
69 };
72 #endif // __TT_ALLPASS_H__
TTErr calculateValue(const TTFloat64 &x, TTFloat64 &y, TTPtrSizedInt data)
y = f(x) for a single value
Definition: TTAllpass.cpp:142
TTAudioObjectBase is the base class for all audio generating and processing objects in Jamoma DSP...
TTSymbol mFilter
Name of the filter to use.
Definition: TTAllpass.h:29
static TTErr GetRegisteredClassNamesForTags(TTValue &classNames, const TTValue &searchTags)
Query TTEnvironment for names of all registered TTObjectBase classes that share specific tags...
Definition: TTObject.cpp:78
virtual TTErr test(TTValue &returnedTestInfo)
Unit Tests.
Jamoma DSP Library.
double TTFloat64
64 bit floating point number
Definition: TTBase.h:188
#define TT
This macro is defined as a shortcut for doing a lookup in the symbol table.
Definition: TTSymbol.h:155
#define TTCLASS_SETUP(className)
TODO Doxygen: need more comments here.
Definition: TTFoundation.h:54
Generalized Allpass Filter Wrapper.
Definition: TTAllpass.h:24
The TTSymbol class is used to represent a string and efficiently pass and compare that string...
Definition: TTSymbol.h:26
TTErr clear()
This algorithm uses an IIR filter, meaning that it relies on feedback.
Definition: TTAllpass.cpp:130
A simple container for an array of TTAudioSignal pointers.
TTErr processAudio(TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs)
A standard audio processing method as used by Jamoma DSP objects.
Definition: TTAllpass.cpp:148
long TTPtrSizedInt
An integer that is the same size as a pointer.
Definition: TTBase.h:240
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
Definition: TTBase.h:342
TTErr getFilters(const TTValue &, TTValue &listOfFiltersToReturn)
return a list of all the available filters
Definition: TTAllpass.h:46
TTAudioObjectBasePtr mFilterObject
The actual filter object for mFilter.
Definition: TTAllpass.h:30
Definition: TTValue.h:34