Jamoma API  0.6.0.a19
TTHilbertLinear33.h
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup dspFilterLib
4  *
5  * @brief #TTHilbertLinear33 is a 33rd-order Hilbert Transform filter built up from a 2-path allpass structure with linear phase relationship to the input signal.
6  *
7  * @details See notes on TTHilbert9 for information about the structure of this filter. @n
8  * @n
9  * See notes on TTHalfband33 for information regarding coefficient calculations, remembering that we need to flip signs to perform the Hilbert Transform. Note however, that we flip signs for the Z^(-2) terms because i^2 = -1. The caveat is that in this filter we also have Z^(-4) terms in the second-order allpass filters, and i^4 = 1, meaning we don't flip those signs. This may seem obvious after reading this, however it is easy to miss, especially as the general rule is stated as "flip all of the signs".
10  *
11  * @authors Timothy Place, Trond Lossius
12  *
16  */
17
18
19 #ifndef __TT_HILBERTLINEAR33_H__
20 #define __TT_HILBERTLINEAR33_H__
21
22 #include "TTDSP.h"
23 #include "TTAllpass1a.h"
24 #include "TTAllpass1b.h"
25 #include "TTAllpass2b.h"
26 #include "TTDelay.h"
27
28
29 /** A 33rd-order Hilber Transform filter built-up from allpass building blocks.
30
31  See notes on TTHilbert9 for information about the structure of this filter.
32
33  See notes on TTHalfband33 for information regarding coefficient calculations,
34  remembering that we need to flip signs to perform the Hilbert Transform.
35  Note however, that we flip signs for the Z^(-2) terms because i^2 = -1.
36  The caveat is that in this filter we also have Z^(-4) terms in the second-order
37  allpass filters, and i^4 = 1, meaning we don't flip those signs.
38  This may seem obvious after reading this, however it is easy to miss, especially
39  as the general rule is stated as "flip all of the signs".
40 */
43
44 protected:
45
46  TTAudioObject mP0Delay; ///< path0, pure delay, 16 samples
47
48  TTAudioObject mP1Delay; ///< path1
49  TTAudioObject mF0; ///< path1
50  TTAudioObject mF1; ///< path1
51  TTAudioObject mF2; ///< path1
52  TTAudioObject mF3; ///< path1
53  TTAudioObject mF4; ///< path1
54
56  TTErr updateMaxNumChannels(const TTValue& oldMaxNumChannels, TTValue&);
57
58  // Zero filter history
59  TTErr clear();
60
61  inline void filterKernel(const TTFloat64& input, TTFloat64& outputPath0, TTFloat64& outputPath1, TTPtrSizedInt channel);
62
63  TTErr processAudio(TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs);
64
65
66  /** Unit Tests
67  @param returnedTestInfo Used to return test information
68  @return #TTErr error code if the method fails to execute, else #kTTErrNone.
69  */
70  virtual TTErr test(TTValue& returnedTestInfo);
71 };
72
73
74 #endif // __TT_HILBERTLINEAR33_H__
A 33rd-order Hilber Transform filter built-up from allpass building blocks.
TTAudioObject mF4
path1
TTAllpass2b is a second-order allpass filter.
TTAudioObject mP1Delay
path1
TTAudioObjectBase is the base class for all audio generating and processing objects in Jamoma DSP...
Wrap audio objects for convenience.
TTAudioObject mF2
path1
Jamoma DSP Library.
double TTFloat64
64 bit floating point number
Definition: TTBase.h:188
TTAudioObject mF1
path1
#define TTCLASS_SETUP(className)
TODO Doxygen: need more comments here.
Definition: TTFoundation.h:54
Basic audio delay unit with 4 interpolation options.
TTAudioObject mF3
path1
TTAudioObject mF0
path1
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
virtual TTErr test(TTValue &returnedTestInfo)
Unit Tests.
TTAllpass1a is a first-order building-block allpass filter.
[doxygenAppendixC_copyExample]
Definition: TTValue.h:34
TTAllpass1b is a first-order building-block allpass filter.
TTAudioObject mP0Delay
path0, pure delay, 16 samples