Mercurial > hg > libxtract
comparison xtract/xtract_scalar.h @ 205:f6fcf3bec020
Add xtract_midicent() convenience function to convert from frequency to MIDI cent
author | Jamie Bullock <jamie@jamiebullock.com> |
---|---|
date | Tue, 11 Mar 2014 18:14:45 +0000 |
parents | 02b7b3f96713 |
children | 44401945d850 |
comparison
equal
deleted
inserted
replaced
204:f262144347e7 | 205:f6fcf3bec020 |
---|---|
432 * xtract_init_wavelet_f0_state() must be called exactly once prior to calling xtract_wavelet_f0() | 432 * xtract_init_wavelet_f0_state() must be called exactly once prior to calling xtract_wavelet_f0() |
433 * | 433 * |
434 */ | 434 */ |
435 int xtract_wavelet_f0(const double *data, const int N, const void *argv, double *result); | 435 int xtract_wavelet_f0(const double *data, const int N, const void *argv, double *result); |
436 | 436 |
437 | |
438 /** \brief Convenience function to convert a frequency in Hertz to a "pitch" value in MIDI cents | |
439 * | |
440 * \param *data: not used | |
441 * \param N: not used | |
442 * \param *argv: a pointer to a double-precision floating point value representing a frequency in Hertz | |
443 * \param *result: a pointer to a double-precision floating point value representing a "pitch" in MIDI cents | |
444 * \return if *argv value causes a *result within the range 0..127, XTRACT_SUCCESS will be returned, otherwise XTRACT_ARGUMENT_ERROR | |
445 * | |
446 */ | |
447 int xtract_midicent(const double *data, const int N, const void *argv, double *result); | |
448 | |
449 | |
437 /** \brief Extract the number of non-zero elements in an input vector | 450 /** \brief Extract the number of non-zero elements in an input vector |
438 * | 451 * |
439 * \param *data: a pointer to the first element in an array of doubles | 452 * \param *data: a pointer to the first element in an array of doubles |
440 * \param N: the number of elements to be considered | 453 * \param N: the number of elements to be considered |
441 * \param *argv: not used | 454 * \param *argv: not used |