Mercurial > hg > libxtract
comparison xtract/xtract_scalar.h @ 42:84e69b155098
Numerous fixes, see ChangeLog
author | Jamie Bullock <jamie@postlude.co.uk> |
---|---|
date | Tue, 12 Dec 2006 21:47:42 +0000 |
parents | afb9e6fee244 |
children | 4a36f70a76e9 |
comparison
equal
deleted
inserted
replaced
41:afb9e6fee244 | 42:84e69b155098 |
---|---|
115 */ | 115 */ |
116 int xtract_irregularity_j(float *data, int N, void *argv, float *result); | 116 int xtract_irregularity_j(float *data, int N, void *argv, float *result); |
117 | 117 |
118 /** \brief Calculate the Tristimulus of an input vector using a method described by Pollard and Jansson (1982) | 118 /** \brief Calculate the Tristimulus of an input vector using a method described by Pollard and Jansson (1982) |
119 * | 119 * |
120 * \param *data: a pointer to the first element in an array of floats representing the amplitudes of the harmonic spectrum of an audio vector e.g. a pointer to the second half of the array pointed to by *result from xtract_harmonics() | 120 * \param *data: a pointer to the first element in an array of floats representing the amplitudes of the harmonic spectrum of an audio vector e.g. a pointer to the second half of the array pointed to by *result from xtract_harmonics(). The amplitudes of the peak spectrum (e.g. *result from xtract_peaks()) can be used if one wishes to consider all partials not just harmonics. |
121 * \param N: the number of elements to be considered | 121 * \param N: the number of elements to be considered |
122 * \param *argv: a pointer to NULL | 122 * \param *argv: a pointer to NULL |
123 * \param *result: the tristimulus of N values from the array pointed to by *data | 123 * \param *result: the tristimulus of N values from the array pointed to by *data |
124 * | 124 * |
125 * These three functions provide the first, second and third order tristimulus formulae | 125 * These three functions provide the first, second and third order tristimulus formulae |
160 | 160 |
161 /** \brief Extract the spectral rolloff of an input vector using a method described by Bee Suan Ong (2005) | 161 /** \brief Extract the spectral rolloff of an input vector using a method described by Bee Suan Ong (2005) |
162 * | 162 * |
163 * \param *data: a pointer to the first element in an array of floats representing the magnitude spectrum of an audio vector | 163 * \param *data: a pointer to the first element in an array of floats representing the magnitude spectrum of an audio vector |
164 * \param N: the number of elements to be considered | 164 * \param N: the number of elements to be considered |
165 * \param *argv: a pointer to a floating point value representing the threshold for rolloff, i.e. the percentile at which the rolloff is determined | 165 * \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 |
166 * \param *result: the spectral rolloff of N values from the array pointed to by *data | 166 * \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. |
167 */ | 167 */ |
168 int xtract_rolloff(float *data, int N, void *argv, float *result); | 168 int xtract_rolloff(float *data, int N, void *argv, float *result); |
169 | 169 |
170 /* Loudness */ | 170 /* Loudness */ |
171 /* A set of BARK_BANDS bark coefficients must be passed in, the loudness is calculated approximately according to Moore, Glasberg et al, 1997 */ | 171 /* A set of BARK_BANDS bark coefficients must be passed in, the loudness is calculated approximately according to Moore, Glasberg et al, 1997 */ |
189 int xtract_flatness(float *data, int N, void *argv, float *result); | 189 int xtract_flatness(float *data, int N, void *argv, float *result); |
190 | 190 |
191 | 191 |
192 /** \brief Extract the tonality factor of an input vector using a method described by Tristan Jehan (2005) | 192 /** \brief Extract the tonality factor of an input vector using a method described by Tristan Jehan (2005) |
193 * | 193 * |
194 * \param *data: a pointer to the first element in an array of floats representing the spectral peaks of an audio vector | 194 * \param *data: not used. |
195 * \param N: the number of elements to be considered | 195 * \param N: not used |
196 * \param *argv: a pointer to NULL | 196 * \param *argv: a pointer to the spectral flatness measure of an audio vector (e.g. the output from xtract_flatness) |
197 * \param *result: the tonality factor of N values from the array pointed to by *data | 197 * \param *result: the tonality factor of N values from the array pointed to by *data |
198 */ | 198 */ |
199 int xtract_tonality(float *data, int N, void *argv, float *result); | 199 int xtract_tonality(float *data, int N, void *argv, float *result); |
200 | 200 |
201 /** \brief Extract the noisiness of an input vector using a method described by Tae Hong Park (2000) | 201 /** \brief Extract the noisiness of an input vector using a method described by Tae Hong Park (2000) |