From: Paul Brossier Date: Tue, 3 Nov 2009 17:23:04 +0000 (+0100) Subject: src/spectral/specdesc.{c,h}: rename aubio_onsetdetection to aubio_specdesc X-Git-Tag: bzr2git~51 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=31907fd993a3680189eec64ca301467fa77df7bd;p=aubio.git src/spectral/specdesc.{c,h}: rename aubio_onsetdetection to aubio_specdesc --- diff --git a/python/aubio/aubioclass.py b/python/aubio/aubioclass.py index fd92727b..ded95485 100644 --- a/python/aubio/aubioclass.py +++ b/python/aubio/aubioclass.py @@ -68,13 +68,13 @@ class pvoc: aubio_pvoc_rdo(self.pv,tc(),tf()) class onsetdetection: - """ class for aubio_onsetdetection """ + """ class for aubio_specdesc """ def __init__(self,mode,buf,chan): - self.od = new_aubio_onsetdetection(mode,buf,chan) + self.od = new_aubio_specdesc(mode,buf,chan) def do(self,tc,tf): - aubio_onsetdetection_do(self.od,tc(),tf()) + aubio_specdesc_do(self.od,tc(),tf()) def __del__(self): - del_aubio_onsetdetection(self.od) + del_aubio_specdesc(self.od) class peakpick: """ class for aubio_peakpicker """ @@ -91,7 +91,7 @@ class peakpick: del_aubio_peakpicker(self.pp) class onsetpick: - """ superclass for aubio_pvoc + aubio_onsetdetection + aubio_peakpicker """ + """ superclass for aubio_pvoc + aubio_specdesc + aubio_peakpicker """ def __init__(self,bufsize,hopsize,channels,myvec,threshold,mode='dual',derivate=False,dcthreshold=0): self.myfft = cvec(bufsize,channels) self.pv = pvoc(bufsize,hopsize,channels) diff --git a/src/Makefile.am b/src/Makefile.am index 7ece9d55..931557e5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -22,6 +22,7 @@ nobase_pkginclude_HEADERS = \ spectral/phasevoc.h \ spectral/fft.h \ spectral/tss.h \ + spectral/specdesc.h \ spectral/spectral_centroid.h \ pitch/pitch.h \ pitch/pitchmcomb.h \ @@ -30,7 +31,6 @@ nobase_pkginclude_HEADERS = \ pitch/pitchfcomb.h \ pitch/pitchyinfft.h \ onset/onset.h \ - onset/onsetdetection.h \ onset/peakpick.h \ tempo/tempo.h \ tempo/beattracking.h diff --git a/src/aubio.h b/src/aubio.h index 5b553189..6008ad4e 100644 --- a/src/aubio.h +++ b/src/aubio.h @@ -165,6 +165,7 @@ extern "C" #include "spectral/fft.h" #include "spectral/phasevoc.h" #include "spectral/mfcc.h" +#include "spectral/specdesc.h" #include "pitch/pitch.h" #include "onset/onset.h" #include "tempo/tempo.h" @@ -182,7 +183,6 @@ extern "C" #include "pitch/pitchyinfft.h" #include "pitch/pitchschmitt.h" #include "pitch/pitchfcomb.h" -#include "onset/onsetdetection.h" #include "spectral/spectral_centroid.h" #include "onset/peakpick.h" #include "tempo/beattracking.h" diff --git a/src/onset/onset.c b/src/onset/onset.c index 2d567c9a..d626702b 100644 --- a/src/onset/onset.c +++ b/src/onset/onset.c @@ -21,7 +21,7 @@ #include "aubio_priv.h" #include "fvec.h" #include "cvec.h" -#include "onset/onsetdetection.h" +#include "spectral/specdesc.h" #include "spectral/phasevoc.h" #include "onset/peakpick.h" #include "mathutils.h" @@ -30,7 +30,7 @@ /** structure to store object state */ struct _aubio_onset_t { aubio_pvoc_t * pv; /**< phase vocoder */ - aubio_onsetdetection_t * od; /**< onset detection */ + aubio_specdesc_t * od; /**< onset detection */ aubio_peakpicker_t * pp; /**< peak picker */ cvec_t * fftgrain; /**< phase vocoder output */ fvec_t * of; /**< onset detection function */ @@ -48,9 +48,9 @@ void aubio_onset_do (aubio_onset_t *o, fvec_t * input, fvec_t * onset) smpl_t wasonset = 0; uint_t i; aubio_pvoc_do (o->pv,input, o->fftgrain); - aubio_onsetdetection_do (o->od,o->fftgrain, o->of); + aubio_specdesc_do (o->od,o->fftgrain, o->of); /*if (usedoubled) { - aubio_onsetdetection_do (o2,fftgrain, onset2); + aubio_specdesc_do (o2,fftgrain, onset2); onset->data[0][0] *= onset2->data[0][0]; }*/ aubio_peakpicker_do(o->pp, o->of, onset); @@ -108,11 +108,11 @@ aubio_onset_t * new_aubio_onset (char_t * onset_mode, o->pv = new_aubio_pvoc(buf_size, hop_size, channels); o->pp = new_aubio_peakpicker(channels); aubio_peakpicker_set_threshold (o->pp, o->threshold); - o->od = new_aubio_onsetdetection(onset_mode,buf_size,channels); + o->od = new_aubio_specdesc(onset_mode,buf_size,channels); o->fftgrain = new_cvec(buf_size,channels); o->of = new_fvec(1, channels); /*if (usedoubled) { - o2 = new_aubio_onsetdetection(onset_type2,buffer_size,channels); + o2 = new_aubio_specdesc(onset_type2,buffer_size,channels); onset2 = new_fvec(1 , channels); }*/ return o; @@ -120,7 +120,7 @@ aubio_onset_t * new_aubio_onset (char_t * onset_mode, void del_aubio_onset (aubio_onset_t *o) { - del_aubio_onsetdetection(o->od); + del_aubio_specdesc(o->od); del_aubio_peakpicker(o->pp); del_aubio_pvoc(o->pv); del_fvec(o->of); diff --git a/src/onset/onset.h b/src/onset/onset.h index a94770c6..67a34f48 100644 --- a/src/onset/onset.h +++ b/src/onset/onset.h @@ -46,7 +46,7 @@ typedef struct _aubio_onset_t aubio_onset_t; /** create onset detection object - \param onset_mode onset detection type as specified in onsetdetection.h + \param onset_mode onset detection type as specified in specdesc.h \param buf_size buffer size for phase vocoder \param hop_size hop size for phase vocoder \param channels number of channels diff --git a/src/onset/onsetdetection.c b/src/spectral/specdesc.c similarity index 81% rename from src/onset/onsetdetection.c rename to src/spectral/specdesc.c index 6b06a0dc..684a16cd 100644 --- a/src/onset/onsetdetection.c +++ b/src/spectral/specdesc.c @@ -22,20 +22,20 @@ #include "fvec.h" #include "cvec.h" #include "spectral/fft.h" +#include "spectral/specdesc.h" #include "mathutils.h" #include "utils/hist.h" -#include "onset/onsetdetection.h" /** Energy based onset detection function This function calculates the local energy of the input spectral frame. - \param o onset detection object as returned by new_aubio_onsetdetection() + \param o onset detection object as returned by new_aubio_specdesc() \param fftgrain input spectral frame \param onset output onset detection function */ -void aubio_onsetdetection_energy(aubio_onsetdetection_t *o, cvec_t * fftgrain, fvec_t * onset); +void aubio_specdesc_energy(aubio_specdesc_t *o, cvec_t * fftgrain, fvec_t * onset); /** High Frequency Content onset detection function This method computes the High Frequency Content (HFC) of the input spectral @@ -44,24 +44,24 @@ void aubio_onsetdetection_energy(aubio_onsetdetection_t *o, cvec_t * fftgrain, f Paul Masri. Computer modeling of Sound for Transformation and Synthesis of Musical Signal. PhD dissertation, University of Bristol, UK, 1996. - \param o onset detection object as returned by new_aubio_onsetdetection() + \param o onset detection object as returned by new_aubio_specdesc() \param fftgrain input spectral frame \param onset output onset detection function */ -void aubio_onsetdetection_hfc(aubio_onsetdetection_t *o, cvec_t * fftgrain, fvec_t * onset); +void aubio_specdesc_hfc(aubio_specdesc_t *o, cvec_t * fftgrain, fvec_t * onset); /** Complex Domain Method onset detection function Christopher Duxbury, Mike E. Davies, and Mark B. Sandler. Complex domain onset detection for musical signals. In Proceedings of the Digital Audio Effects Conference, DAFx-03, pages 90-93, London, UK, 2003. - \param o onset detection object as returned by new_aubio_onsetdetection() + \param o onset detection object as returned by new_aubio_specdesc() \param fftgrain input spectral frame \param onset output onset detection function */ -void aubio_onsetdetection_complex(aubio_onsetdetection_t *o, cvec_t * fftgrain, fvec_t * onset); +void aubio_specdesc_complex(aubio_specdesc_t *o, cvec_t * fftgrain, fvec_t * onset); /** Phase Based Method onset detection function Juan-Pablo Bello, Mike P. Davies, and Mark B. Sandler. Phase-based note onset @@ -69,60 +69,60 @@ void aubio_onsetdetection_complex(aubio_onsetdetection_t *o, cvec_t * fftgrain, Conference on Acoustics Speech and Signal Processing, pages 441­444, Hong-Kong, 2003. - \param o onset detection object as returned by new_aubio_onsetdetection() + \param o onset detection object as returned by new_aubio_specdesc() \param fftgrain input spectral frame \param onset output onset detection function */ -void aubio_onsetdetection_phase(aubio_onsetdetection_t *o, cvec_t * fftgrain, fvec_t * onset); +void aubio_specdesc_phase(aubio_specdesc_t *o, cvec_t * fftgrain, fvec_t * onset); /** Spectral difference method onset detection function Jonhatan Foote and Shingo Uchihashi. The beat spectrum: a new approach to rhythm analysis. In IEEE International Conference on Multimedia and Expo (ICME 2001), pages 881­884, Tokyo, Japan, August 2001. - \param o onset detection object as returned by new_aubio_onsetdetection() + \param o onset detection object as returned by new_aubio_specdesc() \param fftgrain input spectral frame \param onset output onset detection function */ -void aubio_onsetdetection_specdiff(aubio_onsetdetection_t *o, cvec_t * fftgrain, fvec_t * onset); +void aubio_specdesc_specdiff(aubio_specdesc_t *o, cvec_t * fftgrain, fvec_t * onset); /** Kullback-Liebler onset detection function Stephen Hainsworth and Malcom Macleod. Onset detection in music audio signals. In Proceedings of the International Computer Music Conference (ICMC), Singapore, 2003. - \param o onset detection object as returned by new_aubio_onsetdetection() + \param o onset detection object as returned by new_aubio_specdesc() \param fftgrain input spectral frame \param onset output onset detection function */ -void aubio_onsetdetection_kl(aubio_onsetdetection_t *o, cvec_t * fftgrain, fvec_t * onset); +void aubio_specdesc_kl(aubio_specdesc_t *o, cvec_t * fftgrain, fvec_t * onset); /** Modified Kullback-Liebler onset detection function Paul Brossier, ``Automatic annotation of musical audio for interactive systems'', Chapter 2, Temporal segmentation, PhD thesis, Centre for Digital music, Queen Mary University of London, London, UK, 2006. - \param o onset detection object as returned by new_aubio_onsetdetection() + \param o onset detection object as returned by new_aubio_specdesc() \param fftgrain input spectral frame \param onset output onset detection function */ -void aubio_onsetdetection_mkl(aubio_onsetdetection_t *o, cvec_t * fftgrain, fvec_t * onset); +void aubio_specdesc_mkl(aubio_specdesc_t *o, cvec_t * fftgrain, fvec_t * onset); /** Spectral Flux Simon Dixon, Onset Detection Revisited, in ``Proceedings of the 9th International Conference on Digital Audio Effects'' (DAFx-06), Montreal, Canada, 2006. - \param o onset detection object as returned by new_aubio_onsetdetection() + \param o onset detection object as returned by new_aubio_specdesc() \param fftgrain input spectral frame \param onset output onset detection function */ -void aubio_onsetdetection_specflux(aubio_onsetdetection_t *o, cvec_t * fftgrain, fvec_t * onset); +void aubio_specdesc_specflux(aubio_specdesc_t *o, cvec_t * fftgrain, fvec_t * onset); /** onsetdetection types */ typedef enum { @@ -135,13 +135,13 @@ typedef enum { aubio_onset_mkl, /**< modified Kullback Liebler */ aubio_onset_specflux, /**< spectral flux */ aubio_onset_default = aubio_onset_hfc, /**< default mode, set to hfc */ -} aubio_onsetdetection_type; +} aubio_specdesc_type; /** structure to store object state */ -struct _aubio_onsetdetection_t { - aubio_onsetdetection_type onset_type; /**< onset detection type */ - /** Pointer to aubio_onsetdetection_ function */ - void (*funcpointer)(aubio_onsetdetection_t *o, +struct _aubio_specdesc_t { + aubio_specdesc_type onset_type; /**< onset detection type */ + /** Pointer to aubio_specdesc_ function */ + void (*funcpointer)(aubio_specdesc_t *o, cvec_t * fftgrain, fvec_t * onset); smpl_t threshold; /**< minimum norm threshold for phase and specdiff */ fvec_t *oldmag; /**< previous norm vector */ @@ -153,7 +153,7 @@ struct _aubio_onsetdetection_t { /* Energy based onset detection function */ -void aubio_onsetdetection_energy (aubio_onsetdetection_t *o UNUSED, +void aubio_specdesc_energy (aubio_specdesc_t *o UNUSED, cvec_t * fftgrain, fvec_t * onset) { uint_t i,j; for (i=0;ichannels;i++) { @@ -165,7 +165,7 @@ void aubio_onsetdetection_energy (aubio_onsetdetection_t *o UNUSED, } /* High Frequency Content onset detection function */ -void aubio_onsetdetection_hfc(aubio_onsetdetection_t *o UNUSED, +void aubio_specdesc_hfc(aubio_specdesc_t *o UNUSED, cvec_t * fftgrain, fvec_t * onset){ uint_t i,j; for (i=0;ichannels;i++) { @@ -178,7 +178,7 @@ void aubio_onsetdetection_hfc(aubio_onsetdetection_t *o UNUSED, /* Complex Domain Method onset detection function */ -void aubio_onsetdetection_complex (aubio_onsetdetection_t *o, cvec_t * fftgrain, fvec_t * onset) { +void aubio_specdesc_complex (aubio_specdesc_t *o, cvec_t * fftgrain, fvec_t * onset) { uint_t i, j; uint_t nbins = fftgrain->length; for (i=0;ichannels; i++) { @@ -203,7 +203,7 @@ void aubio_onsetdetection_complex (aubio_onsetdetection_t *o, cvec_t * fftgrain, /* Phase Based Method onset detection function */ -void aubio_onsetdetection_phase(aubio_onsetdetection_t *o, +void aubio_specdesc_phase(aubio_specdesc_t *o, cvec_t * fftgrain, fvec_t * onset){ uint_t i, j; uint_t nbins = fftgrain->length; @@ -235,7 +235,7 @@ void aubio_onsetdetection_phase(aubio_onsetdetection_t *o, } /* Spectral difference method onset detection function */ -void aubio_onsetdetection_specdiff(aubio_onsetdetection_t *o, +void aubio_specdesc_specdiff(aubio_specdesc_t *o, cvec_t * fftgrain, fvec_t * onset){ uint_t i, j; uint_t nbins = fftgrain->length; @@ -266,7 +266,7 @@ void aubio_onsetdetection_specdiff(aubio_onsetdetection_t *o, /* Kullback Liebler onset detection function * note we use ln(1+Xn/(Xn-1+0.0001)) to avoid * negative (1.+) and infinite values (+1.e-10) */ -void aubio_onsetdetection_kl(aubio_onsetdetection_t *o, cvec_t * fftgrain, fvec_t * onset){ +void aubio_specdesc_kl(aubio_specdesc_t *o, cvec_t * fftgrain, fvec_t * onset){ uint_t i,j; for (i=0;ichannels;i++) { onset->data[i][0] = 0.; @@ -282,7 +282,7 @@ void aubio_onsetdetection_kl(aubio_onsetdetection_t *o, cvec_t * fftgrain, fvec_ /* Modified Kullback Liebler onset detection function * note we use ln(1+Xn/(Xn-1+0.0001)) to avoid * negative (1.+) and infinite values (+1.e-10) */ -void aubio_onsetdetection_mkl(aubio_onsetdetection_t *o, cvec_t * fftgrain, fvec_t * onset){ +void aubio_specdesc_mkl(aubio_specdesc_t *o, cvec_t * fftgrain, fvec_t * onset){ uint_t i,j; for (i=0;ichannels;i++) { onset->data[i][0] = 0.; @@ -295,7 +295,7 @@ void aubio_onsetdetection_mkl(aubio_onsetdetection_t *o, cvec_t * fftgrain, fvec } /* Spectral flux */ -void aubio_onsetdetection_specflux(aubio_onsetdetection_t *o, cvec_t * fftgrain, fvec_t * onset){ +void aubio_specdesc_specflux(aubio_specdesc_t *o, cvec_t * fftgrain, fvec_t * onset){ uint_t i, j; for (i=0;ichannels;i++) { onset->data[i][0] = 0.; @@ -309,7 +309,7 @@ void aubio_onsetdetection_specflux(aubio_onsetdetection_t *o, cvec_t * fftgrain, /* Generic function pointing to the choosen one */ void -aubio_onsetdetection_do (aubio_onsetdetection_t *o, cvec_t * fftgrain, +aubio_specdesc_do (aubio_specdesc_t *o, cvec_t * fftgrain, fvec_t * onset) { o->funcpointer(o,fftgrain,onset); } @@ -317,12 +317,12 @@ aubio_onsetdetection_do (aubio_onsetdetection_t *o, cvec_t * fftgrain, /* Allocate memory for an onset detection * depending on the choosen type, allocate memory as needed */ -aubio_onsetdetection_t * -new_aubio_onsetdetection (char_t * onset_mode, +aubio_specdesc_t * +new_aubio_specdesc (char_t * onset_mode, uint_t size, uint_t channels){ - aubio_onsetdetection_t * o = AUBIO_NEW(aubio_onsetdetection_t); + aubio_specdesc_t * o = AUBIO_NEW(aubio_specdesc_t); uint_t rsize = size/2+1; - aubio_onsetdetection_type onset_type; + aubio_specdesc_type onset_type; if (strcmp (onset_mode, "energy") == 0) onset_type = aubio_onset_energy; else if (strcmp (onset_mode, "specdiff") == 0) @@ -388,28 +388,28 @@ new_aubio_onsetdetection (char_t * onset_mode, switch(onset_type) { case aubio_onset_energy: - o->funcpointer = aubio_onsetdetection_energy; + o->funcpointer = aubio_specdesc_energy; break; case aubio_onset_hfc: - o->funcpointer = aubio_onsetdetection_hfc; + o->funcpointer = aubio_specdesc_hfc; break; case aubio_onset_complex: - o->funcpointer = aubio_onsetdetection_complex; + o->funcpointer = aubio_specdesc_complex; break; case aubio_onset_phase: - o->funcpointer = aubio_onsetdetection_phase; + o->funcpointer = aubio_specdesc_phase; break; case aubio_onset_specdiff: - o->funcpointer = aubio_onsetdetection_specdiff; + o->funcpointer = aubio_specdesc_specdiff; break; case aubio_onset_kl: - o->funcpointer = aubio_onsetdetection_kl; + o->funcpointer = aubio_specdesc_kl; break; case aubio_onset_mkl: - o->funcpointer = aubio_onsetdetection_mkl; + o->funcpointer = aubio_specdesc_mkl; break; case aubio_onset_specflux: - o->funcpointer = aubio_onsetdetection_specflux; + o->funcpointer = aubio_specdesc_specflux; break; default: break; @@ -418,7 +418,7 @@ new_aubio_onsetdetection (char_t * onset_mode, return o; } -void del_aubio_onsetdetection (aubio_onsetdetection_t *o){ +void del_aubio_specdesc (aubio_specdesc_t *o){ switch(o->onset_type) { /* for both energy and hfc, only fftgrain->norm is required */ case aubio_onset_energy: diff --git a/src/onset/onsetdetection.h b/src/spectral/specdesc.h similarity index 79% rename from src/onset/onsetdetection.h rename to src/spectral/specdesc.h index b4b01ba2..7bc20be5 100644 --- a/src/onset/onsetdetection.h +++ b/src/spectral/specdesc.h @@ -40,17 +40,17 @@ extern "C" { #endif /** onsetdetection structure */ -typedef struct _aubio_onsetdetection_t aubio_onsetdetection_t; +typedef struct _aubio_specdesc_t aubio_specdesc_t; /** execute onset detection function on a spectral frame Generic function to compute onset detection. - \param o onset detection object as returned by new_aubio_onsetdetection() + \param o onset detection object as returned by new_aubio_specdesc() \param fftgrain input signal spectrum as computed by aubio_pvoc_do \param onset output vector (one sample long, to send to the peak picking) */ -void aubio_onsetdetection_do (aubio_onsetdetection_t *o, cvec_t * fftgrain, fvec_t * onset); +void aubio_specdesc_do (aubio_specdesc_t *o, cvec_t * fftgrain, fvec_t * onset); /** creation of an onset detection object \param type onset detection mode @@ -58,13 +58,13 @@ void aubio_onsetdetection_do (aubio_onsetdetection_t *o, cvec_t * fftgrain, fvec \param channels number of input channels */ -aubio_onsetdetection_t * new_aubio_onsetdetection(char_t * onset_mode, uint_t buf_size, uint_t channels); +aubio_specdesc_t * new_aubio_specdesc(char_t * onset_mode, uint_t buf_size, uint_t channels); /** deletion of an onset detection object - \param o onset detection object as returned by new_aubio_onsetdetection() + \param o onset detection object as returned by new_aubio_specdesc() */ -void del_aubio_onsetdetection(aubio_onsetdetection_t *o); +void del_aubio_specdesc(aubio_specdesc_t *o); #ifdef __cplusplus } diff --git a/src/tempo/tempo.c b/src/tempo/tempo.c index 54684667..f9e3b2a4 100644 --- a/src/tempo/tempo.c +++ b/src/tempo/tempo.c @@ -21,7 +21,7 @@ #include "aubio_priv.h" #include "fvec.h" #include "cvec.h" -#include "onset/onsetdetection.h" +#include "spectral/specdesc.h" #include "tempo/beattracking.h" #include "spectral/phasevoc.h" #include "onset/peakpick.h" @@ -30,7 +30,7 @@ /* structure to store object state */ struct _aubio_tempo_t { - aubio_onsetdetection_t * od; /** onset detection */ + aubio_specdesc_t * od; /** onset detection */ aubio_pvoc_t * pv; /** phase vocoder */ aubio_peakpicker_t * pp; /** peak picker */ aubio_beattracking_t * bt; /** beat tracking */ @@ -55,9 +55,9 @@ void aubio_tempo_do(aubio_tempo_t *o, fvec_t * input, fvec_t * tempo) uint_t winlen = o->winlen; uint_t step = o->step; aubio_pvoc_do (o->pv, input, o->fftgrain); - aubio_onsetdetection_do (o->od, o->fftgrain, o->of); + aubio_specdesc_do (o->od, o->fftgrain, o->of); /*if (usedoubled) { - aubio_onsetdetection_do(o2,fftgrain, onset2); + aubio_specdesc_do(o2,fftgrain, onset2); onset->data[0][0] *= onset2->data[0][0]; }*/ /* execute every overlap_size*step */ @@ -120,13 +120,13 @@ aubio_tempo_t * new_aubio_tempo (char_t * onset_mode, o->pv = new_aubio_pvoc(buf_size, hop_size, channels); o->pp = new_aubio_peakpicker(channels); aubio_peakpicker_set_threshold (o->pp, o->threshold); - o->od = new_aubio_onsetdetection(onset_mode,buf_size,channels); + o->od = new_aubio_specdesc(onset_mode,buf_size,channels); o->of = new_fvec(1, channels); o->bt = new_aubio_beattracking(o->winlen,channels); o->onset = new_fvec(1, channels); o->peek = new_fvec(3, channels); /*if (usedoubled) { - o2 = new_aubio_onsetdetection(type_onset2,buffer_size,channels); + o2 = new_aubio_specdesc(type_onset2,buffer_size,channels); onset2 = new_fvec(1 , channels); }*/ return o; @@ -142,7 +142,7 @@ smpl_t aubio_tempo_get_confidence(aubio_tempo_t *o) { void del_aubio_tempo (aubio_tempo_t *o) { - del_aubio_onsetdetection(o->od); + del_aubio_specdesc(o->od); del_aubio_beattracking(o->bt); del_aubio_peakpicker(o->pp); del_aubio_pvoc(o->pv); diff --git a/tests/src/test-onsetdetection.c b/tests/src/test-onsetdetection.c index fb90de2b..8234d98c 100644 --- a/tests/src/test-onsetdetection.c +++ b/tests/src/test-onsetdetection.c @@ -11,35 +11,35 @@ main () cvec_t *in = new_cvec (win_s, channels); /* input buffer */ fvec_t *out = new_fvec (1, channels); /* input buffer */ - aubio_onsetdetection_t *o; + aubio_specdesc_t *o; - o = new_aubio_onsetdetection ("energy", win_s, channels); - aubio_onsetdetection_do (o, in, out); - del_aubio_onsetdetection (o); + o = new_aubio_specdesc ("energy", win_s, channels); + aubio_specdesc_do (o, in, out); + del_aubio_specdesc (o); - o = new_aubio_onsetdetection ("energy", win_s, channels); - aubio_onsetdetection_do (o, in, out); - del_aubio_onsetdetection (o); + o = new_aubio_specdesc ("energy", win_s, channels); + aubio_specdesc_do (o, in, out); + del_aubio_specdesc (o); - o = new_aubio_onsetdetection ("hfc", win_s, channels); - aubio_onsetdetection_do (o, in, out); - del_aubio_onsetdetection (o); + o = new_aubio_specdesc ("hfc", win_s, channels); + aubio_specdesc_do (o, in, out); + del_aubio_specdesc (o); - o = new_aubio_onsetdetection ("complex", win_s, channels); - aubio_onsetdetection_do (o, in, out); - del_aubio_onsetdetection (o); + o = new_aubio_specdesc ("complex", win_s, channels); + aubio_specdesc_do (o, in, out); + del_aubio_specdesc (o); - o = new_aubio_onsetdetection ("phase", win_s, channels); - aubio_onsetdetection_do (o, in, out); - del_aubio_onsetdetection (o); + o = new_aubio_specdesc ("phase", win_s, channels); + aubio_specdesc_do (o, in, out); + del_aubio_specdesc (o); - o = new_aubio_onsetdetection ("kl", win_s, channels); - aubio_onsetdetection_do (o, in, out); - del_aubio_onsetdetection (o); + o = new_aubio_specdesc ("kl", win_s, channels); + aubio_specdesc_do (o, in, out); + del_aubio_specdesc (o); - o = new_aubio_onsetdetection ("mkl", win_s, channels); - aubio_onsetdetection_do (o, in, out); - del_aubio_onsetdetection (o); + o = new_aubio_specdesc ("mkl", win_s, channels); + aubio_specdesc_do (o, in, out); + del_aubio_specdesc (o); del_cvec (in); del_fvec (out);