#include "spectral/phasevoc.h"
#include "mathutils.h"
#include "temporal/filter.h"
-#include "temporal/cdesign.h"
+#include "temporal/c_weighting.h"
#include "pitch/pitchmcomb.h"
#include "pitch/pitchyin.h"
#include "pitch/pitchfcomb.h"
p->pv = new_aubio_pvoc(bufsize, hopsize, channels);
p->fftgrain = new_cvec(bufsize, channels);
p->mcomb = new_aubio_pitchmcomb(bufsize,hopsize,channels,samplerate);
- p->filter = new_aubio_filter_cdsgn (samplerate, channels);
+ p->filter = new_aubio_filter_c_weighting (samplerate, channels);
p->callback = aubio_pitchdetection_mcomb;
break;
case aubio_pitch_fcomb:
#include "fvec.h"
#include "lvec.h"
#include "temporal/filter.h"
-#include "temporal/adesign.h"
+#include "temporal/a_weighting.h"
-void aubio_filter_set_adsgn (aubio_filter_t * f) {
+void aubio_filter_set_a_weighting (aubio_filter_t * f) {
uint_t samplerate = aubio_filter_get_samplerate (f);
lvec_t *bs = aubio_filter_get_feedforward (f);
}
-aubio_filter_t * new_aubio_filter_adsgn (uint_t samplerate, uint_t channels) {
+aubio_filter_t * new_aubio_filter_a_weighting (uint_t samplerate, uint_t channels) {
aubio_filter_t * f = new_aubio_filter (samplerate, 7, channels);
- aubio_filter_set_adsgn (f);
+ aubio_filter_set_a_weighting (f);
return f;
}
\return a new filter object
*/
-aubio_filter_t * new_aubio_filter_adsgn (uint_t samplerate, uint_t channels);
+aubio_filter_t * new_aubio_filter_a_weighting (uint_t samplerate, uint_t channels);
/** set feedback and feedforward coefficients of a A-weighting filter
\param f filter object to get coefficients from
*/
-void aubio_filter_set_adsgn (aubio_filter_t *f);
+void aubio_filter_set_a_weighting (aubio_filter_t *f);
#ifdef __cplusplus
}
#include "fvec.h"
#include "lvec.h"
#include "temporal/filter.h"
-#include "temporal/cdesign.h"
+#include "temporal/c_weighting.h"
-void aubio_filter_set_cdsgn (aubio_filter_t * f) {
+void aubio_filter_set_c_weighting (aubio_filter_t * f) {
uint_t samplerate = aubio_filter_get_samplerate (f);
lvec_t * bs = aubio_filter_get_feedforward (f);
}
-aubio_filter_t * new_aubio_filter_cdsgn (uint_t samplerate, uint_t channels) {
+aubio_filter_t * new_aubio_filter_c_weighting (uint_t samplerate, uint_t channels) {
aubio_filter_t * f = new_aubio_filter(samplerate, 5, channels);
- aubio_filter_set_cdsgn (f);
+ aubio_filter_set_c_weighting (f);
return f;
}
\return a new filter object
*/
-aubio_filter_t * new_aubio_filter_cdsgn (uint_t samplerate, uint_t channels);
+aubio_filter_t * new_aubio_filter_c_weighting (uint_t samplerate, uint_t channels);
/** set feedback and feedforward coefficients of a C-weighting filter
\param f filter object to get coefficients from
*/
-void aubio_filter_set_cdsgn (aubio_filter_t *f);
+void aubio_filter_set_c_weighting (aubio_filter_t *f);
#ifdef __cplusplus
}
operation.
Some convenience functions are provided:
- - new_aubio_filter_adsgn() and aubio_filter_set_adsgn(),
- - new_aubio_filter_cdsgn() and aubio_filter_set_cdsgn().
+ - new_aubio_filter_a_weighting() and aubio_filter_set_a_weighting(),
+ - new_aubio_filter_c_weighting() and aubio_filter_set_c_weighting().
*/
uint_t channels = 2;
for ( samplerate = rates[i]; i < nrates ; i++ ) {
- f = new_aubio_filter_adsgn (samplerate, channels);
+ f = new_aubio_filter_a_weighting (samplerate, channels);
del_aubio_filter (f);
f = new_aubio_filter (samplerate, 7, channels*2);
- aubio_filter_set_adsgn (f);
+ aubio_filter_set_a_weighting (f);
del_aubio_filter (f);
}
// samplerate unknown
- f = new_aubio_filter_adsgn (12089, channels);
+ f = new_aubio_filter_a_weighting (12089, channels);
del_aubio_filter (f);
// order to small
f = new_aubio_filter (samplerate, 2, channels*2);
- aubio_filter_set_adsgn (f);
+ aubio_filter_set_a_weighting (f);
del_aubio_filter (f);
// order to big
f = new_aubio_filter (samplerate, 12, channels*2);
- aubio_filter_set_adsgn (f);
+ aubio_filter_set_a_weighting (f);
del_aubio_filter (f);
return 0;
uint_t channels = 2;
for ( samplerate = rates[i]; i < nrates ; i++ ) {
- f = new_aubio_filter_cdsgn (samplerate, channels);
+ f = new_aubio_filter_c_weighting (samplerate, channels);
del_aubio_filter (f);
f = new_aubio_filter (samplerate, 5, channels*2);
- aubio_filter_set_cdsgn (f);
+ aubio_filter_set_c_weighting (f);
del_aubio_filter (f);
}
// samplerate unknown
- f = new_aubio_filter_cdsgn (12089, channels);
+ f = new_aubio_filter_c_weighting (12089, channels);
del_aubio_filter (f);
// order to small
f = new_aubio_filter (samplerate, 2, channels*2);
- aubio_filter_set_cdsgn (f);
+ aubio_filter_set_c_weighting (f);
del_aubio_filter (f);
// order to big
f = new_aubio_filter (samplerate, 12, channels*2);
- aubio_filter_set_cdsgn (f);
+ aubio_filter_set_c_weighting (f);
del_aubio_filter (f);
return 0;
fvec_t * out = new_fvec (win_s, channels); /* input buffer */
/* allocate fft and other memory space */
- aubio_filter_t * o = new_aubio_filter_cdsgn (44100, channels);
+ aubio_filter_t * o = new_aubio_filter_c_weighting (44100, channels);
aubio_filter_do(o,in);
aubio_filter_do_outplace(o,in,out);