Skip to content

Commit

Permalink
vbap: adding methods to handle floats for inlets 1 and 2
Browse files Browse the repository at this point in the history
  • Loading branch information
nwolek committed Jan 17, 2015
1 parent 8883b6b commit 1a4f813
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Max/VBAP-1.03-w-source/source/vbap/vbap.c
Expand Up @@ -20,7 +20,9 @@ void additive_vbap(float *final_gs, float cartdir[3], t_vbap *x);
void vbap_bang(t_vbap *x);
void vbap_matrix(t_vbap *x, t_symbol *s, int ac, t_atom *av);
void vbap_in1(t_vbap *x, long n);
void vbap_ft1(t_vbap *x, double n);
void vbap_in2(t_vbap *x, long n);
void vbap_ft2(t_vbap *x, double n);
void vbap_in3(t_vbap *x, long n);
void vbap_ft4(t_vbap *x, double g);
void spread_it(t_vbap *x, float *final_gs);
Expand Down Expand Up @@ -77,7 +79,9 @@ int C74_EXPORT main(void)

class_addmethod(c, (method)vbap_bang, "bang", 0);
class_addmethod(c, (method)vbap_in1, "in1", A_LONG, 0);
class_addmethod(c, (method)vbap_ft1, "ft1", A_FLOAT, 0);
class_addmethod(c, (method)vbap_in2, "in2", A_LONG, 0);
class_addmethod(c, (method)vbap_ft2, "ft2", A_FLOAT, 0);
class_addmethod(c, (method)vbap_in3, "in3", A_LONG, 0);
class_addmethod(c, (method)vbap_ft4, "ft4", A_FLOAT, 0);
class_addmethod(c, (method)vbap_matrix, "loudspeaker-matrices", A_GIMME, 0);
Expand All @@ -104,9 +108,11 @@ int C74_EXPORT main(void)
/*--------------------------------------------------------------------------*/
// panning angle azimuth
void vbap_in1(t_vbap *x, long n) { x->x_azi = n; }
void vbap_ft1(t_vbap *x, double n) { x->x_azi = n; }
/*--------------------------------------------------------------------------*/
// panning angle elevation
void vbap_in2(t_vbap *x, long n) { x->x_ele = n; }
void vbap_ft2(t_vbap *x, double n) { x->x_ele = n; }
/*--------------------------------------------------------------------------*/
// spread amount
void vbap_in3(t_vbap *x, long n) { x->x_spread = (n<0) ? 0 : (n>100) ? 100 : n; }
Expand Down

0 comments on commit 1a4f813

Please sign in to comment.