Jamoma API  0.6.0.a19
TTAllpass1c.h
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup dspFilterLib
4  *
5  * @brief #TTAllpass1c is a first-order building-block allpass filter.
6  *
7  * @details This allpass filter uses a fixed delay of 1 sample.
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  */
15 
16 
17 #ifndef __TT_ALLPASS1C_H__
18 #define __TT_ALLPASS1C_H__
19 
20 #include "TTDSP.h"
21 
22 
23 /** A first-order building-block allpass filter.
24  This allpass filter uses a fixed delay of 1 sample. */
27 
28 protected:
29 
30  TTFloat64 mAlpha; ///< single coefficient for the first-order allpass
31  TTSampleVector mX1; ///< previous input sample (n-1) for each channel
32  TTSampleVector mY1; ///< previous output sample (n-1) for each channel
33 
34  // Notifications
35  TTErr updateMaxNumChannels(const TTValue& oldMaxNumChannels, TTValue&);
36 
37  // Zero filter history
38  TTErr clear();
39 
40  // Do the processing
41  TTErr processAudio(TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs);
42 
43  /** Unit Tests
44  @param returnedTestInfo Used to return test information
45  @return #TTErr error code if the method fails to execute, else #kTTErrNone.
46  */
47  virtual TTErr test(TTValue& returnedTestInfo);
48 
49 public:
50  TTErr calculateValue(const TTFloat64& x, TTFloat64& y, TTPtrSizedInt channel=0);
51 };
52 
53 
54 #endif // __TT_ALLPASS1C_H__
TTSampleVector mX1
previous input sample (n-1) for each channel
Definition: TTAllpass1c.h:31
TTSampleVector mY1
previous output sample (n-1) for each channel
Definition: TTAllpass1c.h:32
TTAudioObjectBase is the base class for all audio generating and processing objects in Jamoma DSP...
Jamoma DSP Library.
double TTFloat64
64 bit floating point number
Definition: TTBase.h:188
virtual TTErr test(TTValue &returnedTestInfo)
Unit Tests.
#define TTCLASS_SETUP(className)
TODO Doxygen: need more comments here.
Definition: TTFoundation.h:54
std::vector< TTSampleValue > TTSampleVector
A TTSampleVector is simply a pointer to the first of an array of TTSampleValues.
Definition: TTBase.h:233
A first-order building-block allpass filter.
Definition: TTAllpass1c.h:25
A simple container for an array of TTAudioSignal pointers.
long TTPtrSizedInt
An integer that is the same size as a pointer.
Definition: TTBase.h:240
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
Definition: TTBase.h:342
TTFloat64 mAlpha
single coefficient for the first-order allpass
Definition: TTAllpass1c.h:30
[doxygenAppendixC_copyExample]
Definition: TTValue.h:34