Jamoma API  0.6.0.a19
TTFilter.cpp
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup dspFilterLib
4  *
5  * @brief #TTFilter is a generalized filter wrapper object for Jamoma
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  */
15 
16 
17 #include "TTFilter.h"
18 
19 #define thisTTClass TTFilter
20 #define thisTTClassName "filter"
21 #define thisTTClassTags "dspFilterLib, audio, processor"
22 
23 
24 TT_AUDIO_CONSTRUCTOR,
25  mActualFilterObject(NULL),
26  mFrequency(0),
27  mQ(0)
28 {
32 
33  addMessageWithArguments(getTypes);
34  addMessage(clear);
35  addMessageWithArguments(mode); // some filters have a 'mode' attribute, some don't, so this is a message instead of an attribute
36 
37  addUpdates(SampleRate);
38  addUpdates(MaxNumChannels);
39 
40  setAttributeValue(kTTSym_maxNumChannels, arguments);
41  setAttributeValue(TT("type"), TT("lowpass.1"));
42  setAttributeValue(TT("mode"), TT("lowpass"));
43  setAttributeValue(TT("frequency"), 1000.0);
44  setAttributeValue(TT("q"), 1.0);
45  setProcessMethod(processAudio);
46 }
47 
48 
49 // Destructor
50 TTFilter::~TTFilter()
51 {
52  ;
53 }
#define setProcessMethod(methodName)
A convenience macro to be used by subclasses for setting the process method.
Symbol type.
Definition: TTBase.h:282
#define TT
This macro is defined as a shortcut for doing a lookup in the symbol table.
Definition: TTSymbol.h:155
64-bit floating point
Definition: TTBase.h:272
#define addMessageWithArguments(name)
A convenience macro to be used by subclasses for registering messages.
Definition: TTMessage.h:27
#define addAttributeWithSetter(name, type)
A convenience macro to be used by subclasses for registering attributes with a custom setter...
Definition: TTAttribute.h:47
#define addMessage(name)
A convenience macro to be used by subclasses for registering messages.
Definition: TTMessage.h:19
TTFilter is a generalized filter wrapper object for Jamoma
#define addUpdates(updateName)
An 'update' is a message sent to a subclass instance from its parent class.
Definition: TTMessage.h:44