endif
-SUBDIRS = src ext interfaces/cpp examples sounds plugins $(PYTHONDIR) $(SWIGDIR) $(JAVADIR) $(DOC) tests
+SUBDIRS = src interfaces/cpp examples sounds plugins $(PYTHONDIR) $(SWIGDIR) $(JAVADIR) $(DOC) tests
EXTRA_DIST = bootstrap VERSION
docs:
[with_samplerate=$enableval],
with_samplerate="yes")
if test "$with_samplerate" = "yes"; then
- PKG_CHECK_MODULES(SAMPLERATE, samplerate >= 0.0.15, HAVE_SAMPLERATE=1)
+ PKG_CHECK_MODULES(SAMPLERATE, samplerate >= 0.0.15, HAVE_SAMPLERATE=1,
+ HAVE_SAMPLERATE=0)
if test "${HAVE_SAMPLERATE}" = "1"; then
AC_DEFINE(HAVE_SAMPLERATE,1,[Define to enable libsamplerate support])
fi
AC_OUTPUT([
Makefile
src/Makefile
- ext/Makefile
examples/Makefile
tests/Makefile
tests/src/Makefile
# global flags
-AM_CFLAGS = -DAUBIO_PREFIX=\"$(prefix)\" -I$(top_srcdir)/src -I$(top_srcdir)/ext @AUBIO_CFLAGS@ @LASH_CFLAGS@ @FFTWLIB_CFLAGS@
-AM_LDFLAGS = -L$(top_builddir)/src -L$(top_builddir)/ext -laubioext -laubio @LASH_LIBS@
+AM_CFLAGS = -DAUBIO_PREFIX=\"$(prefix)\" -I$(top_srcdir)/src @AUBIO_CFLAGS@ @LASH_CFLAGS@ @SNDFILE_CFLAGS@ @JACK_CFLAGS@
+AM_LDFLAGS = -L$(top_builddir)/src -laubio @LASH_LIBS@
# add your programs to this list
bin_PROGRAMS = \
noinst_PROGRAMS = \
aubioquiet
-EXTRA_DIST = utils.h
+EXTRA_DIST = utils.h sndfileio.h jackio.h
# optionally add sources file for these programs
-aubioonset_SOURCES = aubioonset.c utils.c
-aubionotes_SOURCES = aubionotes.c utils.c
-aubiotrack_SOURCES = aubiotrack.c utils.c
-aubioquiet_SOURCES = aubioquiet.c utils.c
-aubiomfcc_SOURCES = aubiomfcc.c utils.c
+COMMON_SOURCE_FILES = sndfileio.c jackio.c utils.c
+aubioonset_SOURCES = aubioonset.c $(COMMON_SOURCE_FILES)
+aubionotes_SOURCES = aubionotes.c $(COMMON_SOURCE_FILES)
+aubiotrack_SOURCES = aubiotrack.c $(COMMON_SOURCE_FILES)
+aubioquiet_SOURCES = aubioquiet.c $(COMMON_SOURCE_FILES)
+aubiomfcc_SOURCES = aubiomfcc.c $(COMMON_SOURCE_FILES)
-aubioonset_LDADD = @JACK_LIBS@
-aubionotes_LDADD = @JACK_LIBS@
-aubiotrack_LDADD = @JACK_LIBS@
-aubioquiet_LDADD = @JACK_LIBS@
-aubiomfcc_LDADD = @JACK_LIBS@
+aubioonset_LDADD = @SNDFILE_LIBS@ @JACK_LIBS@
+aubionotes_LDADD = @SNDFILE_LIBS@ @JACK_LIBS@
+aubiotrack_LDADD = @SNDFILE_LIBS@ @JACK_LIBS@
+aubioquiet_LDADD = @SNDFILE_LIBS@ @JACK_LIBS@
+aubiomfcc_LDADD = @SNDFILE_LIBS@ @JACK_LIBS@
#include <math.h> /* for isfinite */
#include <string.h> /* for strcmp */
#include <aubio.h>
-#include <aubioext.h>
+#include "sndfileio.h"
+#ifdef HAVE_JACK
+#include "jackio.h"
+#endif /* HAVE_JACK */
#ifdef HAVE_C99_VARARGS_MACROS
#define debug(...) if (verbose) fprintf (stderr, __VA_ARGS__)
defines = ['AUBIO_PREFIX="' + bld.env['AUBIO_PREFIX'] + '"']
defines += ['PACKAGE="' + bld.env['PACKAGE'] + '"']
+extra_source = ['utils.c', 'sndfileio.c', 'jackio.c']
+
bld.new_task_gen(features = 'cc',
- includes = '../src ../ext',
- source = 'utils.c',
+ includes = '../src',
+ source = extra_source,
uselib = ['LASH'],
defines = defines,
- target = 'utils')
+ target = 'utils_io')
# loop over all *.c filenames in examples to build them all
for target_name in bld.path.ant_glob('*.c').split():
# ignore utils.c
- if target_name in ['utils.c']: continue
+ if target_name in extra_source: continue
bld.new_task_gen(features = 'cc cprogram',
- add_objects = 'utils',
- includes = '../src ../ext',
+ add_objects = 'utils_io',
+ includes = '../src',
defines = defines,
- uselib = ['LASH'],
- uselib_local = ['aubio', 'aubioext'],
+ uselib = ['LASH', 'JACK', 'SNDFILE'],
+ uselib_local = ['aubio'],
source = target_name,
# program name is filename.c without the .c
target = target_name.split('.')[0])
+++ /dev/null
-pkginclude_HEADERS = \
- aubioext.h \
- jackio.h \
- sndfileio.h
-
-lib_LTLIBRARIES = libaubioext.la
-libaubioext_la_SOURCES = aubioext.h \
- jackio.c \
- jackio.h \
- sndfileio.c \
- sndfileio.h
-
-AM_CFLAGS = -I$(top_srcdir)/src @AUBIO_CFLAGS@ @SNDFILE_CFLAGS@ @JACK_CFLAGS@ @FFTWLIB_CFLAGS@ @SAMPLERATE_CFLAGS@
-libaubioext_la_LIBADD = -laubio -L${top_builddir}/src @SNDFILE_LIBS@ @JACK_LIBS@ @FFTWLIB_LIBS@ @SAMPLERATE_LIBS@ @LTLIBOBJS@
-libaubioext_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@
+++ /dev/null
-/*
- Copyright (C) 2003 Paul Brossier <piem@altern.org>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
-
-#ifndef __AUBIOEXT_H__
-#define __AUBIOEXT_H__
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <aubio.h>
-
-#if HAVE_JACK
-#include "jackio.h"
-#endif /* HAVE_JACK */
-
-#if HAVE_SNDFILE
-#include "sndfileio.h"
-#endif /* HAVE_SNDFILE */
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif
+++ /dev/null
-# build libaubioext
-libaubioext = bld.new_task_gen(
- features = 'cc cshlib',
- includes = ['.', '../src'],
- source = bld.path.ant_glob('*.c **/*.c'),
- target = 'aubioext',
- uselib = ['SNDFILE', 'JACK'],
- uselib_local = ['aubio'],
- vnum = bld.env['LIB_VERSION'])
-
-# install headers
-for file in bld.path.ant_glob('**/*.h').split():
- bld.install_as('${PREFIX}/include/aubio/' + file, file)
NOWARN_CFLAGS = -Wno-missing-prototypes -Wno-missing-declarations \
-Wno-strict-aliasing
-AM_CFLAGS = @AUBIO_CFLAGS@ $(NOWARN_CFLAGS) $(SWCFLAGS) \
- -I$(top_builddir)/src -I$(top_srcdir)/src -I$(top_srcdir)/ext \
+AM_CFLAGS = @AUBIO_CFLAGS@ @SNDFILE_CFLAGS@ \
+ $(NOWARN_CFLAGS) $(SWCFLAGS) \
+ -I$(top_builddir)/src -I$(top_srcdir)/src \
+ -I$(top_srcdir)/examples \
-I/usr/include/python${PYTHON_VERSION} \
-I${prefix}/include/python${PYTHON_VERSION} \
-I/usr/include \
-I${prefix}/include
AUBIO_LDFLAGS = $(SWLDFLAGS) \
- -L$(top_builddir)/ext -laubioext \
+ @SNDFILE_LIBS@ \
-L$(top_builddir)/src -laubio
pkgpyexec_LTLIBRARIES = _aubiowrapper.la
_aubiowrapper_la_LDFLAGS = -module -avoid-version $(AUBIO_LDFLAGS)
-_aubiowrapper_la_SOURCES = aubio_wrap.c
+_aubiowrapper_la_SOURCES = aubio_wrap.c $(top_srcdir)/examples/sndfileio.c
aubio_wrap.c aubiowrapper.py:
$(SWIG) -outdir . -o aubio_wrap.c -python $(top_srcdir)/swig/aubio.i
+bld.new_task_gen(features = 'cc',
+ includes = '../../examples ../../src',
+ source = ['../../examples/sndfileio.c'],
+ uselib = ['JACK'],
+ target = 'sndfileio')
+
pyaubio = bld.new_task_gen(name = 'python-aubio',
features = 'cc cshlib pyext',
source = '../../swig/aubio.i',
+ add_objects = 'sndfileio',
target = '_aubiowrapper',
- uselib_local = ['aubio', 'aubioext'],
+ uselib_local = ['aubio'],
+ uselib = ['SNDFILE'],
swig_flags = '-python -Wall',
- includes = '. ../../src ../../ext')
+ includes = '. ../../src ../../examples')
pyaubio.install_path = '${PYTHONDIR}/${PACKAGE}'
# install python files
%module aubiowrapper
%{
- #include "aubio.h"
- #include "aubioext.h"
-%}
-
#include "aubio.h"
-#include "aubioext.h"
+%}
/* type aliases */
typedef unsigned int uint_t;
extern smpl_t ** cvec_get_phas(cvec_t *s);
-/* sndfile */
-%#if HAVE_SNDFILE
-extern aubio_sndfile_t * new_aubio_sndfile_ro (const char * inputfile);
-extern aubio_sndfile_t * new_aubio_sndfile_wo(aubio_sndfile_t * existingfile, const char * outputname);
-extern void aubio_sndfile_info(aubio_sndfile_t * file);
-extern int aubio_sndfile_write(aubio_sndfile_t * file, int frames, fvec_t * write);
-extern int aubio_sndfile_read(aubio_sndfile_t * file, int frames, fvec_t * read);
-extern int del_aubio_sndfile(aubio_sndfile_t * file);
-extern uint_t aubio_sndfile_channels(aubio_sndfile_t * file);
-extern uint_t aubio_sndfile_samplerate(aubio_sndfile_t * file);
-%#endif /* HAVE_SNDFILE */
-
/* fft */
extern aubio_fft_t * new_aubio_fft(uint_t size, uint_t channels);
extern void del_aubio_fft(aubio_fft_t * s);
/* scale */
extern aubio_scale_t * new_aubio_scale(smpl_t flow, smpl_t fhig, smpl_t ilow, smpl_t ihig);
-extern void aubio_scale_set_limits (aubio_scale_t *s, smpl_t ilow, smpl_t ihig, smpl_t olow, smpl_t ohig);
+extern uint_t aubio_scale_set_limits (aubio_scale_t *s, smpl_t ilow, smpl_t ihig, smpl_t olow, smpl_t ohig);
extern void aubio_scale_do(aubio_scale_t *s, fvec_t * input);
extern void del_aubio_scale(aubio_scale_t *s);
/* resampling */
-%#if HAVE_SAMPLERATE
+#if HAVE_SAMPLERATE
extern aubio_resampler_t * new_aubio_resampler(float ratio, uint_t type);
extern void aubio_resampler_do (aubio_resampler_t *s, fvec_t * input, fvec_t * output);
extern void del_aubio_resampler(aubio_resampler_t *s);
-%#endif /* HAVE_SAMPLERATE */
+#endif /* HAVE_SAMPLERATE */
/* onset detection */
aubio_onsetdetection_t * new_aubio_onsetdetection(char * onset_mode, uint_t size, uint_t channels);
aubio_pitchdetection_t *new_aubio_pitchdetection (char *pitch_mode,
uint_t bufsize, uint_t hopsize, uint_t channels, uint_t samplerate);
void aubio_pitchdetection_do (aubio_pitchdetection_t * p, fvec_t * ibuf, fvec_t * obuf);
-void aubio_pitchdetection_set_tolerance(aubio_pitchdetection_t *p, smpl_t thres);
-void aubio_pitchdetection_set_unit(aubio_pitchdetection_t *p, char * pitch_unit);
+uint_t aubio_pitchdetection_set_tolerance(aubio_pitchdetection_t *p, smpl_t thres);
+uint_t aubio_pitchdetection_set_unit(aubio_pitchdetection_t *p, char * pitch_unit);
void del_aubio_pitchdetection(aubio_pitchdetection_t * p);
-
/* pitch mcomb */
aubio_pitchmcomb_t * new_aubio_pitchmcomb(uint_t bufsize, uint_t hopsize, uint_t channels);
void aubio_pitchmcomb_do (aubio_pitchmcomb_t * p, cvec_t * fftgrain, fvec_t * out);
smpl_t aubio_peakpicker_do(aubio_peakpicker_t * p, fvec_t * df);
smpl_t aubio_peakpicker_get_thresholded_input(aubio_peakpicker_t* p);
void del_aubio_peakpicker(aubio_peakpicker_t * p);
-void aubio_peakpicker_set_threshold(aubio_peakpicker_t * p, smpl_t threshold);
+uint_t aubio_peakpicker_set_threshold(aubio_peakpicker_t * p, smpl_t threshold);
smpl_t aubio_peakpicker_get_threshold(aubio_peakpicker_t * p);
/* transient/steady state separation */
-aubio_tss_t * new_aubio_tss(smpl_t thrs, smpl_t alfa, smpl_t beta,
- uint_t size, uint_t overlap,uint_t channels);
-void del_aubio_tss(aubio_tss_t *s);
-void aubio_tss_do(aubio_tss_t *s, cvec_t * input, cvec_t * trans, cvec_t * stead);
+aubio_tss_t *new_aubio_tss (uint_t win_s, uint_t hop_s, uint_t channels);
+void del_aubio_tss (aubio_tss_t * s);
+void aubio_tss_do (aubio_tss_t * s, cvec_t * input, cvec_t * trans,
+ cvec_t * stead);
+uint_t aubio_tss_set_threshold (aubio_tss_t * o, smpl_t thrs);
+uint_t aubio_tss_set_alpha (aubio_tss_t * o, smpl_t alpha);
+uint_t aubio_tss_set_beta (aubio_tss_t * o, smpl_t beta);
/* beattracking */
aubio_beattracking_t * new_aubio_beattracking(uint_t winlen, uint_t channels);
smpl_t aubio_beattracking_get_bpm(aubio_beattracking_t * p);
smpl_t aubio_beattracking_get_confidence(aubio_beattracking_t * p);
+/* tempo */
+typedef struct _aubio_tempo_t aubio_tempo_t;
+aubio_tempo_t * new_aubio_tempo (char_t * mode,
+ uint_t buf_size, uint_t hop_size, uint_t channels, uint_t samplerate);
+void aubio_tempo_do (aubio_tempo_t *o, fvec_t * input, fvec_t * tempo);
+uint_t aubio_tempo_set_silence(aubio_tempo_t * o, smpl_t silence);
+uint_t aubio_tempo_set_threshold(aubio_tempo_t * o, smpl_t threshold);
+smpl_t aubio_tempo_get_bpm(aubio_tempo_t * bt);
+smpl_t aubio_tempo_get_confidence(aubio_tempo_t * bt);
+void del_aubio_tempo(aubio_tempo_t * o);
+
+/* sndfile */
+%{
+#if HAVE_SNDFILE
+#include "sndfileio.h"
+%}
+extern aubio_sndfile_t * new_aubio_sndfile_ro (const char * inputfile);
+extern aubio_sndfile_t * new_aubio_sndfile_wo(aubio_sndfile_t * existingfile, const char * outputname);
+extern void aubio_sndfile_info(aubio_sndfile_t * file);
+extern int aubio_sndfile_write(aubio_sndfile_t * file, int frames, fvec_t * write);
+extern int aubio_sndfile_read(aubio_sndfile_t * file, int frames, fvec_t * read);
+extern int del_aubio_sndfile(aubio_sndfile_t * file);
+extern uint_t aubio_sndfile_channels(aubio_sndfile_t * file);
+extern uint_t aubio_sndfile_samplerate(aubio_sndfile_t * file);
+%{
+#endif /* HAVE_SNDFILE */
+%}
#include <unistd.h> /* sleep() */
#include <aubio.h>
-#include <aubioext.h>
+#include "jackio.h"
uint_t testing = 1; /* change this to 1 to listen */
bld.env['LIB_VERSION'] = LIB_VERSION
# add sub directories
- bld.add_subdirs('src ext examples interfaces/cpp')
+ bld.add_subdirs('src examples interfaces/cpp')
if bld.env['SWIG']:
if bld.env['PYTHON']:
bld.add_subdirs('python/aubio python')
source = target_name,
target = target_name.split('.')[0],
includes = 'src',
+ defines = 'AUBIO_UNSTABLE_API=1',
uselib_local = 'aubio')
- # phasevoc-jack also needs aubioext
+ # phasevoc-jack also needs jack
if target_name.endswith('test-phasevoc-jack.c'):
- this_target.includes = ['src', 'ext']
- this_target.uselib_local = ['aubio', 'aubioext']
+ this_target.includes = ['src', 'examples']
+ this_target.uselib_local = ['aubio']
+ this_target.uselib = ['JACK']
+ this_target.source += ' examples/jackio.c'