Jamoma API  0.6.0.a19
j.filter~.cpp File Reference

j.filter~ : wraps the TTFilter class as a a Jamoma external for MSP More...

#include "TTClassWrapperMax.h"
#include "ext.h"
#include "z_dsp.h"
#include "ext_strings.h"
#include "commonsyms.h"
#include "ext_obex.h"
#include "TTDSP.h"
+ Include dependency graph for j.filter~.cpp:

Go to the source code of this file.

Classes

struct  t_filter
 Data structure for the tt.filter~ object. More...
 

Functions

void * filter_new (t_symbol *msg, short argc, t_atom *argv)
 New object create method. More...
 
void filter_free (t_filter *x)
 Free memory etc. More...
 
void filter_assist (t_filter *x, void *b, long msg, long arg, char *dst)
 Assist strings for object inlets and outlets. More...
 
t_int * filter_perform (t_int *w)
 This method is called on each audio vector: Frequency and resonance set at control rate. More...
 
t_int * filter_perform_freq (t_int *w)
 This method is called on each audio vector: Frequency set at signal rate. More...
 
t_int * filter_perform_q (t_int *w)
 This method is called on each audio vector: Resonance set at signal rate. More...
 
t_int * filter_perform_freq_q (t_int *w)
 This method is called on each audio vector: Frequency and resonance set at signal rate. More...
 
void filter_dsp (t_filter *x, t_signal **sp, short *count)
 This method is called when audio is started in order to compile the audio chain. More...
 
void filter_clear (t_filter *x)
 Clear the filter in case it has blown up (NaN). More...
 
t_max_err filter_setBypass (t_filter *x, void *attr, long argc, t_atom *argv)
 Method setting the value of the bypass attribute. More...
 
t_max_err filter_setFrequency (t_filter *x, void *attr, long argc, t_atom *argv)
 Method setting the value of the frequency attribute. More...
 
t_max_err filter_setQ (t_filter *x, void *attr, long argc, t_atom *argv)
 Method setting the value of the resonance (Q) attribute. More...
 
t_max_err filter_setType (t_filter *x, void *attr, long argc, t_atom *argv)
 Method setting the type of the filter to use. More...
 
void filter_gettypes (t_filter *x)
 Spew the available filter names to the dumpout for a umenu. More...
 
int C74_EXPORT main (void)
 Set up this class as a Max external the first time an object of this kind is instantiated. More...
 

Detailed Description

j.filter~ : wraps the TTFilter class as a a Jamoma external for MSP

Authors
Tim Place, Trond Lossius

Definition in file j.filter~.cpp.

Function Documentation

void filter_assist ( t_filter x,
void *  b,
long  msg,
long  arg,
char *  dst 
)

Assist strings for object inlets and outlets.

Definition at line 199 of file j.filter~.cpp.

References t_filter::maxNumChannels.

Referenced by main().

void filter_clear ( t_filter x)

Clear the filter in case it has blown up (NaN).

Definition at line 221 of file j.filter~.cpp.

References t_filter::filter, TTObjectBase::sendMessage(), and TT.

Referenced by main().

+ Here is the call graph for this function:

void filter_dsp ( t_filter x,
t_signal **  sp,
short *  count 
)

This method is called when audio is started in order to compile the audio chain.

Definition at line 516 of file j.filter~.cpp.

References t_filter::audioIn, t_filter::audioOut, t_filter::filter, filter_perform(), filter_perform_freq(), filter_perform_freq_q(), filter_perform_q(), t_filter::maxNumChannels, t_filter::numChannels, TTObjectBase::sendMessage(), TTObjectBase::setAttributeValue(), t_filter::sr, and t_filter::vs.

Referenced by main().

+ Here is the call graph for this function:

void filter_free ( t_filter x)

Free memory etc.

when an object is destroyed.

Definition at line 186 of file j.filter~.cpp.

References t_filter::audioIn, t_filter::audioOut, t_filter::filter, and TTObjectBaseRelease().

Referenced by main().

+ Here is the call graph for this function:

void filter_gettypes ( t_filter x)

Spew the available filter names to the dumpout for a umenu.

Definition at line 227 of file j.filter~.cpp.

References TTSymbol::c_str(), TTValue::size(), TT, and TTGetRegisteredClassNamesForTags().

Referenced by main().

+ Here is the call graph for this function:

void * filter_new ( t_symbol *  msg,
short  argc,
t_atom *  argv 
)

New object create method.

Definition at line 147 of file j.filter~.cpp.

References t_filter::attrBypass, t_filter::attrFrequency, t_filter::attrQ, t_filter::audioIn, t_filter::audioOut, t_filter::maxNumChannels, t_filter::obj, TTObjectBase::setAttributeValue(), t_filter::sr, ttEnvironment, and TTObjectBaseInstantiate().

Referenced by main().

+ Here is the call graph for this function:

t_int * filter_perform ( t_int *  w)

This method is called on each audio vector: Frequency and resonance set at control rate.

Definition at line 315 of file j.filter~.cpp.

References t_filter::audioIn, t_filter::audioOut, t_filter::filter, t_filter::numChannels, t_filter::obj, TTAudioObjectBase::process(), and TTAudioSignal::setVector().

Referenced by filter_dsp().

+ Here is the call graph for this function:

t_int * filter_perform_freq ( t_int *  w)

This method is called on each audio vector: Frequency set at signal rate.

Definition at line 339 of file j.filter~.cpp.

References t_filter::attrFrequency, t_filter::audioIn, t_filter::audioOut, t_filter::filter, t_filter::numChannels, t_filter::obj, TTAudioObjectBase::process(), TTObjectBase::setAttributeValue(), TTAudioSignal::setVector(), and TT.

Referenced by filter_dsp().

+ Here is the call graph for this function:

t_int * filter_perform_freq_q ( t_int *  w)

This method is called on each audio vector: Frequency and resonance set at signal rate.

Definition at line 398 of file j.filter~.cpp.

References t_filter::attrFrequency, t_filter::attrQ, t_filter::audioIn, t_filter::audioOut, t_filter::filter, t_filter::numChannels, t_filter::obj, TTAudioObjectBase::process(), TTObjectBase::setAttributeValue(), TTAudioSignal::setVector(), and TT.

Referenced by filter_dsp().

+ Here is the call graph for this function:

t_int * filter_perform_q ( t_int *  w)

This method is called on each audio vector: Resonance set at signal rate.

Definition at line 369 of file j.filter~.cpp.

References t_filter::attrQ, t_filter::audioIn, t_filter::audioOut, t_filter::filter, t_filter::numChannels, t_filter::obj, TTAudioObjectBase::process(), TTObjectBase::setAttributeValue(), TTAudioSignal::setVector(), and TT.

Referenced by filter_dsp().

+ Here is the call graph for this function:

t_max_err filter_setBypass ( t_filter x,
void *  attr,
long  argc,
t_atom *  argv 
)

Method setting the value of the bypass attribute.

Definition at line 246 of file j.filter~.cpp.

References t_filter::attrBypass, t_filter::filter, and TTObjectBase::setAttributeValue().

Referenced by main().

+ Here is the call graph for this function:

t_max_err filter_setFrequency ( t_filter x,
void *  attr,
long  argc,
t_atom *  argv 
)

Method setting the value of the frequency attribute.

Definition at line 255 of file j.filter~.cpp.

References t_filter::attrFrequency, t_filter::filter, TTObjectBase::setAttributeValue(), and TT.

Referenced by main().

+ Here is the call graph for this function:

t_max_err filter_setQ ( t_filter x,
void *  attr,
long  argc,
t_atom *  argv 
)

Method setting the value of the resonance (Q) attribute.

Definition at line 264 of file j.filter~.cpp.

References t_filter::attrQ, t_filter::filter, kTTErrInvalidAttribute, kTTErrNone, TTObjectBase::setAttributeValue(), and TT.

Referenced by main().

+ Here is the call graph for this function:

t_max_err filter_setType ( t_filter x,
void *  attr,
long  argc,
t_atom *  argv 
)

Method setting the type of the filter to use.

Definition at line 278 of file j.filter~.cpp.

References t_filter::attrBypass, t_filter::attrFrequency, t_filter::attrQ, t_filter::attrType, t_filter::filter, kTTErrInvalidAttribute, kTTErrNone, t_filter::maxNumChannels, TTObjectBase::setAttributeValue(), t_filter::sr, TT, and TTObjectBaseInstantiate().

Referenced by main().

+ Here is the call graph for this function:

int C74_EXPORT main ( void  )

Set up this class as a Max external the first time an object of this kind is instantiated.

Returns
Error message if the object fails to load.

Set up this class as a Max external the first time an object of this kind is instantiated.

Definition at line 103 of file j.filter~.cpp.

References filter_assist(), filter_clear(), filter_dsp(), filter_free(), filter_gettypes(), filter_new(), filter_setBypass(), filter_setFrequency(), filter_setQ(), filter_setType(), and TTDSPInit().

+ Here is the call graph for this function: