Jamoma API  0.6.0.a19
j.dbap_bformat.cpp File Reference

j.dbap_bformat - Distance Based Amplitude Panning using 4-channel ambisonic Bformat signals as sources. More...

#include "JamomaForMax.h"
#include "j.dbap_bformat.h"
+ Include dependency graph for j.dbap_bformat.cpp:

Go to the source code of this file.

Functions

int JAMOMA_EXPORT_MAXOBJ main (void)
 Set up this class as a Max external the first time an object of this kind is instantiated. More...
 
void dbap_bformatBlur (t_dbap_bformat *x, t_symbol *msg, long argc, t_atom *argv)
 Set spatial blur for nth source. More...
 
void dbap_bformatBlurAll (t_dbap_bformat *x, double f)
 Set spatial blur for all sources. More...
 
void dbap_bformatPolarity (t_dbap_bformat *x, t_symbol *msg, long argc, t_atom *argv)
 Set polarity of the nth virtual source.
 
void dbap_bformatPolarityAll (t_dbap_bformat *x, double f)
 Set polarity for all sources.
 
void dbap_bformatSource (t_dbap_bformat *x, void *msg, long argc, t_atom *argv)
 Set the position of the nth virtual source. More...
 
void dbap_bformatDestination (t_dbap_bformat *x, void *msg, long argc, t_atom *argv)
 Set the position of the nth speaker. More...
 
void dbap_bformatSourceGain (t_dbap_bformat *x, void *msg, long argc, t_atom *argv)
 Set input gain for nth source. More...
 
void dbap_bformatMasterGain (t_dbap_bformat *x, double f)
 Set master gain for all values passed from the object to matrix~. More...
 
void dbap_bformatSourceWeight (t_dbap_bformat *x, t_symbol *msg, long argc, t_atom *argv)
 Set weight for nth source by passing a list to balance each destination. More...
 
void dbap_bformatSourceMute (t_dbap_bformat *x, void *msg, long argc, t_atom *argv)
 Mute and unmute sources.
 
void dbap_bformatInfo (t_dbap_bformat *x)
 Get info on destination setup ++.
 
void dbap_bformatAssist (t_dbap_bformat *x, void *b, long msg, long arg, char *dst)
 Display assist strings while patching. More...
 
t_max_err dbap_bformatAttrSetNumberOfSources (t_dbap_bformat *x, void *attr, long argc, t_atom *argv)
 Set the number of sources of the system. More...
 
t_max_err dbap_bformatAttrSetNumberOfDestinations (t_dbap_bformat *x, void *attr, long argc, t_atom *argv)
 Set the number of destinations of the system. More...
 
t_max_err dbap_bformatAttrSetRollOff (t_dbap_bformat *x, void *attr, long argc, t_atom *argv)
 Set rolloff in dB.
 
t_max_err dbap_bformatAttrSetVicinity (t_dbap_bformat *x, void *attr, long argc, t_atom *argv)
 Set radius of vicinity field around speaker where decoding will converge towards omni.
 
void dbap_bformatCalculate (t_dbap_bformat *x, long n)
 General method for calculation of matrix coefficient for nth source. More...
 
void dbap_bformatCalculateA (t_dbap_bformat *x)
 Calculation of exponent coefficient based on rolloff.
 
void dbap_bformatCalculateMeanDestinationPosition (t_dbap_bformat *x)
 Calculate mean position of the destination points. More...
 
void dbap_bformatCalculateVariance (t_dbap_bformat *x)
 Calculate bias-corrected variance of distance from destination points to mean destination point. More...
 

Detailed Description

j.dbap_bformat - Distance Based Amplitude Panning using 4-channel ambisonic Bformat signals as sources.

Authors
Trond Lossius

Definition in file j.dbap_bformat.cpp.

Function Documentation

void dbap_bformatAssist ( t_dbap_bformat x,
void *  b,
long  msg,
long  arg,
char *  dst 
)

Display assist strings while patching.

Definition at line 406 of file j.dbap_bformat.cpp.

Referenced by main().

t_max_err dbap_bformatAttrSetNumberOfDestinations ( t_dbap_bformat x,
void *  attr,
long  argc,
t_atom *  argv 
)

Set the number of destinations of the system.

Definition at line 456 of file j.dbap_bformat.cpp.

References t_dbap_bformat::attrNumberOfDestinations, and dbap_bformatCalculateVariance().

Referenced by main().

+ Here is the call graph for this function:

t_max_err dbap_bformatAttrSetNumberOfSources ( t_dbap_bformat x,
void *  attr,
long  argc,
t_atom *  argv 
)

Set the number of sources of the system.

Definition at line 439 of file j.dbap_bformat.cpp.

References t_dbap_bformat::attrNumberOfSources.

Referenced by main().

void dbap_bformatBlur ( t_dbap_bformat x,
t_symbol *  msg,
long  argc,
t_atom *  argv 
)

Set spatial blur for nth source.

Definition at line 146 of file j.dbap_bformat.cpp.

References t_dbap_bformat::blur, and dbap_bformatCalculate().

Referenced by main().

+ Here is the call graph for this function:

void dbap_bformatBlurAll ( t_dbap_bformat x,
double  f 
)

Set spatial blur for all sources.

Definition at line 169 of file j.dbap_bformat.cpp.

References t_dbap_bformat::attrNumberOfSources, t_dbap_bformat::blur, and dbap_bformatCalculate().

Referenced by main().

+ Here is the call graph for this function:

void dbap_bformatCalculateMeanDestinationPosition ( t_dbap_bformat x)
void dbap_bformatCalculateVariance ( t_dbap_bformat x)

Calculate bias-corrected variance of distance from destination points to mean destination point.

Definition at line 672 of file j.dbap_bformat.cpp.

References t_dbap_bformat::attrNumberOfDestinations, t_dbap_bformat::attrNumberOfSources, dbap_bformatCalculate(), dbap_bformatCalculateMeanDestinationPosition(), t_dbap_bformat::destinationPosition, t_dbap_bformat::meanDestinationPosition, t_dbap_bformat::variance, t_xyz::x, t_xyz::y, and t_xyz::z.

Referenced by dbap_bformatAttrSetNumberOfDestinations(), and dbap_bformatDestination().

+ Here is the call graph for this function:

void dbap_bformatDestination ( t_dbap_bformat x,
void *  msg,
long  argc,
t_atom *  argv 
)

Set the position of the nth speaker.

Definition at line 246 of file j.dbap_bformat.cpp.

References dbap_bformatCalculateVariance(), t_dbap_bformat::destinationPosition, t_xyz::x, t_xyz::y, and t_xyz::z.

Referenced by main().

+ Here is the call graph for this function:

void dbap_bformatMasterGain ( t_dbap_bformat x,
double  f 
)

Set master gain for all values passed from the object to matrix~.

Definition at line 292 of file j.dbap_bformat.cpp.

References t_dbap_bformat::attrNumberOfSources, dbap_bformatCalculate(), and t_dbap_bformat::masterGain.

Referenced by main().

+ Here is the call graph for this function:

void dbap_bformatSource ( t_dbap_bformat x,
void *  msg,
long  argc,
t_atom *  argv 
)

Set the position of the nth virtual source.

Definition at line 223 of file j.dbap_bformat.cpp.

References dbap_bformatCalculate(), t_dbap_bformat::sourcePosition, t_xyz::x, t_xyz::y, and t_xyz::z.

Referenced by main().

+ Here is the call graph for this function:

void dbap_bformatSourceGain ( t_dbap_bformat x,
void *  msg,
long  argc,
t_atom *  argv 
)

Set input gain for nth source.

Definition at line 268 of file j.dbap_bformat.cpp.

References dbap_bformatCalculate(), and t_dbap_bformat::sourceGain.

Referenced by main().

+ Here is the call graph for this function:

void dbap_bformatSourceWeight ( t_dbap_bformat x,
t_symbol *  msg,
long  argc,
t_atom *  argv 
)

Set weight for nth source by passing a list to balance each destination.

Definition at line 305 of file j.dbap_bformat.cpp.

References t_dbap_bformat::attrNumberOfDestinations, t_dbap_bformat::attrNumberOfSources, dbap_bformatCalculate(), and t_dbap_bformat::sourceWeight.

Referenced by main().

+ Here is the call graph for this function:

int JAMOMA_EXPORT_MAXOBJ 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.

Definition at line 25 of file j.dbap_bformat.cpp.

References dbap_bformatAssist(), dbap_bformatAttrSetNumberOfDestinations(), dbap_bformatAttrSetNumberOfSources(), dbap_bformatAttrSetRollOff(), dbap_bformatAttrSetVicinity(), dbap_bformatBlur(), dbap_bformatBlurAll(), dbap_bformatDestination(), dbap_bformatInfo(), dbap_bformatMasterGain(), dbap_bformatPolarity(), dbap_bformatPolarityAll(), dbap_bformatSource(), dbap_bformatSourceGain(), dbap_bformatSourceMute(), dbap_bformatSourceWeight(), and this_class.

+ Here is the call graph for this function: