Mercurial > hg > libxtract
comparison xtract/xtract_scalar.h @ 1:b8f2448f7207
Initial import
author | Jamie Bullock <jamie@postlude.co.uk> |
---|---|
date | Mon, 02 Oct 2006 14:18:15 +0000 |
parents | |
children | 819937ea6359 |
comparison
equal
deleted
inserted
replaced
0:28af86ad3cc1 | 1:b8f2448f7207 |
---|---|
1 /* libxtract feature extraction library | |
2 * | |
3 * Copyright (C) 2006 Jamie Bullock | |
4 * | |
5 * This program is free software; you can redistribute it and/or modify | |
6 * it under the terms of the GNU General Public License as published by | |
7 * the Free Software Foundation; either version 2 of the License, or | |
8 * (at your option) any later version. | |
9 * | |
10 * This program is distributed in the hope that it will be useful, | |
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 * GNU General Public License for more details. | |
14 * | |
15 * You should have received a copy of the GNU General Public License | |
16 * along with this program; if not, write to the Free Software | |
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, | |
18 * USA. | |
19 */ | |
20 | |
21 /* xtract_scalar.h: declares functions that extract a feature as a single value from an input vector */ | |
22 | |
23 #ifndef XTRACT_SCALAR | |
24 #define XTRACT_SCALAR | |
25 | |
26 #ifdef __cplusplus | |
27 extern "C" { | |
28 #endif | |
29 | |
30 | |
31 /* Statistical features */ | |
32 | |
33 int xtract_mean(float *data, int N, void *argv, float *result); | |
34 /* mean is passed in as arg */ | |
35 int xtract_variance(float *data, int N, void *argv, float *result); | |
36 /* variance is passed in as arg */ | |
37 int xtract_standard_deviation(float *data, int N, void *argv, float *result); | |
38 /* mean is passed in as arg */ | |
39 int xtract_average_deviation(float *data, int N, void *argv, float *result); | |
40 /* mean and standard deviation are passed in as arg */ | |
41 int xtract_skewness(float *data, int N, void *argv, float *result); | |
42 /* mean and standard deviation are passed in as arg */ | |
43 int xtract_kurtosis(float *data, int N, void *argv, float *result); | |
44 | |
45 /* Irregularity */ | |
46 | |
47 /* Krimphoff (1994) */ | |
48 int xtract_irregularity_k(float *data, int N, void *argv, float *result); | |
49 /* Jensen (1999) */ | |
50 int xtract_irregularity_j(float *data, int N, void *argv, float *result); | |
51 | |
52 /* Tristimulus */ | |
53 | |
54 /* Pollard and Jansson (1982) */ | |
55 int xtract_tristimulus_1(float *data, int N, void *argv, float *result); | |
56 int xtract_tristimulus_2(float *data, int N, void *argv, float *result); | |
57 int xtract_tristimulus_3(float *data, int N, void *argv, float *result); | |
58 | |
59 /* Smoothness */ | |
60 | |
61 /*McAdams (1999)*/ | |
62 int xtract_smoothness(float *data, int N, void *argv, float *result); | |
63 | |
64 /* Spectral Spread */ | |
65 | |
66 /* Casagrande 2005 */ | |
67 | |
68 int xtract_spread(float *data, int N, void *argv, float *result); | |
69 | |
70 /* Zero crossing rate */ | |
71 | |
72 int xtract_zcr(float *data, int N, void *argv, float *result); | |
73 | |
74 /* Rolloff */ | |
75 | |
76 /* Bee Suan Ong (2005) */ | |
77 /* Threshold is the percentile at which the rolloff is determined */ | |
78 | |
79 int xtract_rolloff(float *data, int N, void *argv, float *result); | |
80 | |
81 /* Loudness */ | |
82 /* A set of BARK_BANDS bark coefficients must be passed in, the loudness is calculated approximately according to Moore, Glasberg et al, 1997 */ | |
83 | |
84 int xtract_loudness(float *data, int N, void *argv, float *result); | |
85 | |
86 /* Spectral Flatness Measure */ | |
87 /* Tristan Jehan (2005) */ | |
88 | |
89 int xtract_flatness(float *data, int N, void *argv, float *result); | |
90 | |
91 /* Tonality Factor */ | |
92 /* Tristan Jehan (2005) */ | |
93 | |
94 int xtract_tonality(float *data, int N, void *argv, float *result); | |
95 | |
96 /* Noisiness */ | |
97 /* Tae Hong Park (2000) */ | |
98 | |
99 int xtract_noisiness(float *data, int N, void *argv, float *result); | |
100 | |
101 /* RMS amplitude */ | |
102 /* Tae Hong Park (2000) */ | |
103 | |
104 int xtract_rms_amplitude(float *data, int N, void *argv, float *result); | |
105 | |
106 /* Inharmonicity */ | |
107 | |
108 int xtract_inharmonicity(float *data, int N, void *argv, float *result); | |
109 | |
110 /* Spectral Crest */ | |
111 /* Peeters (2003) */ | |
112 int xtract_crest(float *data, int N, void *argv, float *result); | |
113 | |
114 /* Spectral Power */ | |
115 /* Bee Suan Ong (2005) */ | |
116 int xtract_power(float *data, int N, void *argv, float *result); | |
117 | |
118 /* Odd to even harmonic ratio */ | |
119 | |
120 int xtract_odd_even_ratio(float *data, int N, void *argv, float *result); | |
121 | |
122 /* Sharpness */ | |
123 | |
124 int xtract_sharpness(float *data, int N, void *argv, float *result); | |
125 | |
126 /* Slope */ | |
127 int xtract_slope(float *data, int N, void *argv, float *result); | |
128 | |
129 /* F0 */ | |
130 /*This method takes a guess which can come from taking the ZCR of an autocorrelation function, and then finds the spectral peak that most closely matches the gess */ | |
131 int xtract_f0(float *data, int N, void *argv, float *result); | |
132 | |
133 /* Pitch */ | |
134 /* Pitch via HPS analysis */ | |
135 int xtract_hps(float *data, int N, void *argv, float *result); | |
136 | |
137 #ifdef __cplusplus | |
138 } | |
139 #endif | |
140 | |
141 #endif | |
142 | |
143 | |
144 |