From d6561eaa0bcaaf163bd09e48193c02fa7fb84252 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Wed, 31 Oct 2018 16:50:25 +0100 Subject: [PATCH] [doc] re-add py_examples --- doc/py_examples.rst | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 doc/py_examples.rst diff --git a/doc/py_examples.rst b/doc/py_examples.rst new file mode 100644 index 00000000..cd20901e --- /dev/null +++ b/doc/py_examples.rst @@ -0,0 +1,42 @@ +.. default-domain:: py +.. currentmodule:: aubio + +Examples +-------- + +Below is a short selection of examples using the aubio module. + +Read a sound file +................. + +Here is a simple script, :download:`demo_source_simple.py +<../python/demos/demo_source_simple.py>` that reads all the samples from a +media file using :class:`source`: + +.. literalinclude:: ../python/demos/demo_source_simple.py + :language: python + +Filter a sound file +................... + +Here is another example, :download:`demo_filter.py +<../python/demos/demo_filter.py>`, which applies a filter to a sound file +and writes the filtered signal in another file: + +* read audio samples from a file with :class:`source` + +* filter them using an `A-weighting `_ + filter using :class:`digital_filter` + +* write the filtered samples to a new file with :class:`sink`. + +.. literalinclude:: ../python/demos/demo_filter.py + :language: python + +More examples +............. + +For more examples showing how to use other components of the module, see +the `python demos folder`_. + +.. _python demos folder: https://github.com/aubio/aubio/blob/master/python/demos -- 2.11.0