Mercurial > hg > vamp-aubio-plugins
diff plugins/Types.cpp @ 30:7fd8f7a0b088
Start overhaul for (current git, presumably later v0.4.0) aubio API
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Mon, 09 Jul 2012 15:10:35 +0100 |
parents | |
children | a2301c902711 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/Types.cpp Mon Jul 09 15:10:35 2012 +0100 @@ -0,0 +1,43 @@ +/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ + +/* + Vamp feature extraction plugins using Paul Brossier's Aubio library. + + Centre for Digital Music, Queen Mary, University of London. + This file copyright 2012 Queen Mary, University of London. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. See the file + COPYING included with this distribution for more information. + +*/ + +#include "Types.h" + +const char *getAubioNameForOnsetType(OnsetType t) +{ + switch (t) { + case OnsetEnergy: return "energy"; + case OnsetSpecDiff: return "specdiff"; + case OnsetHFC: return "hfc"; + case OnsetComplex: return "complex"; + case OnsetPhase: return "phase"; + case OnsetMKL: return "mkl"; + case OnsetKL: return "kl"; + case OnsetSpecFlux: return "specflux"; + } +} + +const char *getAubioNameForPitchType(PitchType t) +{ + switch (t) { + case PitchMComb: return "mcomb"; + case PitchYinFFT: return "yinfft"; + case PitchYin: return "yin"; + case PitchSchmitt: return "schmitt"; + case PitchFComb: return "fcomb"; + } +} +