diff options
author | Jamie Bullock <jamie@jamiebullock.com> | 2013-05-31 22:44:03 +0100 |
---|---|---|
committer | Jamie Bullock <jamie@jamiebullock.com> | 2013-05-31 22:50:18 +0100 |
commit | 7b4c50a8d9087a57a6af27ca0ae3eb30d35aae43 (patch) | |
tree | 50afdbdeca49923cff79c3ac634baaf159c88143 /xtract | |
parent | 962c5fe017b588f59b21585c847ef6b67898cbf7 (diff) | |
download | LibXtract-7b4c50a8d9087a57a6af27ca0ae3eb30d35aae43.tar.gz LibXtract-7b4c50a8d9087a57a6af27ca0ae3eb30d35aae43.tar.bz2 LibXtract-7b4c50a8d9087a57a6af27ca0ae3eb30d35aae43.zip |
Add wavelet-based pitch tracker
Diffstat (limited to 'xtract')
-rw-r--r-- | xtract/libxtract.h | 4 | ||||
-rw-r--r-- | xtract/xtract_scalar.h | 15 |
2 files changed, 19 insertions, 0 deletions
diff --git a/xtract/libxtract.h b/xtract/libxtract.h index 8082a47..d07ba97 100644 --- a/xtract/libxtract.h +++ b/xtract/libxtract.h @@ -116,6 +116,7 @@ enum xtract_features_ { XTRACT_HPS, XTRACT_F0, XTRACT_FAILSAFE_F0, + XTRACT_WAVELET_F0, XTRACT_LNORM, XTRACT_FLUX, XTRACT_ATTACK_TIME, @@ -361,6 +362,9 @@ extern int(*xtract[XTRACT_FEATURES])(const double *data, const int N, const void #endif +/** \brief A function to initialise wavelet f0 detector state */ +int xtract_init_wavelet_f0_state(void); + /** \brief A structure to store a set of n_filters Mel filters */ typedef struct xtract_mel_filter_ { int n_filters; diff --git a/xtract/xtract_scalar.h b/xtract/xtract_scalar.h index 3853e66..7d5d752 100644 --- a/xtract/xtract_scalar.h +++ b/xtract/xtract_scalar.h @@ -416,6 +416,21 @@ int xtract_f0(const double *data, const int N, const void *argv, double *result) */ int xtract_failsafe_f0(const double *data, const int N, const void *argv, double *result); +/** \brief Extract the fundamental frequency of an input vector using wavelet-based method + * + * \param *data: a pointer to the first element in an array of doubles representing an audio vector + * \param N: the number of elements to be considered + * \param *argv: a pointer to a double representing the audio sample rate + * \param *result: the pitch of N values from the array pointed to by *data + * + * This function uses the time-domain wavelet-based method described in Larson and Maddox (2005) and + * implemented in the dywapitchtrack library + * + * xtract_init_wavelet_f0_state() must be called exactly once prior to calling xtract_wavelet_f0() + * + */ +int xtract_wavelet_f0(const double *data, const int N, const void *argv, double *result); + /** \brief Extract the number of non-zero elements in an input vector * * \param *data: a pointer to the first element in an array of doubles |