LibXtract 1.6.0
xtract_scalar.h
Go to the documentation of this file.
1/* Part of LibXtract
2 *
3 * SPDX-FileCopyrightText: 2006 Jamie Bullock
4 * SPDX-License-Identifier: Zlib
5 */
6
8
9#ifndef XTRACT_SCALAR_H
10#define XTRACT_SCALAR_H
11
12#ifdef __cplusplus
13extern "C"
14{
15#endif
16
24
32 int xtract_mean(const double *data, const int N, const void *argv, double *result);
33
41 int xtract_variance(const double *data, const int N, const void *argv, double *result);
42
50 int xtract_standard_deviation(const double *data, const int N, const void *argv, double *result);
51
59 int xtract_average_deviation(const double *data, const int N, const void *argv, double *result);
60
68 int xtract_skewness(const double *data, const int N, const void *argv, double *result);
69
77 int xtract_kurtosis(const double *data, const int N, const void *argv, double *result);
78
86 int xtract_spectral_mean(const double *data, const int N, const void *argv, double *result);
87
95 int xtract_spectral_variance(const double *data, const int N, const void *argv, double *result);
96
104 int xtract_spectral_standard_deviation(const double *data, const int N, const void *argv, double *result);
105
113 int xtract_spectral_skewness(const double *data, const int N, const void *argv, double *result);
114
122 int xtract_spectral_kurtosis(const double *data, const int N, const void *argv, double *result);
123
134 int xtract_spectral_centroid(const double *data, const int N, const void *argv, double *result);
135
143 int xtract_irregularity_k(const double *data, const int N, const void *argv, double *result);
144
152 int xtract_irregularity_j(const double *data, const int N, const void *argv, double *result);
153
161 int xtract_tristimulus_1(const double *data, const int N, const void *argv, double *result);
162
170 int xtract_tristimulus_2(const double *data, const int N, const void *argv, double *result);
171
179 int xtract_tristimulus_3(const double *data, const int N, const void *argv, double *result);
180
188 int xtract_smoothness(const double *data, const int N, const void *argv, double *result);
189
197 int xtract_spread(const double *data, const int N, const void *argv, double *result);
198
199 /* Zero crossing rate */
200
208 int xtract_zcr(const double *data, const int N, const void *argv, double *result);
209
217 int xtract_rolloff(const double *data, const int N, const void *argv, double *result);
218
229 int xtract_loudness(const double *data, const int N, const void *argv, double *result);
230
240 int xtract_flatness(const double *data, const int N, const void *argv, double *result);
241
252 int xtract_flatness_db(const double *data, const int N, const void *argv, double *result);
253
261 int xtract_tonality(const double *data, const int N, const void *argv, double *result);
262
270 int xtract_noisiness(const double *data, const int N, const void *argv, double *result);
271
279 int xtract_rms_amplitude(const double *data, const int N, const void *argv, double *result);
280
288 int xtract_spectral_inharmonicity(const double *data, const int N, const void *argv, double *result);
289
297 int xtract_crest(const double *data, const int N, const void *argv, double *result);
298
306 int xtract_power(const double *data, const int N, const void *argv, double *result);
307
308 /* Odd to even harmonic ratio */
323 int xtract_odd_even_ratio(const double *data, const int N, const void *argv, double *result);
324
337 int xtract_sharpness(const double *data, const int N, const void *argv, double *result);
338
346 int xtract_spectral_slope(const double *data, const int N, const void *argv, double *result);
347
356 int xtract_lowest_value(const double *data, const int N, const void *argv, double *result);
357
366 int xtract_highest_value(const double *data, const int N, const void *argv, double *result);
367
376 int xtract_sum(const double *data, const int N, const void *argv, double *result);
377
385 int xtract_hps(const double *data, const int N, const void *argv, double *result);
386
399 int xtract_f0(const double *data, const int N, const void *argv, double *result);
400
411 int xtract_failsafe_f0(const double *data, const int N, const void *argv, double *result);
412
426 int xtract_wavelet_f0(const double *data, const int N, const void *argv, double *result);
427
439 int xtract_mcleod_f0(const double *data, const int N, const void *argv, double *result);
440
449 int xtract_midicent(const double *data, const int N, const void *argv, double *result);
450
459 int xtract_nonzero_count(const double *data, const int N, const void *argv, double *result);
460
469 int xtract_peak(const double *data, const int N, const void *argv, double *result);
470
478 int xtract_median(const double *data, const int N, const void *argv, double *result);
479
487 int xtract_median_absolute_deviation(const double *data, const int N, const void *argv, double *result);
488
496 int xtract_hjorth_activity(const double *data, const int N, const void *argv, double *result);
497
505 int xtract_hjorth_mobility(const double *data, const int N, const void *argv, double *result);
506
514 int xtract_hjorth_complexity(const double *data, const int N, const void *argv, double *result);
515
523 int xtract_time_reversal_asymmetry(const double *data, const int N, const void *argv, double *result);
524
532 int xtract_spectral_entropy(const double *data, const int N, const void *argv, double *result);
533
541 int xtract_petrosian_fractal_dimension(const double *data, const int N, const void *argv, double *result);
542
550 int xtract_katz_fractal_dimension(const double *data, const int N, const void *argv, double *result);
551
559 int xtract_higuchi_fractal_dimension(const double *data, const int N, const void *argv, double *result);
560
568 int xtract_permutation_entropy(const double *data, const int N, const void *argv, double *result);
569
577 int xtract_lempel_ziv_complexity(const double *data, const int N, const void *argv, double *result);
578
586 int xtract_sample_entropy(const double *data, const int N, const void *argv, double *result);
587
595 int xtract_approximate_entropy(const double *data, const int N, const void *argv, double *result);
596
604 int xtract_periodicity(const double *data, const int N, const void *argv, double *result);
605
613 int xtract_signal_confidence(const double *data, const int N, const void *argv, double *result);
614
622 int xtract_decay_rate(const double *data, const int N, const void *argv, double *result);
623
631 int xtract_temporal_centroid(const double *data, const int N, const void *argv, double *result);
632
640 int xtract_max_position(const double *data, const int N, const void *argv, double *result);
641
649 int xtract_min_position(const double *data, const int N, const void *argv, double *result);
650
658 int xtract_peak_asymmetry(const double *data, const int N, const void *argv, double *result);
659
661
662#ifdef __cplusplus
663}
664#endif
665
666#endif
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_skewness(const double *data, const int N, const void *argv, double *result)
Extract the skewness of an input vector.
int xtract_hjorth_complexity(const double *data, const int N, const void *argv, double *result)
Extract the Hjorth complexity of an input vector: the ratio of the mobility of its first difference t...
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_standard_deviation(const double *data, const int N, const void *argv, double *result)
Extract the 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_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_median(const double *data, const int N, const void *argv, double *result)
Extract the median of an input vector.
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_sample_entropy(const double *data, const int N, const void *argv, double *result)
Extract the sample entropy of an input vector: the negative log of the fraction of its pairs of match...
int xtract_spectral_kurtosis(const double *data, const int N, const void *argv, double *result)
Extract the kurtosis of an input spectrum.
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_sharpness(const double *data, const int N, const void *argv, double *result)
Extract the Sharpness of an input vector.
int xtract_mcleod_f0(const double *data, const int N, const void *argv, double *result)
Extract the fundamental frequency using the McLeod Pitch Method.
int xtract_decay_rate(const double *data, const int N, const void *argv, double *result)
Extract the decay rate of an envelope: the least-squares slope of the natural log of its elements aga...
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_hjorth_activity(const double *data, const int N, const void *argv, double *result)
Extract the Hjorth activity of an input vector: its variance, with N as the divisor.
int xtract_tristimulus_1(const double *data, const int N, const void *argv, double *result)
Calculate the first order Tristimulus of an input vector using a method described by Pollard and Jans...
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_failsafe_f0(const double *data, const int N, const void *argv, double *result)
Extract the fundamental frequency of an input vector.
int xtract_signal_confidence(const double *data, const int N, const void *argv, double *result)
Extract the confidence of the McLeod pitch method's fundamental frequency estimate for an input vecto...
int xtract_periodicity(const double *data, const int N, const void *argv, double *result)
Extract the periodicity of an input vector: the height of the highest key maximum of its normalised s...
int xtract_petrosian_fractal_dimension(const double *data, const int N, const void *argv, double *result)
Extract the Petrosian fractal dimension of an input vector, from the number of sign changes in its fi...
int xtract_variance(const double *data, const int N, const void *argv, double *result)
Extract the variance of an input vector.
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_tristimulus_2(const double *data, const int N, const void *argv, double *result)
Calculate the second order Tristimulus of an input vector using a method described by Pollard and Jan...
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_median_absolute_deviation(const double *data, const int N, const void *argv, double *result)
Extract the median absolute deviation of an input vector.
int xtract_mean(const double *data, const int N, const void *argv, double *result)
Extract the mean of an input vector.
int xtract_f0(const double *data, const int N, const void *argv, double *result)
Extract the fundamental frequency of 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_hjorth_mobility(const double *data, const int N, const void *argv, double *result)
Extract the Hjorth mobility of an input vector: the square root of the ratio of the activity of its f...
int xtract_peak_asymmetry(const double *data, const int N, const void *argv, double *result)
Extract the peak asymmetry of an envelope: the energy from its maximum to the end over the energy fro...
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_lempel_ziv_complexity(const double *data, const int N, const void *argv, double *result)
Extract the Lempel-Ziv complexity of an input vector: the number of distinct phrases in its exhaustiv...
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_spectral_centroid(const double *data, const int N, const void *argv, double *result)
Extract the centroid of an input vector.
int xtract_max_position(const double *data, const int N, const void *argv, double *result)
Extract the position of the largest value in an input vector as a fraction of the length.
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_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_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_permutation_entropy(const double *data, const int N, const void *argv, double *result)
Extract the permutation entropy of an input vector: the Shannon entropy of the ordinal patterns of it...
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_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,...
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_approximate_entropy(const double *data, const int N, const void *argv, double *result)
Extract the approximate entropy of an input vector: the difference between the mean log fraction of t...
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_entropy(const double *data, const int N, const void *argv, double *result)
Extract the spectral entropy of a spectrum: the Shannon entropy of the spectrum normalised to sum to ...
int xtract_peak(const double *data, const int N, const void *argv, double *result)
Report whether the 'current' value is a peak.
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_tristimulus_3(const double *data, const int N, const void *argv, double *result)
Calculate the third order Tristimulus of an input vector using a method described by Pollard and Jans...
int xtract_temporal_centroid(const double *data, const int N, const void *argv, double *result)
Extract the temporal centroid of an envelope: the position of its centre of gravity,...
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_kurtosis(const double *data, const int N, const void *argv, double *result)
Extract the kurtosis 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_time_reversal_asymmetry(const double *data, const int N, const void *argv, double *result)
Extract the time reversal asymmetry statistic of an input vector: the mean over every position of the...
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_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_zcr(const double *data, const int N, const void *argv, double *result)
Extract the zero crossing rate of an input vector.
int xtract_spectral_variance(const double *data, const int N, const void *argv, double *result)
Extract the variance of an input spectrum.
int xtract_katz_fractal_dimension(const double *data, const int N, const void *argv, double *result)
Extract the Katz fractal dimension of an input vector, from the length of its path and its greatest d...
int xtract_spectral_skewness(const double *data, const int N, const void *argv, double *result)
Extract the skewness of an input spectrum.
int xtract_spectral_mean(const double *data, const int N, const void *argv, double *result)
Extract the mean of an input spectrum.
int xtract_min_position(const double *data, const int N, const void *argv, double *result)
Extract the position of the smallest value in an input vector as a fraction of the length.
int xtract_higuchi_fractal_dimension(const double *data, const int N, const void *argv, double *result)
Extract the Higuchi fractal dimension of an input vector: the slope of the log of its curve length ag...