aboutsummaryrefslogtreecommitdiff
path: root/xtract/xtract_delta.h
diff options
context:
space:
mode:
authorJamie Bullock <jamie@postlude.co.uk>2007-12-27 20:37:15 +0000
committerJamie Bullock <jamie@postlude.co.uk>2007-12-27 20:37:15 +0000
commit0c2e564c15c583a5274271a0bbacb237b180d500 (patch)
treef821a5c3785a6c6d0354b9e2f91431c8a3c3d544 /xtract/xtract_delta.h
parent24f2b43e28e755423cc0c319aafcf74e7db5b61b (diff)
downloadLibXtract-0c2e564c15c583a5274271a0bbacb237b180d500.tar.gz
LibXtract-0c2e564c15c583a5274271a0bbacb237b180d500.tar.bz2
LibXtract-0c2e564c15c583a5274271a0bbacb237b180d500.zip
Added l-norm/spectral flux
Diffstat (limited to 'xtract/xtract_delta.h')
-rw-r--r--xtract/xtract_delta.h26
1 files changed, 23 insertions, 3 deletions
diff --git a/xtract/xtract_delta.h b/xtract/xtract_delta.h
index 706c812..9b4f28f 100644
--- a/xtract/xtract_delta.h
+++ b/xtract/xtract_delta.h
@@ -29,8 +29,21 @@ extern "C" {
#include "xtract_types.h"
-/* \brief Extract spectral flux as defined by Gaƫl Richard (2006)*/
+/* \brief Extract flux
+ *
+ * An alias for xtract_lnorm()
+ */
int xtract_flux(const float *data, const int N, const void *argv , float *result);
+
+/* \brief Extract the L-norm of a vector
+ *
+ * \param *data: a pointer to the first element in an array of floats representing the difference between two subsequent frames of output from a vector-based feature e.g. the *result from xtract_difference_vector()
+ * \param N: the length of the array pointed to by *data
+ * \param *argv: a pointer to an array of floats, the first representing the "norm order". The second argument represents the filter type determining what values we consider from the difference vector as given in the enumeration xtract_lnorm_filter_types_ (libxtract.h)
+ * \param *result: a pointer to a float representing the flux
+ *
+ */
+int xtract_lnorm(const float *data, const int N, const void *argv , float *result);
/*xtract_frame_tracker *xf */
/** \brief Extract attack Time */
@@ -42,8 +55,15 @@ int xtract_decay_time(const float *data, const int N, const void *argv, float *r
/* xtract_amp_tracker *xa */
-/** \brief A generic function to calculate the delta of a feature over a given period (in frames) */
-int xtract_delta_feature(const float *data, const int N, const void *argv, float *result);
+/** \brief Extract the difference between two vectors
+ *
+ * \param *data a pointer to an array representing two distinct vectors, e.g. two successive magnitude spectra.
+ * \param N the size of the array pointed to by *data
+ * \param *argv a pointer to NULL
+ * \param *result a pointer to an array of size N / 2 representing the difference between the two input vectors.
+ *
+ * */
+int xtract_difference_vector(const float *data, const int N, const void *argv, float *result);
/*xtract_frame_tracker *xf */
/*float frames*/