view plugins/Types.cpp @ 110:b147d06397bc

plugins/{MelEnergy,Mfcc,SpecDesc}.{cpp,h}: change package name to vamp-aubio-plugins
author Paul Brossier <piem@piem.org>
date Sat, 31 Jan 2015 16:43:22 +0100
parents e9eb5753796b
children f80b207ccd15
line wrap: on
line source
/* -*- 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)
{
    // In the same order as the enum elements in the header
    static const char *const names[] = {
        "energy", "specdiff", "hfc", "complex", "phase", "kl", "mkl", "specflux"
    };
    return names[(int)t];
}

const char *getAubioNameForSpecDescType(SpecDescType t)
{
    // In the same order as the enum elements in the header
    static const char *const names[] = {
        "specflux", "centroid", "spread", "skewness", "kurtosis", "slope", "decrease", "rolloff"
    };
    return names[(int)t];
}

const char *getAubioNameForPitchType(PitchType t)
{
    // In the same order as the enum elements in the header
    static const char *const names[] = {
        "yin", "mcomb", "schmitt", "fcomb", "yinfft"
    };
    return names[(int)t];
}