annotate plugins/Types.cpp @ 89:e9eb5753796b

plugins/SpecDesc.{cpp,h}: added first draft for SpecDesc
author Paul Brossier <piem@piem.org>
date Fri, 30 Jan 2015 18:21:15 +0100
parents a2301c902711
children f80b207ccd15
rev   line source
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
cannam@30 9 This program is free software; you can redistribute it and/or
cannam@30 10 modify it under the terms of the GNU General Public License as
cannam@30 11 published by the Free Software Foundation; either version 2 of the
cannam@30 12 License, or (at your option) any later version. See the file
cannam@30 13 COPYING included with this distribution for more information.
cannam@30 14
cannam@30 15 */
cannam@30 16
cannam@30 17 #include "Types.h"
cannam@30 18
cannam@30 19 const char *getAubioNameForOnsetType(OnsetType t)
cannam@30 20 {
cannam@33 21 // In the same order as the enum elements in the header
cannam@33 22 static const char *const names[] = {
cannam@33 23 "energy", "specdiff", "hfc", "complex", "phase", "kl", "mkl", "specflux"
cannam@33 24 };
cannam@33 25 return names[(int)t];
cannam@30 26 }
cannam@30 27
piem@89 28 const char *getAubioNameForSpecDescType(SpecDescType t)
piem@89 29 {
piem@89 30 // In the same order as the enum elements in the header
piem@89 31 static const char *const names[] = {
piem@89 32 "specflux", "centroid", "spread", "skewness", "kurtosis", "slope", "decrease", "rolloff"
piem@89 33 };
piem@89 34 return names[(int)t];
piem@89 35 }
piem@89 36
cannam@30 37 const char *getAubioNameForPitchType(PitchType t)
cannam@30 38 {
cannam@33 39 // In the same order as the enum elements in the header
cannam@33 40 static const char *const names[] = {
cannam@33 41 "yin", "mcomb", "schmitt", "fcomb", "yinfft"
cannam@33 42 };
cannam@33 43 return names[(int)t];
cannam@30 44 }
cannam@30 45