From bd8a918fc40cca2c7e7c9f569751f8a7e3c21598 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Thu, 19 Dec 2013 18:04:36 -0500 Subject: [PATCH] *.c: remove tabs and trailing spaces --- aubio_setup.c | 24 ++++---- aubioonset~.c | 4 +- aubiopitch~.c | 129 +++++++++++++++++++++---------------------- aubioquiet~.c | 1 - aubiotempo~.c | 21 ++++--- aubiotss~.c | 174 +++++++++++++++++++++++++++++----------------------------- aubiozcr~.c | 99 +++++++++++++++++---------------- 7 files changed, 224 insertions(+), 228 deletions(-) diff --git a/aubio_setup.c b/aubio_setup.c index 99930d4..f56be15 100644 --- a/aubio_setup.c +++ b/aubio_setup.c @@ -7,7 +7,7 @@ static t_class *aubio_class; typedef struct aubio { - t_object x_ob; + t_object x_ob; } t_aubio; void *aubio_new (void); @@ -21,19 +21,19 @@ extern void aubiozcr_tilde_setup (void); void *aubio_new (void) { - t_aubio *x = (t_aubio *)pd_new(aubio_class); - return (void *)x; + t_aubio *x = (t_aubio *)pd_new(aubio_class); + return (void *)x; } void aubio_setup (void) { - post(aubio_version); - aubioonset_tilde_setup(); - aubiotempo_tilde_setup(); - aubiotss_tilde_setup(); - aubioquiet_tilde_setup(); - aubiopitch_tilde_setup(); - aubiozcr_tilde_setup(); - aubio_class = class_new(gensym("aubio"), (t_newmethod)aubio_new, 0, - sizeof(t_aubio), 0, 0); + post(aubio_version); + aubioonset_tilde_setup(); + aubiotempo_tilde_setup(); + aubiotss_tilde_setup(); + aubioquiet_tilde_setup(); + aubiopitch_tilde_setup(); + aubiozcr_tilde_setup(); + aubio_class = class_new(gensym("aubio"), (t_newmethod)aubio_new, 0, + sizeof(t_aubio), 0, 0); } diff --git a/aubioonset~.c b/aubioonset~.c index 5d6bac4..f5efd03 100644 --- a/aubioonset~.c +++ b/aubioonset~.c @@ -1,9 +1,9 @@ /** * - * a puredata wrapper for aubio onset detection functions + * a puredata wrapper for aubio onset detection functions * * Thanks to Johannes M Zmolnig for writing the excellent HOWTO: - * http://iem.kug.ac.at/pd/externals-HOWTO/ + * http://iem.kug.ac.at/pd/externals-HOWTO/ * * */ diff --git a/aubiopitch~.c b/aubiopitch~.c index 3155029..d591aa2 100644 --- a/aubiopitch~.c +++ b/aubiopitch~.c @@ -1,9 +1,9 @@ /** * - * a puredata wrapper for aubio pitch detection functions + * a puredata wrapper for aubio pitch detection functions * * Thanks to Johannes M Zmolnig for writing the excellent HOWTO: - * http://iem.kug.ac.at/pd/externals-HOWTO/ + * http://iem.kug.ac.at/pd/externals-HOWTO/ * * */ @@ -17,99 +17,98 @@ static t_class *aubiopitch_tilde_class; void aubiopitch_tilde_setup (void); -typedef struct _aubiopitch_tilde +typedef struct _aubiopitch_tilde { - t_object x_obj; - t_float threshold; - t_float threshold2; - t_int pos; /*frames%dspblocksize*/ - t_int bufsize; - t_int hopsize; - aubio_pitch_t *o; - fvec_t *vec; - fvec_t *pitchvec; - t_outlet *pitch; + t_object x_obj; + t_float threshold; + t_float threshold2; + t_int pos; /*frames%dspblocksize*/ + t_int bufsize; + t_int hopsize; + aubio_pitch_t *o; + fvec_t *vec; + fvec_t *pitchvec; + t_outlet *pitch; } t_aubiopitch_tilde; -static t_int *aubiopitch_tilde_perform(t_int *w) +static t_int *aubiopitch_tilde_perform(t_int *w) { - t_aubiopitch_tilde *x = (t_aubiopitch_tilde *)(w[1]); - t_sample *in = (t_sample *)(w[2]); - int n = (int)(w[3]); - int j; - for (j=0;jvec, in[j], x->pos); - /*time for fft*/ - if (x->pos == x->hopsize-1) { - /* block loop */ - aubio_pitch_do(x->o, x->vec, x->pitchvec); - outlet_float(x->pitch, x->pitchvec->data[0]); - /* end of block loop */ - x->pos = -1; /* so it will be zero next j loop */ - } - x->pos++; - } - return (w+4); + t_aubiopitch_tilde *x = (t_aubiopitch_tilde *)(w[1]); + t_sample *in = (t_sample *)(w[2]); + int n = (int)(w[3]); + int j; + for (j=0;jvec, in[j], x->pos); + /*time for fft*/ + if (x->pos == x->hopsize-1) { + /* block loop */ + aubio_pitch_do(x->o, x->vec, x->pitchvec); + outlet_float(x->pitch, x->pitchvec->data[0]); + /* end of block loop */ + x->pos = -1; /* so it will be zero next j loop */ + } + x->pos++; + } + return (w+4); } static void aubiopitch_tilde_dsp(t_aubiopitch_tilde *x, t_signal **sp) { - dsp_add(aubiopitch_tilde_perform, 3, x, sp[0]->s_vec, sp[0]->s_n); + dsp_add(aubiopitch_tilde_perform, 3, x, sp[0]->s_vec, sp[0]->s_n); } static void aubiopitch_tilde_debug(t_aubiopitch_tilde *x) { - post("aubiopitch~ bufsize:\t%d", x->bufsize); - post("aubiopitch~ hopsize:\t%d", x->hopsize); - post("aubiopitch~ threshold:\t%f", x->threshold); - post("aubiopitch~ audio in:\t%f", x->vec->data[0]); + post("aubiopitch~ bufsize:\t%d", x->bufsize); + post("aubiopitch~ hopsize:\t%d", x->hopsize); + post("aubiopitch~ threshold:\t%f", x->threshold); + post("aubiopitch~ audio in:\t%f", x->vec->data[0]); } //static void *aubiopitch_tilde_new (t_floatarg f) static void *aubiopitch_tilde_new (t_symbol * s) { - t_aubiopitch_tilde *x = - (t_aubiopitch_tilde *)pd_new(aubiopitch_tilde_class); + t_aubiopitch_tilde *x = + (t_aubiopitch_tilde *)pd_new(aubiopitch_tilde_class); - x->bufsize = 2048; - x->hopsize = x->bufsize / 2; + x->bufsize = 2048; + x->hopsize = x->bufsize / 2; x->o = new_aubio_pitch(s->s_name, x->bufsize, x->hopsize, (uint_t)sys_getsr() ); - aubio_pitch_set_tolerance (x->o, 0.7); - x->vec = (fvec_t *)new_fvec(x->hopsize); - x->pitchvec = (fvec_t *)new_fvec(1); + aubio_pitch_set_tolerance (x->o, 0.7); + x->vec = (fvec_t *)new_fvec(x->hopsize); + x->pitchvec = (fvec_t *)new_fvec(1); - //floatinlet_new (&x->x_obj, &x->threshold); - x->pitch = outlet_new (&x->x_obj, &s_float); + //floatinlet_new (&x->x_obj, &x->threshold); + x->pitch = outlet_new (&x->x_obj, &s_float); - post(aubiopitch_version); - return (void *)x; + post(aubiopitch_version); + return (void *)x; } static void *aubiopitch_tilde_del(t_aubiopitch_tilde *x) { del_aubio_pitch(x->o); - del_fvec(x->vec); - del_fvec(x->pitchvec); - return 0; + del_fvec(x->vec); + del_fvec(x->pitchvec); + return 0; } void aubiopitch_tilde_setup (void) { - aubiopitch_tilde_class = class_new (gensym ("aubiopitch~"), - (t_newmethod)aubiopitch_tilde_new, - (t_method)aubiopitch_tilde_del, - sizeof (t_aubiopitch_tilde), - CLASS_DEFAULT, A_DEFSYMBOL, 0); - class_addmethod(aubiopitch_tilde_class, - (t_method)aubiopitch_tilde_dsp, - gensym("dsp"), 0); - class_addmethod(aubiopitch_tilde_class, - (t_method)aubiopitch_tilde_debug, - gensym("debug"), 0); - CLASS_MAINSIGNALIN(aubiopitch_tilde_class, - t_aubiopitch_tilde, threshold); + aubiopitch_tilde_class = class_new (gensym ("aubiopitch~"), + (t_newmethod)aubiopitch_tilde_new, + (t_method)aubiopitch_tilde_del, + sizeof (t_aubiopitch_tilde), + CLASS_DEFAULT, A_DEFSYMBOL, 0); + class_addmethod(aubiopitch_tilde_class, + (t_method)aubiopitch_tilde_dsp, + gensym("dsp"), 0); + class_addmethod(aubiopitch_tilde_class, + (t_method)aubiopitch_tilde_debug, + gensym("debug"), 0); + CLASS_MAINSIGNALIN(aubiopitch_tilde_class, + t_aubiopitch_tilde, threshold); } - diff --git a/aubioquiet~.c b/aubioquiet~.c index 56f465e..d477cc2 100644 --- a/aubioquiet~.c +++ b/aubioquiet~.c @@ -114,4 +114,3 @@ void aubioquiet_tilde_setup (void) CLASS_MAINSIGNALIN(aubioquiet_tilde_class, t_aubioquiet_tilde, threshold); } - diff --git a/aubiotempo~.c b/aubiotempo~.c index aabb565..64e58af 100644 --- a/aubiotempo~.c +++ b/aubiotempo~.c @@ -1,9 +1,9 @@ /** * - * a puredata wrapper for aubio tempo detection functions + * a puredata wrapper for aubio tempo detection functions * * Thanks to Johannes M Zmolnig for writing the excellent HOWTO: - * http://iem.kug.ac.at/pd/externals-HOWTO/ + * http://iem.kug.ac.at/pd/externals-HOWTO/ * * */ @@ -16,7 +16,7 @@ static t_class *aubiotempo_tilde_class; void aubiotempo_tilde_setup (void); -typedef struct _aubiotempo_tilde +typedef struct _aubiotempo_tilde { t_object x_obj; t_float threshold; @@ -31,7 +31,7 @@ typedef struct _aubiotempo_tilde t_outlet *onsetbang; } t_aubiotempo_tilde; -static t_int *aubiotempo_tilde_perform(t_int *w) +static t_int *aubiotempo_tilde_perform(t_int *w) { t_aubiotempo_tilde *x = (t_aubiotempo_tilde *)(w[1]); t_sample *in = (t_sample *)(w[2]); @@ -41,7 +41,7 @@ static t_int *aubiotempo_tilde_perform(t_int *w) /* write input to datanew */ fvec_set_sample(x->vec, in[j], x->pos); /*time for fft*/ - if (x->pos == x->hopsize-1) { + if (x->pos == x->hopsize-1) { /* block loop */ aubio_tempo_do (x->t, x->vec, x->output); if (x->output->data[0]) { @@ -73,7 +73,7 @@ static void aubiotempo_tilde_debug(t_aubiotempo_tilde *x) static void *aubiotempo_tilde_new (t_floatarg f) { - t_aubiotempo_tilde *x = + t_aubiotempo_tilde *x = (t_aubiotempo_tilde *)pd_new(aubiotempo_tilde_class); x->threshold = (f < 1e-5) ? 0.1 : (f > 10.) ? 10. : f; @@ -111,13 +111,12 @@ void aubiotempo_tilde_setup (void) (t_method)aubiotempo_tilde_del, sizeof (t_aubiotempo_tilde), CLASS_DEFAULT, A_DEFFLOAT, 0); - class_addmethod(aubiotempo_tilde_class, - (t_method)aubiotempo_tilde_dsp, + class_addmethod(aubiotempo_tilde_class, + (t_method)aubiotempo_tilde_dsp, gensym("dsp"), 0); - class_addmethod(aubiotempo_tilde_class, + class_addmethod(aubiotempo_tilde_class, (t_method)aubiotempo_tilde_debug, gensym("debug"), 0); - CLASS_MAINSIGNALIN(aubiotempo_tilde_class, + CLASS_MAINSIGNALIN(aubiotempo_tilde_class, t_aubiotempo_tilde, threshold); } - diff --git a/aubiotss~.c b/aubiotss~.c index 36483ab..71dd53a 100644 --- a/aubiotss~.c +++ b/aubiotss~.c @@ -1,9 +1,9 @@ /** * - * a puredata wrapper for aubio tss detection functions + * a puredata wrapper for aubio tss detection functions * * Thanks to Johannes M Zmolnig for writing the excellent HOWTO: - * http://iem.kug.ac.at/pd/externals-HOWTO/ + * http://iem.kug.ac.at/pd/externals-HOWTO/ * * */ @@ -17,116 +17,116 @@ static t_class *aubiotss_tilde_class; void aubiotss_tilde_setup (void); -typedef struct _aubiotss_tilde +typedef struct _aubiotss_tilde { - t_object x_obj; - t_float thres; - t_int pos; /*frames%dspblocksize*/ - t_int bufsize; - t_int hopsize; - aubio_pvoc_t * pv; - aubio_pvoc_t * pvt; - aubio_pvoc_t * pvs; - aubio_tss_t * tss; - fvec_t *vec; - cvec_t *fftgrain; - cvec_t *cstead; - cvec_t *ctrans; - fvec_t *trans; - fvec_t *stead; + t_object x_obj; + t_float thres; + t_int pos; /*frames%dspblocksize*/ + t_int bufsize; + t_int hopsize; + aubio_pvoc_t * pv; + aubio_pvoc_t * pvt; + aubio_pvoc_t * pvs; + aubio_tss_t * tss; + fvec_t *vec; + cvec_t *fftgrain; + cvec_t *cstead; + cvec_t *ctrans; + fvec_t *trans; + fvec_t *stead; } t_aubiotss_tilde; -static t_int *aubiotss_tilde_perform(t_int *w) +static t_int *aubiotss_tilde_perform(t_int *w) { - t_aubiotss_tilde *x = (t_aubiotss_tilde *)(w[1]); - t_sample *in = (t_sample *)(w[2]); - t_sample *outtrans = (t_sample *)(w[3]); - t_sample *outstead = (t_sample *)(w[4]); - int n = (int)(w[5]); - int j; - for (j=0;jvec, in[j], x->pos); - /*time for fft*/ - if (x->pos == x->hopsize-1) { - /* block loop */ - /* test for silence */ - //if (!aubio_silence_detection(x->vec, x->threshold2)) - aubio_pvoc_do (x->pv, x->vec, x->fftgrain); - aubio_tss_set_threshold ( x->tss, x->thres); - aubio_tss_do (x->tss, x->fftgrain, x->ctrans, x->cstead); - aubio_pvoc_rdo (x->pvt, x->ctrans, x->trans); - aubio_pvoc_rdo (x->pvs, x->cstead, x->stead); - //} - /* end of block loop */ - x->pos = -1; /* so it will be zero next j loop */ - } - x->pos++; - *outtrans++ = x->trans->data[x->pos]; - *outstead++ = x->stead->data[x->pos]; - } - return (w+6); + t_aubiotss_tilde *x = (t_aubiotss_tilde *)(w[1]); + t_sample *in = (t_sample *)(w[2]); + t_sample *outtrans = (t_sample *)(w[3]); + t_sample *outstead = (t_sample *)(w[4]); + int n = (int)(w[5]); + int j; + for (j=0;jvec, in[j], x->pos); + /*time for fft*/ + if (x->pos == x->hopsize-1) { + /* block loop */ + /* test for silence */ + //if (!aubio_silence_detection(x->vec, x->threshold2)) + aubio_pvoc_do (x->pv, x->vec, x->fftgrain); + aubio_tss_set_threshold ( x->tss, x->thres); + aubio_tss_do (x->tss, x->fftgrain, x->ctrans, x->cstead); + aubio_pvoc_rdo (x->pvt, x->ctrans, x->trans); + aubio_pvoc_rdo (x->pvs, x->cstead, x->stead); + //} + /* end of block loop */ + x->pos = -1; /* so it will be zero next j loop */ + } + x->pos++; + *outtrans++ = x->trans->data[x->pos]; + *outstead++ = x->stead->data[x->pos]; + } + return (w+6); } static void aubiotss_tilde_dsp(t_aubiotss_tilde *x, t_signal **sp) { - dsp_add(aubiotss_tilde_perform, 5, x, - sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, sp[0]->s_n); + dsp_add(aubiotss_tilde_perform, 5, x, + sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, sp[0]->s_n); } static void aubiotss_tilde_debug(t_aubiotss_tilde *x) { - post("aubiotss~ bufsize:\t%d", x->bufsize); - post("aubiotss~ hopsize:\t%d", x->hopsize); - post("aubiotss~ threshold:\t%f", x->thres); - post("aubiotss~ audio in:\t%f", x->vec->data[0]); - post("aubiotss~ audio out:\t%f", x->stead->data[0]); + post("aubiotss~ bufsize:\t%d", x->bufsize); + post("aubiotss~ hopsize:\t%d", x->hopsize); + post("aubiotss~ threshold:\t%f", x->thres); + post("aubiotss~ audio in:\t%f", x->vec->data[0]); + post("aubiotss~ audio out:\t%f", x->stead->data[0]); } static void *aubiotss_tilde_new (t_floatarg f) - //, t_floatarg bufsize) + //, t_floatarg bufsize) { - t_aubiotss_tilde *x = - (t_aubiotss_tilde *)pd_new(aubiotss_tilde_class); + t_aubiotss_tilde *x = + (t_aubiotss_tilde *)pd_new(aubiotss_tilde_class); - x->thres = (f < 1e-5) ? 0.01 : (f > 1.) ? 1. : f; - x->bufsize = 1024; //(bufsize < 64) ? 1024: (bufsize > 16385) ? 16385: bufsize; - x->hopsize = x->bufsize / 4; + x->thres = (f < 1e-5) ? 0.01 : (f > 1.) ? 1. : f; + x->bufsize = 1024; //(bufsize < 64) ? 1024: (bufsize > 16385) ? 16385: bufsize; + x->hopsize = x->bufsize / 4; - x->vec = (fvec_t *)new_fvec(x->hopsize); + x->vec = (fvec_t *)new_fvec(x->hopsize); - x->fftgrain = (cvec_t *)new_cvec(x->bufsize); - x->ctrans = (cvec_t *)new_cvec(x->bufsize); - x->cstead = (cvec_t *)new_cvec(x->bufsize); + x->fftgrain = (cvec_t *)new_cvec(x->bufsize); + x->ctrans = (cvec_t *)new_cvec(x->bufsize); + x->cstead = (cvec_t *)new_cvec(x->bufsize); - x->trans = (fvec_t *)new_fvec(x->hopsize); - x->stead = (fvec_t *)new_fvec(x->hopsize); + x->trans = (fvec_t *)new_fvec(x->hopsize); + x->stead = (fvec_t *)new_fvec(x->hopsize); - x->pv = (aubio_pvoc_t *)new_aubio_pvoc(x->bufsize, x->hopsize); - x->pvt = (aubio_pvoc_t *)new_aubio_pvoc(x->bufsize, x->hopsize); - x->pvs = (aubio_pvoc_t *)new_aubio_pvoc(x->bufsize, x->hopsize); + x->pv = (aubio_pvoc_t *)new_aubio_pvoc(x->bufsize, x->hopsize); + x->pvt = (aubio_pvoc_t *)new_aubio_pvoc(x->bufsize, x->hopsize); + x->pvs = (aubio_pvoc_t *)new_aubio_pvoc(x->bufsize, x->hopsize); - x->tss = (aubio_tss_t *)new_aubio_tss(x->bufsize, x->hopsize); + x->tss = (aubio_tss_t *)new_aubio_tss(x->bufsize, x->hopsize); - floatinlet_new (&x->x_obj, &x->thres); - outlet_new(&x->x_obj, gensym("signal")); - outlet_new(&x->x_obj, gensym("signal")); - post(aubiotss_version); - return (void *)x; + floatinlet_new (&x->x_obj, &x->thres); + outlet_new(&x->x_obj, gensym("signal")); + outlet_new(&x->x_obj, gensym("signal")); + post(aubiotss_version); + return (void *)x; } void aubiotss_tilde_setup (void) { - aubiotss_tilde_class = class_new (gensym ("aubiotss~"), - (t_newmethod)aubiotss_tilde_new, - 0, sizeof (t_aubiotss_tilde), - CLASS_DEFAULT, A_DEFFLOAT, 0); - class_addmethod(aubiotss_tilde_class, - (t_method)aubiotss_tilde_dsp, - gensym("dsp"), 0); - class_addmethod(aubiotss_tilde_class, - (t_method)aubiotss_tilde_debug, - gensym("debug"), 0); - CLASS_MAINSIGNALIN(aubiotss_tilde_class, - t_aubiotss_tilde, thres); + aubiotss_tilde_class = class_new (gensym ("aubiotss~"), + (t_newmethod)aubiotss_tilde_new, + 0, sizeof (t_aubiotss_tilde), + CLASS_DEFAULT, A_DEFFLOAT, 0); + class_addmethod(aubiotss_tilde_class, + (t_method)aubiotss_tilde_dsp, + gensym("dsp"), 0); + class_addmethod(aubiotss_tilde_class, + (t_method)aubiotss_tilde_debug, + gensym("debug"), 0); + CLASS_MAINSIGNALIN(aubiotss_tilde_class, + t_aubiotss_tilde, thres); } diff --git a/aubiozcr~.c b/aubiozcr~.c index 6a103d3..874a266 100644 --- a/aubiozcr~.c +++ b/aubiozcr~.c @@ -1,10 +1,10 @@ /** * - * a puredata wrapper for aubio zero crossing rate function + * a puredata wrapper for aubio zero crossing rate function * * Thanks to Johannes M Zmolnig for writing the excellent HOWTO: - * http://iem.kug.ac.at/pd/externals-HOWTO/ + * http://iem.kug.ac.at/pd/externals-HOWTO/ * * */ @@ -17,75 +17,74 @@ static t_class *aubiozcr_tilde_class; void aubiozcr_tilde_setup (void); -typedef struct _aubiozcr_tilde +typedef struct _aubiozcr_tilde { - t_object x_obj; - t_int pos; /*frames%dspblocksize*/ - t_int bufsize; - t_float f; - fvec_t *vec; - t_outlet *zcr; + t_object x_obj; + t_int pos; /*frames%dspblocksize*/ + t_int bufsize; + t_float f; + fvec_t *vec; + t_outlet *zcr; } t_aubiozcr_tilde; -static t_int *aubiozcr_tilde_perform(t_int *w) +static t_int *aubiozcr_tilde_perform(t_int *w) { - t_aubiozcr_tilde *x = (t_aubiozcr_tilde *)(w[1]); - t_sample *in = (t_sample *)(w[2]); - int n = (int)(w[3]); - int j; - for (j=0;jvec, in[j], x->pos); - /*time for fft*/ - if (x->pos == x->bufsize-1) { - /* block loop */ - outlet_float(x->zcr, aubio_zero_crossing_rate(x->vec)); - /* end of block loop */ - x->pos = -1; /* so it will be zero next j loop */ - } - x->pos++; - } - return (w+4); + t_aubiozcr_tilde *x = (t_aubiozcr_tilde *)(w[1]); + t_sample *in = (t_sample *)(w[2]); + int n = (int)(w[3]); + int j; + for (j=0;jvec, in[j], x->pos); + /*time for fft*/ + if (x->pos == x->bufsize-1) { + /* block loop */ + outlet_float(x->zcr, aubio_zero_crossing_rate(x->vec)); + /* end of block loop */ + x->pos = -1; /* so it will be zero next j loop */ + } + x->pos++; + } + return (w+4); } static void aubiozcr_tilde_dsp(t_aubiozcr_tilde *x, t_signal **sp) { - dsp_add(aubiozcr_tilde_perform, 3, x, sp[0]->s_vec, sp[0]->s_n); + dsp_add(aubiozcr_tilde_perform, 3, x, sp[0]->s_vec, sp[0]->s_n); } static void aubiozcr_tilde_debug(t_aubiozcr_tilde *x) { - post("aubiozcr~ bufsize:\t%d", x->bufsize); - post("aubiozcr~ audio in:\t%f", x->vec->data[0]); + post("aubiozcr~ bufsize:\t%d", x->bufsize); + post("aubiozcr~ audio in:\t%f", x->vec->data[0]); } static void *aubiozcr_tilde_new (void) { - t_aubiozcr_tilde *x = - (t_aubiozcr_tilde *)pd_new(aubiozcr_tilde_class); + t_aubiozcr_tilde *x = + (t_aubiozcr_tilde *)pd_new(aubiozcr_tilde_class); - x->bufsize = 1024; + x->bufsize = 1024; - x->vec = (fvec_t *)new_fvec(x->bufsize); + x->vec = (fvec_t *)new_fvec(x->bufsize); - x->zcr = outlet_new (&x->x_obj, &s_float); - post(aubiozcr_version); - return (void *)x; + x->zcr = outlet_new (&x->x_obj, &s_float); + post(aubiozcr_version); + return (void *)x; } void aubiozcr_tilde_setup (void) { - aubiozcr_tilde_class = class_new (gensym ("aubiozcr~"), - (t_newmethod)aubiozcr_tilde_new, - 0, sizeof (t_aubiozcr_tilde), - CLASS_DEFAULT, 0); - class_addmethod(aubiozcr_tilde_class, - (t_method)aubiozcr_tilde_dsp, - gensym("dsp"), 0); - class_addmethod(aubiozcr_tilde_class, - (t_method)aubiozcr_tilde_debug, - gensym("debug"), 0); - CLASS_MAINSIGNALIN(aubiozcr_tilde_class, - t_aubiozcr_tilde, f); + aubiozcr_tilde_class = class_new (gensym ("aubiozcr~"), + (t_newmethod)aubiozcr_tilde_new, + 0, sizeof (t_aubiozcr_tilde), + CLASS_DEFAULT, 0); + class_addmethod(aubiozcr_tilde_class, + (t_method)aubiozcr_tilde_dsp, + gensym("dsp"), 0); + class_addmethod(aubiozcr_tilde_class, + (t_method)aubiozcr_tilde_debug, + gensym("debug"), 0); + CLASS_MAINSIGNALIN(aubiozcr_tilde_class, + t_aubiozcr_tilde, f); } - -- 2.11.0