From c6e4f6421b2a72e33e21b53ee2838532d8958a8d Mon Sep 17 00:00:00 2001 From: Jamie Bullock Date: Mon, 9 Oct 2006 09:22:03 +0000 Subject: Added f0 estimation (based on AMDF) --- examples/puredata/xtract~.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'examples') diff --git a/examples/puredata/xtract~.c b/examples/puredata/xtract~.c index 7866ff3..6c65e4b 100644 --- a/examples/puredata/xtract~.c +++ b/examples/puredata/xtract~.c @@ -123,11 +123,14 @@ static void *xtract_new(t_symbol *me, t_int argc, t_atom *argv) { else if(tmp == gensym("sharpness")) x->feature = SHARPNESS; else if(tmp == gensym("slope")) x->feature = SLOPE; else if(tmp == gensym("f0")){ - x->feature = F0; - x->argv = getbytes(sizeof(t_float)); - } + x->feature = F0; + x->argv = getbytes(sizeof(t_float)); + } else if(tmp == gensym("hps"))x->feature = HPS; - else if(tmp == gensym("lowest_match"))x->feature = LOWEST_MATCH; + else if(tmp == gensym("lowest_match")){ + x->feature = LOWEST_MATCH; + x->argv = getbytes(sizeof(t_float)); + } else if(tmp == gensym("magnitude_spectrum")) x->feature = MAGNITUDE_SPECTRUM; else if(tmp == gensym("autocorrelation")) x->feature = AUTOCORRELATION; -- cgit v1.2.3