[doc] reorganize python doc
authorPaul Brossier <piem@piem.org>
Wed, 31 Oct 2018 15:25:09 +0000 (16:25 +0100)
committerPaul Brossier <piem@piem.org>
Wed, 31 Oct 2018 15:25:09 +0000 (16:25 +0100)
doc/python.rst
doc/python_module.rst

index 038055a..0664cc5 100644 (file)
@@ -7,23 +7,49 @@
 ..
    we follow numpy type docstrings, see:
    https://numpydoc.readthedocs.io/en/latest/format.html#docstring-standard
+..
+   note: we do not import aubio's docstring, which will be displayed from an
+   interpreter.
+
+.. .. automodule:: aubio
+
 
 .. _python:
 
 Python documentation
 ====================
 
+This module provides a number of classes and functions for the analysis of
+music and audio signals.
+
+Contents
+--------
+
+.. toctree::
+   :maxdepth: 1
+
+   py_examples
+   py_datatypes
+   py_io
+   py_utils
 
-.. midiconv.py
+Introduction
+------------
 
-.. autofunction:: note2midi
+This document provides a reference guide. For documentation on how to
+install aubio, see :ref:`python-install`.
 
-.. autofunction:: midi2note
+Examples included in this guide and within the code are written assuming
+both `aubio` and `numpy`_ have been imported:
 
-.. autofunction:: freq2note
+.. code-block:: python
 
-.. autofunction:: note2freq
+    >>> import aubio
+    >>> import numpy as np
 
-.. slicing.py
+`Changed in 0.4.8` :  Prior to this version, almost no documentation was
+provided with the python module. This version adds documentation for some
+classes, including :class:`fvec`, :class:`cvec`, :class:`source`, and
+:class:`sink`.
 
-.. autofunction:: slice_source_at_stamps
+.. _numpy: https://www.numpy.org
index d552dea..e008a31 100644 (file)
@@ -25,8 +25,8 @@ From ``aubio`` source directory, run the following:
     $ ./setup.py build
     $ sudo ./setup.py install
 
-Using aubio in python
----------------------
+Checking your installation
+--------------------------
 
 Once the python module is installed, its version can be checked with:
 
@@ -40,35 +40,6 @@ The command line `aubio` is also installed:
 
     $ aubio -h
 
-A simple example
-................
-
-Here is a :download:`simple script <../python/demos/demo_source_simple.py>`
-that reads all the samples from a media file:
-
-.. literalinclude:: ../python/demos/demo_source_simple.py
-   :language: python
-
-Filtering an input sound file
-.............................
-
-Here is a more complete example, :download:`demo_filter.py
-<../python/demos/demo_filter.py>`. This files executes the following:
-
-* read an input media file (``aubio.source``)
-
-* filter it using an `A-weighting <https://en.wikipedia.org/wiki/A-weighting>`_
-  filter (``aubio.digital_filter``)
-
-* write result to a new file (``aubio.sink``)
-
-.. literalinclude:: ../python/demos/demo_filter.py
-   :language: python
-
-More demos
-..........
-
-Check out the `python demos folder`_ for more examples.
 
 Python tests
 ------------
@@ -76,6 +47,5 @@ Python tests
 A number of `python tests`_ are provided. To run them, use
 ``python/tests/run_all_tests``.
 
-.. _python demos folder: https://github.com/aubio/aubio/blob/master/python/demos
 .. _demo_filter.py: https://github.com/aubio/aubio/blob/master/python/demos/demo_filter.py
 .. _python tests: https://github.com/aubio/aubio/blob/master/python/tests