Mercurial > hg > vamp-aubio-plugins
diff plugins/Notes.cpp @ 2:76c1a7bd0416
include math.h, add onset timestamps, fix default block and step sizes, switch to onset_complex and pitch_yinfft
author | Paul Brossier <piem@piem.org> |
---|---|
date | Tue, 16 May 2006 15:43:21 +0000 |
parents | 76761a42d239 |
children | be376e1b36c3 |
line wrap: on
line diff
--- a/plugins/Notes.cpp Mon May 15 12:56:46 2006 +0000 +++ b/plugins/Notes.cpp Tue May 16 15:43:21 2006 +0000 @@ -14,6 +14,7 @@ */ +#include <math.h> #include "Notes.h" using std::string; @@ -29,9 +30,9 @@ m_pv(0), m_peakpick(0), m_onsetdet(0), - m_onsettype(aubio_onset_mkl), + m_onsettype(aubio_onset_complex), m_pitchdet(0), - m_pitchtype(aubio_pitch_fcomb), + m_pitchtype(aubio_pitch_yinfft), m_pitchmode(aubio_pitchm_freq), m_threshold(0.3), m_silence(-90), @@ -125,18 +126,13 @@ size_t Notes::getPreferredStepSize() const { - if (m_onsettype == aubio_onset_energy || - m_onsettype == aubio_onset_hfc) { - return 512; - } else { - return 128; - } + return 512; } size_t Notes::getPreferredBlockSize() const { - return getPreferredStepSize(); + return 4*getPreferredStepSize(); } Notes::ParameterList @@ -149,7 +145,7 @@ desc.description = "Onset Detection Function Type"; desc.minValue = 0; desc.maxValue = 6; - desc.defaultValue = (int)aubio_onset_mkl; + desc.defaultValue = (int)aubio_onset_complex; desc.isQuantized = true; desc.quantizeStep = 1; desc.valueNames.push_back("Energy Based"); @@ -166,7 +162,7 @@ desc.description = "Pitch Detection Function Type"; desc.minValue = 0; desc.maxValue = 4; - desc.defaultValue = (int)aubio_pitch_fcomb; + desc.defaultValue = (int)aubio_pitch_yinfft; desc.isQuantized = true; desc.quantizeStep = 1; desc.valueNames.push_back("YIN Frequency Estimator");