it's been almost a year since i've really been into the external coding,
and right now i'm trying to do something i just don't know how to do.
the first three inlets will always be there and they are select, azimuth,
and elevation. after that is the user specified amount of sources for
which there will be one mono input each. i'll paste that part of the code
here for anybody who's interested in helping me out. thanks!
scott
static void multiconvo_tilde_dsp(t_multiconvo_tilde *x, t_signal **sp)
{
dsp_add(multiconvo_tilde_perform, 6, x,
sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, sp[3]->s_vec,
sp[0]->s_n);
}
static void multiconvo_select(t_multiconvo_tilde *x, t_floatarg f)
{
x->firstfloat = f;
}
static void multiconvo_azimuth(t_multiconvo_tilde *x, t_floatarg f)
{
x->secondfloat = f;
}
static void multiconvo_elevation(t_multiconvo_tilde *x, t_floatarg f)
{
x->thirdfloat = f;
}
static void *multiconvo_tilde_new(t_floatarg f, t_int argc, t_atom* argv)
{
int i;
t_multiconvo_tilde *x = (t_multiconvo_tilde
*)pd_new(multiconvo_tilde_class);
x->f_multiconvo = f;
//additional signal and float inlets
inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"),
gensym("select"));
inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"),
gensym("azimuth"));
inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"),
gensym("elevation"));
for(i = 0; i <= argv[2]; i++)
{
inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal);
}
//two signal outlets for stereo
outlet_new(&x->x_obj, &s_signal);
outlet_new(&x->x_obj, &s_signal);
return (void *)x;
}
//setup declares new classes and their properties
void multiconvo_tilde_setup(void) {
multiconvo_tilde_class = class_new(gensym("multiconvo~"),
(t_newmethod)multiconvo_tilde_new,
0, sizeof(t_multiconvo_tilde),
CLASS_DEFAULT,
A_DEFFLOAT, 0);
class_addmethod(multiconvo_tilde_class, (t_method)multiconvo_select,
gensym("select"), A_FLOAT, 0);
class_addmethod(multiconvo_tilde_class, (t_method)multiconvo_azimuth,
gensym("azimuth"), A_FLOAT, 0);
class_addmethod(multiconvo_tilde_class, (t_method)multiconvo_elevation,
gensym("elevation"), A_FLOAT, 0);
// for(int i = 0; i <= argv[2]; i++)
// {
//class_addmethod(multiconvo_tilde_class,
(t_method)multiconvo_tilde_dsp, gensym("dsp"), 0);
//}
CLASS_MAINSIGNALIN(multiconvo_tilde_class, t_multiconvo_tilde, f);
}
--------------------------------------------------------------------
"640K ought to be enough for anybody." -- Bill Gates, 1981
--------------------------------------------------------------------