|
LibXtract 0.6.2
|
Functions | |
| void | test (void) |
| int | xtract_mean (const float *data, const int N, const void *argv, float *result) |
| Extract the mean of an input vector. | |
| int | xtract_variance (const float *data, const int N, const void *argv, float *result) |
| Extract the variance of an input vector. | |
| int | xtract_standard_deviation (const float *data, const int N, const void *argv, float *result) |
| Extract the deviation of an input vector. | |
| int | xtract_average_deviation (const float *data, const int N, const void *argv, float *result) |
| Extract the average deviation of an input vector. | |
| int | xtract_skewness (const float *data, const int N, const void *argv, float *result) |
| Extract the skewness of an input vector. | |
| int | xtract_kurtosis (const float *data, const int N, const void *argv, float *result) |
| Extract the kurtosis of an input vector. | |
| int | xtract_spectral_mean (const float *data, const int N, const void *argv, float *result) |
| Extract the mean of an input spectrum. | |
| int | xtract_spectral_variance (const float *data, const int N, const void *argv, float *result) |
| Extract the variance of an input spectrum. | |
| int | xtract_spectral_standard_deviation (const float *data, const int N, const void *argv, float *result) |
| Extract the deviation of an input spectrum. | |
| int | xtract_spectral_average_deviation (const float *data, const int N, const void *argv, float *result) |
| Extract the average deviation of an input spectrum. | |
| int | xtract_spectral_skewness (const float *data, const int N, const void *argv, float *result) |
| Extract the skewness of an input spectrum. | |
| int | xtract_spectral_kurtosis (const float *data, const int N, const void *argv, float *result) |
| Extract the kurtosis of an input spectrum. | |
| int | xtract_spectral_centroid (const float *data, const int N, const void *argv, float *result) |
| Extract the centroid of an input vector. | |
| int | xtract_irregularity_k (const float *data, const int N, const void *argv, float *result) |
| Calculate the Irregularity of an input vector using a method described by Krimphoff (1994). | |
| int | xtract_irregularity_j (const float *data, const int N, const void *argv, float *result) |
| Calculate the Irregularity of an input vector using a method described by Jensen (1999). | |
| int | xtract_tristimulus_1 (const float *data, const int N, const void *argv, float *result) |
| Calculate the Tristimulus of an input vector using a method described by Pollard and Jansson (1982). | |
| int | xtract_tristimulus_2 (const float *data, const int N, const void *argv, float *result) |
| int | xtract_tristimulus_3 (const float *data, const int N, const void *argv, float *result) |
| int | xtract_smoothness (const float *data, const int N, const void *argv, float *result) |
| Extract the smoothness of an input vector using a method described by McAdams (1999). | |
| int | xtract_spread (const float *data, const int N, const void *argv, float *result) |
| Extract the spectral spread of an input vector using a method described by Casagrande(2005). | |
| int | xtract_zcr (const float *data, const int N, const void *argv, float *result) |
| Extract the zero crossing rate of an input vector. | |
| int | xtract_rolloff (const float *data, const int N, const void *argv, float *result) |
| Extract the spectral rolloff of an input vector using a method described by Bee Suan Ong (2005). | |
| int | xtract_loudness (const float *data, const int N, const void *argv, float *result) |
| Extract the 'total loudness' of an input vector using a method described by Moore, Glasberg et al (2005). | |
| int | xtract_flatness (const float *data, const int N, const void *argv, float *result) |
| Extract the spectral flatness measure of an input vector, where the flatness measure (SFM) is defined as the ratio of the geometric mean to the arithmetic mean of a magnitude spectrum. | |
| int | xtract_flatness_db (const float *data, const int N, const void *argv, float *result) |
| Extract the LOG spectral flatness measure of an input vector. | |
| int | xtract_tonality (const float *data, const int N, const void *argv, float *result) |
| Extract the tonality factor of an input vector using a method described by Peeters 2003. | |
| int | xtract_noisiness (const float *data, const int N, const void *argv, float *result) |
| Extract the noisiness of an input vector using a method described by Tae Hong Park (2000). | |
| int | xtract_rms_amplitude (const float *data, const int N, const void *argv, float *result) |
| Extract the RMS amplitude of an input vector using a method described by Tae Hong Park (2000). | |
| int | xtract_spectral_inharmonicity (const float *data, const int N, const void *argv, float *result) |
| Extract the Inharmonicity of an input vector. | |
| int | xtract_crest (const float *data, const int N, const void *argv, float *result) |
| Extract the spectral crest of an input vector using a method described by Peeters (2003). | |
| int | xtract_power (const float *data, const int N, const void *argv, float *result) |
| Extract the Spectral Power of an input vector using a method described by Bee Suan Ong (2005). | |
| int | xtract_odd_even_ratio (const float *data, const int N, const void *argv, float *result) |
| Extract the Odd to even harmonic ratio of an input vector. | |
| int | xtract_sharpness (const float *data, const int N, const void *argv, float *result) |
| Extract the Sharpness of an input vector. | |
| int | xtract_spectral_slope (const float *data, const int N, const void *argv, float *result) |
| Extract the Slope of an input vector using a method described by Peeters(2003). | |
| int | xtract_lowest_value (const float *data, const int N, const void *argv, float *result) |
| Extract the value of the lowest value in an input vector. | |
| int | xtract_highest_value (const float *data, const int N, const void *argv, float *result) |
| Extract the value of the highest value in an input vector. | |
| int | xtract_sum (const float *data, const int N, const void *argv, float *result) |
| Extract the sum of the values in an input vector. | |
| int | xtract_hps (const float *data, const int N, const void *argv, float *result) |
| Extract the Pitch of an input vector using Harmonic Product Spectrum (HPS) analysis. | |
| int | xtract_f0 (const float *data, const int N, const void *argv, float *result) |
| Extract the fundamental frequency of an input vector. | |
| int | xtract_failsafe_f0 (const float *data, const int N, const void *argv, float *result) |
| Extract the fundamental frequency of an input vector. | |
| int | xtract_nonzero_count (const float *data, const int N, const void *argv, float *result) |
| Extract the number of non-zero elements in an input vector. | |
Functions that extract a feature as a single value from an input vector
| int xtract_average_deviation | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the average deviation of an input vector.
| *data | a pointer to the first element in an array of floats |
| N | the number of elements to be considered |
| *argv | a pointer to a float representing the mean of the input vector |
| *result | the average deviation of N values from the array pointed to by *data |
References xtract_average_deviation().
Referenced by xtract_average_deviation().
| int xtract_crest | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the spectral crest of an input vector using a method described by Peeters (2003).
| *data | a pointer to NULL |
| N | not used |
| *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 |
| *result | the spectral crest of N values from the array pointed to by *data |
References xtract_crest().
Referenced by xtract_crest().
| int xtract_f0 | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the fundamental frequency of an input vector.
| *data | a pointer to the first element in an array of floats representing an audio vector |
| N | the number of elements to be considered |
| *argv | a pointer to a float representing the audio sample rate |
| *result | the pitch of N values from the array pointed to by *data |
This algorithm is based on the AMDF, with peak and centre clipping. It would benefit from further improvements to improve noise robustness and overall efficiency
It is based on suggestion by Robert Bristow-Johnson in a discussion on the comp.dsp mailing list, subject "Reference implementation of pitch detection"
References xtract_f0().
Referenced by xtract_f0().
| int xtract_failsafe_f0 | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the fundamental frequency of an input vector.
| *data | a pointer to the first element in an array of floats representing an audio vector |
| N | the number of elements to be considered |
| *argv | a pointer to a float representing the audio sample rate |
| *result | the pitch of N values from the array pointed to by *data |
This function wraps xtract_f0, but provides the frequency of the lowest partial in the peak spectrum if f0 can't be found.
References xtract_failsafe_f0().
Referenced by xtract_failsafe_f0().
| int xtract_flatness | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the spectral flatness measure of an input vector, where the flatness measure (SFM) is defined as the ratio of the geometric mean to the arithmetic mean of a magnitude spectrum.
| *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(). Alternatively the magnitudes from a number of 'subbands' can be used by using *result from xtract_bands(). |
| N | the number of *data array elements to be considered |
| *argv | a pointer to NULL |
| *result | the flatness of N values from the array pointed to by *data |
References xtract_flatness().
Referenced by xtract_flatness().
| int xtract_flatness_db | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the LOG spectral flatness measure of an input vector.
| *data | a pointer to NULL. |
| N | not used - can safely be set to 0. |
| *argv | a pointer to a float represnting spectral flatness. |
| *result | the LOG spectral flatness of N values from the array pointed to by *data |
flatness_db = 10 * log10(flatness)
References xtract_flatness_db().
Referenced by xtract_flatness_db().
| int xtract_highest_value | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the value of the highest value in an input vector.
| *data | a pointer to the first element in an array of floats |
| N | the number of elements to be considered |
| *argv | a pointer to NULL. |
| *result | a pointer to a value representing the highest component in *data. |
References xtract_highest_value().
Referenced by xtract_highest_value().
| int xtract_hps | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the Pitch of an input vector using Harmonic Product Spectrum (HPS) analysis.
| *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(). |
| N | the number of elements to be considered |
| *argv | a pointer to NULL |
| *result | the pitch of N values from the array pointed to by *data |
References xtract_hps().
Referenced by xtract_hps().
| int xtract_irregularity_j | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Calculate the Irregularity of an input vector using a method described by Jensen (1999).
| *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(). |
| N | the number of elements to be considered |
| *argv | a pointer to NULL |
| *result | the irregularity of N values from the array pointed to by *data |
References xtract_irregularity_j().
Referenced by xtract_irregularity_j().
| int xtract_irregularity_k | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Calculate the Irregularity of an input vector using a method described by Krimphoff (1994).
| *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(). |
| N | the number of elements to be considered |
| *argv | a pointer to NULL |
| *result | the irregularity of N values from the array pointed to by *data |
References xtract_irregularity_k().
Referenced by xtract_irregularity_k().
| int xtract_kurtosis | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the kurtosis of an input vector.
| *data | a pointer to the first element in an array of floats |
| N | the number of elements to be considered |
| *argv | a pointer to an array of values representing the mean and standard deviation of the input vector |
| *result | the kurtosis of N values from the array pointed to by *data |
References xtract_kurtosis().
Referenced by xtract_kurtosis().
| int xtract_loudness | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the 'total loudness' of an input vector using a method described by Moore, Glasberg et al (2005).
| *data | a pointer to the first element in an array of floats representing a set of BARK_BANDS bark coefficients |
| N | the number of coefficients to be considered |
| *argv | a pointer to NULL |
| *result | the total loudness of N values from the array pointed to by *data |
Note: if N = 1, the 'specific loudness' of the bark band pointed to by *data will be given by *result
References xtract_loudness().
Referenced by xtract_loudness().
| int xtract_lowest_value | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the value of the lowest value in an input vector.
| *data | a pointer to the first element in an array of floats |
| N | the number of elements to be considered |
| *argv | a pointer to a float representing the lower limit for the search. i.e. (*result > *argv) returns 1. |
| *result | a pointer to a value representing the lowest component in *data that falls above a given threshold. |
References xtract_lowest_value().
Referenced by xtract_lowest_value().
| int xtract_mean | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the mean of an input vector.
| *data | a pointer to the first element |
| N | the number of array elements to be considered |
| *argv | a pointer to NULL |
| *result | the mean of N values from the array pointed to by *data |
References xtract_mean().
Referenced by xtract_mean().
| int xtract_noisiness | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the noisiness of an input vector using a method described by Tae Hong Park (2000).
| *data | a pointer to NULL |
| N | |
| *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 |
| *result | the noisiness coefficient as calculated from argv |
References xtract_noisiness().
Referenced by xtract_noisiness().
| int xtract_nonzero_count | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the number of non-zero elements in an input vector.
| *data | a pointer to the first element in an array of floats |
| N | the number of elements to be considered |
| *argv | not used |
| *result | the number of non-zero elements in the array pointed to by *data |
References xtract_nonzero_count().
Referenced by xtract_nonzero_count().
| int xtract_odd_even_ratio | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the Odd to even harmonic ratio of an input vector.
| *data | a pointer to the first element in an array of floats representing the amplitudes of the harmonic spectrum of an audio vector. It is sufficient to pass in a pointer to the first half of the array pointed to by *result from xtract_harmonic_spectrum(). |
| 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 amplitudes of the peaks. |
| *argv | a pointer to NULL |
| *result | the even/odd harmonic ratio of N values from the array pointed to by *data |
References xtract_odd_even_ratio().
Referenced by xtract_odd_even_ratio().
| int xtract_power | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the Spectral Power of an input vector using a method described by Bee Suan Ong (2005).
| *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(). |
| N | the number of elements to be considered |
| *argv | a pointer to NULL |
| *result | the spectral power of N values from the array pointed to by *data |
References xtract_power().
Referenced by xtract_power().
| int xtract_rms_amplitude | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the RMS amplitude of an input vector using a method described by Tae Hong Park (2000).
| *data | a pointer to the first element in an array of floats |
| N | the number of elements to be considered |
| *argv | a pointer to NULL |
| *result | the RMS amplitude of N values from the array pointed to by *data |
References xtract_rms_amplitude().
Referenced by xtract_rms_amplitude().
| int xtract_rolloff | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the spectral rolloff of an input vector using a method described by Bee Suan Ong (2005).
| *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(). |
| N | the number of elements to be considered |
| *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 |
| *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. |
References xtract_rolloff().
Referenced by xtract_rolloff().
| int xtract_sharpness | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the Sharpness of an input vector.
| *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(). |
| N | the number of elements to be considered |
| *argv | a pointer to NULL |
| *result | the Sharpness of N values from the array pointed to by *data |
References xtract_sharpness().
Referenced by xtract_sharpness().
| int xtract_skewness | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the skewness of an input vector.
| *data | a pointer to the first element in an array of floats |
| N | the number of elements to be considered |
| *argv | a pointer to an array of floats representing the mean and standard deviation of the input vector |
| *result | the skewness of N values from the array pointed to by *data |
References xtract_skewness().
Referenced by xtract_skewness().
| int xtract_smoothness | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the smoothness of an input vector using a method described by McAdams (1999).
| *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(). |
| N | the number of elements to be considered |
| *argv | a pointer to the first element of an array of integers containing the lower bound, upper bound, and pre-scaling factor, whereby array data in the range lower < n < upper will be pre-scaled by p before processing. |
| *result | the smoothness of N values from the array pointed to by *data |
References xtract_smoothness().
Referenced by xtract_smoothness().
| int xtract_spectral_average_deviation | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the average deviation of an input spectrum.
| *data | a pointer to the first element in an array of floats representing the spectrum of an audio vector, (e.g. the array pointed to by *result from xtract_spectrum(), xtract_peak_spectrum() or xtract_harmonic_spectrum()). |
| N | the size of the array pointed to by *data |
| *argv | a pointer to a float representing the spectral mean of the input spectrum |
| *result | the average deviation of the spectrum pointed to by *data |
References xtract_spectral_average_deviation().
Referenced by xtract_spectral_average_deviation().
| int xtract_spectral_centroid | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the centroid of an input vector.
| *data | a pointer to the first element in an array of floats representing the spectrum of an audio vector, (e.g. the array pointed to by *result from xtract_spectrum(), xtract_peak_spectrum() or xtract_harmonic_spectrum()). |
| N | the number of elements to be considered |
| *argv | a pointer to NULL |
| *result | the centroid of the values pointed to by *data |
Note: for a more 'accurate' result *result from xtract_peak_spectrum() can be passed in. This gives the interpolated peak frequency locations.
References xtract_spectral_centroid().
Referenced by xtract_spectral_centroid().
| int xtract_spectral_inharmonicity | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the Inharmonicity of an input vector.
| *data | a pointer to the first element in an array of floats represeting a magnitude peak spectrum of size N/2, and a frequency spectrum of size N/2 (This is the output format of xtract_peak_spectrum()) |
| N | the number of elements to be considered |
| *argv | a pointer to a float representing the fundamental frequency of the input vector. |
| *result | the inharmonicity of N values from the array pointed to by *data |
References xtract_spectral_inharmonicity().
Referenced by xtract_spectral_inharmonicity().
| int xtract_spectral_kurtosis | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the kurtosis of an input spectrum.
| *data | a pointer to the first element in an array of floats representing the spectrum of an audio vector, (e.g. the array pointed to by *result from xtract_spectrum(), xtract_peak_spectrum() or xtract_harmonic_spectrum()). |
| N | the size of the array pointed to by *data |
| *argv | a pointer to an array of values representing the spectral mean and spectral standard deviation of the input spectrum |
| *result | the kurtosis of the spectrum pointed to by *data |
References xtract_spectral_kurtosis().
Referenced by xtract_spectral_kurtosis().
| int xtract_spectral_mean | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the mean of an input spectrum.
| *data | a pointer to the first element in an array of floats representing the spectrum of an audio vector, (e.g. the array pointed to by *result from xtract_spectrum(), xtract_peak_spectrum() or xtract_harmonic_spectrum()). |
| N | the size of the array pointed to by *data |
| *argv | a pointer to NULL |
| *result | the mean of the spectrum pointed to by *data |
References xtract_spectral_mean().
Referenced by xtract_spectral_mean().
| int xtract_spectral_skewness | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the skewness of an input spectrum.
| *data | a pointer to the first element in an array of floats representing the spectrum of an audio vector, (e.g. the array pointed to by *result from xtract_spectrum(), xtract_peak_spectrum() or xtract_harmonic_spectrum()). |
| N | the size of the array pointed to by *data |
| *argv | a pointer to an array of floats representing the spectral mean and spectral standard deviation of the input spectrum |
| *result | the skewness of the spectrum pointed to by *data |
References xtract_spectral_skewness().
Referenced by xtract_spectral_skewness().
| int xtract_spectral_slope | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the Slope of an input vector using a method described by Peeters(2003).
| *data | a pointer to the first element in an array of floats representing the spectrum of an audio vector, (e.g. the array pointed to by *result from xtract_spectrum(), xtract_peak_spectrum() or xtract_harmonic_spectrum()). |
| N | the number of elements to be considered |
| *argv | a pointer to NULL |
| *result | the Slope of N values from the array pointed to by *data |
References xtract_spectral_slope().
Referenced by xtract_spectral_slope().
| int xtract_spectral_standard_deviation | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the deviation of an input spectrum.
| *data | a pointer to the first element in an array of floats representing the spectrum of an audio vector, (e.g. the array pointed to by *result from xtract_spectrum(), xtract_peak_spectrum() or xtract_harmonic_spectrum()). |
| N | the size of the array pointed to by *data |
| *argv | a pointer to a float representing the spectral variance of the input spectrum |
| *result | the deviation of the spectrum pointed to by *data |
References xtract_spectral_standard_deviation().
Referenced by xtract_spectral_standard_deviation().
| int xtract_spectral_variance | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the variance of an input spectrum.
| *data | a pointer to the first element in an array of floats representing the spectrum of an audio vector, (e.g. the array pointed to by *result from xtract_spectrum(), xtract_peak_spectrum() or xtract_harmonic_spectrum()). |
| N | the number of elements to be considered |
| N | the size of the array pointed to by *data |
| *argv | a pointer to a float representing the spectral mean of the input spectrum |
| *result | the variance of the spectrum pointed to by *data |
References xtract_spectral_variance().
Referenced by xtract_spectral_variance().
| int xtract_spread | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the spectral spread of an input vector using a method described by Casagrande(2005).
| *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(). |
| N | the number of elements to be considered |
| *argv | a pointer to a float corresponding to the spectral centroid |
| *result | the spectral spread of N values from the array pointed to by *data |
References xtract_spread().
Referenced by xtract_spread().
| int xtract_standard_deviation | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the deviation of an input vector.
| *data | a pointer to the first element in an array of floats |
| N | the number of elements to be considered |
| *argv | a pointer to a float representing the variance of the input vector |
| *result | the deviation of N values from the array pointed to by *data |
References xtract_standard_deviation().
Referenced by xtract_standard_deviation().
| int xtract_sum | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the sum of the values in an input vector.
| *data | a pointer to the first element in an array of floats |
| N | the number of elements to be considered |
| *argv | a pointer to NULL. |
| *result | a pointer to a value representing the sum of all of the values pointed to by *data. |
References xtract_sum().
Referenced by xtract_sum().
| int xtract_tonality | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the tonality factor of an input vector using a method described by Peeters 2003.
| *data | a pointer to NULL. |
| N | not used - can safely be set to 0. |
| *argv | a pointer to the LOG spectral flatness measure of an audio vector (e.g. the output from xtract_flatness_db) |
| *result | the tonality factor of N values from the array pointed to by *data |
References xtract_tonality().
Referenced by xtract_tonality().
| int xtract_tristimulus_1 | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Calculate the Tristimulus of an input vector using a method described by Pollard and Jansson (1982).
| *data | a pointer to the first element in an array of floats representing the magnitude coefficients of the harmonic spectrum of an audio vector e.g. a pointer to the first half of the array pointed to by *result from xtract_harmonics(). The amplitudes of the peak spectrum (e.g. *result from xtract_peak_spectrum()) can be used if one wishes to consider all partials not just harmonics. |
| N | the number of elements to be considered |
| *argv | a pointer to NULL |
| *result | the tristimulus of N values from the array pointed to by *data |
These three functions provide the first, second and third order tristimulus formulae
References xtract_tristimulus_1().
Referenced by xtract_tristimulus_1().
| int xtract_variance | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the variance of an input vector.
| *data | a pointer to the first element in an array of floats |
| N | the number of elements to be considered |
| *argv | a pointer to a float representing the mean of the input vector |
| *result | the variance of N values from the array pointed to by *data |
References xtract_variance().
Referenced by xtract_variance().
| int xtract_zcr | ( | const float * | data, |
| const int | N, | ||
| const void * | argv, | ||
| float * | result ) |
Extract the zero crossing rate of an input vector.
| *data | a pointer to the first element in an array of floats |
| N | the number of elements to be considered |
| *argv | a pointer to NULL |
| *result | the zero crossing rate of N values from the array pointed to by *data |
References xtract_zcr().
Referenced by xtract_zcr().