History

Merge branch 'master' into feature/pytest

Paul Brossier committed 7 years ago

Commit e893e6f2 parents bf3f09b c4a8bc115 files · +299 −128Browse files

Unified · Split

15 files
  1. .travis.yml +7 −11
  2. ChangeLog +76 −0
  3. MANIFEST.in +1 −0
  4. Makefile +25 −9
  5. VERSION +3 −3
  6. doc/aubiocut.txt +2 −0
  7. doc/python_module.rst +38 −15
  8. doc/requirements.rst +30 −2
  9. python/README.md +88 −84
  10. python/tests/test_source_channels.py +1 −1
  11. setup.py +7 −1
  12. src/spectral/mfcc.h +0 −1
  13. src/synth/wavetable.c +7 −0
  14. src/synth/wavetable.h +12 −0
  15. wscript +2 −1
.travis.yml+7−11
@@ -62,15 +62,17 @@ addons: · 61 unmodified lines
62 - libfftw3-dev62 - libfftw3-dev
63 - sox63 - sox
64 - lcov64 - lcov
65 homebrew:
66 packages:
67 - sox
68 - ffmpeg
69 - libsndfile
70 - lcov
71 #update: true
65 72
66before_install:73before_install:
67 - |74 - |
68 if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then75 if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
69 brew update
70 brew install sox
71 brew install ffmpeg
72 brew install libsndfile
73 brew install lcov
74 export PATH="$HOME/Library/Python/2.7/bin/:$PATH"76 export PATH="$HOME/Library/Python/2.7/bin/:$PATH"
75 fi;77 fi;
76 78
@@ -83,8 +85,6 @@ install: · 6 unmodified lines
83 - travis_retry make getwaf expandwaf deps_python85 - travis_retry make getwaf expandwaf deps_python
84 - which pip86 - which pip
85 - pip --version87 - pip --version
86 - pip install python-coveralls
87 - gem install coveralls-lcov
88 88
89script:89script:
90 - make create_test_sounds90 - make create_test_sounds
@@ -99,10 +99,6 @@ script: · 8 unmodified lines
99after_success:99after_success:
100 - |100 - |
101 if [[ -z "$AUBIO_NOTESTS" ]]; then101 if [[ -z "$AUBIO_NOTESTS" ]]; then
102 # upload lcov coverage to coveralls.io
103 coveralls-lcov build/coverage.info
104 # upload python coverage
105 #coveralls
106 # upload to codecov102 # upload to codecov
107 bash <(curl -s https://codecov.io/bash)103 bash <(curl -s https://codecov.io/bash)
108 fi104 fi
ChangeLog+76−0
@@ -1,3 +1,79 @@
12018-11-21 Paul Brossier <piem@aubio.org>
2
3 [ Overview ]
4
5 * VERSION: bump to 0.4.8
6 * notes: new option release_drop (gh-203)
7 * spectral: new parameters added to filterbank and mfcc (gh-206)
8 * python: start documenting module (gh-73, debian #480018), improve build for
9 win-amd64 (gh-154, gh-199, gh-208)
10 * fixes: prevent crash when using fft sizes unsupported by vDSP (gh-207),
11 prevent saturation when down-mixing a multi-channel source (avcodec/ffmpeg)
12
13 [ Fixes ]
14
15 * avcodec: prevent saturation when down-mixing a multi-channel source, emit
16 a warning if compiling against avutil < 53 (gh-137), wrap long lines
17 * examples/: avoid hiding global and unreachable code
18 * fft: limit to r*2*n sizes, with r in [1, 3, 5, 15] (vDSP only) (gh-207)
19 * fft: fix reconstruction for odd sizes (fftw only)
20 * pvoc: add missing implementations for aubio_pvoc_get_hop/win
21 * mathutils: increase ln(2) precision of in freqtomidi/miditofreq
22 * wavetable: stop sets playing to 0, add dummy implementation for _load
23
24 [ New features ]
25
26 * src/musicutils.h: new aubio_meltohz, aubio_hztomel, with _htk versions
27 * src/spectral/filterbank.h: new set_mel_coeffs, set_mel_coeffs_htk,
28 set_power, and set_norm methods, improved set_triangle_bands
29 * src/spectral/mfcc.h: new set_scale, set_power, set_norm, set_mel_coeffs,
30 set_mel_coeffs_htk, set_mel_coeffs_slaney
31 * src/mathutils.h: new fvec_mul
32 * src/notes: new option release_drop to prevent missing note-offs (gh-203)
33
34 [ Python module ]
35
36 * fix: rounding to nearest integer in midi2note and freq2note
37 * general: supports code generation of setters with none or multiple
38 parameters
39 * documentation: add docstrings do fvec, cvec, source, sink, pvoc, frequency
40 conversion and level detection routines (gh-73, debian #480018)
41 * slicing: improve and document slice_source_at_stamps
42 * module: new note2freq function, recover error log when raising exceptions
43 on failed set_ methods, prevent cyclic import, coding style improvements
44 * demos: improve coding style, fix bpm_extract arguments
45 * MANIFEST.in: exclude *.pyc, improve patterns
46
47 [ Documentation ]
48
49 * doc/: use sphinx autodoc to load docstrings from aubio module, reorganize
50 python module documentation, add a note about double precision, use https
51 when possible
52 * src/spectral/: update Auditory Toolbox url, update copyright year
53
54 [ Tools ]
55
56 * aubionotes: add --release-drop option
57 * aubio: add --release-drop and --silence options to `aubio notes`,
58 workaround for -V to really show version (py2)
59 * aubiocut: add option --create-first to always create first slice
60
61 [ Tests ]
62
63 * tests/, python/tests: add tests for new methods, check source channel
64 down-mix, improve coverage
65
66 [ Build system ]
67
68 * Makefile: disable docs when measuring coverage, add branch coverage
69 option, add coverage_zero_counters target, improve html report
70 * waf: update to 2.0.12, improve wscript style, prevent shipping some
71 generated files
72 * python: always show compiler warnings when pre-processing headers,
73 workaround to fix code generation for win-amd64 (gh-154, gh-199, gh-208).
74 * continuous integration: add azure pipelines, update and improve
75 configurations for appveyor, circleci, and travis.
76
12018-09-22 Paul Brossier <piem@aubio.org>772018-09-22 Paul Brossier <piem@aubio.org>
2 78
3 [ Overview ]79 [ Overview ]
MANIFEST.in+1−0
@@ -1,6 +1,7 @@
1include AUTHORS COPYING README.md VERSION ChangeLog1include AUTHORS COPYING README.md VERSION ChangeLog
2include python/README.md2include python/README.md
3include this_version.py3include this_version.py
4include waf_gensyms.py
4include waf5include waf
5recursive-include waflib *.py6recursive-include waflib *.py
6include Makefile wscript */wscript_build7include Makefile wscript */wscript_build
Makefile+25−9
@@ -42,6 +42,8 @@ SOX=sox · 41 unmodified lines
42 42
43TESTSOUNDS := python/tests/sounds43TESTSOUNDS := python/tests/sounds
44 44
45LCOVOPTS += --rc lcov_branch_coverage=1
46
45all: build47all: build
46 48
47checkwaf:49checkwaf:
@@ -243,22 +245,36 @@ coverage: export PYTHONPATH=$(PWD)/python/lib · 195 unmodified lines
243coverage: export LD_LIBRARY_PATH=$(PWD)/build/src245coverage: export LD_LIBRARY_PATH=$(PWD)/build/src
244coverage: force_uninstall_python deps_python \246coverage: force_uninstall_python deps_python \
245 clean_python clean distclean build local_dylib247 clean_python clean distclean build local_dylib
246 lcov --capture --no-external --directory . --output-file build/coverage_lib.info248 # capture coverage after running c tests
249 lcov $(LCOVOPTS) --capture --no-external --directory . \
250 --output-file build/coverage_lib.info
251 # build and test python
247 pip install -v -e .252 pip install -v -e .
253 # run tests, with python coverage
248 coverage run `which pytest`254 coverage run `which pytest`
249 lcov --capture --no-external --directory . --output-file build/coverage_python.info255 # capture coverage again
250 lcov -a build/coverage_python.info -a build/coverage_lib.info -o build/coverage.info256 lcov $(LCOVOPTS) --capture --no-external --directory . \
257 --output-file build/coverage_python.info
258 # merge both coverage info files
259 lcov $(LCOVOPTS) -a build/coverage_python.info -a build/coverage_lib.info \
260 --output-file build/coverage.info
261 # remove tests
262 lcov $(LCOVOPTS) --remove build/coverage.info '*/tests/*' '*/ooura_fft8g*' \
263 --output-file build/coverage_lib.info
251 264
252# make sure we don't build the doc, which builds a temporary python module265# make sure we don't build the doc, which builds a temporary python module
253coverage_report: export WAFOPTS += --disable-docs266coverage_report: export WAFOPTS += --disable-docs
254coverage_report: coverage267coverage_report: coverage
255 genhtml build/coverage.info --output-directory lcov_html268 # create coverage report dir
256 mkdir -p gcovr_html/269 mkdir -p build/coverage/
257 gcovr -r . --html --html-details \270 # generate report with lcov's genhtml
258 --output gcovr_html/index.html \271 genhtml build/coverage_lib.info --output-directory build/coverage/lcov \
259 --exclude ".*tests/.*" --exclude ".*examples/.*"272 --branch-coverage --highlight --legend
273 # generate python report with coverage python package
260 coverage report274 coverage report
261 coverage html275 coverage html -d build/coverage/coverage
276 # show links to generated reports
277 for i in $$(ls build/coverage/*/index.html); do echo file://$(PWD)/$$i; done
262 278
263sphinx: configure279sphinx: configure
264 $(WAFCMD) sphinx $(WAFOPTS)280 $(WAFCMD) sphinx $(WAFOPTS)
VERSION+3−3
@@ -1,7 +1,7 @@
1AUBIO_MAJOR_VERSION=01AUBIO_MAJOR_VERSION=0
2AUBIO_MINOR_VERSION=42AUBIO_MINOR_VERSION=4
3AUBIO_PATCH_VERSION=83AUBIO_PATCH_VERSION=8
4AUBIO_VERSION_STATUS='~alpha'4AUBIO_VERSION_STATUS=''
5LIBAUBIO_LT_CUR=55LIBAUBIO_LT_CUR=5
6LIBAUBIO_LT_REV=36LIBAUBIO_LT_REV=4
7LIBAUBIO_LT_AGE=77LIBAUBIO_LT_AGE=8
doc/aubiocut.txt+2−0
@@ -50,6 +50,8 @@ OPTIONS · 49 unmodified lines
50 --cut-until-nslices n How many extra slices should be added at the end of50 --cut-until-nslices n How many extra slices should be added at the end of
51 each slice (default 0).51 each slice (default 0).
52 52
53 --create-first Alway create first slice.
54
53 -h, --help Print a short help message and exit.55 -h, --help Print a short help message and exit.
54 56
55 -v, --verbose Be verbose.57 -v, --verbose Be verbose.
doc/python_module.rst+38−15
@@ -3,28 +3,50 @@ · 2 unmodified lines
3Installing aubio for Python3Installing aubio for Python
4===========================4===========================
5 5
6The aubio extension for Python is available for Python 2.7 and Python 3.6aubio is available as a package for Python 2.7 and Python 3. The aubio
7extension is written C using the `Python/C`_ and the `Numpy/C`_ APIs.
8
9.. _Python/C: https://docs.python.org/c-api/index.html
10.. _Numpy/C: https://docs.scipy.org/doc/numpy/reference/c-api.html
11
12For general documentation on how to install Python packages, see `Installing
13Packages`_.
7 14
8Installing aubio with pip15Installing aubio with pip
9-------------------------16-------------------------
10 17
11aubio can now be installed using ``pip``:18aubio can be installed from `PyPI`_ using ``pip``:
12 19
13.. code-block:: console20.. code-block:: console
14 21
15 $ pip install aubio22 $ pip install aubio
16 23
17Building the module24See also `Installing from PyPI`_ for general documentation.
18-------------------25
26.. note::
27
28 aubio is currently a `source only`_ package, so you will need a compiler to
29 install it from `PyPI`_. See also `Installing aubio with conda`_ for
30 pre-compiled binaries.
31
32.. _PyPI: https://pypi.python.org/pypi/aubio
33.. _Installing Packages: https://packaging.python.org/tutorials/installing-packages/
34.. _Installing from PyPI: https://packaging.python.org/tutorials/installing-packages/#installing-from-pypi
35.. _source only: https://packaging.python.org/tutorials/installing-packages/#source-distributions-vs-wheels
36
37Installing aubio with conda
38---------------------------
19 39
20From ``aubio`` source directory, run the following:40`Conda packages`_ are available through the `conda-forge`_ channel for Linux,
41macOS, and Windows:
21 42
22.. code-block:: console43.. code-block:: console
23 44
24 $ ./setup.py clean45 $ conda config --add channels conda-forge
25 $ ./setup.py build46 $ conda install -c conda-forge aubio
26 $ sudo ./setup.py install
27 47
48.. _Conda packages: https://anaconda.org/conda-forge/aubio
49.. _conda-forge: https://conda-forge.org/
28 50
29.. _py-doubleprecision:51.. _py-doubleprecision:
30 52
@@ -67,14 +89,15 @@ The command line `aubio` is also installed: · 36 unmodified lines
67Python tests89Python tests
68------------90------------
69 91
70A number of python tests are provided. To run them, use [pytest] from the92A number of Python tests are provided in the `python/tests`_ folder. To run
71aubio source tree:93them, install `pytest`_ and run it from the aubio source directory:
94
95.. code-block:: console
72 96
97 $ pip install pytest
98 $ git clone https://git.aubio.org/aubio/aubio
73 $ cd aubio99 $ cd aubio
74 $ pytest100 $ pytest
75 101
76Each test script can also be called individually. For instance:102.. _python/tests: https://github.com/aubio/aubio/blob/master/python/tests
77 103.. _pytest: https://pytest.org
78 $ ./python/tests/test_note2midi.py -v
79
80[pytest]: https://pytest.org
doc/requirements.rst+30−2
@@ -302,10 +302,38 @@ Here is an example of a custom command: · 301 unmodified lines
302Double precision302Double precision
303................303................
304 304
305The datatype used to store real numbers in aubio is named `smpl_t`. By default,
306`smpl_t` is defined as `float`, a `single-precision format
307<https://en.wikipedia.org/wiki/Single-precision_floating-point_format>`_
308(32-bit). Some algorithms require a floating point representation with a
309higher precision, for instance to prevent arithmetic underflow in recursive
310filters. In aubio, these special samples are named `lsmp_t` and defined as
311`double` by default (64-bit).
312
313Sometimes it may be useful to compile aubio in `double-precision`, for instance
314to reproduce numerical results obtained with 64-bit routines. In this case,
315`smpl_t` will be defined as `double`.
316
317The following table shows how `smpl_t` and `lsmp_t` are defined in single- and
318double-precision modes:
319
320.. list-table:: Single and double-precision modes
321 :align: center
322
323 * -
324 - single
325 - double
326 * - `smpl_t`
327 - ``float``
328 - ``double``
329 * - `lsmp_t`
330 - ``double``
331 - ``long double``
332
305To compile aubio in double precision mode, configure with ``--enable-double``.333To compile aubio in double precision mode, configure with ``--enable-double``.
306 334
307To compile aubio in single precision mode, use ``--disable-double`` (default,335To compile in single-precision mode (default), use ``--disable-double`` (or
308recommended).336simply none of these two options).
309 337
310Disabling the tests338Disabling the tests
311...................339...................
python/README.md+88−84
@@ -1,105 +1,109 @@
1Python aubio module1aubio
2===================2=====
3 3
4This module wraps the aubio library for Python using the numpy module.4aubio is a collection of tools for music and audio analysis.
5 5
6Using the Python aubio module6This package integrates the aubio library with [NumPy] to provide a set of
7-----------------------------7efficient tools to process and analyse audio signals, including:
8 8
9After installing python-aubio, you will be able to import the aubio module:9- read audio from any media file, including videos and remote streams
10- high quality phase vocoder, spectral filterbanks, and linear filters
11- Mel-Frequency Cepstrum Coefficients and standard spectral descriptors
12- detection of note attacks (onset)
13- pitch tracking (fundamental frequency estimation)
14- beat detection and tempo tracking
10 15
11 $ python16aubio works with both Python 2 and Python 3.
12 [...]
13 >>> import aubio
14 >>> help(aubio.miditofreq)
15 17
16Finding some inspiration18Links
17------------------------19-----
18 20
19Some examples are available in the `python/demos` directory. These scripts are21- [module documentation][doc_python]
20small programs written in python and using python-aubio.22- [installation instructions][doc_python_install]
23- [aubio manual][manual]
24- [aubio homepage][homepage]
25- [issue tracker][bugtracker]
21 26
22For instance, `demo_source.py` reads a media file.27Demos
28-----
23 29
24 $ ./python/demos/demo_source.py /path/to/sound/sample.wav30Some examples are available in the [`python/demos`][demos_dir] folder. Each
31script is a command line program which accepts one ore more argument.
25 32
26and `demo_timestretch_online.py` stretches the original file into a new one:33**Notes**: installing additional modules is required to run some of the demos.
27 34
28 $ ./python/demo/demo_timestretch_online.py loop.wav stretched_loop.wav 0.92`35### Analysis
29 36
30Note: you might need to install additional modules to run some of the demos.37- `demo_source.py` uses aubio to read audio samples from media files
31Some demos use [matplotlib](http://matplotlib.org/) to draw plots, others use38- `demo_onset_plot.py` detects attacks in a sound file and plots the results
32[PySoundCard](https://github.com/bastibe/PySoundCard) to play and record39 using [matplotlib]
33sounds.40- `demo_pitch.py` looks for fundamental frequency in a sound file and plots the
41 results using [matplotlib]
42- `demo_spectrogram.py`, `demo_specdesc.py`, `demo_mfcc.py` for spectral
43 analysis.
34 44
35Testing the Python module45### Real-time
36-------------------------
37 46
38Python tests are in `python/tests` and use [pytest].47- `demo_pyaudio.py` and `demo_tapthebeat.py` use [pyaudio]
48- `demo_pysoundcard_play.py`, `demo_pysoundcard.py` use [PySoundCard]
49- `demo_alsa.py` uses [pyalsaaudio]
39 50
40To run the all the python tests:51### Others
41 52
42 $ cd aubio53- `demo_timestretch.py` can change the duration of an input file and write the
43 $ pytest54 new sound to disk,
55- `demo_wav2midi.py` detects the notes in a file and uses [mido] to write the
56 results into a MIDI file
44 57
45Each test script can also be called one at a time. For instance:58### Example
46 59
47 $ pytest -v python/tests/test_note2midi.py60Use `demo_timestretch_online.py` to slow down `loop.wav`, write the results in
61`stretched_loop.wav`:
48 62
49[pytest]: https://pytest.org63 $ python demo_timestretch_online.py loop.wav stretched_loop.wav 0.92
50 64
51Install in a virtualenv65Built with
52-----------------------
53
54You should be able to install python-aubio directly from the top source
55directory of aubio.
56
57First, create a virtualenv to hold the required python module:
58
59 $ virtualenv pyaubio
60 $ source pyaubio/bin/activate
61
62Now install and build the python extension using:
63
64 $ pip install .
65
66Install requirements
67--------------------
68
69Before compiling this module, you must have compiled libaubio.
70
71A simple way to do this is with pip:
72
73 $ pip install -r requirements.txt
74
75For more information about how this module works, please refer to the [Python/C
76API Reference Manual] (http://docs.python.org/c-api/index.html) and the
77[Numpy/C API Reference](http://docs.scipy.org/doc/numpy/reference/c-api.html).
78
79Compiling python aubio
80----------------------
81
82To build the aubio Python module, run the following command from the top source
83directory of aubio:
84
85 $ ./setup.py build
86
87Note: if libaubio was previously built using waf, the script will use it.
88Otherwise, the entire library will be built inside the python extension.
89
90To find out more about `setup.py` options:
91
92 $ ./setup.py --help
93
94Installing
95----------66----------
96 67
97To install the Python module:68The core of aubio is written in C for portability and speed. In addition to
98 69[NumPy], aubio can be optionally built to use one or more of the following
99 $ ./setup.py install70libraries:
100 71
101Alternatively, you may want to use the Python module without installing it by72- media file reading:
102setting your PYTHONPATH, for instance as follows:73
103 74 - [ffmpeg] / [avcodec] to decode and read audio from almost any format,
104 $ export PYTHONPATH=$PYTHONPATH:$PWD/`ls -rtd build/lib.* | head -1`:$PWD/tests75 - [libsndfile] to read audio from uncompressed sound files,
105 76 - [libsamplerate] to re-sample audio signals,
77 - [CoreAudio] to read all media formats supported by macOS, iOS, and tvOS.
78
79- hardware acceleration:
80
81 - [Atlas] and [Blas], for accelerated vector and matrix computations,
82 - [fftw3], to compute fast Fourier Transforms of any size,
83 - [Accelerate] for accelerated FFT and matrix computations (macOS/iOS),
84 - [Intel IPP], accelerated vector computation and FFT implementation.
85
86[ffmpeg]: https://ffmpeg.org
87[avcodec]: https://libav.org
88[libsndfile]: http://www.mega-nerd.com/libsndfile/
89[libsamplerate]: http://www.mega-nerd.com/SRC/
90[CoreAudio]: https://developer.apple.com/reference/coreaudio
91[Atlas]: http://math-atlas.sourceforge.net/
92[Blas]: https://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms
93[fftw3]: http://fftw.org
94[Accelerate]: https://developer.apple.com/reference/accelerate
95[Intel IPP]: https://software.intel.com/en-us/intel-ipp
96
97[demos_dir]:https://github.com/aubio/aubio/tree/master/python/demos
98[pyaudio]:https://people.csail.mit.edu/hubert/pyaudio/
99[PySoundCard]:https://github.com/bastibe/PySoundCard
100[pyalsaaudio]:https://larsimmisch.github.io/pyalsaaudio/
101[mido]:https://mido.readthedocs.io
102
103[manual]: https://aubio.org/manual/latest/
104[doc_python]: https://aubio.org/manual/latest/python.html
105[doc_python_install]: https://aubio.org/manual/latest/python_module.html
106[homepage]: https://aubio.org
107[NumPy]: https://www.numpy.org
108[bugtracker]: https://github.com/aubio/aubio/issues
109[matplotlib]:https://matplotlib.org/
python/tests/test_source_channels.py+1−1
@@ -8,7 +8,7 @@ import unittest · 7 unmodified lines
8import aubio8import aubio
9import numpy as np9import numpy as np
10from numpy.testing import assert_equal10from numpy.testing import assert_equal
11from utils import get_tmp_sink_path11from .utils import get_tmp_sink_path
12 12
13class aubio_source_test_case(unittest.TestCase):13class aubio_source_test_case(unittest.TestCase):
14 14
setup.py+7−1
@@ -62,13 +62,19 @@ classifiers = [ · 61 unmodified lines
62 'GNU General Public License v3 or later (GPLv3+)',62 'GNU General Public License v3 or later (GPLv3+)',
63 ]63 ]
64 64
65thisdir = os.path.abspath(os.path.dirname(__file__))
66py_readme_file = os.path.join(thisdir, 'python', 'README.md')
67with open(py_readme_file, 'r') as fp:
68 long_description = ''.join(fp.readlines()[3:])
69
65distrib = setup(name='aubio',70distrib = setup(name='aubio',
66 version = __version__,71 version = __version__,
67 packages = ['aubio'],72 packages = ['aubio'],
68 package_dir = {'aubio': 'python/lib/aubio'},73 package_dir = {'aubio': 'python/lib/aubio'},
69 ext_modules = [aubio_extension],74 ext_modules = [aubio_extension],
70 description = 'a collection of tools for music analysis',75 description = 'a collection of tools for music analysis',
71 long_description = 'a collection of tools for music analysis',76 long_description = long_description,
77 long_description_content_type = 'text/markdown',
72 license = 'GNU/GPL version 3',78 license = 'GNU/GPL version 3',
73 author = 'Paul Brossier',79 author = 'Paul Brossier',
74 author_email = 'piem@aubio.org',80 author_email = 'piem@aubio.org',
src/spectral/mfcc.h+0−1
@@ -152,7 +152,6 @@ uint_t aubio_mfcc_set_mel_coeffs_htk (aubio_mfcc_t *mf, · 151 unmodified lines
152/** Mel filterbank initialization (Auditory Toolbox's parameters)152/** Mel filterbank initialization (Auditory Toolbox's parameters)
153 153
154 \param mf mfcc object154 \param mf mfcc object
155 \param samplerate audio sampling rate, in Hz
156 155
157 The filter coefficients are built to match exactly Malcolm Slaney's Auditory156 The filter coefficients are built to match exactly Malcolm Slaney's Auditory
158 Toolbox implementation. The number of filters should be 40.157 Toolbox implementation. The number of filters should be 40.
src/synth/wavetable.c+7−0
@@ -167,6 +167,13 @@ uint_t aubio_wavetable_stop ( aubio_wavetable_t * s ) · 166 unmodified lines
167 return aubio_wavetable_set_playing (s, 0);167 return aubio_wavetable_set_playing (s, 0);
168}168}
169 169
170uint_t
171aubio_wavetable_load ( aubio_wavetable_t *s UNUSED, const char_t *uri UNUSED)
172{
173 AUBIO_ERR("wavetable: load method not implemented yet, see sampler\n");
174 return AUBIO_FAIL;
175}
176
170uint_t aubio_wavetable_set_freq ( aubio_wavetable_t * s, smpl_t freq )177uint_t aubio_wavetable_set_freq ( aubio_wavetable_t * s, smpl_t freq )
171{178{
172 return aubio_parameter_set_target_value ( s->freq, freq );179 return aubio_parameter_set_target_value ( s->freq, freq );
src/synth/wavetable.h+12−0
@@ -51,6 +51,18 @@ typedef struct _aubio_wavetable_t aubio_wavetable_t; · 50 unmodified lines
51*/51*/
52aubio_wavetable_t * new_aubio_wavetable(uint_t samplerate, uint_t hop_size);52aubio_wavetable_t * new_aubio_wavetable(uint_t samplerate, uint_t hop_size);
53 53
54/** load source in wavetable
55
56 TODO: This function is not implemented yet. See new_aubio_sampler() instead.
57
58 \param o wavetable, created by new_aubio_wavetable()
59 \param uri the uri of the source to load
60
61 \return 0 if successful, non-zero otherwise
62
63*/
64uint_t aubio_wavetable_load( aubio_wavetable_t * o, const char_t * uri );
65
54/** process wavetable function66/** process wavetable function
55 67
56 \param o wavetable, created by new_aubio_wavetable()68 \param o wavetable, created by new_aubio_wavetable()
wscript+2−1
@@ -618,6 +618,7 @@ def dist(ctx): · 617 unmodified lines
618 ctx.excl += ' **/python/*.db'618 ctx.excl += ' **/python/*.db'
619 ctx.excl += ' **/python.old/*'619 ctx.excl += ' **/python.old/*'
620 ctx.excl += ' **/python/*/*.old'620 ctx.excl += ' **/python/*/*.old'
621 ctx.excl += ' **/python/lib/aubio/*.so'
621 ctx.excl += ' **/python/tests/sounds'622 ctx.excl += ' **/python/tests/sounds'
622 ctx.excl += ' **/**.asc'623 ctx.excl += ' **/**.asc'
623 ctx.excl += ' **/dist*'624 ctx.excl += ' **/dist*'
@@ -627,4 +628,4 @@ def dist(ctx): · 3 unmodified lines
627 ctx.excl += ' **/.appveyor.yml'628 ctx.excl += ' **/.appveyor.yml'
628 ctx.excl += ' **/.circleci/*'629 ctx.excl += ' **/.circleci/*'
629 ctx.excl += ' **/azure-pipelines.yml'630 ctx.excl += ' **/azure-pipelines.yml'
630 ctx.excl += ' **/.coveragerc'631 ctx.excl += ' **/.coverage*'

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t