LibXtract  0.7.1
xtract_scalar.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 Jamie Bullock
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a copy
5  * of this software and associated documentation files (the "Software"), to
6  * deal in the Software without restriction, including without limitation the
7  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8  * sell copies of the Software, and to permit persons to whom the Software is
9  * furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20  * IN THE SOFTWARE.
21  *
22  */
23 
26 #ifndef XTRACT_SCALAR_H
27 #define XTRACT_SCALAR_H
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
48 int xtract_mean(const double *data, const int N, const void *argv, double *result);
49 
57 int xtract_variance(const double *data, const int N, const void *argv, double *result);
58 
66 int xtract_standard_deviation(const double *data, const int N, const void *argv, double *result);
67 
75 int xtract_average_deviation(const double *data, const int N, const void *argv, double *result);
76 
77 
85 int xtract_skewness(const double *data, const int N, const void *argv, double *result);
86 
94 int xtract_kurtosis(const double *data, const int N, const void *argv, double *result);
95 
103 int xtract_spectral_mean(const double *data, const int N, const void *argv, double *result);
104 
113 int xtract_spectral_variance(const double *data, const int N, const void *argv, double *result);
114 
122 int xtract_spectral_standard_deviation(const double *data, const int N, const void *argv, double *result);
123 
131 /*
132 int xtract_spectral_average_deviation(const double *data, const int N, const void *argv, double *result);
133 */
134 
142 int xtract_spectral_skewness(const double *data, const int N, const void *argv, double *result);
143 
151 int xtract_spectral_kurtosis(const double *data, const int N, const void *argv, double *result);
152 
163 int xtract_spectral_centroid(const double *data, const int N, const void *argv, double *result);
164 
172 int xtract_irregularity_k(const double *data, const int N, const void *argv, double *result);
173 
181 int xtract_irregularity_j(const double *data, const int N, const void *argv, double *result);
182 
193 int xtract_tristimulus_1(const double *data, const int N, const void *argv, double *result);
194 int xtract_tristimulus_2(const double *data, const int N, const void *argv, double *result);
195 int xtract_tristimulus_3(const double *data, const int N, const void *argv, double *result);
196 
204 int xtract_smoothness(const double *data, const int N, const void *argv, double *result);
205 
213 int xtract_spread(const double *data, const int N, const void *argv, double *result);
214 
215 /* Zero crossing rate */
216 
224 int xtract_zcr(const double *data, const int N, const void *argv, double *result);
225 
233 int xtract_rolloff(const double *data, const int N, const void *argv, double *result);
234 
245 int xtract_loudness(const double *data, const int N, const void *argv, double *result);
246 
256 int xtract_flatness(const double *data, const int N, const void *argv, double *result);
257 
268 int xtract_flatness_db(const double *data, const int N, const void *argv, double *result);
269 
277 int xtract_tonality(const double *data, const int N, const void *argv, double *result);
278 
286 int xtract_noisiness(const double *data, const int N, const void *argv, double *result);
287 
295 int xtract_rms_amplitude(const double *data, const int N, const void *argv, double *result);
296 
304 int xtract_spectral_inharmonicity(const double *data, const int N, const void *argv, double *result);
305 
313 int xtract_crest(const double *data, const int N, const void *argv, double *result);
314 
322 int xtract_power(const double *data, const int N, const void *argv, double *result);
323 
324 /* Odd to even harmonic ratio */
332 int xtract_odd_even_ratio(const double *data, const int N, const void *argv, double *result);
333 
341 int xtract_sharpness(const double *data, const int N, const void *argv, double *result);
342 
350 int xtract_spectral_slope(const double *data, const int N, const void *argv, double *result);
351 
365 int xtract_lowest_value(const double *data, const int N, const void *argv, double *result);
366 
375 int xtract_highest_value(const double *data, const int N, const void *argv, double *result);
376 
385 int xtract_sum(const double *data, const int N, const void *argv, double *result);
386 
394 int xtract_hps(const double *data, const int N, const void *argv, double *result);
395 
408 int xtract_f0(const double *data, const int N, const void *argv, double *result);
409 
420 int xtract_failsafe_f0(const double *data, const int N, const void *argv, double *result);
421 
435 int xtract_wavelet_f0(const double *data, const int N, const void *argv, double *result);
436 
437 
447 int xtract_midicent(const double *data, const int N, const void *argv, double *result);
448 
449 
458 int xtract_nonzero_count(const double *data, const int N, const void *argv, double *result);
459 
471 int xtract_peak(const double *data, const int N, const void *argv, double *result);
472 
473 
476 #ifdef __cplusplus
477 }
478 #endif
479 
480 #endif
481 
482 
483 
int xtract_spectral_centroid(const double *data, const int N, const void *argv, double *result)
Extract the centroid of an input vector.
int xtract_hps(const double *data, const int N, const void *argv, double *result)
Extract the Pitch of an input vector using Harmonic Product Spectrum (HPS) analysis.
int xtract_irregularity_k(const double *data, const int N, const void *argv, double *result)
Calculate the Irregularity of an input vector using a method described by Krimphoff (1994) ...
int xtract_rolloff(const double *data, const int N, const void *argv, double *result)
Extract the spectral rolloff of an input vector using a method described by Bee Suan Ong (2005) ...
int xtract_crest(const double *data, const int N, const void *argv, double *result)
Extract the spectral crest of an input vector using a method described by Peeters (2003) ...
int xtract_smoothness(const double *data, const int N, const void *argv, double *result)
Extract the smoothness of an input vector using a method described by McAdams (1999) ...
int xtract_spectral_skewness(const double *data, const int N, const void *argv, double *result)
Extract the average deviation of an input spectrum.
int xtract_flatness_db(const double *data, const int N, const void *argv, double *result)
Extract the LOG spectral flatness measure of an input vector.
int xtract_standard_deviation(const double *data, const int N, const void *argv, double *result)
Extract the deviation of an input vector.
int xtract_skewness(const double *data, const int N, const void *argv, double *result)
Extract the skewness of an input vector.
int xtract_flatness(const double *data, const int N, const void *argv, double *result)
Extract the spectral flatness measure of an input vector, where the flatness measure (SFM) is defined...
int xtract_f0(const double *data, const int N, const void *argv, double *result)
Extract the fundamental frequency of an input vector.
int xtract_sharpness(const double *data, const int N, const void *argv, double *result)
Extract the Sharpness of an input vector.
int xtract_rms_amplitude(const double *data, const int N, const void *argv, double *result)
Extract the RMS amplitude of an input vector using a method described by Tae Hong Park (2000) ...
int xtract_failsafe_f0(const double *data, const int N, const void *argv, double *result)
Extract the fundamental frequency of an input vector.
int xtract_spread(const double *data, const int N, const void *argv, double *result)
Extract the spectral spread of an input vector using a method described by Casagrande(2005) ...
int xtract_mean(const double *data, const int N, const void *argv, double *result)
Extract the mean of an input vector.
int xtract_midicent(const double *data, const int N, const void *argv, double *result)
Convenience function to convert a frequency in Hertz to a "pitch" value in MIDI cents.
int xtract_lowest_value(const double *data, const int N, const void *argv, double *result)
Extract the value of the lowest value in an input vector.
int xtract_tristimulus_1(const double *data, const int N, const void *argv, double *result)
Calculate the Tristimulus of an input vector using a method described by Pollard and Jansson (1982) ...
int xtract_loudness(const double *data, const int N, const void *argv, double *result)
Extract the 'total loudness' of an input vector using a method described by Moore, Glasberg et al (2005)
int xtract_average_deviation(const double *data, const int N, const void *argv, double *result)
Extract the average deviation of an input vector.
int xtract_irregularity_j(const double *data, const int N, const void *argv, double *result)
Calculate the Irregularity of an input vector using a method described by Jensen (1999) ...
int xtract_noisiness(const double *data, const int N, const void *argv, double *result)
Extract the noisiness of an input vector using a method described by Tae Hong Park (2000) ...
int xtract_spectral_variance(const double *data, const int N, const void *argv, double *result)
Extract the variance of an input spectrum.
int xtract_zcr(const double *data, const int N, const void *argv, double *result)
Extract the zero crossing rate of an input vector.
int xtract_odd_even_ratio(const double *data, const int N, const void *argv, double *result)
Extract the Odd to even harmonic ratio of an input vector.
int xtract_peak(const double *data, const int N, const void *argv, double *result)
Return XTRACT_SUCCESS if the 'current' value is considered a peak.
int xtract_highest_value(const double *data, const int N, const void *argv, double *result)
Extract the value of the highest value in an input vector.
int xtract_spectral_inharmonicity(const double *data, const int N, const void *argv, double *result)
Extract the Inharmonicity of an input vector.
int xtract_variance(const double *data, const int N, const void *argv, double *result)
Extract the variance of an input vector.
int xtract_tonality(const double *data, const int N, const void *argv, double *result)
Extract the tonality factor of an input vector using a method described by Peeters 2003...
int xtract_sum(const double *data, const int N, const void *argv, double *result)
Extract the sum of the values in an input vector.
int xtract_spectral_slope(const double *data, const int N, const void *argv, double *result)
Extract the Slope of an input vector using a method described by Peeters(2003)
int xtract_spectral_standard_deviation(const double *data, const int N, const void *argv, double *result)
Extract the deviation of an input spectrum.
int xtract_spectral_kurtosis(const double *data, const int N, const void *argv, double *result)
Extract the kurtosis of an input spectrum.
int xtract_wavelet_f0(const double *data, const int N, const void *argv, double *result)
Extract the fundamental frequency of an input vector using wavelet-based method.
int xtract_power(const double *data, const int N, const void *argv, double *result)
Extract the Spectral Power of an input vector using a method described by Bee Suan Ong (2005) ...
int xtract_nonzero_count(const double *data, const int N, const void *argv, double *result)
Extract the number of non-zero elements in an input vector.
int xtract_kurtosis(const double *data, const int N, const void *argv, double *result)
Extract the kurtosis of an input vector.
int xtract_spectral_mean(const double *data, const int N, const void *argv, double *result)
Extract the mean of an input spectrum.