#include "ofxAubioPitch.h"
#include "ofxAubioMelBands.h"
#include "ofxAubioAttackClass.h"
+#include "ofxAubioFilterDetect.h"
ofxAubioBlock::setup(method, buf_s, hop_s, samplerate);
tempo = new_aubio_tempo((char_t*)method.c_str(),
buf_size, hop_size, samplerate);
- aubio_tempo_set_silence(tempo, -60);
+ aubio_tempo_set_silence(tempo, -1000);
if (tempo) {
ofLogNotice() << "created ofxAubioBeat(" << method
<< ", " << buf_size
nBands = 40;
pv = new_aubio_pvoc(buf_s, hop_s);
spectrum = new_cvec(buf_s);
+ awhitening = new_aubio_spectral_whitening(buf_s, hop_s, samplerate);
fb = new_aubio_filterbank(nBands, buf_s);
aubio_filterbank_set_mel_coeffs_slaney(fb, samplerate);
bands = new_fvec(nBands);
energies = bands->data;
+ bDoWhitening = true;
+
if (pv && fb) {
ofLogNotice() << "created ofxAubioMelBands(" << method
<< ", " << buf_size
{
if (spectrum) del_cvec(spectrum);
if (pv) del_aubio_pvoc(pv);
+ if (awhitening) del_aubio_spectral_whitening(awhitening);
if (bands) del_fvec(bands);
if (fb) del_aubio_filterbank(fb);
cleanup();
void ofxAubioMelBands::blockAudioIn()
{
aubio_pvoc_do(pv, aubio_input, spectrum);
+ if (bDoWhitening) {
+ //aubio_spectral_whitening_do(awhitening, spectrum);
+ }
aubio_filterbank_do(fb, spectrum, bands);
}
ofxAubioBlock::setup(method, buf_s, hop_s, samplerate);
onset = new_aubio_onset((char_t*)method.c_str(),
buf_size, hop_size, samplerate);
+ aubio_onset_set_adaptive_whitening(onset, 0);
if (onset) {
threshold = aubio_onset_get_threshold(onset);
ofLogNotice() << "created ofxAubioOnset(" << method