Changeset 740f06b
- Timestamp:
- Oct 17, 2009, 12:43:00 AM (15 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- 858cfa7
- Parents:
- 6107f4c
- Files:
-
- 3 deleted
- 10 edited
- 6 moved
Legend:
- Unmodified
- Added
- Removed
-
Makefile.am
r6107f4c r740f06b 14 14 15 15 16 SUBDIRS = src extinterfaces/cpp examples sounds plugins $(PYTHONDIR) $(SWIGDIR) $(JAVADIR) $(DOC) tests16 SUBDIRS = src interfaces/cpp examples sounds plugins $(PYTHONDIR) $(SWIGDIR) $(JAVADIR) $(DOC) tests 17 17 EXTRA_DIST = bootstrap VERSION 18 18 -
configure.ac
r6107f4c r740f06b 167 167 with_samplerate="yes") 168 168 if test "$with_samplerate" = "yes"; then 169 PKG_CHECK_MODULES(SAMPLERATE, samplerate >= 0.0.15, HAVE_SAMPLERATE=1) 169 PKG_CHECK_MODULES(SAMPLERATE, samplerate >= 0.0.15, HAVE_SAMPLERATE=1, 170 HAVE_SAMPLERATE=0) 170 171 if test "${HAVE_SAMPLERATE}" = "1"; then 171 172 AC_DEFINE(HAVE_SAMPLERATE,1,[Define to enable libsamplerate support]) … … 257 258 Makefile 258 259 src/Makefile 259 ext/Makefile260 260 examples/Makefile 261 261 tests/Makefile -
examples/Makefile.am
r6107f4c r740f06b 1 1 # global flags 2 AM_CFLAGS = -DAUBIO_PREFIX=\"$(prefix)\" -I$(top_srcdir)/src -I$(top_srcdir)/ext @AUBIO_CFLAGS@ @LASH_CFLAGS@ @FFTWLIB_CFLAGS@3 AM_LDFLAGS = -L$(top_builddir)/src - L$(top_builddir)/ext -laubioext -laubio @LASH_LIBS@2 AM_CFLAGS = -DAUBIO_PREFIX=\"$(prefix)\" -I$(top_srcdir)/src @AUBIO_CFLAGS@ @LASH_CFLAGS@ @SNDFILE_CFLAGS@ @JACK_CFLAGS@ 3 AM_LDFLAGS = -L$(top_builddir)/src -laubio @LASH_LIBS@ 4 4 5 5 # add your programs to this list … … 13 13 aubioquiet 14 14 15 EXTRA_DIST = utils.h 15 EXTRA_DIST = utils.h sndfileio.h jackio.h 16 16 17 17 # optionally add sources file for these programs 18 aubioonset_SOURCES = aubioonset.c utils.c 19 aubionotes_SOURCES = aubionotes.c utils.c 20 aubiotrack_SOURCES = aubiotrack.c utils.c 21 aubioquiet_SOURCES = aubioquiet.c utils.c 22 aubiomfcc_SOURCES = aubiomfcc.c utils.c 18 COMMON_SOURCE_FILES = sndfileio.c jackio.c utils.c 19 aubioonset_SOURCES = aubioonset.c $(COMMON_SOURCE_FILES) 20 aubionotes_SOURCES = aubionotes.c $(COMMON_SOURCE_FILES) 21 aubiotrack_SOURCES = aubiotrack.c $(COMMON_SOURCE_FILES) 22 aubioquiet_SOURCES = aubioquiet.c $(COMMON_SOURCE_FILES) 23 aubiomfcc_SOURCES = aubiomfcc.c $(COMMON_SOURCE_FILES) 23 24 24 aubioonset_LDADD = @ JACK_LIBS@25 aubionotes_LDADD = @ JACK_LIBS@26 aubiotrack_LDADD = @ JACK_LIBS@27 aubioquiet_LDADD = @ JACK_LIBS@28 aubiomfcc_LDADD = @ JACK_LIBS@25 aubioonset_LDADD = @SNDFILE_LIBS@ @JACK_LIBS@ 26 aubionotes_LDADD = @SNDFILE_LIBS@ @JACK_LIBS@ 27 aubiotrack_LDADD = @SNDFILE_LIBS@ @JACK_LIBS@ 28 aubioquiet_LDADD = @SNDFILE_LIBS@ @JACK_LIBS@ 29 aubiomfcc_LDADD = @SNDFILE_LIBS@ @JACK_LIBS@ -
examples/utils.h
r6107f4c r740f06b 27 27 #include <string.h> /* for strcmp */ 28 28 #include <aubio.h> 29 #include <aubioext.h> 29 #include "sndfileio.h" 30 #ifdef HAVE_JACK 31 #include "jackio.h" 32 #endif /* HAVE_JACK */ 30 33 31 34 #ifdef HAVE_C99_VARARGS_MACROS -
examples/wscript_build
r6107f4c r740f06b 4 4 defines += ['PACKAGE="' + bld.env['PACKAGE'] + '"'] 5 5 6 extra_source = ['utils.c', 'sndfileio.c', 'jackio.c'] 7 6 8 bld.new_task_gen(features = 'cc', 7 includes = '../src ../ext',8 source = 'utils.c',9 includes = '../src', 10 source = extra_source, 9 11 uselib = ['LASH'], 10 12 defines = defines, 11 target = 'utils ')13 target = 'utils_io') 12 14 13 15 # loop over all *.c filenames in examples to build them all 14 16 for target_name in bld.path.ant_glob('*.c').split(): 15 17 # ignore utils.c 16 if target_name in ['utils.c']: continue18 if target_name in extra_source: continue 17 19 bld.new_task_gen(features = 'cc cprogram', 18 add_objects = 'utils ',19 includes = '../src ../ext',20 add_objects = 'utils_io', 21 includes = '../src', 20 22 defines = defines, 21 uselib = ['LASH' ],22 uselib_local = ['aubio' , 'aubioext'],23 uselib = ['LASH', 'JACK', 'SNDFILE'], 24 uselib_local = ['aubio'], 23 25 source = target_name, 24 26 # program name is filename.c without the .c -
python/aubio/Makefile.am
r6107f4c r740f06b 45 45 -Wno-strict-aliasing 46 46 47 AM_CFLAGS = @AUBIO_CFLAGS@ $(NOWARN_CFLAGS) $(SWCFLAGS) \ 48 -I$(top_builddir)/src -I$(top_srcdir)/src -I$(top_srcdir)/ext \ 47 AM_CFLAGS = @AUBIO_CFLAGS@ @SNDFILE_CFLAGS@ \ 48 $(NOWARN_CFLAGS) $(SWCFLAGS) \ 49 -I$(top_builddir)/src -I$(top_srcdir)/src \ 50 -I$(top_srcdir)/examples \ 49 51 -I/usr/include/python${PYTHON_VERSION} \ 50 52 -I${prefix}/include/python${PYTHON_VERSION} \ … … 53 55 54 56 AUBIO_LDFLAGS = $(SWLDFLAGS) \ 55 -L$(top_builddir)/ext -laubioext\57 @SNDFILE_LIBS@ \ 56 58 -L$(top_builddir)/src -laubio 57 59 … … 59 61 60 62 _aubiowrapper_la_LDFLAGS = -module -avoid-version $(AUBIO_LDFLAGS) 61 _aubiowrapper_la_SOURCES = aubio_wrap.c 63 _aubiowrapper_la_SOURCES = aubio_wrap.c $(top_srcdir)/examples/sndfileio.c 62 64 63 65 aubio_wrap.c aubiowrapper.py: -
python/aubio/wscript_build
r6107f4c r740f06b 1 bld.new_task_gen(features = 'cc', 2 includes = '../../examples ../../src', 3 source = ['../../examples/sndfileio.c'], 4 uselib = ['JACK'], 5 target = 'sndfileio') 6 1 7 pyaubio = bld.new_task_gen(name = 'python-aubio', 2 8 features = 'cc cshlib pyext', 3 9 source = '../../swig/aubio.i', 10 add_objects = 'sndfileio', 4 11 target = '_aubiowrapper', 5 uselib_local = ['aubio', 'aubioext'], 12 uselib_local = ['aubio'], 13 uselib = ['SNDFILE'], 6 14 swig_flags = '-python -Wall', 7 includes = '. ../../src ../../ex t')15 includes = '. ../../src ../../examples') 8 16 pyaubio.install_path = '${PYTHONDIR}/${PACKAGE}' 9 17 -
swig/aubio.i
r6107f4c r740f06b 2 2 3 3 %{ 4 #include "aubio.h" 5 #include "aubioext.h" 4 #include "aubio.h" 6 5 %} 7 8 #include "aubio.h"9 #include "aubioext.h"10 6 11 7 /* type aliases */ … … 60 56 extern smpl_t ** cvec_get_phas(cvec_t *s); 61 57 62 63 /* sndfile */64 %#if HAVE_SNDFILE65 extern aubio_sndfile_t * new_aubio_sndfile_ro (const char * inputfile);66 extern aubio_sndfile_t * new_aubio_sndfile_wo(aubio_sndfile_t * existingfile, const char * outputname);67 extern void aubio_sndfile_info(aubio_sndfile_t * file);68 extern int aubio_sndfile_write(aubio_sndfile_t * file, int frames, fvec_t * write);69 extern int aubio_sndfile_read(aubio_sndfile_t * file, int frames, fvec_t * read);70 extern int del_aubio_sndfile(aubio_sndfile_t * file);71 extern uint_t aubio_sndfile_channels(aubio_sndfile_t * file);72 extern uint_t aubio_sndfile_samplerate(aubio_sndfile_t * file);73 %#endif /* HAVE_SNDFILE */74 58 75 59 /* fft */ … … 176 160 /* scale */ 177 161 extern aubio_scale_t * new_aubio_scale(smpl_t flow, smpl_t fhig, smpl_t ilow, smpl_t ihig); 178 extern voidaubio_scale_set_limits (aubio_scale_t *s, smpl_t ilow, smpl_t ihig, smpl_t olow, smpl_t ohig);162 extern uint_t aubio_scale_set_limits (aubio_scale_t *s, smpl_t ilow, smpl_t ihig, smpl_t olow, smpl_t ohig); 179 163 extern void aubio_scale_do(aubio_scale_t *s, fvec_t * input); 180 164 extern void del_aubio_scale(aubio_scale_t *s); 181 165 182 166 /* resampling */ 183 %#if HAVE_SAMPLERATE167 #if HAVE_SAMPLERATE 184 168 extern aubio_resampler_t * new_aubio_resampler(float ratio, uint_t type); 185 169 extern void aubio_resampler_do (aubio_resampler_t *s, fvec_t * input, fvec_t * output); 186 170 extern void del_aubio_resampler(aubio_resampler_t *s); 187 %#endif /* HAVE_SAMPLERATE */171 #endif /* HAVE_SAMPLERATE */ 188 172 189 173 /* onset detection */ … … 202 186 uint_t bufsize, uint_t hopsize, uint_t channels, uint_t samplerate); 203 187 void aubio_pitchdetection_do (aubio_pitchdetection_t * p, fvec_t * ibuf, fvec_t * obuf); 204 voidaubio_pitchdetection_set_tolerance(aubio_pitchdetection_t *p, smpl_t thres);205 voidaubio_pitchdetection_set_unit(aubio_pitchdetection_t *p, char * pitch_unit);188 uint_t aubio_pitchdetection_set_tolerance(aubio_pitchdetection_t *p, smpl_t thres); 189 uint_t aubio_pitchdetection_set_unit(aubio_pitchdetection_t *p, char * pitch_unit); 206 190 void del_aubio_pitchdetection(aubio_pitchdetection_t * p); 207 208 191 209 192 /* pitch mcomb */ … … 232 215 smpl_t aubio_peakpicker_get_thresholded_input(aubio_peakpicker_t* p); 233 216 void del_aubio_peakpicker(aubio_peakpicker_t * p); 234 voidaubio_peakpicker_set_threshold(aubio_peakpicker_t * p, smpl_t threshold);217 uint_t aubio_peakpicker_set_threshold(aubio_peakpicker_t * p, smpl_t threshold); 235 218 smpl_t aubio_peakpicker_get_threshold(aubio_peakpicker_t * p); 236 219 237 220 /* transient/steady state separation */ 238 aubio_tss_t * new_aubio_tss(smpl_t thrs, smpl_t alfa, smpl_t beta, 239 uint_t size, uint_t overlap,uint_t channels); 240 void del_aubio_tss(aubio_tss_t *s); 241 void aubio_tss_do(aubio_tss_t *s, cvec_t * input, cvec_t * trans, cvec_t * stead); 221 aubio_tss_t *new_aubio_tss (uint_t win_s, uint_t hop_s, uint_t channels); 222 void del_aubio_tss (aubio_tss_t * s); 223 void aubio_tss_do (aubio_tss_t * s, cvec_t * input, cvec_t * trans, 224 cvec_t * stead); 225 uint_t aubio_tss_set_threshold (aubio_tss_t * o, smpl_t thrs); 226 uint_t aubio_tss_set_alpha (aubio_tss_t * o, smpl_t alpha); 227 uint_t aubio_tss_set_beta (aubio_tss_t * o, smpl_t beta); 242 228 243 229 /* beattracking */ … … 248 234 smpl_t aubio_beattracking_get_confidence(aubio_beattracking_t * p); 249 235 236 /* tempo */ 237 typedef struct _aubio_tempo_t aubio_tempo_t; 238 aubio_tempo_t * new_aubio_tempo (char_t * mode, 239 uint_t buf_size, uint_t hop_size, uint_t channels, uint_t samplerate); 240 void aubio_tempo_do (aubio_tempo_t *o, fvec_t * input, fvec_t * tempo); 241 uint_t aubio_tempo_set_silence(aubio_tempo_t * o, smpl_t silence); 242 uint_t aubio_tempo_set_threshold(aubio_tempo_t * o, smpl_t threshold); 243 smpl_t aubio_tempo_get_bpm(aubio_tempo_t * bt); 244 smpl_t aubio_tempo_get_confidence(aubio_tempo_t * bt); 245 void del_aubio_tempo(aubio_tempo_t * o); 246 247 /* sndfile */ 248 %{ 249 #if HAVE_SNDFILE 250 #include "sndfileio.h" 251 %} 252 extern aubio_sndfile_t * new_aubio_sndfile_ro (const char * inputfile); 253 extern aubio_sndfile_t * new_aubio_sndfile_wo(aubio_sndfile_t * existingfile, const char * outputname); 254 extern void aubio_sndfile_info(aubio_sndfile_t * file); 255 extern int aubio_sndfile_write(aubio_sndfile_t * file, int frames, fvec_t * write); 256 extern int aubio_sndfile_read(aubio_sndfile_t * file, int frames, fvec_t * read); 257 extern int del_aubio_sndfile(aubio_sndfile_t * file); 258 extern uint_t aubio_sndfile_channels(aubio_sndfile_t * file); 259 extern uint_t aubio_sndfile_samplerate(aubio_sndfile_t * file); 260 %{ 261 #endif /* HAVE_SNDFILE */ 262 %} -
tests/src/test-phasevoc-jack.c
r6107f4c r740f06b 10 10 #include <unistd.h> /* sleep() */ 11 11 #include <aubio.h> 12 #include <aubioext.h>12 #include "jackio.h" 13 13 14 14 uint_t testing = 1; /* change this to 1 to listen */ -
wscript
r6107f4c r740f06b 137 137 138 138 # add sub directories 139 bld.add_subdirs('src ex t examples interfaces/cpp')139 bld.add_subdirs('src examples interfaces/cpp') 140 140 if bld.env['SWIG']: 141 141 if bld.env['PYTHON']: … … 188 188 target = target_name.split('.')[0], 189 189 includes = 'src', 190 defines = 'AUBIO_UNSTABLE_API=1', 190 191 uselib_local = 'aubio') 191 # phasevoc-jack also needs aubioext192 # phasevoc-jack also needs jack 192 193 if target_name.endswith('test-phasevoc-jack.c'): 193 this_target.includes = ['src', 'ext'] 194 this_target.uselib_local = ['aubio', 'aubioext'] 194 this_target.includes = ['src', 'examples'] 195 this_target.uselib_local = ['aubio'] 196 this_target.uselib = ['JACK'] 197 this_target.source += ' examples/jackio.c'
Note: See TracChangeset
for help on using the changeset viewer.