Mercurial > hg > libxtract
diff examples/puredata/xtract~.c @ 12:1aec087ddfca
Added f0 estimation (based on AMDF)
author | Jamie Bullock <jamie@postlude.co.uk> |
---|---|
date | Mon, 09 Oct 2006 09:22:03 +0000 |
parents | 81eb5810a301 |
children | 6417baefffc8 |
line wrap: on
line diff
--- a/examples/puredata/xtract~.c Sun Oct 08 15:31:40 2006 +0000 +++ b/examples/puredata/xtract~.c Mon Oct 09 09:22:03 2006 +0000 @@ -123,11 +123,14 @@ 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->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; 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("magnitude_spectrum")) x->feature = MAGNITUDE_SPECTRUM; else if(tmp == gensym("autocorrelation")) x->feature = AUTOCORRELATION;