right now i'm converting my convolution external to take as many inputs as the user would like. i'd like to call it like this:
multiconvo~ <number of sources>
is there a way to do this? here is the current code i gotta play with:
static void convaudio2_tilde_dsp(t_convaudio2_tilde *x, t_signal **sp) { dsp_add(convaudio2_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 convaudio2_first(t_convaudio2_tilde *x, t_floatarg f) { x->firstfloat = f; }
static void convaudio2_bound(t_convaudio2_tilde *x, t_floatarg f) { x->secondfloat = f; }
static void *convaudio2_tilde_new(t_floatarg f) { t_convaudio2_tilde *x = (t_convaudio2_tilde *)pd_new(convaudio2_tilde_class);
x->f_convaudio2 = f;
//additional signal and float inlets inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("first")); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("bound"));
//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 convaudio2_tilde_setup(void) { convaudio2_tilde_class = class_new(gensym("convaudio2~"), (t_newmethod)convaudio2_tilde_new, 0, sizeof(t_convaudio2_tilde), CLASS_DEFAULT, A_DEFFLOAT, 0);
class_addmethod(convaudio2_tilde_class, (t_method)convaudio2_tilde_dsp, gensym("dsp"), 0); class_addmethod(convaudio2_tilde_class, (t_method)convaudio2_first, gensym("first"), A_FLOAT, 0); class_addmethod(convaudio2_tilde_class, (t_method)convaudio2_bound, gensym("bound"), A_FLOAT, 0); CLASS_MAINSIGNALIN(convaudio2_tilde_class, t_convaudio2_tilde, f);
"640K ought to be enough for anybody." -- Bill Gates, 1981