cannam@30
|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
cannam@30
|
2
|
cannam@30
|
3 /*
|
cannam@30
|
4 Vamp feature extraction plugins using Paul Brossier's Aubio library.
|
cannam@30
|
5
|
cannam@30
|
6 Centre for Digital Music, Queen Mary, University of London.
|
cannam@30
|
7 This file copyright 2012 Queen Mary, University of London.
|
cannam@30
|
8
|
piem@112
|
9 This file is part of vamp-aubio-plugins.
|
piem@112
|
10
|
piem@112
|
11 vamp-aubio is free software: you can redistribute it and/or modify
|
piem@112
|
12 it under the terms of the GNU General Public License as published by
|
piem@112
|
13 the Free Software Foundation, either version 3 of the License, or
|
piem@112
|
14 (at your option) any later version.
|
piem@112
|
15
|
piem@112
|
16 vamp-aubio is distributed in the hope that it will be useful,
|
piem@112
|
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
|
piem@112
|
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
piem@112
|
19 GNU General Public License for more details.
|
piem@112
|
20
|
piem@112
|
21 You should have received a copy of the GNU General Public License
|
piem@112
|
22 along with aubio. If not, see <http://www.gnu.org/licenses/>.
|
cannam@30
|
23
|
cannam@30
|
24 */
|
cannam@30
|
25
|
cannam@30
|
26 #include "Types.h"
|
cannam@30
|
27
|
cannam@30
|
28 const char *getAubioNameForOnsetType(OnsetType t)
|
cannam@30
|
29 {
|
cannam@33
|
30 // In the same order as the enum elements in the header
|
cannam@33
|
31 static const char *const names[] = {
|
piem@145
|
32 "energy", "specdiff", "hfc", "complex", "phase", "kl", "mkl", "specflux", "default"
|
cannam@33
|
33 };
|
cannam@33
|
34 return names[(int)t];
|
cannam@30
|
35 }
|
cannam@30
|
36
|
piem@89
|
37 const char *getAubioNameForSpecDescType(SpecDescType t)
|
piem@89
|
38 {
|
piem@89
|
39 // In the same order as the enum elements in the header
|
piem@89
|
40 static const char *const names[] = {
|
piem@89
|
41 "specflux", "centroid", "spread", "skewness", "kurtosis", "slope", "decrease", "rolloff"
|
piem@89
|
42 };
|
piem@89
|
43 return names[(int)t];
|
piem@89
|
44 }
|
piem@89
|
45
|
cannam@30
|
46 const char *getAubioNameForPitchType(PitchType t)
|
cannam@30
|
47 {
|
cannam@33
|
48 // In the same order as the enum elements in the header
|
cannam@33
|
49 static const char *const names[] = {
|
cannam@33
|
50 "yin", "mcomb", "schmitt", "fcomb", "yinfft"
|
cannam@33
|
51 };
|
cannam@33
|
52 return names[(int)t];
|
cannam@30
|
53 }
|
cannam@30
|
54
|