comparison xtract/xtract_scalar.h @ 55:4ea1a8838b14

Finished the essentials of descriptors.c
author Jamie Bullock <jamie@postlude.co.uk>
date Sun, 21 Jan 2007 14:40:23 +0000
parents 9762d7e3d129
children 450712b21565
comparison
equal deleted inserted replaced
54:9762d7e3d129 55:4ea1a8838b14
218 218
219 /** \brief Extract the spectral rolloff of an input vector using a method described by Bee Suan Ong (2005) 219 /** \brief Extract the spectral rolloff of an input vector using a method described by Bee Suan Ong (2005)
220 * 220 *
221 * \param *data: a pointer to the first element in an array of floats representing the magnitude coefficients from the spectrum of an audio vector, (e.g. the first half of the array pointed to by *result from xtract_spectrum(). 221 * \param *data: a pointer to the first element in an array of floats representing the magnitude coefficients from the spectrum of an audio vector, (e.g. the first half of the array pointed to by *result from xtract_spectrum().
222 * \param N: the number of elements to be considered 222 * \param N: the number of elements to be considered
223 * \param *argv: a pointer to an array containing a floating point value representing the threshold for rolloff, i.e. the percentile at which the rolloff is determined, expressed in the range 0-1.0, and a float representing the sample rate in Hz 223 * \param *argv: a pointer to an array containing a float representing (samplerate / N ) and a float representing the threshold for rolloff, i.e. the percentile at which the rolloff is determined, expressed as a percentage, and
224 * \param *result: the spectral rolloff in Hz of N values from the array pointed to by *data. This is the point in the spectrum below which argv[0] of the energy is distributed. 224 * \param *result: the spectral rolloff in Hz of N values from the array pointed to by *data. This is the point in the spectrum below which argv[0] of the energy is distributed.
225 */ 225 */
226 int xtract_rolloff(const float *data, const int N, const void *argv, float *result); 226 int xtract_rolloff(const float *data, const int N, const void *argv, float *result);
227 227
228 /** \brief Extract the 'total loudness' of an input vector using a method described by Moore, Glasberg et al (2005) 228 /** \brief Extract the 'total loudness' of an input vector using a method described by Moore, Glasberg et al (2005)
256 */ 256 */
257 int xtract_tonality(const float *data, const int N, const void *argv, float *result); 257 int xtract_tonality(const float *data, const int N, const void *argv, float *result);
258 258
259 /** \brief Extract the noisiness of an input vector using a method described by Tae Hong Park (2000) 259 /** \brief Extract the noisiness of an input vector using a method described by Tae Hong Park (2000)
260 * 260 *
261 * \param *data: a pointer to the first element in an array of floats representing the magnitude coefficients from the spectrum of an audio vector, (e.g. the first half of the array pointed to by *result from xtract_spectrum(). 261 * \param *data: a pointer to NULL
262 * \param N: the number of elements to be considered 262 * \param N:
263 * \param *argv: a pointer to NULL 263 * \param *argv: a pointer to an array containing a float represnting the number of harmonic partials in a spectrum, and a float representing the number of partials in a spectrum
264 * \param *result: the noisiness of N values from the array pointed to by *data 264 * \param *result: the noisiness coefficient as calculated from argv
265 */ 265 */
266 int xtract_noisiness(const float *data, const int N, const void *argv, float *result); 266 int xtract_noisiness(const float *data, const int N, const void *argv, float *result);
267 267
268 /** \brief Extract the RMS amplitude of an input vector using a method described by Tae Hong Park (2000) 268 /** \brief Extract the RMS amplitude of an input vector using a method described by Tae Hong Park (2000)
269 * 269 *
283 */ 283 */
284 int xtract_spectral_inharmonicity(const float *data, const int N, const void *argv, float *result); 284 int xtract_spectral_inharmonicity(const float *data, const int N, const void *argv, float *result);
285 285
286 /** \brief Extract the spectral crest of an input vector using a method described by Peeters (2003) 286 /** \brief Extract the spectral crest of an input vector using a method described by Peeters (2003)
287 * 287 *
288 * \param *data: a pointer to the first element in an array of floats representing the magnitude coefficients from the spectrum of an audio vector, (e.g. the first half of the array pointed to by *result from xtract_spectrum(). 288 * \param *data: a pointer to NULL
289 * \param N: the number of elements to be considered 289 * \param N: not used
290 * \param *argv: a pointer to NULL 290 * \param *argv: a pointer to an array containing a float representing the maximum value in a spectrum, and a float representing the mean value of a spectrum
291 * \param *result: the spectral crest of N values from the array pointed to by *data 291 * \param *result: the spectral crest of N values from the array pointed to by *data
292 */ 292 */
293 int xtract_crest(const float *data, const int N, const void *argv, float *result); 293 int xtract_crest(const float *data, const int N, const void *argv, float *result);
294 294
295 /** \brief Extract the Spectral Power of an input vector using a method described by Bee Suan Ong (2005) 295 /** \brief Extract the Spectral Power of an input vector using a method described by Bee Suan Ong (2005)
304 /* Odd to even harmonic ratio */ 304 /* Odd to even harmonic ratio */
305 /** \brief Extract the Odd to even harmonic ratio of an input vector 305 /** \brief Extract the Odd to even harmonic ratio of an input vector
306 * 306 *
307 * \param *data: a pointer to the first element in an array of floats representing the frequencies of the harmonic spectrum of an audio vector. It is sufficient to pass in a pointer to the second half of the array pointed to by *result from xtract_harmonic_spectrum(). 307 * \param *data: a pointer to the first element in an array of floats representing the frequencies of the harmonic spectrum of an audio vector. It is sufficient to pass in a pointer to the second half of the array pointed to by *result from xtract_harmonic_spectrum().
308 * \param N: the number of elements to be considered. If using the array pointed to by *result from xtract_harmonics, N should equal half the total array size i.e., just the frequencies of the peaks. 308 * \param N: the number of elements to be considered. If using the array pointed to by *result from xtract_harmonics, N should equal half the total array size i.e., just the frequencies of the peaks.
309 * \param *argv: a pointer to NULL 309 * \param *argv: a pointer to a float representing the fundamental frequency of the input vector.
310 * \param *result: the odd/even harmonic ratio of N values from the array pointed to by *data 310 * \param *result: the odd/even harmonic ratio of N values from the array pointed to by *data
311 */ 311 */
312 int xtract_odd_even_ratio(const float *data, const int N, const void *argv, float *result); 312 int xtract_odd_even_ratio(const float *data, const int N, const void *argv, float *result);
313 313
314 /** \brief Extract the Sharpness of an input vector 314 /** \brief Extract the Sharpness of an input vector