cannam@30: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ cannam@30: cannam@30: /* cannam@30: Vamp feature extraction plugins using Paul Brossier's Aubio library. cannam@30: cannam@30: Centre for Digital Music, Queen Mary, University of London. cannam@30: This file copyright 2012 Queen Mary, University of London. cannam@30: piem@112: This file is part of vamp-aubio-plugins. piem@112: piem@112: vamp-aubio is free software: you can redistribute it and/or modify piem@112: it under the terms of the GNU General Public License as published by piem@112: the Free Software Foundation, either version 3 of the License, or piem@112: (at your option) any later version. piem@112: piem@112: vamp-aubio is distributed in the hope that it will be useful, piem@112: but WITHOUT ANY WARRANTY; without even the implied warranty of piem@112: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the piem@112: GNU General Public License for more details. piem@112: piem@112: You should have received a copy of the GNU General Public License piem@112: along with aubio. If not, see . cannam@30: cannam@30: */ cannam@30: cannam@30: #include "Types.h" cannam@30: cannam@30: const char *getAubioNameForOnsetType(OnsetType t) cannam@30: { cannam@33: // In the same order as the enum elements in the header cannam@33: static const char *const names[] = { piem@145: "energy", "specdiff", "hfc", "complex", "phase", "kl", "mkl", "specflux", "default" cannam@33: }; cannam@33: return names[(int)t]; cannam@30: } cannam@30: piem@89: const char *getAubioNameForSpecDescType(SpecDescType t) piem@89: { piem@89: // In the same order as the enum elements in the header piem@89: static const char *const names[] = { piem@89: "specflux", "centroid", "spread", "skewness", "kurtosis", "slope", "decrease", "rolloff" piem@89: }; piem@89: return names[(int)t]; piem@89: } piem@89: cannam@30: const char *getAubioNameForPitchType(PitchType t) cannam@30: { cannam@33: // In the same order as the enum elements in the header cannam@33: static const char *const names[] = { cannam@33: "yin", "mcomb", "schmitt", "fcomb", "yinfft" cannam@33: }; cannam@33: return names[(int)t]; cannam@30: } cannam@30: