15 #include "jit.common.h"
19 const long MAX_NUM_SOURCES = 128;
20 const long MAX_NUM_DESTINATIONS = 128;
22 const long MAX_NUM_WEIGHTED_SOURCES = 64;
23 const long MAX_NUM_WEIGHTED_DESTINATIONS = 32;
25 const long MAX_SIZE_VIEW_X = 80;
26 const long MAX_SIZE_VIEW_Y = 60;
28 t_symbol *ps_rollloff,
50 typedef struct _hull1{
56 typedef struct _hull2{
58 long id_dst[MAX_NUM_DESTINATIONS];
59 double dst2next[MAX_NUM_DESTINATIONS];
64 t_xyz src_position[MAX_NUM_SOURCES];
65 double blur[MAX_NUM_SOURCES];
66 double src_gain[MAX_NUM_SOURCES];
67 double src_weight[MAX_NUM_WEIGHTED_SOURCES][MAX_NUM_WEIGHTED_DESTINATIONS];
68 double src_not_muted[MAX_NUM_SOURCES];
70 t_xyz dst_position[MAX_NUM_DESTINATIONS];
71 t_xyz mean_dst_position;
78 long attr_num_sources;
79 long attr_num_destinations;
83 t_jit_matrix_info view_info;
84 t_xyz attr_view_start;
86 bool attr_view_update;
95 void *dbap_new(t_symbol *msg,
long argc, t_atom *argv);
96 t_max_err dbap_setstep(t_dbap *x,
void *attr,
long argc, t_atom *argv);
98 void dbap_free(t_dbap *x);
101 void dbap_blur(t_dbap *x, t_symbol *msg,
long argc, t_atom *argv);
107 void dbap_source(t_dbap *x,
void *msg,
long argc, t_atom *argv);
128 void dbap_view(t_dbap *x,
void *msg,
long argc, t_atom *argv);
140 void dbap_view_end(t_dbap *x,
void *msg,
long argc, t_atom *argv);
146 void dbap_assist(t_dbap *x,
void *b,
long msg,
long arg,
char *dst);
192 void dbap_hull2_postpoint(t_dbap *x, t_H2D h2);
void dbap_calculate_view2D(t_dbap *x, long dst, long src)
Calculate the view (2D-matrix) : 2D.
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.
void dbap_blurall(t_dbap *x, double f)
Set spatial blur for all sources.
void dbap_calculate_view(t_dbap *x, long dst, long src)
Calculate the view (2D-matrix)
void dbap_calculate3D(t_dbap *x, long n)
Calculate matrix coefficients for nth source: 3D space.
double min
minimum x value
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.
void dbap_view_update(t_dbap *x, long io)
Turn on/off the auto view updating.
double max
maximum x value
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 ou...
void dbap_calculate_variance(t_dbap *x)
Calculate bias-corrected variance of distance from destination points to mean destination point...
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.
void dbap_blur(t_dbap *x, t_symbol *msg, long argc, t_atom *argv)
Set spatial blur for nth source.
void dbap_calculate_hull2D(t_dbap *x, long n)
Calculate convex hull of space spanned by destination points: 2D.
void dbap_calculate(t_dbap *x, long n)
General method for calculation of matrix coefficient for nth source.
void dbap_calculate1D(t_dbap *x, long n)
Calculate matrix coefficients for nth source: 1D space.
void dbap_calculate_a(t_dbap *x)
Calculation of exponent coefficient based on rolloff.
void dbap_calculate_hull1D(t_dbap *x, long n)
Calculate convex hull of space spanned by destination points: 1D.
void dbap_mastergain(t_dbap *x, double f)
Set master gain for all values passed from the object to matrix~.
void dbap_calculate_hull(t_dbap *x, long n)
Calculate convex hull of space spanned by destination points.
Data structure for 2 dimensional convex hull.
t_max_err dbap_attr_setrolloff(t_dbap *x, void *attr, long argc, t_atom *argv)
Set rolloff in dB.
void dbap_hull(t_dbap *x, long f)
Turn on/off the calculation of distance to hull.
long num_dst
number dst in the convex hull
void dbap_source(t_dbap *x, void *msg, long argc, t_atom *argv)
Set the position of the nth virtual source.
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_view_size(t_dbap *x, long sizeX, long sizeY)
Set the size of hitmap view window.
Data structure for 1 dimensional convex hull.
void dbap_output_view(t_dbap *x)
Output the calculated view.
void dbap_calculate_mean_dst_position(t_dbap *x)
Calculate mean position of the destination points.
void dbap_calculate_hull3D(t_dbap *x, long n)
Calculate convex hull of space spanned by destination points: 3D.
void dbap_destination(t_dbap *x, void *msg, long argc, t_atom *argv)
Set the position of the nth speaker.
Compute convex hulls in 2 dimensions.
void dbap_sourcemute(t_dbap *x, void *msg, long argc, t_atom *argv)
Mute and unmute sources.
void dbap_update_view(t_dbap *x)
If the attr_view_update is true : calculate the last view.
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_calculate_view1D(t_dbap *x, long dst, long src)
Calculate the view (2D-matrix) : 1D.
t_max_err dbap_attr_setdimensions(t_dbap *x, void *attr, long argc, t_atom *argv)
Set number of dimensions of the system.
void dbap_assist(t_dbap *x, void *b, long msg, long arg, char *dst)
Display assist strings while patching.
t_max_err dbap_attr_setblur(t_dbap *x, void *attr, long argc, t_atom *argv)
Set spatial blur coefficient.
Data structure for storing a 1,2 or 3 dimensional space data.
void dbap_calculate2D(t_dbap *x, long n)
Calculate matrix coefficients for nth source: 2D space.
void dbap_calculate_view3D(t_dbap *x, long dst, long src)
Calculate the view (2D-matrix) : 3D.
void dbap_sourcegain(t_dbap *x, void *msg, long argc, t_atom *argv)
Set input gain for nth source.