diff options
author | Jamie Bullock <jamie@postlude.co.uk> | 2007-12-24 13:21:13 +0000 |
---|---|---|
committer | Jamie Bullock <jamie@postlude.co.uk> | 2007-12-24 13:21:13 +0000 |
commit | 6abcb447777c3ab48bdbe720fc3d84d3e8841317 (patch) | |
tree | 01e0930c51bc1c5cf43aeed186f196e095378fe1 /examples/puredata/xtract~.c | |
parent | 672302aadaba97f3e5df256e3d358cb2411ab3ed (diff) | |
download | LibXtract-6abcb447777c3ab48bdbe720fc3d84d3e8841317.tar.gz LibXtract-6abcb447777c3ab48bdbe720fc3d84d3e8841317.tar.bz2 LibXtract-6abcb447777c3ab48bdbe720fc3d84d3e8841317.zip |
- Fixes to descriptors.c where no break statement was given for certain cases is switch conditionals
- Added LPC and LPCC extraction functions. LPC implements Durbin method as described in Rabiner and Juang and implemented in Dr. Dobbs 1994 edition by Jutta Degener
Diffstat (limited to 'examples/puredata/xtract~.c')
-rw-r--r-- | examples/puredata/xtract~.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/examples/puredata/xtract~.c b/examples/puredata/xtract~.c index e58aea0..f82aab6 100644 --- a/examples/puredata/xtract~.c +++ b/examples/puredata/xtract~.c @@ -93,7 +93,7 @@ static t_int *xtract_perform_vector(t_int *w) { tmp_in = copybytes(in, N * sizeof(t_float)); tmp_out = getbytes(N * sizeof(t_float)); - if(x->feature == XTRACT_PEAK_SPECTRUM) + if(x->feature == XTRACT_PEAK_SPECTRUM || x->feature == XTRACT_LPC) N >>= 1; return_code = xtract[x->feature](tmp_in, N, x->argv, tmp_out); @@ -239,7 +239,9 @@ static void *xtract_new(t_symbol *me, t_int argc, t_atom *argv) { x->feature == XTRACT_BARK_COEFFICIENTS || x->feature == XTRACT_SPECTRUM || x->feature == XTRACT_PEAK_SPECTRUM || - x->feature == XTRACT_HARMONIC_SPECTRUM) + x->feature == XTRACT_HARMONIC_SPECTRUM || + x->feature == XTRACT_LPC || + x->feature == XTRACT_LPCC) x->feature_type = XTRACT_VECTOR; else if (x->feature == XTRACT_FLUX || x->feature == XTRACT_ATTACK_TIME || @@ -273,8 +275,8 @@ t_int argc, t_atom *argv) { x->argv = getbytes(argc * sizeof(float)); - while(argc--) - ((t_float *)x->argv)[argc] = atom_getfloat(&argv[argc]); + while(argc--) + ((t_float *)x->argv)[argc] = atom_getfloat(&argv[argc]); /* }*/ } |