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

j.dbap - Distance Based Amplitude Panning More...

#include "JamomaForMax.h"
#include "j.dbap.h"
+ Include dependency graph for j.dbap.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_blur (t_dbap *x, t_symbol *msg, long argc, t_atom *argv)
 Set spatial blur for nth source. More...
 
void dbap_blurall (t_dbap *x, double f)
 Set spatial blur for all sources. More...
 
void dbap_source (t_dbap *x, void *msg, long argc, t_atom *argv)
 Set the position of the nth virtual source. More...
 
void dbap_destination (t_dbap *x, void *msg, long argc, t_atom *argv)
 Set the position of the nth speaker. More...
 
void dbap_sourcegain (t_dbap *x, void *msg, long argc, t_atom *argv)
 Set input gain for nth source. More...
 
void dbap_mastergain (t_dbap *x, double f)
 Set master gain for all values passed from the object to matrix~. More...
 
void dbap_sourceweight (t_dbap *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_sourcemute (t_dbap *x, void *msg, long argc, t_atom *argv)
 Mute and unmute sources.
 
void dbap_hull (t_dbap *x, long f)
 Turn on/off the calculation of distance to hull.
 
void dbap_view (t_dbap *x, void *msg, long argc, t_atom *argv)
 Display a hitmap view of the dbap for a destination and a source weight config or all (on the info outlet ?)
 
void dbap_view_update (t_dbap *x, long io)
 Turn on/off the auto view updating.
 
void dbap_view_size (t_dbap *x, long sizeX, long sizeY)
 Set the size of hitmap view window.
 
void dbap_view_start (t_dbap *x, void *msg, long argc, t_atom *argv)
 Set the start point of the hitmap view window.
 
void dbap_view_end (t_dbap *x, void *msg, long argc, t_atom *argv)
 Set the end point of the hitmap view window.
 
void dbap_info (t_dbap *x)
 Get info on destination setup ++.
 
void dbap_assist (t_dbap *x, void *b, long msg, long arg, char *dst)
 Display assist strings while patching. More...
 
t_max_err dbap_attr_setdimensions (t_dbap *x, void *attr, long argc, t_atom *argv)
 Set number of dimensions of the system. More...
 
t_max_err dbap_attr_setnum_sources (t_dbap *x, void *attr, long argc, t_atom *argv)
 Set the number of sources of the system. More...
 
t_max_err dbap_attr_setnum_destinations (t_dbap *x, void *attr, long argc, t_atom *argv)
 Set the number of destinations of the system. More...
 
t_max_err dbap_attr_setrolloff (t_dbap *x, void *attr, long argc, t_atom *argv)
 Set rolloff in dB.
 
void dbap_calculate (t_dbap *x, long n)
 General method for calculation of matrix coefficient for nth source. More...
 
void dbap_calculate1D (t_dbap *x, long n)
 Calculate matrix coefficients for nth source: 1D space. More...
 
void dbap_calculate2D (t_dbap *x, long n)
 Calculate matrix coefficients for nth source: 2D space. More...
 
void dbap_calculate3D (t_dbap *x, long n)
 Calculate matrix coefficients for nth source: 3D space. More...
 
void dbap_calculate_a (t_dbap *x)
 Calculation of exponent coefficient based on rolloff.
 
void dbap_calculate_mean_dst_position (t_dbap *x)
 Calculate mean position of the destination points. More...
 
void dbap_calculate_variance (t_dbap *x)
 Calculate bias-corrected variance of distance from destination points to mean destination point. More...
 
void dbap_calculate_hull (t_dbap *x, long n)
 Calculate convex hull of space spanned by destination points. More...
 
void dbap_calculate_hull1D (t_dbap *x, long n)
 Calculate convex hull of space spanned by destination points: 1D.
 
void dbap_calculate_hull2D (t_dbap *x, long n)
 Calculate convex hull of space spanned by destination points: 2D.
 
void dbap_calculate_hull3D (t_dbap *x, long n)
 Calculate convex hull of space spanned by destination points: 3D.
 
void dbap_calculate_view (t_dbap *x, long dst, long src)
 Calculate the view (2D-matrix)
 
void dbap_update_view (t_dbap *x)
 If the attr_view_update is true : calculate the last view.
 
void dbap_calculate_view1D (t_dbap *x, long dst, long src)
 Calculate the view (2D-matrix) : 1D.
 
void dbap_calculate_view2D (t_dbap *x, long dst, long src)
 Calculate the view (2D-matrix) : 2D.
 
void dbap_calculate_view3D (t_dbap *x, long dst, long src)
 Calculate the view (2D-matrix) : 3D.
 
void dbap_output_view (t_dbap *x)
 Output the calculated view.
 

Detailed Description

j.dbap - Distance Based Amplitude Panning

Authors
Trond Lossius, Tim Place, Théo de la Hogue

Definition in file j.dbap.cpp.

Function Documentation

void dbap_assist ( t_dbap *  x,
void *  b,
long  msg,
long  arg,
char *  dst 
)

Display assist strings while patching.

Definition at line 603 of file j.dbap.cpp.

Referenced by main().

t_max_err dbap_attr_setdimensions ( t_dbap *  x,
void *  attr,
long  argc,
t_atom *  argv 
)

Set number of dimensions of the system.

Definition at line 641 of file j.dbap.cpp.

Referenced by main().

t_max_err dbap_attr_setnum_destinations ( t_dbap *  x,
void *  attr,
long  argc,
t_atom *  argv 
)

Set the number of destinations of the system.

Definition at line 673 of file j.dbap.cpp.

References dbap_calculate_variance().

Referenced by main().

+ Here is the call graph for this function:

t_max_err dbap_attr_setnum_sources ( t_dbap *  x,
void *  attr,
long  argc,
t_atom *  argv 
)

Set the number of sources of the system.

Definition at line 657 of file j.dbap.cpp.

Referenced by main().

void dbap_blur ( t_dbap *  x,
t_symbol *  msg,
long  argc,
t_atom *  argv 
)

Set spatial blur for nth source.

Definition at line 202 of file j.dbap.cpp.

References dbap_calculate(), and dbap_update_view().

Referenced by main().

+ Here is the call graph for this function:

void dbap_blurall ( t_dbap *  x,
double  f 
)

Set spatial blur for all sources.

Definition at line 226 of file j.dbap.cpp.

References dbap_calculate(), and dbap_update_view().

Referenced by main().

+ Here is the call graph for this function:

void dbap_calculate ( t_dbap *  x,
long  n 
)

General method for calculation of matrix coefficient for nth source.

Definition at line 721 of file j.dbap.cpp.

References dbap_calculate1D(), dbap_calculate2D(), and dbap_calculate3D().

Referenced by dbap_attr_setrolloff(), dbap_blur(), dbap_blurall(), dbap_calculate_variance(), dbap_mastergain(), dbap_source(), dbap_sourcegain(), dbap_sourcemute(), and dbap_sourceweight().

+ Here is the call graph for this function:

void dbap_calculate1D ( t_dbap *  x,
long  n 
)

Calculate matrix coefficients for nth source: 1D space.

Definition at line 735 of file j.dbap.cpp.

Referenced by dbap_calculate().

void dbap_calculate2D ( t_dbap *  x,
long  n 
)

Calculate matrix coefficients for nth source: 2D space.

Definition at line 787 of file j.dbap.cpp.

References t_xyz::x, and t_xyz::y.

Referenced by dbap_calculate().

void dbap_calculate3D ( t_dbap *  x,
long  n 
)

Calculate matrix coefficients for nth source: 3D space.

Definition at line 878 of file j.dbap.cpp.

Referenced by dbap_calculate().

void dbap_calculate_hull ( t_dbap *  x,
long  n 
)

Calculate convex hull of space spanned by destination points.

Definition at line 976 of file j.dbap.cpp.

References dbap_calculate_hull1D(), dbap_calculate_hull2D(), and dbap_calculate_hull3D().

Referenced by dbap_destination(), and dbap_hull().

+ Here is the call graph for this function:

void dbap_calculate_mean_dst_position ( t_dbap *  x)

Calculate mean position of the destination points.

Definition at line 919 of file j.dbap.cpp.

Referenced by dbap_calculate_variance().

void dbap_calculate_variance ( t_dbap *  x)

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

Definition at line 938 of file j.dbap.cpp.

References dbap_calculate(), and dbap_calculate_mean_dst_position().

Referenced by dbap_attr_setnum_destinations(), and dbap_destination().

+ Here is the call graph for this function:

void dbap_destination ( t_dbap *  x,
void *  msg,
long  argc,
t_atom *  argv 
)

Set the position of the nth speaker.

Definition at line 273 of file j.dbap.cpp.

References dbap_calculate_hull(), dbap_calculate_variance(), and dbap_update_view().

Referenced by main().

+ Here is the call graph for this function:

void dbap_mastergain ( t_dbap *  x,
double  f 
)

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

Definition at line 332 of file j.dbap.cpp.

References dbap_calculate().

Referenced by main().

+ Here is the call graph for this function:

void dbap_source ( t_dbap *  x,
void *  msg,
long  argc,
t_atom *  argv 
)

Set the position of the nth virtual source.

Definition at line 240 of file j.dbap.cpp.

References dbap_calculate().

Referenced by main().

+ Here is the call graph for this function:

void dbap_sourcegain ( t_dbap *  x,
void *  msg,
long  argc,
t_atom *  argv 
)

Set input gain for nth source.

Definition at line 308 of file j.dbap.cpp.

References dbap_calculate().

Referenced by main().

+ Here is the call graph for this function:

void dbap_sourceweight ( t_dbap *  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 345 of file j.dbap.cpp.

References dbap_calculate(), and dbap_update_view().

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 27 of file j.dbap.cpp.

References dbap_assist(), dbap_attr_setdimensions(), dbap_attr_setnum_destinations(), dbap_attr_setnum_sources(), dbap_attr_setrolloff(), dbap_blur(), dbap_blurall(), dbap_destination(), dbap_hull(), dbap_info(), dbap_mastergain(), dbap_source(), dbap_sourcegain(), dbap_sourcemute(), dbap_sourceweight(), dbap_view(), dbap_view_end(), dbap_view_size(), dbap_view_start(), dbap_view_update(), jamoma_loadextern(), and this_class.

+ Here is the call graph for this function: