projects
/
vamp-aubio-plugins.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
include math.h, add onset timestamps, fix default block and step sizes, switch to...
[vamp-aubio-plugins.git]
/
plugins
/
Notes.cpp
diff --git
a/plugins/Notes.cpp
b/plugins/Notes.cpp
index
0a64dce
..
35f4be9
100644
(file)
--- a/
plugins/Notes.cpp
+++ b/
plugins/Notes.cpp
@@
-14,6
+14,7
@@
*/
*/
+#include <math.h>
#include "Notes.h"
using std::string;
#include "Notes.h"
using std::string;
@@
-29,9
+30,9
@@
Notes::Notes(float inputSampleRate) :
m_pv(0),
m_peakpick(0),
m_onsetdet(0),
m_pv(0),
m_peakpick(0),
m_onsetdet(0),
- m_onsettype(aubio_onset_
mkl
),
+ m_onsettype(aubio_onset_
complex
),
m_pitchdet(0),
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),
m_pitchmode(aubio_pitchm_freq),
m_threshold(0.3),
m_silence(-90),
@@
-125,18
+126,13
@@
Notes::reset()
size_t
Notes::getPreferredStepSize() const
{
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
{
}
size_t
Notes::getPreferredBlockSize() const
{
- return getPreferredStepSize();
+ return
4*
getPreferredStepSize();
}
Notes::ParameterList
}
Notes::ParameterList
@@
-149,7
+145,7
@@
Notes::getParameterDescriptors() const
desc.description = "Onset Detection Function Type";
desc.minValue = 0;
desc.maxValue = 6;
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");
desc.isQuantized = true;
desc.quantizeStep = 1;
desc.valueNames.push_back("Energy Based");
@@
-166,7
+162,7
@@
Notes::getParameterDescriptors() const
desc.description = "Pitch Detection Function Type";
desc.minValue = 0;
desc.maxValue = 4;
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");
desc.isQuantized = true;
desc.quantizeStep = 1;
desc.valueNames.push_back("YIN Frequency Estimator");