From: Paul Brossier Date: Fri, 16 Oct 2009 22:43:00 +0000 (+0200) Subject: ext/, examples/, swig/, python/, tests/: remove libaubioext, make libsamplerate optional X-Git-Tag: 0.4.0-beta1~635 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=740f06b69a354c22dd92e9ca2d371fc93f259604;p=aubio.git ext/, examples/, swig/, python/, tests/: remove libaubioext, make libsamplerate optional --- diff --git a/Makefile.am b/Makefile.am index 257a70df..db7792d5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -13,7 +13,7 @@ endif 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: diff --git a/configure.ac b/configure.ac index eb27baec..5c3c19be 100644 --- a/configure.ac +++ b/configure.ac @@ -166,7 +166,8 @@ AC_ARG_ENABLE(samplerate, [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 @@ -256,7 +257,6 @@ dnl Create Makefiles AC_OUTPUT([ Makefile src/Makefile - ext/Makefile examples/Makefile tests/Makefile tests/src/Makefile diff --git a/examples/Makefile.am b/examples/Makefile.am index 3ac9a14e..bf593506 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -1,6 +1,6 @@ # 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 = \ @@ -12,17 +12,18 @@ 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@ diff --git a/examples/jackio.c b/examples/jackio.c new file mode 100644 index 00000000..b63f68a2 --- /dev/null +++ b/examples/jackio.c @@ -0,0 +1,342 @@ +/* + Copyright (C) 2003-2009 Paul Brossier + + This file is part of aubio. + + aubio 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 3 of the License, or + (at your option) any later version. + + aubio 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 aubio. If not, see . + +*/ + +#include + +#if HAVE_JACK +#include "aubio_priv.h" +#include "jackio.h" + +typedef jack_default_audio_sample_t jack_sample_t; + +#if HAVE_AUBIO_DOUBLE +#define AUBIO_JACK_MAX_FRAMES 4096 +#define AUBIO_JACK_NEEDS_CONVERSION +#endif + +#define RINGBUFFER_SIZE 1024*sizeof(jack_midi_event_t) + +/** + * jack device structure + */ +struct _aubio_jack_t +{ + /** jack client */ + jack_client_t *client; + /** jack output ports */ + jack_port_t **oports; + /** jack input ports */ + jack_port_t **iports; + /** jack input buffer */ + jack_sample_t **ibufs; + /** jack output buffer */ + jack_sample_t **obufs; +#ifdef AUBIO_JACK_NEEDS_CONVERSION + /** converted jack input buffer */ + smpl_t **sibufs; + /** converted jack output buffer */ + smpl_t **sobufs; +#endif + /** jack input audio channels */ + uint_t ichan; + /** jack output audio channels */ + uint_t ochan; + /** jack input midi channels */ + uint_t imidichan; + /** jack output midi channels */ + uint_t omidichan; + /** midi output ringbuffer */ + jack_ringbuffer_t *midi_out_ring; + /** jack samplerate (Hz) */ + uint_t samplerate; + /** jack processing function */ + aubio_process_func_t callback; +}; + +/* static memory management */ +static aubio_jack_t *aubio_jack_alloc (uint_t ichan, uint_t ochan, + uint_t imidichan, uint_t omidichan); +static uint_t aubio_jack_free (aubio_jack_t * jack_setup); +/* jack callback functions */ +static int aubio_jack_process (jack_nframes_t nframes, void *arg); +static void aubio_jack_shutdown (void *arg); + +aubio_jack_t * +new_aubio_jack (uint_t ichan, uint_t ochan, + uint_t imidichan, uint_t omidichan, aubio_process_func_t callback) +{ + aubio_jack_t *jack_setup = aubio_jack_alloc (ichan, ochan, + imidichan, omidichan); + uint_t i; + char *client_name = "aubio"; + char *jack_port_type; + char name[64]; + /* initial jack client setup */ + if ((jack_setup->client = jack_client_new (client_name)) == 0) { + AUBIO_ERR ("jack server not running?\n"); + AUBIO_QUIT (AUBIO_FAIL); + } + + if (jack_setup->omidichan) { + jack_setup->midi_out_ring = jack_ringbuffer_create (RINGBUFFER_SIZE); + + if (jack_setup->midi_out_ring == NULL) { + AUBIO_ERR ("Failed creating jack midi output ringbuffer."); + AUBIO_QUIT (AUBIO_FAIL); + } + + jack_ringbuffer_mlock (jack_setup->midi_out_ring); + } + + /* set callbacks */ + jack_set_process_callback (jack_setup->client, aubio_jack_process, + (void *) jack_setup); + jack_on_shutdown (jack_setup->client, aubio_jack_shutdown, + (void *) jack_setup); + + /* register jack output audio and midi ports */ + for (i = 0; i < ochan + omidichan; i++) { + if (i < ochan) { + jack_port_type = JACK_DEFAULT_AUDIO_TYPE; + AUBIO_SPRINTF (name, "out_%d", i + 1); + } else { + jack_port_type = JACK_DEFAULT_MIDI_TYPE; + AUBIO_SPRINTF (name, "midi_out_%d", i - ochan + 1); + } + if ((jack_setup->oports[i] = + jack_port_register (jack_setup->client, name, + jack_port_type, JackPortIsOutput, 0)) == 0) { + goto beach; + } + AUBIO_DBG ("%s:%s\n", client_name, name); + } + + /* register jack input audio ports */ + for (i = 0; i < ichan + imidichan; i++) { + if (i < ichan) { + jack_port_type = JACK_DEFAULT_AUDIO_TYPE; + AUBIO_SPRINTF (name, "in_%d", i + 1); + } else { + jack_port_type = JACK_DEFAULT_MIDI_TYPE; + AUBIO_SPRINTF (name, "midi_in_%d", i - ichan + 1); + } + if ((jack_setup->iports[i] = + jack_port_register (jack_setup->client, name, + jack_port_type, JackPortIsInput, 0)) == 0) { + goto beach; + } + AUBIO_DBG ("%s:%s\n", client_name, name); + } + + /* set processing callback */ + jack_setup->callback = callback; + return jack_setup; + +beach: + AUBIO_ERR ("failed registering port \"%s:%s\"!\n", client_name, name); + jack_client_close (jack_setup->client); + AUBIO_QUIT (AUBIO_FAIL); +} + +uint_t +aubio_jack_activate (aubio_jack_t * jack_setup) +{ + /* get sample rate */ + jack_setup->samplerate = jack_get_sample_rate (jack_setup->client); + /* actual jack process activation */ + if (jack_activate (jack_setup->client)) { + AUBIO_ERR ("jack client activation failed"); + return 1; + } + return 0; +} + +void +aubio_jack_close (aubio_jack_t * jack_setup) +{ + /* bug : should disconnect all ports first */ + jack_client_close (jack_setup->client); + aubio_jack_free (jack_setup); +} + +/* memory management */ +static aubio_jack_t * +aubio_jack_alloc (uint_t ichan, uint_t ochan, + uint_t imidichan, uint_t omidichan) +{ + aubio_jack_t *jack_setup = AUBIO_NEW (aubio_jack_t); + jack_setup->ichan = ichan; + jack_setup->ochan = ochan; + jack_setup->imidichan = imidichan; + jack_setup->omidichan = omidichan; + jack_setup->oports = AUBIO_ARRAY (jack_port_t *, ichan + imidichan); + jack_setup->iports = AUBIO_ARRAY (jack_port_t *, ochan + omidichan); + jack_setup->ibufs = AUBIO_ARRAY (jack_sample_t *, ichan); + jack_setup->obufs = AUBIO_ARRAY (jack_sample_t *, ochan); +#ifdef AUBIO_JACK_NEEDS_CONVERSION + /* allocate arrays for data conversion */ + jack_setup->sibufs = AUBIO_ARRAY (smpl_t *, ichan); + uint_t i; + for (i = 0; i < ichan; i++) { + jack_setup->sibufs[i] = AUBIO_ARRAY (smpl_t, AUBIO_JACK_MAX_FRAMES); + } + jack_setup->sobufs = AUBIO_ARRAY (smpl_t *, ochan); + for (i = 0; i < ochan; i++) { + jack_setup->sobufs[i] = AUBIO_ARRAY (smpl_t, AUBIO_JACK_MAX_FRAMES); + } +#endif + return jack_setup; +} + +static uint_t +aubio_jack_free (aubio_jack_t * jack_setup) +{ + if (jack_setup->omidichan && jack_setup->midi_out_ring) { + jack_ringbuffer_free (jack_setup->midi_out_ring); + } + AUBIO_FREE (jack_setup->oports); + AUBIO_FREE (jack_setup->iports); + AUBIO_FREE (jack_setup->ibufs); + AUBIO_FREE (jack_setup->obufs); + AUBIO_FREE (jack_setup); + return AUBIO_OK; +} + +/* jack callback functions */ +static void +aubio_jack_shutdown (void *arg UNUSED) +{ + AUBIO_ERR ("jack shutdown\n"); + AUBIO_QUIT (AUBIO_OK); +} + +static void process_midi_output (aubio_jack_t * dev, jack_nframes_t nframes); + +static int +aubio_jack_process (jack_nframes_t nframes, void *arg) +{ + aubio_jack_t *dev = (aubio_jack_t *) arg; + uint_t i; + for (i = 0; i < dev->ichan; i++) { + /* get readable input */ + dev->ibufs[i] = + (jack_sample_t *) jack_port_get_buffer (dev->iports[i], nframes); + } + for (i = 0; i < dev->ochan; i++) { + /* get writable output */ + dev->obufs[i] = + (jack_sample_t *) jack_port_get_buffer (dev->oports[i], nframes); + } +#ifndef AUBIO_JACK_NEEDS_CONVERSION + dev->callback (dev->ibufs, dev->obufs, nframes); +#else + uint_t j; + for (j = 0; j < MIN (nframes, AUBIO_JACK_MAX_FRAMES); j++) { + for (i = 0; i < dev->ichan; i++) { + dev->sibufs[i][j] = (smpl_t) dev->ibufs[i][j]; + } + } + dev->callback (dev->sibufs, dev->sobufs, nframes); + for (j = 0; j < MIN (nframes, AUBIO_JACK_MAX_FRAMES); j++) { + for (i = 0; i < dev->ochan; i++) { + dev->obufs[i][j] = (jack_sample_t) dev->sobufs[i][j]; + } + } +#endif + + /* now process midi stuff */ + if (dev->omidichan) { + process_midi_output (dev, nframes); + } + + return 0; +} + +void +aubio_jack_midi_event_write (aubio_jack_t * dev, jack_midi_event_t * event) +{ + int written; + + if (jack_ringbuffer_write_space (dev->midi_out_ring) < sizeof (*event)) { + AUBIO_ERR ("Not enough space to write midi output, midi event lost!\n"); + return; + } + + written = jack_ringbuffer_write (dev->midi_out_ring, + (char *) event, sizeof (*event)); + + if (written != sizeof (*event)) { + AUBIO_WRN ("Call to jack_ringbuffer_write failed, midi event lost! \n"); + } +} + +static void +process_midi_output (aubio_jack_t * dev, jack_nframes_t nframes) +{ + int read, sendtime; + jack_midi_event_t ev; + unsigned char *buffer; + jack_nframes_t last_frame_time = jack_last_frame_time (dev->client); + // TODO for each omidichan + void *port_buffer = jack_port_get_buffer (dev->oports[dev->ochan], nframes); + + if (port_buffer == NULL) { + AUBIO_WRN ("Failed to get jack midi output port, will not send anything\n"); + return; + } + + jack_midi_clear_buffer (port_buffer); + + // TODO add rate_limit + + while (jack_ringbuffer_read_space (dev->midi_out_ring)) { + read = jack_ringbuffer_peek (dev->midi_out_ring, (char *) &ev, sizeof (ev)); + + if (read != sizeof (ev)) { + AUBIO_WRN ("Short read from the ringbuffer, possible note loss.\n"); + jack_ringbuffer_read_advance (dev->midi_out_ring, read); + continue; + } + + sendtime = ev.time + nframes - last_frame_time; + + /* send time is after current period, will do this one later */ + if (sendtime >= (int) nframes) { + break; + } + + if (sendtime < 0) { + sendtime = 0; + } + + jack_ringbuffer_read_advance (dev->midi_out_ring, sizeof (ev)); + + buffer = jack_midi_event_reserve (port_buffer, sendtime, ev.size); + + if (buffer == NULL) { + AUBIO_WRN ("Call to jack_midi_event_reserve failed, note lost.\n"); + break; + } + + AUBIO_MEMCPY (buffer, ev.buffer, ev.size); + } +} + +#endif /* HAVE_JACK */ diff --git a/examples/jackio.h b/examples/jackio.h new file mode 100644 index 00000000..dcb6fb25 --- /dev/null +++ b/examples/jackio.h @@ -0,0 +1,63 @@ +/* + Copyright (C) 2003-2009 Paul Brossier + + This file is part of aubio. + + aubio 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 3 of the License, or + (at your option) any later version. + + aubio 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 aubio. If not, see . + +*/ + +#ifndef JACKIO_H +#define JACKIO_H + +/** + * @file + * + * Jack driver for aubio + * + */ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + +/** jack object */ +typedef struct _aubio_jack_t aubio_jack_t; +/** jack process function */ +typedef int (*aubio_process_func_t) (smpl_t ** input, + smpl_t ** output, int nframes); + +/** jack device creation function */ +aubio_jack_t *new_aubio_jack (uint_t inchannels, uint_t outchannels, + uint_t imidichan, uint_t omidichan, + aubio_process_func_t callback); +/** activate jack client (run jackprocess function) */ +uint_t aubio_jack_activate (aubio_jack_t * jack_setup); +/** close and delete jack client */ +void aubio_jack_close (aubio_jack_t * jack_setup); + +/** write a jack_midi_event_t to the midi output ringbuffer */ +void aubio_jack_midi_event_write (aubio_jack_t * jack_setup, + jack_midi_event_t * event); + +#ifdef __cplusplus +} +#endif + +#endif /* JACKIO_H */ diff --git a/examples/sndfileio.c b/examples/sndfileio.c new file mode 100644 index 00000000..ce4dc689 --- /dev/null +++ b/examples/sndfileio.c @@ -0,0 +1,209 @@ +/* + Copyright (C) 2003 Paul Brossier + + 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. + +*/ + +#include + +#include + +#include "aubio_priv.h" +#include "fvec.h" +#include "sndfileio.h" +#include "mathutils.h" + +#define MAX_CHANNELS 6 +#define MAX_SIZE 4096 + +struct _aubio_sndfile_t { + SNDFILE *handle; + int samplerate; + int channels; + int format; + float *tmpdata; /** scratch pad for interleaving/deinterleaving. */ + int size; /** store the size to check if realloc needed */ +}; + +aubio_sndfile_t * new_aubio_sndfile_ro(const char* outputname) { + aubio_sndfile_t * f = AUBIO_NEW(aubio_sndfile_t); + SF_INFO sfinfo; + AUBIO_MEMSET(&sfinfo, 0, sizeof (sfinfo)); + + f->handle = sf_open (outputname, SFM_READ, &sfinfo); + + if (f->handle == NULL) { + AUBIO_ERR("Failed opening %s: %s\n", outputname, + sf_strerror (NULL)); /* libsndfile err msg */ + return NULL; + } + + if (sfinfo.channels > MAX_CHANNELS) { + AUBIO_ERR("Not able to process more than %d channels\n", MAX_CHANNELS); + return NULL; + } + + f->size = MAX_SIZE*sfinfo.channels; + f->tmpdata = AUBIO_ARRAY(float,f->size); + /* get input specs */ + f->samplerate = sfinfo.samplerate; + f->channels = sfinfo.channels; + f->format = sfinfo.format; + + return f; +} + +int aubio_sndfile_open_wo(aubio_sndfile_t * f, const char* inputname) { + SF_INFO sfinfo; + AUBIO_MEMSET(&sfinfo, 0, sizeof (sfinfo)); + + /* define file output spec */ + sfinfo.samplerate = f->samplerate; + sfinfo.channels = f->channels; + sfinfo.format = f->format; + + if (! (f->handle = sf_open (inputname, SFM_WRITE, &sfinfo))) { + AUBIO_ERR("Not able to open output file %s.\n", inputname); + AUBIO_ERR("%s\n",sf_strerror (NULL)); /* libsndfile err msg */ + AUBIO_QUIT(AUBIO_FAIL); + } + + if (sfinfo.channels > MAX_CHANNELS) { + AUBIO_ERR("Not able to process more than %d channels\n", MAX_CHANNELS); + AUBIO_QUIT(AUBIO_FAIL); + } + f->size = MAX_SIZE*sfinfo.channels; + f->tmpdata = AUBIO_ARRAY(float,f->size); + return AUBIO_OK; +} + +/* setup file struct from existing one */ +aubio_sndfile_t * new_aubio_sndfile_wo(aubio_sndfile_t * fmodel, const char *outputname) { + aubio_sndfile_t * f = AUBIO_NEW(aubio_sndfile_t); + f->samplerate = fmodel->samplerate; + f->channels = fmodel->channels; + f->format = fmodel->format; + aubio_sndfile_open_wo(f, outputname); + return f; +} + + +/* return 0 if properly closed, 1 otherwise */ +int del_aubio_sndfile(aubio_sndfile_t * f) { + if (sf_close(f->handle)) { + AUBIO_ERR("Error closing file."); + puts (sf_strerror (NULL)); + return 1; + } + AUBIO_FREE(f->tmpdata); + AUBIO_FREE(f); + //AUBIO_DBG("File closed.\n"); + return 0; +} + +/************************************************************** + * + * Read write methods + * + */ + + +/* read frames from file in data + * return the number of frames actually read */ +int aubio_sndfile_read(aubio_sndfile_t * f, int frames, fvec_t * read) { + sf_count_t read_frames; + int i,j, channels = f->channels; + int nsamples = frames*channels; + int aread; + smpl_t *pread; + + /* allocate data for de/interleaving reallocated when needed. */ + if (nsamples >= f->size) { + AUBIO_ERR("Maximum aubio_sndfile_read buffer size exceeded."); + return -1; + /* + AUBIO_FREE(f->tmpdata); + f->tmpdata = AUBIO_ARRAY(float,nsamples); + */ + } + //f->size = nsamples; + + /* do actual reading */ + read_frames = sf_read_float (f->handle, f->tmpdata, nsamples); + + aread = (int)FLOOR(read_frames/(float)channels); + + /* de-interleaving data */ + for (i=0; itmpdata[channels*j+i]; + } + } + return aread; +} + +/* write 'frames' samples to file from data + * return the number of frames actually written + */ +int aubio_sndfile_write(aubio_sndfile_t * f, int frames, fvec_t * write) { + sf_count_t written_frames = 0; + int i, j, channels = f->channels; + int nsamples = channels*frames; + smpl_t *pwrite; + + /* allocate data for de/interleaving reallocated when needed. */ + if (nsamples >= f->size) { + AUBIO_ERR("Maximum aubio_sndfile_write buffer size exceeded."); + return -1; + /* + AUBIO_FREE(f->tmpdata); + f->tmpdata = AUBIO_ARRAY(float,nsamples); + */ + } + //f->size = nsamples; + + /* interleaving data */ + for (i=0; itmpdata[channels*j+i] = (float)pwrite[j]; + } + } + written_frames = sf_write_float (f->handle, f->tmpdata, nsamples); + return written_frames/channels; +} + +/******************************************************************* + * + * Get object info + * + */ + +uint_t aubio_sndfile_channels(aubio_sndfile_t * f) { + return f->channels; +} + +uint_t aubio_sndfile_samplerate(aubio_sndfile_t * f) { + return f->samplerate; +} + +void aubio_sndfile_info(aubio_sndfile_t * f) { + AUBIO_DBG("srate : %d\n", f->samplerate); + AUBIO_DBG("channels : %d\n", f->channels); + AUBIO_DBG("format : %d\n", f->format); +} + diff --git a/examples/sndfileio.h b/examples/sndfileio.h new file mode 100644 index 00000000..23d9ee58 --- /dev/null +++ b/examples/sndfileio.h @@ -0,0 +1,73 @@ +/* + Copyright (C) 2003 Paul Brossier + + 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 SNDFILEIO_H +#define SNDFILEIO_H + +/** @file + * sndfile functions + */ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * sndfile object + */ +typedef struct _aubio_sndfile_t aubio_sndfile_t; +/** + * Open a sound file for reading + */ +aubio_sndfile_t * new_aubio_sndfile_ro (const char * inputfile); +/** + * Copy file model from previously opened sound file. + */ +aubio_sndfile_t * new_aubio_sndfile_wo(aubio_sndfile_t * existingfile, const char * outputname); +/** + * Open a sound file for writing + */ +int aubio_sndfile_open_wo (aubio_sndfile_t * file, const char * outputname); +/** + * Read frames data from file + */ +int aubio_sndfile_read(aubio_sndfile_t * file, int frames, fvec_t * read); +/** + * Write data of length frames to file + */ +int aubio_sndfile_write(aubio_sndfile_t * file, int frames, fvec_t * write); +/** + * Close file and delete file object + */ +int del_aubio_sndfile(aubio_sndfile_t * file); +/** + * Return some files facts + */ +void aubio_sndfile_info(aubio_sndfile_t * file); +/** + * Return number of channel in file + */ +uint_t aubio_sndfile_channels(aubio_sndfile_t * file); +uint_t aubio_sndfile_samplerate(aubio_sndfile_t * file); + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/examples/utils.h b/examples/utils.h index 884f94ba..17a7a8bd 100644 --- a/examples/utils.h +++ b/examples/utils.h @@ -26,7 +26,10 @@ #include /* for isfinite */ #include /* for strcmp */ #include -#include +#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__) diff --git a/examples/wscript_build b/examples/wscript_build index 84943bc6..33b601a7 100644 --- a/examples/wscript_build +++ b/examples/wscript_build @@ -3,23 +3,25 @@ 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]) diff --git a/ext/Makefile.am b/ext/Makefile.am deleted file mode 100644 index 24e4b524..00000000 --- a/ext/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ -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@ diff --git a/ext/aubioext.h b/ext/aubioext.h deleted file mode 100644 index 67f75da5..00000000 --- a/ext/aubioext.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - Copyright (C) 2003 Paul Brossier - - 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 - -#if HAVE_JACK -#include "jackio.h" -#endif /* HAVE_JACK */ - -#if HAVE_SNDFILE -#include "sndfileio.h" -#endif /* HAVE_SNDFILE */ - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif diff --git a/ext/jackio.c b/ext/jackio.c deleted file mode 100644 index b63f68a2..00000000 --- a/ext/jackio.c +++ /dev/null @@ -1,342 +0,0 @@ -/* - Copyright (C) 2003-2009 Paul Brossier - - This file is part of aubio. - - aubio 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 3 of the License, or - (at your option) any later version. - - aubio 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 aubio. If not, see . - -*/ - -#include - -#if HAVE_JACK -#include "aubio_priv.h" -#include "jackio.h" - -typedef jack_default_audio_sample_t jack_sample_t; - -#if HAVE_AUBIO_DOUBLE -#define AUBIO_JACK_MAX_FRAMES 4096 -#define AUBIO_JACK_NEEDS_CONVERSION -#endif - -#define RINGBUFFER_SIZE 1024*sizeof(jack_midi_event_t) - -/** - * jack device structure - */ -struct _aubio_jack_t -{ - /** jack client */ - jack_client_t *client; - /** jack output ports */ - jack_port_t **oports; - /** jack input ports */ - jack_port_t **iports; - /** jack input buffer */ - jack_sample_t **ibufs; - /** jack output buffer */ - jack_sample_t **obufs; -#ifdef AUBIO_JACK_NEEDS_CONVERSION - /** converted jack input buffer */ - smpl_t **sibufs; - /** converted jack output buffer */ - smpl_t **sobufs; -#endif - /** jack input audio channels */ - uint_t ichan; - /** jack output audio channels */ - uint_t ochan; - /** jack input midi channels */ - uint_t imidichan; - /** jack output midi channels */ - uint_t omidichan; - /** midi output ringbuffer */ - jack_ringbuffer_t *midi_out_ring; - /** jack samplerate (Hz) */ - uint_t samplerate; - /** jack processing function */ - aubio_process_func_t callback; -}; - -/* static memory management */ -static aubio_jack_t *aubio_jack_alloc (uint_t ichan, uint_t ochan, - uint_t imidichan, uint_t omidichan); -static uint_t aubio_jack_free (aubio_jack_t * jack_setup); -/* jack callback functions */ -static int aubio_jack_process (jack_nframes_t nframes, void *arg); -static void aubio_jack_shutdown (void *arg); - -aubio_jack_t * -new_aubio_jack (uint_t ichan, uint_t ochan, - uint_t imidichan, uint_t omidichan, aubio_process_func_t callback) -{ - aubio_jack_t *jack_setup = aubio_jack_alloc (ichan, ochan, - imidichan, omidichan); - uint_t i; - char *client_name = "aubio"; - char *jack_port_type; - char name[64]; - /* initial jack client setup */ - if ((jack_setup->client = jack_client_new (client_name)) == 0) { - AUBIO_ERR ("jack server not running?\n"); - AUBIO_QUIT (AUBIO_FAIL); - } - - if (jack_setup->omidichan) { - jack_setup->midi_out_ring = jack_ringbuffer_create (RINGBUFFER_SIZE); - - if (jack_setup->midi_out_ring == NULL) { - AUBIO_ERR ("Failed creating jack midi output ringbuffer."); - AUBIO_QUIT (AUBIO_FAIL); - } - - jack_ringbuffer_mlock (jack_setup->midi_out_ring); - } - - /* set callbacks */ - jack_set_process_callback (jack_setup->client, aubio_jack_process, - (void *) jack_setup); - jack_on_shutdown (jack_setup->client, aubio_jack_shutdown, - (void *) jack_setup); - - /* register jack output audio and midi ports */ - for (i = 0; i < ochan + omidichan; i++) { - if (i < ochan) { - jack_port_type = JACK_DEFAULT_AUDIO_TYPE; - AUBIO_SPRINTF (name, "out_%d", i + 1); - } else { - jack_port_type = JACK_DEFAULT_MIDI_TYPE; - AUBIO_SPRINTF (name, "midi_out_%d", i - ochan + 1); - } - if ((jack_setup->oports[i] = - jack_port_register (jack_setup->client, name, - jack_port_type, JackPortIsOutput, 0)) == 0) { - goto beach; - } - AUBIO_DBG ("%s:%s\n", client_name, name); - } - - /* register jack input audio ports */ - for (i = 0; i < ichan + imidichan; i++) { - if (i < ichan) { - jack_port_type = JACK_DEFAULT_AUDIO_TYPE; - AUBIO_SPRINTF (name, "in_%d", i + 1); - } else { - jack_port_type = JACK_DEFAULT_MIDI_TYPE; - AUBIO_SPRINTF (name, "midi_in_%d", i - ichan + 1); - } - if ((jack_setup->iports[i] = - jack_port_register (jack_setup->client, name, - jack_port_type, JackPortIsInput, 0)) == 0) { - goto beach; - } - AUBIO_DBG ("%s:%s\n", client_name, name); - } - - /* set processing callback */ - jack_setup->callback = callback; - return jack_setup; - -beach: - AUBIO_ERR ("failed registering port \"%s:%s\"!\n", client_name, name); - jack_client_close (jack_setup->client); - AUBIO_QUIT (AUBIO_FAIL); -} - -uint_t -aubio_jack_activate (aubio_jack_t * jack_setup) -{ - /* get sample rate */ - jack_setup->samplerate = jack_get_sample_rate (jack_setup->client); - /* actual jack process activation */ - if (jack_activate (jack_setup->client)) { - AUBIO_ERR ("jack client activation failed"); - return 1; - } - return 0; -} - -void -aubio_jack_close (aubio_jack_t * jack_setup) -{ - /* bug : should disconnect all ports first */ - jack_client_close (jack_setup->client); - aubio_jack_free (jack_setup); -} - -/* memory management */ -static aubio_jack_t * -aubio_jack_alloc (uint_t ichan, uint_t ochan, - uint_t imidichan, uint_t omidichan) -{ - aubio_jack_t *jack_setup = AUBIO_NEW (aubio_jack_t); - jack_setup->ichan = ichan; - jack_setup->ochan = ochan; - jack_setup->imidichan = imidichan; - jack_setup->omidichan = omidichan; - jack_setup->oports = AUBIO_ARRAY (jack_port_t *, ichan + imidichan); - jack_setup->iports = AUBIO_ARRAY (jack_port_t *, ochan + omidichan); - jack_setup->ibufs = AUBIO_ARRAY (jack_sample_t *, ichan); - jack_setup->obufs = AUBIO_ARRAY (jack_sample_t *, ochan); -#ifdef AUBIO_JACK_NEEDS_CONVERSION - /* allocate arrays for data conversion */ - jack_setup->sibufs = AUBIO_ARRAY (smpl_t *, ichan); - uint_t i; - for (i = 0; i < ichan; i++) { - jack_setup->sibufs[i] = AUBIO_ARRAY (smpl_t, AUBIO_JACK_MAX_FRAMES); - } - jack_setup->sobufs = AUBIO_ARRAY (smpl_t *, ochan); - for (i = 0; i < ochan; i++) { - jack_setup->sobufs[i] = AUBIO_ARRAY (smpl_t, AUBIO_JACK_MAX_FRAMES); - } -#endif - return jack_setup; -} - -static uint_t -aubio_jack_free (aubio_jack_t * jack_setup) -{ - if (jack_setup->omidichan && jack_setup->midi_out_ring) { - jack_ringbuffer_free (jack_setup->midi_out_ring); - } - AUBIO_FREE (jack_setup->oports); - AUBIO_FREE (jack_setup->iports); - AUBIO_FREE (jack_setup->ibufs); - AUBIO_FREE (jack_setup->obufs); - AUBIO_FREE (jack_setup); - return AUBIO_OK; -} - -/* jack callback functions */ -static void -aubio_jack_shutdown (void *arg UNUSED) -{ - AUBIO_ERR ("jack shutdown\n"); - AUBIO_QUIT (AUBIO_OK); -} - -static void process_midi_output (aubio_jack_t * dev, jack_nframes_t nframes); - -static int -aubio_jack_process (jack_nframes_t nframes, void *arg) -{ - aubio_jack_t *dev = (aubio_jack_t *) arg; - uint_t i; - for (i = 0; i < dev->ichan; i++) { - /* get readable input */ - dev->ibufs[i] = - (jack_sample_t *) jack_port_get_buffer (dev->iports[i], nframes); - } - for (i = 0; i < dev->ochan; i++) { - /* get writable output */ - dev->obufs[i] = - (jack_sample_t *) jack_port_get_buffer (dev->oports[i], nframes); - } -#ifndef AUBIO_JACK_NEEDS_CONVERSION - dev->callback (dev->ibufs, dev->obufs, nframes); -#else - uint_t j; - for (j = 0; j < MIN (nframes, AUBIO_JACK_MAX_FRAMES); j++) { - for (i = 0; i < dev->ichan; i++) { - dev->sibufs[i][j] = (smpl_t) dev->ibufs[i][j]; - } - } - dev->callback (dev->sibufs, dev->sobufs, nframes); - for (j = 0; j < MIN (nframes, AUBIO_JACK_MAX_FRAMES); j++) { - for (i = 0; i < dev->ochan; i++) { - dev->obufs[i][j] = (jack_sample_t) dev->sobufs[i][j]; - } - } -#endif - - /* now process midi stuff */ - if (dev->omidichan) { - process_midi_output (dev, nframes); - } - - return 0; -} - -void -aubio_jack_midi_event_write (aubio_jack_t * dev, jack_midi_event_t * event) -{ - int written; - - if (jack_ringbuffer_write_space (dev->midi_out_ring) < sizeof (*event)) { - AUBIO_ERR ("Not enough space to write midi output, midi event lost!\n"); - return; - } - - written = jack_ringbuffer_write (dev->midi_out_ring, - (char *) event, sizeof (*event)); - - if (written != sizeof (*event)) { - AUBIO_WRN ("Call to jack_ringbuffer_write failed, midi event lost! \n"); - } -} - -static void -process_midi_output (aubio_jack_t * dev, jack_nframes_t nframes) -{ - int read, sendtime; - jack_midi_event_t ev; - unsigned char *buffer; - jack_nframes_t last_frame_time = jack_last_frame_time (dev->client); - // TODO for each omidichan - void *port_buffer = jack_port_get_buffer (dev->oports[dev->ochan], nframes); - - if (port_buffer == NULL) { - AUBIO_WRN ("Failed to get jack midi output port, will not send anything\n"); - return; - } - - jack_midi_clear_buffer (port_buffer); - - // TODO add rate_limit - - while (jack_ringbuffer_read_space (dev->midi_out_ring)) { - read = jack_ringbuffer_peek (dev->midi_out_ring, (char *) &ev, sizeof (ev)); - - if (read != sizeof (ev)) { - AUBIO_WRN ("Short read from the ringbuffer, possible note loss.\n"); - jack_ringbuffer_read_advance (dev->midi_out_ring, read); - continue; - } - - sendtime = ev.time + nframes - last_frame_time; - - /* send time is after current period, will do this one later */ - if (sendtime >= (int) nframes) { - break; - } - - if (sendtime < 0) { - sendtime = 0; - } - - jack_ringbuffer_read_advance (dev->midi_out_ring, sizeof (ev)); - - buffer = jack_midi_event_reserve (port_buffer, sendtime, ev.size); - - if (buffer == NULL) { - AUBIO_WRN ("Call to jack_midi_event_reserve failed, note lost.\n"); - break; - } - - AUBIO_MEMCPY (buffer, ev.buffer, ev.size); - } -} - -#endif /* HAVE_JACK */ diff --git a/ext/jackio.h b/ext/jackio.h deleted file mode 100644 index dcb6fb25..00000000 --- a/ext/jackio.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - Copyright (C) 2003-2009 Paul Brossier - - This file is part of aubio. - - aubio 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 3 of the License, or - (at your option) any later version. - - aubio 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 aubio. If not, see . - -*/ - -#ifndef JACKIO_H -#define JACKIO_H - -/** - * @file - * - * Jack driver for aubio - * - */ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - -/** jack object */ -typedef struct _aubio_jack_t aubio_jack_t; -/** jack process function */ -typedef int (*aubio_process_func_t) (smpl_t ** input, - smpl_t ** output, int nframes); - -/** jack device creation function */ -aubio_jack_t *new_aubio_jack (uint_t inchannels, uint_t outchannels, - uint_t imidichan, uint_t omidichan, - aubio_process_func_t callback); -/** activate jack client (run jackprocess function) */ -uint_t aubio_jack_activate (aubio_jack_t * jack_setup); -/** close and delete jack client */ -void aubio_jack_close (aubio_jack_t * jack_setup); - -/** write a jack_midi_event_t to the midi output ringbuffer */ -void aubio_jack_midi_event_write (aubio_jack_t * jack_setup, - jack_midi_event_t * event); - -#ifdef __cplusplus -} -#endif - -#endif /* JACKIO_H */ diff --git a/ext/sndfileio.c b/ext/sndfileio.c deleted file mode 100644 index ce4dc689..00000000 --- a/ext/sndfileio.c +++ /dev/null @@ -1,209 +0,0 @@ -/* - Copyright (C) 2003 Paul Brossier - - 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. - -*/ - -#include - -#include - -#include "aubio_priv.h" -#include "fvec.h" -#include "sndfileio.h" -#include "mathutils.h" - -#define MAX_CHANNELS 6 -#define MAX_SIZE 4096 - -struct _aubio_sndfile_t { - SNDFILE *handle; - int samplerate; - int channels; - int format; - float *tmpdata; /** scratch pad for interleaving/deinterleaving. */ - int size; /** store the size to check if realloc needed */ -}; - -aubio_sndfile_t * new_aubio_sndfile_ro(const char* outputname) { - aubio_sndfile_t * f = AUBIO_NEW(aubio_sndfile_t); - SF_INFO sfinfo; - AUBIO_MEMSET(&sfinfo, 0, sizeof (sfinfo)); - - f->handle = sf_open (outputname, SFM_READ, &sfinfo); - - if (f->handle == NULL) { - AUBIO_ERR("Failed opening %s: %s\n", outputname, - sf_strerror (NULL)); /* libsndfile err msg */ - return NULL; - } - - if (sfinfo.channels > MAX_CHANNELS) { - AUBIO_ERR("Not able to process more than %d channels\n", MAX_CHANNELS); - return NULL; - } - - f->size = MAX_SIZE*sfinfo.channels; - f->tmpdata = AUBIO_ARRAY(float,f->size); - /* get input specs */ - f->samplerate = sfinfo.samplerate; - f->channels = sfinfo.channels; - f->format = sfinfo.format; - - return f; -} - -int aubio_sndfile_open_wo(aubio_sndfile_t * f, const char* inputname) { - SF_INFO sfinfo; - AUBIO_MEMSET(&sfinfo, 0, sizeof (sfinfo)); - - /* define file output spec */ - sfinfo.samplerate = f->samplerate; - sfinfo.channels = f->channels; - sfinfo.format = f->format; - - if (! (f->handle = sf_open (inputname, SFM_WRITE, &sfinfo))) { - AUBIO_ERR("Not able to open output file %s.\n", inputname); - AUBIO_ERR("%s\n",sf_strerror (NULL)); /* libsndfile err msg */ - AUBIO_QUIT(AUBIO_FAIL); - } - - if (sfinfo.channels > MAX_CHANNELS) { - AUBIO_ERR("Not able to process more than %d channels\n", MAX_CHANNELS); - AUBIO_QUIT(AUBIO_FAIL); - } - f->size = MAX_SIZE*sfinfo.channels; - f->tmpdata = AUBIO_ARRAY(float,f->size); - return AUBIO_OK; -} - -/* setup file struct from existing one */ -aubio_sndfile_t * new_aubio_sndfile_wo(aubio_sndfile_t * fmodel, const char *outputname) { - aubio_sndfile_t * f = AUBIO_NEW(aubio_sndfile_t); - f->samplerate = fmodel->samplerate; - f->channels = fmodel->channels; - f->format = fmodel->format; - aubio_sndfile_open_wo(f, outputname); - return f; -} - - -/* return 0 if properly closed, 1 otherwise */ -int del_aubio_sndfile(aubio_sndfile_t * f) { - if (sf_close(f->handle)) { - AUBIO_ERR("Error closing file."); - puts (sf_strerror (NULL)); - return 1; - } - AUBIO_FREE(f->tmpdata); - AUBIO_FREE(f); - //AUBIO_DBG("File closed.\n"); - return 0; -} - -/************************************************************** - * - * Read write methods - * - */ - - -/* read frames from file in data - * return the number of frames actually read */ -int aubio_sndfile_read(aubio_sndfile_t * f, int frames, fvec_t * read) { - sf_count_t read_frames; - int i,j, channels = f->channels; - int nsamples = frames*channels; - int aread; - smpl_t *pread; - - /* allocate data for de/interleaving reallocated when needed. */ - if (nsamples >= f->size) { - AUBIO_ERR("Maximum aubio_sndfile_read buffer size exceeded."); - return -1; - /* - AUBIO_FREE(f->tmpdata); - f->tmpdata = AUBIO_ARRAY(float,nsamples); - */ - } - //f->size = nsamples; - - /* do actual reading */ - read_frames = sf_read_float (f->handle, f->tmpdata, nsamples); - - aread = (int)FLOOR(read_frames/(float)channels); - - /* de-interleaving data */ - for (i=0; itmpdata[channels*j+i]; - } - } - return aread; -} - -/* write 'frames' samples to file from data - * return the number of frames actually written - */ -int aubio_sndfile_write(aubio_sndfile_t * f, int frames, fvec_t * write) { - sf_count_t written_frames = 0; - int i, j, channels = f->channels; - int nsamples = channels*frames; - smpl_t *pwrite; - - /* allocate data for de/interleaving reallocated when needed. */ - if (nsamples >= f->size) { - AUBIO_ERR("Maximum aubio_sndfile_write buffer size exceeded."); - return -1; - /* - AUBIO_FREE(f->tmpdata); - f->tmpdata = AUBIO_ARRAY(float,nsamples); - */ - } - //f->size = nsamples; - - /* interleaving data */ - for (i=0; itmpdata[channels*j+i] = (float)pwrite[j]; - } - } - written_frames = sf_write_float (f->handle, f->tmpdata, nsamples); - return written_frames/channels; -} - -/******************************************************************* - * - * Get object info - * - */ - -uint_t aubio_sndfile_channels(aubio_sndfile_t * f) { - return f->channels; -} - -uint_t aubio_sndfile_samplerate(aubio_sndfile_t * f) { - return f->samplerate; -} - -void aubio_sndfile_info(aubio_sndfile_t * f) { - AUBIO_DBG("srate : %d\n", f->samplerate); - AUBIO_DBG("channels : %d\n", f->channels); - AUBIO_DBG("format : %d\n", f->format); -} - diff --git a/ext/sndfileio.h b/ext/sndfileio.h deleted file mode 100644 index 23d9ee58..00000000 --- a/ext/sndfileio.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - Copyright (C) 2003 Paul Brossier - - 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 SNDFILEIO_H -#define SNDFILEIO_H - -/** @file - * sndfile functions - */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * sndfile object - */ -typedef struct _aubio_sndfile_t aubio_sndfile_t; -/** - * Open a sound file for reading - */ -aubio_sndfile_t * new_aubio_sndfile_ro (const char * inputfile); -/** - * Copy file model from previously opened sound file. - */ -aubio_sndfile_t * new_aubio_sndfile_wo(aubio_sndfile_t * existingfile, const char * outputname); -/** - * Open a sound file for writing - */ -int aubio_sndfile_open_wo (aubio_sndfile_t * file, const char * outputname); -/** - * Read frames data from file - */ -int aubio_sndfile_read(aubio_sndfile_t * file, int frames, fvec_t * read); -/** - * Write data of length frames to file - */ -int aubio_sndfile_write(aubio_sndfile_t * file, int frames, fvec_t * write); -/** - * Close file and delete file object - */ -int del_aubio_sndfile(aubio_sndfile_t * file); -/** - * Return some files facts - */ -void aubio_sndfile_info(aubio_sndfile_t * file); -/** - * Return number of channel in file - */ -uint_t aubio_sndfile_channels(aubio_sndfile_t * file); -uint_t aubio_sndfile_samplerate(aubio_sndfile_t * file); - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/ext/wscript_build b/ext/wscript_build deleted file mode 100644 index b9e67791..00000000 --- a/ext/wscript_build +++ /dev/null @@ -1,13 +0,0 @@ -# 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) diff --git a/python/aubio/Makefile.am b/python/aubio/Makefile.am index 2eed2af9..426d12bd 100644 --- a/python/aubio/Makefile.am +++ b/python/aubio/Makefile.am @@ -44,21 +44,23 @@ CLEANFILES = *.pyc *.so *.o aubio_wrap.c aubiowrapper.py 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 diff --git a/python/aubio/wscript_build b/python/aubio/wscript_build index 61c36d22..34943f15 100644 --- a/python/aubio/wscript_build +++ b/python/aubio/wscript_build @@ -1,10 +1,18 @@ +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 diff --git a/swig/aubio.i b/swig/aubio.i index 599d2054..70a9888d 100644 --- a/swig/aubio.i +++ b/swig/aubio.i @@ -1,12 +1,8 @@ %module aubiowrapper %{ - #include "aubio.h" - #include "aubioext.h" -%} - #include "aubio.h" -#include "aubioext.h" +%} /* type aliases */ typedef unsigned int uint_t; @@ -60,18 +56,6 @@ extern smpl_t ** cvec_get_norm(cvec_t *s); 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); @@ -175,16 +159,16 @@ void aubio_mfcc_do(aubio_mfcc_t *mf, cvec_t *in, fvec_t *out); /* 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); @@ -201,11 +185,10 @@ void aubio_pvoc_rdo(aubio_pvoc_t *pv, cvec_t * fftgrain, fvec_t *out); 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); @@ -231,14 +214,17 @@ aubio_peakpicker_t * new_aubio_peakpicker(smpl_t threshold); 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); @@ -247,3 +233,30 @@ void del_aubio_beattracking(aubio_beattracking_t * p); 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 */ +%} diff --git a/tests/README.tests b/tests/README.tests new file mode 100644 index 00000000..684e1a2c --- /dev/null +++ b/tests/README.tests @@ -0,0 +1 @@ +Python unit tests checking the output of the programs in aubio/examples/ diff --git a/tests/python/examples/README b/tests/python/examples/README deleted file mode 100644 index 684e1a2c..00000000 --- a/tests/python/examples/README +++ /dev/null @@ -1 +0,0 @@ -Python unit tests checking the output of the programs in aubio/examples/ diff --git a/tests/python/examples/aubiopitch/yinfft.16568__acclivity__TwoCows.wav.txt b/tests/python/examples/aubiopitch/yinfft.16568__acclivity__TwoCows.wav.txt new file mode 100644 index 00000000..dcdd52b0 --- /dev/null +++ b/tests/python/examples/aubiopitch/yinfft.16568__acclivity__TwoCows.wav.txt @@ -0,0 +1,566 @@ +0.0232199546485 -1.0 +0.0464399092971 -1.0 +0.0696598639456 -1.0 +0.0928798185941 -1.0 +0.116099773243 -1.0 +0.139319727891 -1.0 +0.16253968254 -1.0 +0.185759637188 -1.0 +0.208979591837 -1.0 +0.232199546485 -1.0 +0.255419501134 -1.0 +0.278639455782 -1.0 +0.301859410431 -1.0 +0.325079365079 -1.0 +0.348299319728 -1.0 +0.371519274376 -1.0 +0.394739229025 -1.0 +0.417959183673 -1.0 +0.441179138322 -1.0 +0.464399092971 -1.0 +0.487619047619 -1.0 +0.510839002268 -1.0 +0.534058956916 -1.0 +0.557278911565 -1.0 +0.580498866213 -1.0 +0.603718820862 -1.0 +0.62693877551 -1.0 +0.650158730159 -1.0 +0.673378684807 -1.0 +0.696598639456 -1.0 +0.719818594104 -1.0 +0.743038548753 -1.0 +0.766258503401 -1.0 +0.78947845805 -1.0 +0.812698412698 -1.0 +0.835918367347 -1.0 +0.859138321995 -1.0 +0.882358276644 -1.0 +0.905578231293 -1.0 +0.928798185941 -1.0 +0.95201814059 -1.0 +0.975238095238 -1.0 +0.998458049887 -1.0 +1.02167800454 -1.0 +1.04489795918 -1.0 +1.06811791383 392.768096924 +1.09133786848 115.522140503 +1.11455782313 116.574150085 +1.13777777778 117.720863342 +1.16099773243 120.00163269 +1.18421768707 123.633300781 +1.20743764172 426.787963867 +1.23065759637 141.312179565 +1.25387755102 144.336975098 +1.27709750567 148.604934692 +1.30031746032 150.864654541 +1.32353741497 154.889007568 +1.34675736961 156.505081177 +1.36997732426 158.878829956 +1.39319727891 160.931289673 +1.41641723356 163.155059814 +1.43963718821 324.814025879 +1.46285714286 167.016983032 +1.48607709751 168.871704102 +1.50929705215 170.665634155 +1.5325170068 172.353149414 +1.55573696145 174.764205933 +1.5789569161 176.318893433 +1.60217687075 178.282669067 +1.6253968254 179.82383728 +1.64861678005 181.488952637 +1.67183673469 183.1927948 +1.69505668934 184.449371338 +1.71827664399 185.715484619 +1.74149659864 186.702224731 +1.76471655329 187.907455444 +1.78793650794 188.703475952 +1.81115646259 189.502182007 +1.83437641723 190.250213623 +1.85759637188 190.834747314 +1.88081632653 190.98348999 +1.90403628118 190.847137451 +1.92725623583 190.805847168 +1.95047619048 191.00831604 +1.97369614512 191.377182007 +1.99691609977 191.935241699 +2.02013605442 192.395782471 +2.04335600907 192.534378052 +2.06657596372 192.404174805 +2.08979591837 192.085708618 +2.11301587302 191.410400391 +2.13623582766 191.070388794 +2.15945578231 190.677963257 +2.18267573696 190.020675659 +2.20589569161 189.669265747 +2.22911564626 189.298828125 +2.25233560091 188.546142578 +2.27555555556 186.856491089 +2.2987755102 184.917297363 +2.32199546485 183.044509888 +2.3452154195 181.399368286 +2.36843537415 179.126312256 +2.3916553288 175.22946167 +2.41487528345 171.139190674 +2.4380952381 338.55368042 +2.46131519274 162.799713135 +2.48453514739 320.075500488 +2.50775510204 148.602432251 +2.53097505669 139.503982544 +2.55419501134 340.922271729 +2.57741496599 326.436950684 +2.60063492063 333.484558105 +2.62385487528 -1.0 +2.64707482993 -1.0 +2.67029478458 -1.0 +2.69351473923 -1.0 +2.71673469388 -1.0 +2.73995464853 -1.0 +2.76317460317 -1.0 +2.78639455782 -1.0 +2.80961451247 -1.0 +2.83283446712 -1.0 +2.85605442177 -1.0 +2.87927437642 -1.0 +2.90249433107 -1.0 +2.92571428571 -1.0 +2.94893424036 -1.0 +2.97215419501 -1.0 +2.99537414966 -1.0 +3.01859410431 -1.0 +3.04181405896 -1.0 +3.06503401361 -1.0 +3.08825396825 -1.0 +3.1114739229 -1.0 +3.13469387755 -1.0 +3.1579138322 -1.0 +3.18113378685 -1.0 +3.2043537415 -1.0 +3.22757369615 -1.0 +3.25079365079 -1.0 +3.27401360544 -1.0 +3.29723356009 -1.0 +3.32045351474 -1.0 +3.34367346939 -1.0 +3.36689342404 -1.0 +3.39011337868 -1.0 +3.41333333333 -1.0 +3.43655328798 -1.0 +3.45977324263 -1.0 +3.48299319728 -1.0 +3.50621315193 -1.0 +3.52943310658 -1.0 +3.55265306122 -1.0 +3.57587301587 -1.0 +3.59909297052 -1.0 +3.62231292517 -1.0 +3.64553287982 -1.0 +3.66875283447 -1.0 +3.69197278912 -1.0 +3.71519274376 -1.0 +3.73841269841 -1.0 +3.76163265306 -1.0 +3.78485260771 -1.0 +3.80807256236 -1.0 +3.83129251701 -1.0 +3.85451247166 -1.0 +3.8777324263 -1.0 +3.90095238095 -1.0 +3.9241723356 -1.0 +3.94739229025 -1.0 +3.9706122449 -1.0 +3.99383219955 -1.0 +4.0170521542 -1.0 +4.04027210884 -1.0 +4.06349206349 -1.0 +4.08671201814 -1.0 +4.10993197279 -1.0 +4.13315192744 -1.0 +4.15637188209 -1.0 +4.17959183673 -1.0 +4.20281179138 -1.0 +4.22603174603 -1.0 +4.24925170068 -1.0 +4.27247165533 -1.0 +4.29569160998 -1.0 +4.31891156463 -1.0 +4.34213151927 -1.0 +4.36535147392 -1.0 +4.38857142857 -1.0 +4.41179138322 -1.0 +4.43501133787 -1.0 +4.45823129252 -1.0 +4.48145124717 -1.0 +4.50467120181 -1.0 +4.52789115646 -1.0 +4.55111111111 -1.0 +4.57433106576 -1.0 +4.59755102041 -1.0 +4.62077097506 -1.0 +4.64399092971 -1.0 +4.66721088435 -1.0 +4.690430839 -1.0 +4.71365079365 -1.0 +4.7368707483 -1.0 +4.76009070295 -1.0 +4.7833106576 -1.0 +4.80653061224 -1.0 +4.82975056689 -1.0 +4.85297052154 -1.0 +4.87619047619 -1.0 +4.89941043084 -1.0 +4.92263038549 -1.0 +4.94585034014 -1.0 +4.96907029478 -1.0 +4.99229024943 -1.0 +5.01551020408 -1.0 +5.03873015873 -1.0 +5.06195011338 -1.0 +5.08517006803 -1.0 +5.10839002268 -1.0 +5.13160997732 -1.0 +5.15482993197 -1.0 +5.17804988662 -1.0 +5.20126984127 -1.0 +5.22448979592 -1.0 +5.24770975057 -1.0 +5.27092970522 -1.0 +5.29414965986 -1.0 +5.31736961451 -1.0 +5.34058956916 -1.0 +5.36380952381 -1.0 +5.38702947846 -1.0 +5.41024943311 -1.0 +5.43346938776 -1.0 +5.4566893424 -1.0 +5.47990929705 -1.0 +5.5031292517 -1.0 +5.52634920635 -1.0 +5.549569161 -1.0 +5.57278911565 -1.0 +5.59600907029 -1.0 +5.61922902494 -1.0 +5.64244897959 -1.0 +5.66566893424 -1.0 +5.68888888889 -1.0 +5.71210884354 -1.0 +5.73532879819 -1.0 +5.75854875283 -1.0 +5.78176870748 -1.0 +5.80498866213 -1.0 +5.82820861678 -1.0 +5.85142857143 -1.0 +5.87464852608 -1.0 +5.89786848073 -1.0 +5.92108843537 -1.0 +5.94430839002 -1.0 +5.96752834467 -1.0 +5.99074829932 -1.0 +6.01396825397 -1.0 +6.03718820862 -1.0 +6.06040816327 -1.0 +6.08362811791 -1.0 +6.10684807256 -1.0 +6.13006802721 -1.0 +6.15328798186 -1.0 +6.17650793651 -1.0 +6.19972789116 -1.0 +6.2229478458 -1.0 +6.24616780045 -1.0 +6.2693877551 -1.0 +6.29260770975 -1.0 +6.3158276644 -1.0 +6.33904761905 -1.0 +6.3622675737 -1.0 +6.38548752834 -1.0 +6.40870748299 -1.0 +6.43192743764 -1.0 +6.45514739229 -1.0 +6.47836734694 -1.0 +6.50158730159 187.887435913 +6.52480725624 143.988250732 +6.54802721088 147.904678345 +6.57124716553 151.674087524 +6.59446712018 3221.32983398 +6.61768707483 3159.02587891 +6.64090702948 160.395706177 +6.66412698413 162.535690308 +6.68734693878 164.282516479 +6.71056689342 166.054779053 +6.73378684807 167.578659058 +6.75700680272 169.234619141 +6.78022675737 171.029663086 +6.80344671202 173.257110596 +6.82666666667 174.64654541 +6.84988662132 175.149429321 +6.87310657596 175.456039429 +6.89632653061 176.283660889 +6.91954648526 177.318511963 +6.94276643991 178.066696167 +6.96598639456 178.517211914 +6.98920634921 179.053573608 +7.01242630385 179.549285889 +7.0356462585 180.029403687 +7.05886621315 180.64515686 +7.0820861678 180.8934021 +7.10530612245 180.952774048 +7.1285260771 181.48147583 +7.15174603175 182.092208862 +7.17496598639 183.082504272 +7.19818594104 183.907089233 +7.22140589569 184.607666016 +7.24462585034 185.0181427 +7.26784580499 185.282440186 +7.29106575964 185.946502686 +7.31428571429 186.74571228 +7.33750566893 187.205505371 +7.36072562358 187.595703125 +7.38394557823 187.939483643 +7.40716553288 188.01159668 +7.43038548753 187.807418823 +7.45360544218 187.751464844 +7.47682539683 187.811416626 +7.50004535147 187.951507568 +7.52326530612 188.168029785 +7.54648526077 188.630828857 +7.56970521542 188.946014404 +7.59292517007 189.095901489 +7.61614512472 189.302886963 +7.63936507937 189.673339844 +7.66258503401 189.881591797 +7.68580498866 189.865234375 +7.70902494331 189.865234375 +7.73224489796 189.595870972 +7.75546485261 188.954116821 +7.77868480726 188.192108154 +7.8019047619 187.352645874 +7.82512471655 186.524551392 +7.8483446712 184.967712402 +7.87156462585 183.589355469 +7.8947845805 182.828231812 +7.91800453515 181.968215942 +7.9412244898 180.796981812 +7.96444444444 180.0 +7.98766439909 179.184524536 +8.01088435374 178.799484253 +8.03410430839 178.29347229 +8.05732426304 178.088272095 +8.08054421769 177.894317627 +8.10376417234 177.693618774 +8.12698412698 177.905075073 +8.15020408163 178.041549683 +8.17342403628 178.045135498 +8.19664399093 177.650650024 +8.21986394558 177.32208252 +8.24308390023 176.611938477 +8.26630385488 175.525878906 +8.28952380952 172.121078491 +8.31274376417 584.997009277 +8.33596371882 575.042358398 +8.35918367347 465.681121826 +8.38240362812 447.307037354 +8.40562358277 -1.0 +8.42884353741 -1.0 +8.45206349206 -1.0 +8.47528344671 -1.0 +8.49850340136 -1.0 +8.52172335601 -1.0 +8.54494331066 -1.0 +8.56816326531 -1.0 +8.59138321995 -1.0 +8.6146031746 -1.0 +8.63782312925 -1.0 +8.6610430839 -1.0 +8.68426303855 -1.0 +8.7074829932 -1.0 +8.73070294785 -1.0 +8.75392290249 -1.0 +8.77714285714 -1.0 +8.80036281179 -1.0 +8.82358276644 -1.0 +8.84680272109 -1.0 +8.87002267574 -1.0 +8.89324263039 -1.0 +8.91646258503 -1.0 +8.93968253968 -1.0 +8.96290249433 -1.0 +8.98612244898 -1.0 +9.00934240363 -1.0 +9.03256235828 -1.0 +9.05578231293 -1.0 +9.07900226757 -1.0 +9.10222222222 -1.0 +9.12544217687 -1.0 +9.14866213152 -1.0 +9.17188208617 -1.0 +9.19510204082 -1.0 +9.21832199546 -1.0 +9.24154195011 -1.0 +9.26476190476 -1.0 +9.28798185941 -1.0 +9.31120181406 -1.0 +9.33442176871 -1.0 +9.35764172336 -1.0 +9.380861678 -1.0 +9.40408163265 -1.0 +9.4273015873 -1.0 +9.45052154195 -1.0 +9.4737414966 -1.0 +9.49696145125 -1.0 +9.5201814059 -1.0 +9.54340136054 -1.0 +9.56662131519 -1.0 +9.58984126984 -1.0 +9.61306122449 -1.0 +9.63628117914 -1.0 +9.65950113379 -1.0 +9.68272108844 -1.0 +9.70594104308 -1.0 +9.72916099773 -1.0 +9.75238095238 -1.0 +9.77560090703 -1.0 +9.79882086168 -1.0 +9.82204081633 -1.0 +9.84526077098 -1.0 +9.86848072562 -1.0 +9.89170068027 -1.0 +9.91492063492 -1.0 +9.93814058957 -1.0 +9.96136054422 -1.0 +9.98458049887 -1.0 +10.0078004535 -1.0 +10.0310204082 -1.0 +10.0542403628 -1.0 +10.0774603175 -1.0 +10.1006802721 -1.0 +10.1239002268 -1.0 +10.1471201814 -1.0 +10.1703401361 -1.0 +10.1935600907 -1.0 +10.2167800454 -1.0 +10.24 -1.0 +10.2632199546 -1.0 +10.2864399093 100.193115234 +10.3096598639 -1.0 +10.3328798186 326.038757324 +10.3560997732 104.222053528 +10.3793197279 105.370048523 +10.4025396825 106.595123291 +10.4257596372 107.893875122 +10.4489795918 108.992500305 +10.4721995465 109.93119812 +10.4954195011 110.819335938 +10.5186394558 112.031303406 +10.5418594104 113.389472961 +10.5650793651 114.239830017 +10.5882993197 116.827377319 +10.6115192744 119.250427246 +10.634739229 122.184356689 +10.6579591837 148.222839355 +10.6811791383 150.104660034 +10.704399093 153.361968994 +10.7276190476 155.115112305 +10.7508390023 158.433624268 +10.7740589569 161.372955322 +10.7972789116 163.421096802 +10.8204988662 167.165771484 +10.8437188209 170.329452515 +10.8669387755 173.311584473 +10.8901587302 175.445571899 +10.9133786848 177.304244995 +10.9365986395 179.024490356 +10.9598185941 180.073501587 +10.9830385488 180.826629639 +11.0062585034 181.559936523 +11.029478458 182.487792969 +11.0526984127 183.303192139 +11.0759183673 183.976135254 +11.099138322 184.650161743 +11.1223582766 185.613876343 +11.1455782313 186.123062134 +11.1687981859 186.852523804 +11.1920181406 187.531890869 +11.2152380952 188.232284546 +11.2384580499 189.20135498 +11.2616780045 189.485900879 +11.2848979592 190.094390869 +11.3081179138 190.636749268 +11.3313378685 191.252670288 +11.3545578231 191.647476196 +11.3777777778 192.673187256 +11.4009977324 193.018920898 +11.4242176871 193.641860962 +11.4474376417 194.307373047 +11.4706575964 194.234619141 +11.493877551 194.290252686 +11.5170975057 194.641845703 +11.5403174603 194.663314819 +11.563537415 194.719177246 +11.5867573696 194.149108887 +11.6099773243 194.166213989 +11.6331972789 194.136291504 +11.6564172336 193.786529541 +11.6796371882 192.605865479 +11.7028571429 190.785202026 +11.7260770975 188.578399658 +11.7492970522 182.544433594 +11.7725170068 173.676742554 +11.7957369615 415.019744873 +11.8189569161 417.989685059 +11.8421768707 333.699066162 +11.8653968254 415.058837891 +11.88861678 352.025543213 +11.9118367347 -1.0 +11.9350566893 -1.0 +11.958276644 -1.0 +11.9814965986 -1.0 +12.0047165533 -1.0 +12.0279365079 -1.0 +12.0511564626 -1.0 +12.0743764172 -1.0 +12.0975963719 -1.0 +12.1208163265 -1.0 +12.1440362812 -1.0 +12.1672562358 -1.0 +12.1904761905 -1.0 +12.2136961451 -1.0 +12.2369160998 -1.0 +12.2601360544 -1.0 +12.2833560091 -1.0 +12.3065759637 -1.0 +12.3297959184 -1.0 +12.353015873 -1.0 +12.3762358277 -1.0 +12.3994557823 -1.0 +12.422675737 -1.0 +12.4458956916 -1.0 +12.4691156463 -1.0 +12.4923356009 -1.0 +12.5155555556 -1.0 +12.5387755102 -1.0 +12.5619954649 -1.0 +12.5852154195 -1.0 +12.6084353741 -1.0 +12.6316553288 -1.0 +12.6548752834 -1.0 +12.6780952381 -1.0 +12.7013151927 -1.0 +12.7245351474 -1.0 +12.747755102 -1.0 +12.7709750567 -1.0 +12.7941950113 -1.0 +12.817414966 -1.0 +12.8406349206 -1.0 +12.8638548753 -1.0 +12.8870748299 -1.0 +12.9102947846 -1.0 +12.9335147392 -1.0 +12.9567346939 -1.0 +12.9799546485 -1.0 +13.0031746032 -1.0 +13.0263945578 -1.0 +13.0496145125 -1.0 +13.0728344671 -1.0 +13.0960544218 -1.0 +13.1192743764 -1.0 +13.1424943311 -1.0 diff --git a/tests/python/examples/aubiopitch/yinfft.16568_acclivity_TwoCows.wav.txt b/tests/python/examples/aubiopitch/yinfft.16568_acclivity_TwoCows.wav.txt deleted file mode 100644 index dcdd52b0..00000000 --- a/tests/python/examples/aubiopitch/yinfft.16568_acclivity_TwoCows.wav.txt +++ /dev/null @@ -1,566 +0,0 @@ -0.0232199546485 -1.0 -0.0464399092971 -1.0 -0.0696598639456 -1.0 -0.0928798185941 -1.0 -0.116099773243 -1.0 -0.139319727891 -1.0 -0.16253968254 -1.0 -0.185759637188 -1.0 -0.208979591837 -1.0 -0.232199546485 -1.0 -0.255419501134 -1.0 -0.278639455782 -1.0 -0.301859410431 -1.0 -0.325079365079 -1.0 -0.348299319728 -1.0 -0.371519274376 -1.0 -0.394739229025 -1.0 -0.417959183673 -1.0 -0.441179138322 -1.0 -0.464399092971 -1.0 -0.487619047619 -1.0 -0.510839002268 -1.0 -0.534058956916 -1.0 -0.557278911565 -1.0 -0.580498866213 -1.0 -0.603718820862 -1.0 -0.62693877551 -1.0 -0.650158730159 -1.0 -0.673378684807 -1.0 -0.696598639456 -1.0 -0.719818594104 -1.0 -0.743038548753 -1.0 -0.766258503401 -1.0 -0.78947845805 -1.0 -0.812698412698 -1.0 -0.835918367347 -1.0 -0.859138321995 -1.0 -0.882358276644 -1.0 -0.905578231293 -1.0 -0.928798185941 -1.0 -0.95201814059 -1.0 -0.975238095238 -1.0 -0.998458049887 -1.0 -1.02167800454 -1.0 -1.04489795918 -1.0 -1.06811791383 392.768096924 -1.09133786848 115.522140503 -1.11455782313 116.574150085 -1.13777777778 117.720863342 -1.16099773243 120.00163269 -1.18421768707 123.633300781 -1.20743764172 426.787963867 -1.23065759637 141.312179565 -1.25387755102 144.336975098 -1.27709750567 148.604934692 -1.30031746032 150.864654541 -1.32353741497 154.889007568 -1.34675736961 156.505081177 -1.36997732426 158.878829956 -1.39319727891 160.931289673 -1.41641723356 163.155059814 -1.43963718821 324.814025879 -1.46285714286 167.016983032 -1.48607709751 168.871704102 -1.50929705215 170.665634155 -1.5325170068 172.353149414 -1.55573696145 174.764205933 -1.5789569161 176.318893433 -1.60217687075 178.282669067 -1.6253968254 179.82383728 -1.64861678005 181.488952637 -1.67183673469 183.1927948 -1.69505668934 184.449371338 -1.71827664399 185.715484619 -1.74149659864 186.702224731 -1.76471655329 187.907455444 -1.78793650794 188.703475952 -1.81115646259 189.502182007 -1.83437641723 190.250213623 -1.85759637188 190.834747314 -1.88081632653 190.98348999 -1.90403628118 190.847137451 -1.92725623583 190.805847168 -1.95047619048 191.00831604 -1.97369614512 191.377182007 -1.99691609977 191.935241699 -2.02013605442 192.395782471 -2.04335600907 192.534378052 -2.06657596372 192.404174805 -2.08979591837 192.085708618 -2.11301587302 191.410400391 -2.13623582766 191.070388794 -2.15945578231 190.677963257 -2.18267573696 190.020675659 -2.20589569161 189.669265747 -2.22911564626 189.298828125 -2.25233560091 188.546142578 -2.27555555556 186.856491089 -2.2987755102 184.917297363 -2.32199546485 183.044509888 -2.3452154195 181.399368286 -2.36843537415 179.126312256 -2.3916553288 175.22946167 -2.41487528345 171.139190674 -2.4380952381 338.55368042 -2.46131519274 162.799713135 -2.48453514739 320.075500488 -2.50775510204 148.602432251 -2.53097505669 139.503982544 -2.55419501134 340.922271729 -2.57741496599 326.436950684 -2.60063492063 333.484558105 -2.62385487528 -1.0 -2.64707482993 -1.0 -2.67029478458 -1.0 -2.69351473923 -1.0 -2.71673469388 -1.0 -2.73995464853 -1.0 -2.76317460317 -1.0 -2.78639455782 -1.0 -2.80961451247 -1.0 -2.83283446712 -1.0 -2.85605442177 -1.0 -2.87927437642 -1.0 -2.90249433107 -1.0 -2.92571428571 -1.0 -2.94893424036 -1.0 -2.97215419501 -1.0 -2.99537414966 -1.0 -3.01859410431 -1.0 -3.04181405896 -1.0 -3.06503401361 -1.0 -3.08825396825 -1.0 -3.1114739229 -1.0 -3.13469387755 -1.0 -3.1579138322 -1.0 -3.18113378685 -1.0 -3.2043537415 -1.0 -3.22757369615 -1.0 -3.25079365079 -1.0 -3.27401360544 -1.0 -3.29723356009 -1.0 -3.32045351474 -1.0 -3.34367346939 -1.0 -3.36689342404 -1.0 -3.39011337868 -1.0 -3.41333333333 -1.0 -3.43655328798 -1.0 -3.45977324263 -1.0 -3.48299319728 -1.0 -3.50621315193 -1.0 -3.52943310658 -1.0 -3.55265306122 -1.0 -3.57587301587 -1.0 -3.59909297052 -1.0 -3.62231292517 -1.0 -3.64553287982 -1.0 -3.66875283447 -1.0 -3.69197278912 -1.0 -3.71519274376 -1.0 -3.73841269841 -1.0 -3.76163265306 -1.0 -3.78485260771 -1.0 -3.80807256236 -1.0 -3.83129251701 -1.0 -3.85451247166 -1.0 -3.8777324263 -1.0 -3.90095238095 -1.0 -3.9241723356 -1.0 -3.94739229025 -1.0 -3.9706122449 -1.0 -3.99383219955 -1.0 -4.0170521542 -1.0 -4.04027210884 -1.0 -4.06349206349 -1.0 -4.08671201814 -1.0 -4.10993197279 -1.0 -4.13315192744 -1.0 -4.15637188209 -1.0 -4.17959183673 -1.0 -4.20281179138 -1.0 -4.22603174603 -1.0 -4.24925170068 -1.0 -4.27247165533 -1.0 -4.29569160998 -1.0 -4.31891156463 -1.0 -4.34213151927 -1.0 -4.36535147392 -1.0 -4.38857142857 -1.0 -4.41179138322 -1.0 -4.43501133787 -1.0 -4.45823129252 -1.0 -4.48145124717 -1.0 -4.50467120181 -1.0 -4.52789115646 -1.0 -4.55111111111 -1.0 -4.57433106576 -1.0 -4.59755102041 -1.0 -4.62077097506 -1.0 -4.64399092971 -1.0 -4.66721088435 -1.0 -4.690430839 -1.0 -4.71365079365 -1.0 -4.7368707483 -1.0 -4.76009070295 -1.0 -4.7833106576 -1.0 -4.80653061224 -1.0 -4.82975056689 -1.0 -4.85297052154 -1.0 -4.87619047619 -1.0 -4.89941043084 -1.0 -4.92263038549 -1.0 -4.94585034014 -1.0 -4.96907029478 -1.0 -4.99229024943 -1.0 -5.01551020408 -1.0 -5.03873015873 -1.0 -5.06195011338 -1.0 -5.08517006803 -1.0 -5.10839002268 -1.0 -5.13160997732 -1.0 -5.15482993197 -1.0 -5.17804988662 -1.0 -5.20126984127 -1.0 -5.22448979592 -1.0 -5.24770975057 -1.0 -5.27092970522 -1.0 -5.29414965986 -1.0 -5.31736961451 -1.0 -5.34058956916 -1.0 -5.36380952381 -1.0 -5.38702947846 -1.0 -5.41024943311 -1.0 -5.43346938776 -1.0 -5.4566893424 -1.0 -5.47990929705 -1.0 -5.5031292517 -1.0 -5.52634920635 -1.0 -5.549569161 -1.0 -5.57278911565 -1.0 -5.59600907029 -1.0 -5.61922902494 -1.0 -5.64244897959 -1.0 -5.66566893424 -1.0 -5.68888888889 -1.0 -5.71210884354 -1.0 -5.73532879819 -1.0 -5.75854875283 -1.0 -5.78176870748 -1.0 -5.80498866213 -1.0 -5.82820861678 -1.0 -5.85142857143 -1.0 -5.87464852608 -1.0 -5.89786848073 -1.0 -5.92108843537 -1.0 -5.94430839002 -1.0 -5.96752834467 -1.0 -5.99074829932 -1.0 -6.01396825397 -1.0 -6.03718820862 -1.0 -6.06040816327 -1.0 -6.08362811791 -1.0 -6.10684807256 -1.0 -6.13006802721 -1.0 -6.15328798186 -1.0 -6.17650793651 -1.0 -6.19972789116 -1.0 -6.2229478458 -1.0 -6.24616780045 -1.0 -6.2693877551 -1.0 -6.29260770975 -1.0 -6.3158276644 -1.0 -6.33904761905 -1.0 -6.3622675737 -1.0 -6.38548752834 -1.0 -6.40870748299 -1.0 -6.43192743764 -1.0 -6.45514739229 -1.0 -6.47836734694 -1.0 -6.50158730159 187.887435913 -6.52480725624 143.988250732 -6.54802721088 147.904678345 -6.57124716553 151.674087524 -6.59446712018 3221.32983398 -6.61768707483 3159.02587891 -6.64090702948 160.395706177 -6.66412698413 162.535690308 -6.68734693878 164.282516479 -6.71056689342 166.054779053 -6.73378684807 167.578659058 -6.75700680272 169.234619141 -6.78022675737 171.029663086 -6.80344671202 173.257110596 -6.82666666667 174.64654541 -6.84988662132 175.149429321 -6.87310657596 175.456039429 -6.89632653061 176.283660889 -6.91954648526 177.318511963 -6.94276643991 178.066696167 -6.96598639456 178.517211914 -6.98920634921 179.053573608 -7.01242630385 179.549285889 -7.0356462585 180.029403687 -7.05886621315 180.64515686 -7.0820861678 180.8934021 -7.10530612245 180.952774048 -7.1285260771 181.48147583 -7.15174603175 182.092208862 -7.17496598639 183.082504272 -7.19818594104 183.907089233 -7.22140589569 184.607666016 -7.24462585034 185.0181427 -7.26784580499 185.282440186 -7.29106575964 185.946502686 -7.31428571429 186.74571228 -7.33750566893 187.205505371 -7.36072562358 187.595703125 -7.38394557823 187.939483643 -7.40716553288 188.01159668 -7.43038548753 187.807418823 -7.45360544218 187.751464844 -7.47682539683 187.811416626 -7.50004535147 187.951507568 -7.52326530612 188.168029785 -7.54648526077 188.630828857 -7.56970521542 188.946014404 -7.59292517007 189.095901489 -7.61614512472 189.302886963 -7.63936507937 189.673339844 -7.66258503401 189.881591797 -7.68580498866 189.865234375 -7.70902494331 189.865234375 -7.73224489796 189.595870972 -7.75546485261 188.954116821 -7.77868480726 188.192108154 -7.8019047619 187.352645874 -7.82512471655 186.524551392 -7.8483446712 184.967712402 -7.87156462585 183.589355469 -7.8947845805 182.828231812 -7.91800453515 181.968215942 -7.9412244898 180.796981812 -7.96444444444 180.0 -7.98766439909 179.184524536 -8.01088435374 178.799484253 -8.03410430839 178.29347229 -8.05732426304 178.088272095 -8.08054421769 177.894317627 -8.10376417234 177.693618774 -8.12698412698 177.905075073 -8.15020408163 178.041549683 -8.17342403628 178.045135498 -8.19664399093 177.650650024 -8.21986394558 177.32208252 -8.24308390023 176.611938477 -8.26630385488 175.525878906 -8.28952380952 172.121078491 -8.31274376417 584.997009277 -8.33596371882 575.042358398 -8.35918367347 465.681121826 -8.38240362812 447.307037354 -8.40562358277 -1.0 -8.42884353741 -1.0 -8.45206349206 -1.0 -8.47528344671 -1.0 -8.49850340136 -1.0 -8.52172335601 -1.0 -8.54494331066 -1.0 -8.56816326531 -1.0 -8.59138321995 -1.0 -8.6146031746 -1.0 -8.63782312925 -1.0 -8.6610430839 -1.0 -8.68426303855 -1.0 -8.7074829932 -1.0 -8.73070294785 -1.0 -8.75392290249 -1.0 -8.77714285714 -1.0 -8.80036281179 -1.0 -8.82358276644 -1.0 -8.84680272109 -1.0 -8.87002267574 -1.0 -8.89324263039 -1.0 -8.91646258503 -1.0 -8.93968253968 -1.0 -8.96290249433 -1.0 -8.98612244898 -1.0 -9.00934240363 -1.0 -9.03256235828 -1.0 -9.05578231293 -1.0 -9.07900226757 -1.0 -9.10222222222 -1.0 -9.12544217687 -1.0 -9.14866213152 -1.0 -9.17188208617 -1.0 -9.19510204082 -1.0 -9.21832199546 -1.0 -9.24154195011 -1.0 -9.26476190476 -1.0 -9.28798185941 -1.0 -9.31120181406 -1.0 -9.33442176871 -1.0 -9.35764172336 -1.0 -9.380861678 -1.0 -9.40408163265 -1.0 -9.4273015873 -1.0 -9.45052154195 -1.0 -9.4737414966 -1.0 -9.49696145125 -1.0 -9.5201814059 -1.0 -9.54340136054 -1.0 -9.56662131519 -1.0 -9.58984126984 -1.0 -9.61306122449 -1.0 -9.63628117914 -1.0 -9.65950113379 -1.0 -9.68272108844 -1.0 -9.70594104308 -1.0 -9.72916099773 -1.0 -9.75238095238 -1.0 -9.77560090703 -1.0 -9.79882086168 -1.0 -9.82204081633 -1.0 -9.84526077098 -1.0 -9.86848072562 -1.0 -9.89170068027 -1.0 -9.91492063492 -1.0 -9.93814058957 -1.0 -9.96136054422 -1.0 -9.98458049887 -1.0 -10.0078004535 -1.0 -10.0310204082 -1.0 -10.0542403628 -1.0 -10.0774603175 -1.0 -10.1006802721 -1.0 -10.1239002268 -1.0 -10.1471201814 -1.0 -10.1703401361 -1.0 -10.1935600907 -1.0 -10.2167800454 -1.0 -10.24 -1.0 -10.2632199546 -1.0 -10.2864399093 100.193115234 -10.3096598639 -1.0 -10.3328798186 326.038757324 -10.3560997732 104.222053528 -10.3793197279 105.370048523 -10.4025396825 106.595123291 -10.4257596372 107.893875122 -10.4489795918 108.992500305 -10.4721995465 109.93119812 -10.4954195011 110.819335938 -10.5186394558 112.031303406 -10.5418594104 113.389472961 -10.5650793651 114.239830017 -10.5882993197 116.827377319 -10.6115192744 119.250427246 -10.634739229 122.184356689 -10.6579591837 148.222839355 -10.6811791383 150.104660034 -10.704399093 153.361968994 -10.7276190476 155.115112305 -10.7508390023 158.433624268 -10.7740589569 161.372955322 -10.7972789116 163.421096802 -10.8204988662 167.165771484 -10.8437188209 170.329452515 -10.8669387755 173.311584473 -10.8901587302 175.445571899 -10.9133786848 177.304244995 -10.9365986395 179.024490356 -10.9598185941 180.073501587 -10.9830385488 180.826629639 -11.0062585034 181.559936523 -11.029478458 182.487792969 -11.0526984127 183.303192139 -11.0759183673 183.976135254 -11.099138322 184.650161743 -11.1223582766 185.613876343 -11.1455782313 186.123062134 -11.1687981859 186.852523804 -11.1920181406 187.531890869 -11.2152380952 188.232284546 -11.2384580499 189.20135498 -11.2616780045 189.485900879 -11.2848979592 190.094390869 -11.3081179138 190.636749268 -11.3313378685 191.252670288 -11.3545578231 191.647476196 -11.3777777778 192.673187256 -11.4009977324 193.018920898 -11.4242176871 193.641860962 -11.4474376417 194.307373047 -11.4706575964 194.234619141 -11.493877551 194.290252686 -11.5170975057 194.641845703 -11.5403174603 194.663314819 -11.563537415 194.719177246 -11.5867573696 194.149108887 -11.6099773243 194.166213989 -11.6331972789 194.136291504 -11.6564172336 193.786529541 -11.6796371882 192.605865479 -11.7028571429 190.785202026 -11.7260770975 188.578399658 -11.7492970522 182.544433594 -11.7725170068 173.676742554 -11.7957369615 415.019744873 -11.8189569161 417.989685059 -11.8421768707 333.699066162 -11.8653968254 415.058837891 -11.88861678 352.025543213 -11.9118367347 -1.0 -11.9350566893 -1.0 -11.958276644 -1.0 -11.9814965986 -1.0 -12.0047165533 -1.0 -12.0279365079 -1.0 -12.0511564626 -1.0 -12.0743764172 -1.0 -12.0975963719 -1.0 -12.1208163265 -1.0 -12.1440362812 -1.0 -12.1672562358 -1.0 -12.1904761905 -1.0 -12.2136961451 -1.0 -12.2369160998 -1.0 -12.2601360544 -1.0 -12.2833560091 -1.0 -12.3065759637 -1.0 -12.3297959184 -1.0 -12.353015873 -1.0 -12.3762358277 -1.0 -12.3994557823 -1.0 -12.422675737 -1.0 -12.4458956916 -1.0 -12.4691156463 -1.0 -12.4923356009 -1.0 -12.5155555556 -1.0 -12.5387755102 -1.0 -12.5619954649 -1.0 -12.5852154195 -1.0 -12.6084353741 -1.0 -12.6316553288 -1.0 -12.6548752834 -1.0 -12.6780952381 -1.0 -12.7013151927 -1.0 -12.7245351474 -1.0 -12.747755102 -1.0 -12.7709750567 -1.0 -12.7941950113 -1.0 -12.817414966 -1.0 -12.8406349206 -1.0 -12.8638548753 -1.0 -12.8870748299 -1.0 -12.9102947846 -1.0 -12.9335147392 -1.0 -12.9567346939 -1.0 -12.9799546485 -1.0 -13.0031746032 -1.0 -13.0263945578 -1.0 -13.0496145125 -1.0 -13.0728344671 -1.0 -13.0960544218 -1.0 -13.1192743764 -1.0 -13.1424943311 -1.0 diff --git a/tests/src/test-phasevoc-jack.c b/tests/src/test-phasevoc-jack.c index 5d7cc3e7..ffc7673e 100644 --- a/tests/src/test-phasevoc-jack.c +++ b/tests/src/test-phasevoc-jack.c @@ -9,7 +9,7 @@ #include /* sleep() */ #include -#include +#include "jackio.h" uint_t testing = 1; /* change this to 1 to listen */ diff --git a/wscript b/wscript index 58bd1c9b..eb097210 100644 --- a/wscript +++ b/wscript @@ -136,7 +136,7 @@ def build(bld): 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') @@ -187,8 +187,11 @@ def build_tests(bld): 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'