Mercurial > hg > vamp-aubio-plugins
changeset 145:4e37f52e78df
plugins/Onset.cpp: add default mode
author | Paul Brossier <piem@piem.org> |
---|---|
date | Fri, 22 Jul 2016 15:41:19 +0200 |
parents | 5ca1c610ca41 |
children | c89b3954de00 |
files | plugins/Onset.cpp plugins/Types.cpp plugins/Types.h |
diffstat | 3 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/Onset.cpp Fri Jul 22 15:33:16 2016 +0200 +++ b/plugins/Onset.cpp Fri Jul 22 15:41:19 2016 +0200 @@ -36,7 +36,7 @@ m_ibuf(0), m_onset(0), m_onsetdet(0), - m_onsettype(OnsetComplex), + m_onsettype(OnsetDefault), m_threshold(0.3), m_silence(-70), m_minioi(4) @@ -149,7 +149,7 @@ desc.description = "Type of onset detection function to use"; desc.minValue = 0; desc.maxValue = 7; - desc.defaultValue = (int)OnsetComplex; + desc.defaultValue = (int)OnsetDefault; desc.isQuantized = true; desc.quantizeStep = 1; desc.valueNames.push_back("Energy Based"); @@ -160,6 +160,7 @@ desc.valueNames.push_back("Kullback-Liebler"); desc.valueNames.push_back("Modified Kullback-Liebler"); desc.valueNames.push_back("Spectral Flux"); + desc.valueNames.push_back("Default"); list.push_back(desc); desc = ParameterDescriptor();
--- a/plugins/Types.cpp Fri Jul 22 15:33:16 2016 +0200 +++ b/plugins/Types.cpp Fri Jul 22 15:41:19 2016 +0200 @@ -29,7 +29,7 @@ { // In the same order as the enum elements in the header static const char *const names[] = { - "energy", "specdiff", "hfc", "complex", "phase", "kl", "mkl", "specflux" + "energy", "specdiff", "hfc", "complex", "phase", "kl", "mkl", "specflux", "default" }; return names[(int)t]; }
--- a/plugins/Types.h Fri Jul 22 15:33:16 2016 +0200 +++ b/plugins/Types.h Fri Jul 22 15:41:19 2016 +0200 @@ -5,7 +5,7 @@ Centre for Digital Music, Queen Mary, University of London. This file copyright 2012 Queen Mary, University of London. - + This file is part of vamp-aubio-plugins. vamp-aubio is free software: you can redistribute it and/or modify @@ -47,7 +47,8 @@ OnsetPhase, OnsetKL, OnsetMKL, - OnsetSpecFlux // new in 0.4! + OnsetSpecFlux, // new in 0.4! + OnsetDefault // new in 0.5 }; extern const char *getAubioNameForOnsetType(OnsetType t); @@ -74,8 +75,6 @@ }; extern const char *getAubioNameForPitchType(PitchType t); - #endif -