# HG changeset patch # User Paul Brossier # Date 1469194879 -7200 # Node ID 4e37f52e78df219e156631185f6fe33b9e958fb3 # Parent 5ca1c610ca41235172b2e21f25c8d4e513ab6a88 plugins/Onset.cpp: add default mode diff -r 5ca1c610ca41 -r 4e37f52e78df plugins/Onset.cpp --- 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(); diff -r 5ca1c610ca41 -r 4e37f52e78df plugins/Types.cpp --- 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]; } diff -r 5ca1c610ca41 -r 4e37f52e78df plugins/Types.h --- 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 -