Mercurial > hg > vamp-aubio-plugins
annotate plugins/Types.cpp @ 40:c21d294cb5ca
add aubio subrepo
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Tue, 04 Dec 2012 17:27:27 +0000 |
parents | a2301c902711 |
children | e9eb5753796b |
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 |
cannam@30 | 28 const char *getAubioNameForPitchType(PitchType 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[] = { |
cannam@33 | 32 "yin", "mcomb", "schmitt", "fcomb", "yinfft" |
cannam@33 | 33 }; |
cannam@33 | 34 return names[(int)t]; |
cannam@30 | 35 } |
cannam@30 | 36 |