From 32d69586108e1d0e451655e0a0da51bbea9169d4 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sat, 24 Nov 2007 22:00:20 +0100 Subject: [PATCH] src/: more moving and splitting --- src/Makefile.am | 71 ++++++++++++++++----------------- src/aubio.h | 20 +++++----- src/onset/onset.c | 6 +-- src/onset/onsetdetection.c | 4 +- src/onset/peakpick.c | 4 +- src/pitch/pitchdetection.c | 6 +-- src/pitch/pitchfcomb.c | 2 +- src/pitch/pitchyinfft.c | 2 +- src/{ => spectral}/fft.c | 2 +- src/{ => spectral}/fft.h | 0 src/{ => spectral}/filterbank.c | 2 +- src/{ => spectral}/filterbank.h | 0 src/{ => spectral}/mfcc.c | 7 ++-- src/{ => spectral}/mfcc.h | 3 -- src/{ => spectral}/phasevoc.c | 4 +- src/{ => spectral}/phasevoc.h | 0 src/{ => spectral}/tss.c | 2 +- src/{ => spectral}/tss.h | 0 src/tempo/beattracking.c | 2 +- src/tempo/tempo.c | 4 +- src/{ => temporal}/biquad.c | 2 +- src/{ => temporal}/biquad.h | 0 src/{ => temporal}/filter.c | 2 +- src/{ => temporal}/filter.h | 0 src/{ => temporal}/resample.c | 2 +- src/{ => temporal}/resample.h | 0 src/{ => utils}/hist.c | 4 +- src/{ => utils}/hist.h | 0 src/{ => utils}/scale.c | 2 +- src/{ => utils}/scale.h | 0 30 files changed, 74 insertions(+), 79 deletions(-) rename src/{ => spectral}/fft.c (99%) rename src/{ => spectral}/fft.h (100%) rename src/{ => spectral}/filterbank.c (99%) rename src/{ => spectral}/filterbank.h (100%) rename src/{ => spectral}/mfcc.c (97%) rename src/{ => spectral}/mfcc.h (97%) rename src/{ => spectral}/phasevoc.c (98%) rename src/{ => spectral}/phasevoc.h (100%) rename src/{ => spectral}/tss.c (99%) rename src/{ => spectral}/tss.h (100%) rename src/{ => temporal}/biquad.c (98%) rename src/{ => temporal}/biquad.h (100%) rename src/{ => temporal}/filter.c (99%) rename src/{ => temporal}/filter.h (100%) rename src/{ => temporal}/resample.c (98%) rename src/{ => temporal}/resample.h (100%) rename src/{ => utils}/hist.c (98%) rename src/{ => utils}/hist.h (100%) rename src/{ => utils}/scale.c (98%) rename src/{ => utils}/scale.h (100%) diff --git a/src/Makefile.am b/src/Makefile.am index f29dd3bd..7afd4d40 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,17 +1,19 @@ noinst_HEADERS = aubio_priv.h pkginclude_HEADERS = aubio.h \ types.h \ - phasevoc.h \ - mathutils.h \ - fft.h \ - sample.h \ fvec.h \ cvec.h \ - hist.h \ - scale.h \ - resample.h \ - tss.h \ - biquad.h \ + mathutils.h \ + utils/hist.h \ + utils/scale.h \ + temporal/resample.h \ + temporal/biquad.h \ + temporal/filter.h \ + spectral/filterbank.h \ + spectral/mfcc.c \ + spectral/phasevoc.h \ + spectral/fft.h \ + spectral/tss.h \ pitch/pitchdetection.h \ pitch/pitchmcomb.h \ pitch/pitchyin.h \ @@ -22,36 +24,39 @@ pkginclude_HEADERS = aubio.h \ onset/onsetdetection.h \ onset/peakpick.h \ tempo/tempo.h \ - tempo/beattracking.h \ - filter.h \ - filterbank.h \ - mfcc.h + tempo/beattracking.h nodist_pkginclude_HEADERS = config.h lib_LTLIBRARIES = libaubio.la libaubio_la_SOURCES = aubio.h \ types.h \ - phasevoc.c \ - phasevoc.h \ - mathutils.c \ - mathutils.h \ - fft.c \ - fft.h \ fvec.c \ fvec.h \ cvec.c \ cvec.h \ - hist.c \ - hist.h \ - scale.c \ - scale.h \ - resample.c \ - resample.h \ - tss.c \ - tss.h \ - biquad.c \ - biquad.h \ + mathutils.c \ + mathutils.h \ + utils/hist.c \ + utils/hist.h \ + utils/scale.c \ + utils/scale.h \ + temporal/resample.c \ + temporal/resample.h \ + temporal/biquad.c \ + temporal/biquad.h \ + temporal/filter.c \ + temporal/filter.h \ + spectral/filterbank.c \ + spectral/filterbank.h \ + spectral/mfcc.h \ + spectral/mfcc.c \ + spectral/phasevoc.c \ + spectral/phasevoc.h \ + spectral/fft.c \ + spectral/fft.h \ + spectral/tss.c \ + spectral/tss.h \ pitch/pitchdetection.c \ pitch/pitchdetection.h \ pitch/pitchmcomb.c \ @@ -73,13 +78,7 @@ libaubio_la_SOURCES = aubio.h \ tempo/tempo.c \ tempo/tempo.h \ tempo/beattracking.c \ - tempo/beattracking.h \ - filter.c \ - filter.h \ - filterbank.c \ - filterbank.h \ - mfcc.h \ - mfcc.c + tempo/beattracking.h AM_CFLAGS = @AUBIO_CFLAGS@ @FFTWLIB_CFLAGS@ @SAMPLERATE_CFLAGS@ libaubio_la_LIBADD = @FFTWLIB_LIBS@ @SAMPLERATE_LIBS@ @LTLIBOBJS@ diff --git a/src/aubio.h b/src/aubio.h index 73af8bbf..4515606b 100644 --- a/src/aubio.h +++ b/src/aubio.h @@ -59,15 +59,15 @@ extern "C" { /* in this order */ #include "types.h" #include "sample.h" -#include "fft.h" -#include "phasevoc.h" +#include "spectral/fft.h" +#include "spectral/phasevoc.h" #include "mathutils.h" -#include "scale.h" -#include "hist.h" -#include "tss.h" -#include "resample.h" -#include "biquad.h" -#include "filter.h" +#include "utils/scale.h" +#include "utils/hist.h" +#include "spectral/tss.h" +#include "temporal/resample.h" +#include "temporal/biquad.h" +#include "temporal/filter.h" #include "pitch/pitchdetection.h" #include "pitch/pitchmcomb.h" #include "pitch/pitchyin.h" @@ -79,8 +79,8 @@ extern "C" { #include "onset/peakpick.h" #include "tempo/beattracking.h" #include "tempo/tempo.h" -#include "filterbank.h" -#include "mfcc.h" +#include "spectral/filterbank.h" +#include "spectral/mfcc.h" #ifdef __cplusplus } /* extern "C" */ diff --git a/src/onset/onset.c b/src/onset/onset.c index e4bc5dde..084f8de7 100644 --- a/src/onset/onset.c +++ b/src/onset/onset.c @@ -20,10 +20,10 @@ #include "aubio_priv.h" #include "sample.h" #include "onset/onsetdetection.h" -#include "phasevoc.h" -#include "peakpick.h" +#include "spectral/phasevoc.h" +#include "onset/peakpick.h" #include "mathutils.h" -#include "onset.h" +#include "onset/onset.h" /** structure to store object state */ struct _aubio_onset_t { diff --git a/src/onset/onsetdetection.c b/src/onset/onsetdetection.c index 2e4b1bae..0dd52cf1 100644 --- a/src/onset/onsetdetection.c +++ b/src/onset/onsetdetection.c @@ -19,9 +19,9 @@ #include "aubio_priv.h" #include "sample.h" -#include "fft.h" +#include "spectral/fft.h" #include "mathutils.h" -#include "hist.h" +#include "utils/hist.h" #include "onset/onsetdetection.h" diff --git a/src/onset/peakpick.c b/src/onset/peakpick.c index 9f128e87..f9c93369 100644 --- a/src/onset/peakpick.c +++ b/src/onset/peakpick.c @@ -20,8 +20,8 @@ #include "aubio_priv.h" #include "sample.h" #include "mathutils.h" -#include "biquad.h" -#include "peakpick.h" +#include "temporal/biquad.h" +#include "onset/peakpick.h" /* peak picking parameters, default values in brackets * diff --git a/src/pitch/pitchdetection.c b/src/pitch/pitchdetection.c index 18cc89bc..c51a1874 100644 --- a/src/pitch/pitchdetection.c +++ b/src/pitch/pitchdetection.c @@ -18,15 +18,15 @@ #include "aubio_priv.h" #include "sample.h" -#include "phasevoc.h" +#include "spectral/phasevoc.h" #include "mathutils.h" -#include "filter.h" +#include "temporal/filter.h" #include "pitch/pitchmcomb.h" #include "pitch/pitchyin.h" #include "pitch/pitchfcomb.h" #include "pitch/pitchschmitt.h" #include "pitch/pitchyinfft.h" -#include "pitchdetection.h" +#include "pitch/pitchdetection.h" typedef smpl_t (*aubio_pitchdetection_func_t) (aubio_pitchdetection_t *p, fvec_t * ibuf); diff --git a/src/pitch/pitchfcomb.c b/src/pitch/pitchfcomb.c index e894b2bc..e6c88449 100644 --- a/src/pitch/pitchfcomb.c +++ b/src/pitch/pitchfcomb.c @@ -20,7 +20,7 @@ #include "aubio_priv.h" #include "sample.h" #include "mathutils.h" -#include "fft.h" +#include "spectral/fft.h" #include "pitch/pitchfcomb.h" #define MAX_PEAKS 8 diff --git a/src/pitch/pitchyinfft.c b/src/pitch/pitchyinfft.c index e81b490c..12d1051d 100644 --- a/src/pitch/pitchyinfft.c +++ b/src/pitch/pitchyinfft.c @@ -19,7 +19,7 @@ #include "aubio_priv.h" #include "sample.h" #include "mathutils.h" -#include "fft.h" +#include "spectral/fft.h" #include "pitch/pitchyinfft.h" /** pitch yinfft structure */ diff --git a/src/fft.c b/src/spectral/fft.c similarity index 99% rename from src/fft.c rename to src/spectral/fft.c index 3521feba..8bff6ac1 100644 --- a/src/fft.c +++ b/src/spectral/fft.c @@ -21,7 +21,7 @@ #include "fvec.h" #include "cvec.h" #include "mathutils.h" -#include "fft.h" +#include "spectral/fft.h" #if FFTW3F_SUPPORT #define fftw_malloc fftwf_malloc diff --git a/src/fft.h b/src/spectral/fft.h similarity index 100% rename from src/fft.h rename to src/spectral/fft.h diff --git a/src/filterbank.c b/src/spectral/filterbank.c similarity index 99% rename from src/filterbank.c rename to src/spectral/filterbank.c index c009e21e..aa1336bf 100644 --- a/src/filterbank.c +++ b/src/spectral/filterbank.c @@ -21,7 +21,7 @@ #include "aubio_priv.h" #include "sample.h" -#include "filterbank.h" +#include "spectral/filterbank.h" #include "mathutils.h" #define VERY_SMALL_NUMBER 2e-42 diff --git a/src/filterbank.h b/src/spectral/filterbank.h similarity index 100% rename from src/filterbank.h rename to src/spectral/filterbank.h diff --git a/src/mfcc.c b/src/spectral/mfcc.c similarity index 97% rename from src/mfcc.c rename to src/spectral/mfcc.c index 2420d803..a7ac9d59 100644 --- a/src/mfcc.c +++ b/src/spectral/mfcc.c @@ -22,10 +22,9 @@ #include "aubio_priv.h" #include "sample.h" -#include "fft.h" -#include "filterbank.h" -#include "mfcc.h" -#include "math.h" +#include "spectral/fft.h" +#include "spectral/filterbank.h" +#include "spectral/mfcc.h" /** Internal structure for mfcc object **/ diff --git a/src/mfcc.h b/src/spectral/mfcc.h similarity index 97% rename from src/mfcc.h rename to src/spectral/mfcc.h index 6acc6cd2..0c873c54 100644 --- a/src/mfcc.h +++ b/src/spectral/mfcc.h @@ -29,9 +29,6 @@ extern "C" { #endif -#include "sample.h" -#include "filterbank.h" - typedef struct aubio_mfcc_t_ aubio_mfcc_t; /** create mfcc object diff --git a/src/phasevoc.c b/src/spectral/phasevoc.c similarity index 98% rename from src/phasevoc.c rename to src/spectral/phasevoc.c index b04b106f..d7ee1689 100644 --- a/src/phasevoc.c +++ b/src/spectral/phasevoc.c @@ -20,9 +20,9 @@ #include "aubio_priv.h" #include "fvec.h" #include "cvec.h" -#include "fft.h" #include "mathutils.h" -#include "phasevoc.h" +#include "spectral/fft.h" +#include "spectral/phasevoc.h" /** phasevocoder internal object */ struct _aubio_pvoc_t { diff --git a/src/phasevoc.h b/src/spectral/phasevoc.h similarity index 100% rename from src/phasevoc.h rename to src/spectral/phasevoc.h diff --git a/src/tss.c b/src/spectral/tss.c similarity index 99% rename from src/tss.c rename to src/spectral/tss.c index da5a585f..0cbe2de3 100644 --- a/src/tss.c +++ b/src/spectral/tss.c @@ -22,7 +22,7 @@ #include "aubio_priv.h" #include "sample.h" #include "mathutils.h" -#include "tss.h" +#include "spectral/tss.h" struct _aubio_tss_t { diff --git a/src/tss.h b/src/spectral/tss.h similarity index 100% rename from src/tss.h rename to src/spectral/tss.h diff --git a/src/tempo/beattracking.c b/src/tempo/beattracking.c index e67a6082..7066e1c5 100644 --- a/src/tempo/beattracking.c +++ b/src/tempo/beattracking.c @@ -20,7 +20,7 @@ #include "aubio_priv.h" #include "sample.h" #include "mathutils.h" -#include "beattracking.h" +#include "tempo/beattracking.h" uint_t fvec_gettimesig(smpl_t * acf, uint_t acflen, uint_t gp); void aubio_beattracking_checkstate(aubio_beattracking_t * bt); diff --git a/src/tempo/tempo.c b/src/tempo/tempo.c index 1794bae3..6408ba66 100644 --- a/src/tempo/tempo.c +++ b/src/tempo/tempo.c @@ -21,10 +21,10 @@ #include "sample.h" #include "onset/onsetdetection.h" #include "tempo/beattracking.h" -#include "phasevoc.h" +#include "spectral/phasevoc.h" #include "onset/peakpick.h" #include "mathutils.h" -#include "tempo.h" +#include "tempo/tempo.h" /* structure to store object state */ struct _aubio_tempo_t { diff --git a/src/biquad.c b/src/temporal/biquad.c similarity index 98% rename from src/biquad.c rename to src/temporal/biquad.c index 327abfa1..1775125f 100644 --- a/src/biquad.c +++ b/src/temporal/biquad.c @@ -20,7 +20,7 @@ #include "aubio_priv.h" #include "sample.h" #include "mathutils.h" -#include "biquad.h" +#include "temporal/biquad.h" /** \note this file needs to be in double or more less precision would lead to large * errors in the output diff --git a/src/biquad.h b/src/temporal/biquad.h similarity index 100% rename from src/biquad.h rename to src/temporal/biquad.h diff --git a/src/filter.c b/src/temporal/filter.c similarity index 99% rename from src/filter.c rename to src/temporal/filter.c index 58c6191b..f82cd1f0 100644 --- a/src/filter.c +++ b/src/temporal/filter.c @@ -24,7 +24,7 @@ #include "aubio_priv.h" #include "sample.h" #include "mathutils.h" -#include "filter.h" +#include "temporal/filter.h" struct _aubio_filter_t { uint_t order; diff --git a/src/filter.h b/src/temporal/filter.h similarity index 100% rename from src/filter.h rename to src/temporal/filter.h diff --git a/src/resample.c b/src/temporal/resample.c similarity index 98% rename from src/resample.c rename to src/temporal/resample.c index 8d9366ec..05d7a88d 100644 --- a/src/resample.c +++ b/src/temporal/resample.c @@ -22,7 +22,7 @@ #include "aubio_priv.h" #include "sample.h" -#include "resample.h" +#include "temporal/resample.h" struct _aubio_resampler_t { SRC_DATA *proc; diff --git a/src/resample.h b/src/temporal/resample.h similarity index 100% rename from src/resample.h rename to src/temporal/resample.h diff --git a/src/hist.c b/src/utils/hist.c similarity index 98% rename from src/hist.c rename to src/utils/hist.c index e97287b4..7337ec46 100644 --- a/src/hist.c +++ b/src/utils/hist.c @@ -18,9 +18,9 @@ #include "aubio_priv.h" #include "sample.h" -#include "scale.h" +#include "utils/scale.h" #include "mathutils.h" //vec_min vec_max -#include "hist.h" +#include "utils/hist.h" /******** * Object Structure diff --git a/src/hist.h b/src/utils/hist.h similarity index 100% rename from src/hist.h rename to src/utils/hist.h diff --git a/src/scale.c b/src/utils/scale.c similarity index 98% rename from src/scale.c rename to src/utils/scale.c index dff32b03..d348326e 100644 --- a/src/scale.c +++ b/src/utils/scale.c @@ -19,7 +19,7 @@ #include "aubio_priv.h" #include "sample.h" -#include "scale.h" +#include "utils/scale.h" struct _aubio_scale_t { smpl_t ilow; diff --git a/src/scale.h b/src/utils/scale.h similarity index 100% rename from src/scale.h rename to src/utils/scale.h -- 2.26.2