diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 000000000..01c5c4ba5 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,192 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# User-friendly check for sphinx-build +ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) +$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) +endif + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " applehelp to make an Apple Help Book" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " xml to make Docutils-native XML files" + @echo " pseudoxml to make pseudoxml-XML files for display purposes" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + @echo " coverage to run coverage check of the documentation (if enabled)" + +clean: + rm -rf $(BUILDDIR)/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/madmom.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/madmom.qhc" + +applehelp: + $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp + @echo + @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." + @echo "N.B. You won't be able to view it unless you put it in" \ + "~/Library/Documentation/Help or install it in your application" \ + "bundle." + +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/madmom" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/madmom" + @echo "# devhelp" + +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +latexpdfja: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through platex and dvipdfmx..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." + +coverage: + $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage + @echo "Testing of coverage in the sources finished, look at the " \ + "results in $(BUILDDIR)/coverage/python.txt." + +xml: + $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml + @echo + @echo "Build finished. The XML files are in $(BUILDDIR)/xml." + +pseudoxml: + $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml + @echo + @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 000000000..b52ad1eb6 --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,311 @@ +# -*- coding: utf-8 -*- +# +# madmom documentation build configuration file, created by +# sphinx-quickstart on Sat Oct 17 10:26:54 2015. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys +import os + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +sys.path.insert(0, os.path.abspath('../madmom')) + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + 'sphinx.ext.autodoc', + 'sphinx.ext.autosummary', + 'sphinx.ext.doctest', + 'sphinx.ext.todo', + 'sphinx.ext.coverage', + 'sphinx.ext.mathjax', + 'sphinx.ext.viewcode', + 'numpydoc', +] + +# see http://stackoverflow.com/q/12206334/562769 +numpydoc_show_class_members = False + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# source_suffix = ['.rst', '.md'] +source_suffix = '.rst' + +# The encoding of source files. +# source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'madmom' +copyright = u'2015, madmom development team' +author = u'madmom development team' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +import pkg_resources +version = pkg_resources.get_distribution("madmom").version +# The full version, including alpha/beta/rc tags. +release = version + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +# today = '' +# Else, today_fmt is used as the format for a strftime call. +# today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ['_build'] + +# The reST default role (used for this markup: `text`) to use for all +# documents. +# default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +# add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +# add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +# show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +# modindex_common_prefix = [] + +# If true, keep warnings as "system message" paragraphs in the built documents. +# keep_warnings = False + +# If true, `todo` and `todoList` produce output, else they produce nothing. +# todo_include_todos = True + +# -- Options for HTML output ---------------------------------------------- + +# Read the docs style: +if os.environ.get('READTHEDOCS') != 'True': + try: + import sphinx_rtd_theme + except ImportError: + pass # assume we have sphinx >= 1.3 + else: + html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] + html_theme = 'sphinx_rtd_theme' + +def setup(app): + app.add_stylesheet("fix_rtd.css") + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# html_theme = 'alabaster' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +# html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +# html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +# html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +# html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +# html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# Add any extra paths that contain custom files (such as robots.txt or +# .htaccess) here, relative to this directory. These files are copied +# directly to the root of the documentation. +# html_extra_path = [] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +# html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +# html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +# html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +# html_additional_pages = {} + +# If false, no module index is generated. +# html_domain_indices = True + +# If false, no index is generated. +# html_use_index = True + +# If true, the index is split into individual pages for each letter. +# html_split_index = False + +# If true, links to the reST sources are added to the pages. +# html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +# html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +# html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +# html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +# html_file_suffix = None + +# Language to be used for generating the HTML full-text search index. +# Sphinx supports the following languages: +# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja' +# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr' +# html_search_language = 'en' + +# A dictionary with options for the search language support, empty by default. +# Now only 'ja' uses this config value +# html_search_options = {'type': 'default'} + +# The name of a javascript file (relative to the configuration directory) that +# implements a search results scorer. If empty, the default will be used. +# html_search_scorer = 'scorer.js' + +# Output file base name for HTML help builder. +htmlhelp_basename = 'madmomdoc' + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # 'papersize': 'letterpaper', + + # The font size ('10pt', '11pt' or '12pt'). + # 'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + # 'preamble': '', + + # Latex figure (float) alignment + # 'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + (master_doc, 'madmom.tex', u'madmom Documentation', + u'madmom development team', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +# latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +# latex_use_parts = False + +# If true, show page references after internal links. +# latex_show_pagerefs = False + +# If true, show URL addresses after external links. +# latex_show_urls = False + +# Documents to append as an appendix to all manuals. +# latex_appendices = [] + +# If false, no module index is generated. +# latex_domain_indices = True + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + (master_doc, 'madmom', u'madmom Documentation', + [author], 1) +] + +# If true, show URL addresses after external links. +# man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + (master_doc, 'madmom', u'madmom Documentation', + author, 'madmom', 'One line description of project.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +# texinfo_appendices = [] + +# If false, no module index is generated. +# texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +# texinfo_show_urls = 'footnote' + +# If true, do not generate a @detailmenu in the "Top" node's menu. +# texinfo_no_detailmenu = False + +# -- other options -------------------------------------------------------- +autodoc_member_order = 'bysource' diff --git a/docs/development.rst b/docs/development.rst new file mode 100644 index 000000000..e6ccba1a4 --- /dev/null +++ b/docs/development.rst @@ -0,0 +1,105 @@ +Development +=========== + +As an open-source project by researchers for researchers, we highly welcome +any contribution! + +What to contribute +------------------ + +Give feedback +~~~~~~~~~~~~~ + +To send us general feedback, questions or ideas for improvement, please post on +`our mailing list`_. + +Report bugs +~~~~~~~~~~~ + +Please report any bugs at the `issue tracker on GitHub`_. +If you are reporting a bug, please include: + +* your version of madmom, +* steps to reproduce the bug, ideally reduced to as few commands as possible, +* the results you obtain, and the results you expected instead. + +If you are unsure whether the experienced behaviour is intended or a bug, +please just ask on `our mailing list`_ first. + +Fix bugs +~~~~~~~~ + +Look for anything tagged with "bug" on the `issue tracker on GitHub`_ and fix +it. + +Features +~~~~~~~~ + +Please do not hesitate to propose any ideas at the `issue tracker on GitHub`_. +Think about posting them on `our mailing list`_ first, so we can discuss it +and/or guide you through the implementation. + +Alternatively, you can look for anything tagged with "feature request" or +"enhancement" on the `issue tracker on GitHub`_. + +Write documentation +~~~~~~~~~~~~~~~~~~~ + +Whenever you find something not explained well, misleading or just wrong, +please update it! The *Edit on GitHub* link on the top right of every +documentation page and the *[source]* link for every documented entity +in the API reference will help you to quickly locate the origin of any text. + +How to contribute +----------------- + +Edit on GitHub +~~~~~~~~~~~~~~ + +As a very easy way of just fixing issues in the documentation, use the *Edit +on GitHub* link on the top right of a documentation page or the *[source]* link +of an entity in the API reference to open the corresponding source file in +GitHub, then click the *Edit this file* link to edit the file in your browser +and send us a Pull Request. All you need for this is a free GitHub account. + +For any more substantial changes, please follow the steps below. + +Fork the project +~~~~~~~~~~~~~~~~ + +First, fork the project on `GitHub`_. + +Then, follow the :doc:`general installation instructions ` and, +more specifically, the :ref:`installation from source `. +Please note that you should clone from your fork instead. + +Documentation +~~~~~~~~~~~~~ + +The documentation is generated with `Sphinx +`_. To build it locally, run the +following commands: + +.. code:: bash + + cd docs + make html + +Afterwards, open ``docs/_build/html/index.html`` to view the documentation as +it would appear on `readthedocs `_. If you +changed a lot and seem to get misleading error messages or warnings, run +``make clean html`` to force Sphinx to recreate all files from scratch. + +When writing docstrings, follow existing documentation as much as possible to +ensure consistency throughout the library. For additional information on the +syntax and conventions used, please refer to the following documents: + +* `reStructuredText Primer `_ +* `Sphinx reST markup constructs `_ +* `A Guide to NumPy/SciPy Documentation + `_ + + +.. _GitHub: https://github.com/CPJKU/madmom +.. _issue tracker on GitHub: https://github.com/CPJKU/madmom/issues +.. _our mailing list: https://groups.google.com/d/forum/madmom-users diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 000000000..f13b5dc0a --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,56 @@ +Welcome to madmom! +================== + +Madmom is an audio signal processing library written in Python with a strong +focus on music information retrieval (MIR) tasks. The project is on `GitHub`_. + +It's main features / design goals are: + +* ease of use, +* rapid prototyping of signal processing workflows, +* most stuff is modeled as numpy arrays (enhanced by additional methods and + attributes), +* simple conversion to a running program by the use of processors. + +Madmom is a work in progress, input is always welcome. The available +documentation is limited for now, but +:doc:`you can help to improve it `. + +User Guide +---------- + +The madmom user guide explains how to install madmom, how to get things done +and how to contribute to the library as a developer. + +.. toctree:: + :maxdepth: 1 + + installation + tutorial + development + + +API Reference +------------- + +If you are looking for information on a specific function, class or method, +this part of the documentation is for you. + +.. toctree:: + :maxdepth: 2 + + modules/audio + modules/features + modules/evaluation + modules/ml + modules/utils + modules/processors + +Indices and tables +------------------ + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + +.. _GitHub: https://github.com/CPJKU/madmom diff --git a/docs/installation.rst b/docs/installation.rst new file mode 100644 index 000000000..5c902b493 --- /dev/null +++ b/docs/installation.rst @@ -0,0 +1,151 @@ +Installation +============ + +Prerequisites +------------- + +To install the ``madmom`` package, you must have either Python 2.7 or Python +3.3 or newer and the following packages installed: + +- `numpy `_ +- `scipy `_ +- `cython `_ +- `nose `_ (to run the tests) + +If you need support for audio files other than ``.wav`` with a sample rate of +44.1kHz and 16 bit depth, you need ``ffmpeg`` (``avconv`` on Ubuntu Linux has +some decoding bugs, so we advise not to use it!). + +Please refer to the ``requirements.txt`` file for the minimum required versions +and make sure that these modules are up to date, otherwise it can result in +unexpected errors or false computations! + +Install from package +-------------------- + +If you intend to change anything within the `madmom` package, please follow the +steps in :ref:`the next section `. + +The instructions given here should be used if you just want to install the +package (e.g. to run the bundled programs). + +The easiest way to install the package is via ``pip`` from the `PyPI (Python +Package Index) `_: + + pip install madmom + +This includes the latest code and trained models and will install all +dependencies automatically. It will also install the executable scripts to a +common place (e.g. ``/usr/local/bin``) which should be in your ``$PATH`` +already. ``pip`` will output the install location. + +You might need higher privileges (use su or sudo) to install the package, model +files and scripts globally. Alternatively you can install the package locally +(i.e. only for you) by adding the ``--user`` argument: + + pip install --user madmom + +Depending on your platform, the scripts will be copied to a folder which +might not be included in your ``$PATH`` (e.g. ``~/Library/Python/2.7/bin`` +on Mac OS X or ``~/.local/bin`` on Ubuntu Linux), so please call the scripts +directly or add their path to your ``$PATH`` environment variable: + + export PATH='path/to/scripts':$PATH + +.. _install_from_source: + +Install from source +------------------- + +If you plan to use the package as a developer, clone the Git repository: + + git clone https://github.com/CPJKU/madmom.git + +Since the pre-trained model/data files are not included in this repository but +rather added as a Git submodule, you either have to clone the repo recursively: + + git clone --recursive https://github.com/CPJKU/madmom.git + +or init the submodule and fetch the data manually: + + cd /path/to/madmom + + git submodule update --init --remote + +You can then either include the package directory in your ``$PYTHONPATH``, or +you can simply install the package in development mode: + + python setup.py develop --user + +If you change any ``.pyx`` or ``.pxd`` files, you have to (re-)compile the +modules with Cython. To do so, please run the above command again or: + + python setup.py build_ext --inplace + +To run the included tests: + + python setup.py test + +Package structure +----------------- + +The package has a very simple structure, divided into the following folders: + +`/bin `_ + example programs (i.e. executable algorithms) +`/docs `_ + sphinx documentation of the package +`/madmom `_ + the package itself +`/madmom/audio `_ + low level features (e.g. audio file handling, STFT) +`/madmom/evaluation `_ + evaluation code +`/madmom/features `_ + higher level features (e.g. onsets, beats) +`/madmom/ml `_ + machine learning stuff (e.g. RNNs, HMMs) +`/madmom/models `_ + pre-trained model/data files (please note the license) +`/madmom/utils `_ + misc stuff (e.g. MIDI and general file handling) +`/tests `_ + tests + +Almost all low level features (i.e. everything under +`/madmom/audio `_) are divided into a data class and a +corresponding processor class. The data class refers always to a certain +instance (e.g. the STFT of an audio file), whereas the processor classes are +used to define processing chains through which the audio is processed (i.e. +most stuff in `/madmom/features `_). + +Executable programs +------------------- + +The package includes executable programs in the `/bin `_ folder. These are +usually standalone reference implementations of the algorithms contained in the +package. + +All scripts can be run in different modes: in ``single`` file mode to process +a single audio file and write the output to STDOUT or the given output file. + + SuperFlux single [-o OUTFILE] INFILE + +If multiple audio files should be processed, the scripts can also be run in +``batch`` mode to write the outputs to files with the given suffix. + + SuperFlux batch [--o OUTPUT_DIR] [-s OUTPUT_SUFFIX] LIST OF INPUT FILES + +If no output directory is given, the program writes the output files to same +location as the audio files. + +The ``pickle`` mode can be used to store the used parameters to be able to +exactly reproduce experiments. + +Note +---- + +The features are considered work in progress and thus can change without prior +notice, especially the default values can be updated from time to time if they +are more sensible than the previous ones. If your program relies on certain +values, please make sure that you set them explicitely! diff --git a/docs/modules/audio.rst b/docs/modules/audio.rst new file mode 100644 index 000000000..8c7d76249 --- /dev/null +++ b/docs/modules/audio.rst @@ -0,0 +1,29 @@ +madmom.audio package +==================== + +.. automodule:: madmom.audio + :members: + :undoc-members: + :show-inheritance: + +Submodules +---------- + +.. toctree:: + + audio/signal + audio/filters + audio/comb_filters + audio/ffmpeg + audio/stft + audio/spectrogram + audio/cepstrogram + audio/chroma + audio/hpss + + + + + + + diff --git a/docs/modules/audio/cepstrogram.rst b/docs/modules/audio/cepstrogram.rst new file mode 100644 index 000000000..9f1cead82 --- /dev/null +++ b/docs/modules/audio/cepstrogram.rst @@ -0,0 +1,7 @@ +madmom.audio.cepstrogram module +=============================== + +.. automodule:: madmom.audio.cepstrogram + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/modules/audio/chroma.rst b/docs/modules/audio/chroma.rst new file mode 100644 index 000000000..01962d03e --- /dev/null +++ b/docs/modules/audio/chroma.rst @@ -0,0 +1,7 @@ +madmom.audio.chroma module +========================== + +.. automodule:: madmom.audio.chroma + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/modules/audio/comb_filters.rst b/docs/modules/audio/comb_filters.rst new file mode 100644 index 000000000..29a167d07 --- /dev/null +++ b/docs/modules/audio/comb_filters.rst @@ -0,0 +1,7 @@ +madmom.audio.comb_filters module +================================ + +.. automodule:: madmom.audio.comb_filters + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/modules/audio/ffmpeg.rst b/docs/modules/audio/ffmpeg.rst new file mode 100644 index 000000000..a035c6177 --- /dev/null +++ b/docs/modules/audio/ffmpeg.rst @@ -0,0 +1,7 @@ +madmom.audio.ffmpeg module +========================== + +.. automodule:: madmom.audio.ffmpeg + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/modules/audio/filters.rst b/docs/modules/audio/filters.rst new file mode 100644 index 000000000..6d483d7a1 --- /dev/null +++ b/docs/modules/audio/filters.rst @@ -0,0 +1,7 @@ +madmom.audio.filters module +=========================== + +.. automodule:: madmom.audio.filters + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/modules/audio/hpss.rst b/docs/modules/audio/hpss.rst new file mode 100644 index 000000000..8ddd6af89 --- /dev/null +++ b/docs/modules/audio/hpss.rst @@ -0,0 +1,7 @@ +madmom.audio.hpss module +======================== + +.. automodule:: madmom.audio.hpss + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/modules/audio/signal.rst b/docs/modules/audio/signal.rst new file mode 100644 index 000000000..fafebddd5 --- /dev/null +++ b/docs/modules/audio/signal.rst @@ -0,0 +1,7 @@ +madmom.audio.signal module +========================== + +.. automodule:: madmom.audio.signal + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/modules/audio/spectrogram.rst b/docs/modules/audio/spectrogram.rst new file mode 100644 index 000000000..fb874d2bf --- /dev/null +++ b/docs/modules/audio/spectrogram.rst @@ -0,0 +1,7 @@ +madmom.audio.spectrogram module +=============================== + +.. automodule:: madmom.audio.spectrogram + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/modules/audio/stft.rst b/docs/modules/audio/stft.rst new file mode 100644 index 000000000..89484b610 --- /dev/null +++ b/docs/modules/audio/stft.rst @@ -0,0 +1,7 @@ +madmom.audio.stft module +======================== + +.. automodule:: madmom.audio.stft + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/modules/evaluation.rst b/docs/modules/evaluation.rst new file mode 100644 index 000000000..95ff9409e --- /dev/null +++ b/docs/modules/evaluation.rst @@ -0,0 +1,19 @@ +madmom.evaluation package +========================= + +.. automodule:: madmom.evaluation + :members: + :undoc-members: + :show-inheritance: + +Submodules +---------- + +.. toctree:: + + evaluation/alignment + evaluation/beats + evaluation/notes + evaluation/onsets + evaluation/tempo + diff --git a/docs/modules/evaluation/alignment.rst b/docs/modules/evaluation/alignment.rst new file mode 100644 index 000000000..74426ee19 --- /dev/null +++ b/docs/modules/evaluation/alignment.rst @@ -0,0 +1,7 @@ +madmom.evaluation.alignment module +================================== + +.. automodule:: madmom.evaluation.alignment + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/modules/evaluation/beats.rst b/docs/modules/evaluation/beats.rst new file mode 100644 index 000000000..771cbf955 --- /dev/null +++ b/docs/modules/evaluation/beats.rst @@ -0,0 +1,7 @@ +madmom.evaluation.beats module +============================== + +.. automodule:: madmom.evaluation.beats + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/modules/evaluation/notes.rst b/docs/modules/evaluation/notes.rst new file mode 100644 index 000000000..7ca866f36 --- /dev/null +++ b/docs/modules/evaluation/notes.rst @@ -0,0 +1,7 @@ +madmom.evaluation.notes module +============================== + +.. automodule:: madmom.evaluation.notes + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/modules/evaluation/onsets.rst b/docs/modules/evaluation/onsets.rst new file mode 100644 index 000000000..abb0c7730 --- /dev/null +++ b/docs/modules/evaluation/onsets.rst @@ -0,0 +1,7 @@ +madmom.evaluation.onsets module +=============================== + +.. automodule:: madmom.evaluation.onsets + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/modules/evaluation/tempo.rst b/docs/modules/evaluation/tempo.rst new file mode 100644 index 000000000..085ec31f1 --- /dev/null +++ b/docs/modules/evaluation/tempo.rst @@ -0,0 +1,7 @@ +madmom.evaluation.tempo module +============================== + +.. automodule:: madmom.evaluation.tempo + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/modules/features.rst b/docs/modules/features.rst new file mode 100644 index 000000000..71cf5df3b --- /dev/null +++ b/docs/modules/features.rst @@ -0,0 +1,20 @@ +madmom.features package +======================= + +.. automodule:: madmom.features + :members: + :undoc-members: + :show-inheritance: + +Submodules +---------- + +.. toctree:: + + features/beats + features/beats_crf + features/beats_hmm + features/notes + features/onsets + features/tempo + diff --git a/docs/modules/features/beats.rst b/docs/modules/features/beats.rst new file mode 100644 index 000000000..6adc67c25 --- /dev/null +++ b/docs/modules/features/beats.rst @@ -0,0 +1,7 @@ +madmom.features.beats module +============================ + +.. automodule:: madmom.features.beats + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/modules/features/beats_crf.rst b/docs/modules/features/beats_crf.rst new file mode 100644 index 000000000..f7df4aa71 --- /dev/null +++ b/docs/modules/features/beats_crf.rst @@ -0,0 +1,7 @@ +madmom.features.beats_crf module +================================ + +.. automodule:: madmom.features.beats_crf + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/modules/features/beats_hmm.rst b/docs/modules/features/beats_hmm.rst new file mode 100644 index 000000000..c1f5d8c09 --- /dev/null +++ b/docs/modules/features/beats_hmm.rst @@ -0,0 +1,7 @@ +madmom.features.beats_hmm module +================================ + +.. automodule:: madmom.features.beats_hmm + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/modules/features/notes.rst b/docs/modules/features/notes.rst new file mode 100644 index 000000000..6d383e3ee --- /dev/null +++ b/docs/modules/features/notes.rst @@ -0,0 +1,7 @@ +madmom.features.notes module +============================ + +.. automodule:: madmom.features.notes + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/modules/features/onsets.rst b/docs/modules/features/onsets.rst new file mode 100644 index 000000000..0f5d55a1d --- /dev/null +++ b/docs/modules/features/onsets.rst @@ -0,0 +1,7 @@ +madmom.features.onsets module +============================= + +.. automodule:: madmom.features.onsets + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/modules/features/tempo.rst b/docs/modules/features/tempo.rst new file mode 100644 index 000000000..1ea73cb8f --- /dev/null +++ b/docs/modules/features/tempo.rst @@ -0,0 +1,7 @@ +madmom.features.tempo module +============================ + +.. automodule:: madmom.features.tempo + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/modules/ml.rst b/docs/modules/ml.rst new file mode 100644 index 000000000..b033db352 --- /dev/null +++ b/docs/modules/ml.rst @@ -0,0 +1,17 @@ +madmom.ml package +================= + +.. automodule:: madmom.ml + :members: + :undoc-members: + :show-inheritance: + +Submodules +---------- + +.. toctree:: + + ml/gmm + ml/hmm + ml/io + ml/rnn diff --git a/docs/modules/ml/gmm.rst b/docs/modules/ml/gmm.rst new file mode 100644 index 000000000..ba35e81e5 --- /dev/null +++ b/docs/modules/ml/gmm.rst @@ -0,0 +1,7 @@ +madmom.ml.gmm module +==================== + +.. automodule:: madmom.ml.gmm + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/modules/ml/hmm.rst b/docs/modules/ml/hmm.rst new file mode 100644 index 000000000..4c77c3221 --- /dev/null +++ b/docs/modules/ml/hmm.rst @@ -0,0 +1,7 @@ +madmom.ml.hmm module +==================== + +.. automodule:: madmom.ml.hmm + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/modules/ml/io.rst b/docs/modules/ml/io.rst new file mode 100644 index 000000000..48ea6c554 --- /dev/null +++ b/docs/modules/ml/io.rst @@ -0,0 +1,7 @@ +madmom.ml.io module +=================== + +.. automodule:: madmom.ml.io + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/modules/ml/rnn.rst b/docs/modules/ml/rnn.rst new file mode 100644 index 000000000..b7872832c --- /dev/null +++ b/docs/modules/ml/rnn.rst @@ -0,0 +1,7 @@ +madmom.ml.rnn module +==================== + +.. automodule:: madmom.ml.rnn + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/modules/processors.rst b/docs/modules/processors.rst new file mode 100644 index 000000000..bf16d4841 --- /dev/null +++ b/docs/modules/processors.rst @@ -0,0 +1,7 @@ +madmom.processors module +======================== + +.. automodule:: madmom.processors + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/modules/utils.rst b/docs/modules/utils.rst new file mode 100644 index 000000000..69e58e87f --- /dev/null +++ b/docs/modules/utils.rst @@ -0,0 +1,16 @@ +madmom.utils package +==================== + +.. automodule:: madmom.utils + :members: + :undoc-members: + :show-inheritance: + +Submodules +---------- + +.. toctree:: + + utils/midi + utils/stats + diff --git a/docs/modules/utils/midi.rst b/docs/modules/utils/midi.rst new file mode 100644 index 000000000..a5df0a61a --- /dev/null +++ b/docs/modules/utils/midi.rst @@ -0,0 +1,7 @@ +madmom.utils.midi module +======================== + +.. automodule:: madmom.utils.midi + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/modules/utils/stats.rst b/docs/modules/utils/stats.rst new file mode 100644 index 000000000..37927897b --- /dev/null +++ b/docs/modules/utils/stats.rst @@ -0,0 +1,7 @@ +madmom.utils.stats module +========================= + +.. automodule:: madmom.utils.stats + :members: + :undoc-members: + :show-inheritance: