diff --git a/externals/bsaylor/partconv~.c b/externals/bsaylor/partconv~.c index d4d11fe3736b524708b82826639bbe7673a0b0a0..80a108b7b1b29761a1293e3c66b2b739c83500e7 100644 --- a/externals/bsaylor/partconv~.c +++ b/externals/bsaylor/partconv~.c @@ -345,11 +345,25 @@ static void *partconv_new(t_symbol *s, int argc, t_atom *argv) t_partconv *x = (t_partconv *)pd_new(partconv_class); outlet_new(&x->x_obj, gensym("signal")); + t_atom sane_defaults[2]; if (argc != 2) { + /* Give some sane defaults with no args so we can at least + instantiate and get to the help patch */ + if (!argc) + { + post("partconv~: warning: no arguments given"); + SETSYMBOL(sane_defaults, &s_); + SETFLOAT(sane_defaults+1, 2.); + argc = 2; + argv = sane_defaults; + } + else + { post("argc = %d", argc); error("partconv~: usage: [partconv~ <arrayname> <partsize>]\n\t- partition size must be a power of 2 >= blocksize"); return NULL; + } } x->arrayname = atom_getsymbol(argv); diff --git a/externals/bsaylor/pvoc~.c b/externals/bsaylor/pvoc~.c index 30d656d8418ca09e9187440c472281d081c81cb4..62c38c505ee16ba959999c9fe621594f03b6b103 100644 --- a/externals/bsaylor/pvoc~.c +++ b/externals/bsaylor/pvoc~.c @@ -315,14 +315,27 @@ static void *pvoc_new(t_symbol *s, int argc, t_atom *argv) { t_pvoc *x = (t_pvoc *)pd_new(pvoc_class); int i; + t_atom sane_defaults[3]; inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); // pitch-shift inlet outlet_new(&x->x_obj, gensym("signal")); if (argc != 3) { + if (!argc) + { + post("partconv~: warning: no arguments given"); + SETSYMBOL(sane_defaults, &s_); + SETFLOAT(sane_defaults+1, 2.); + SETFLOAT(sane_defaults+2, 2.); + argc = 3; + argv = sane_defaults; + } + else + { post("argc = %d", argc); error("pvoc~: usage: [pvoc~ <arrayname> <fftsize> <overlap>]"); return NULL; + } } x->fftsize = atom_getfloatarg(1, argc, argv);