Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
salu133445 committed Aug 28, 2020
1 parent 692da09 commit 57c2024
Show file tree
Hide file tree
Showing 118 changed files with 1,163 additions and 893 deletions.
27 changes: 27 additions & 0 deletions doc/source/classes/base.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
============
Base Classes
============


Base Class
==========

All MusPy classes inherit from the :class:`muspy.Base` class. A :class:`muspy.Base` object supports the following operations.

- :meth:`muspy.Base.to_ordered_dict`: convert the content into an ordered dictionary
- :meth:`muspy.Base.from_dict` (class method): create a MusPy object of a certain class
- :meth:`muspy.Base.print`: show the content in a YAML-like format
- :meth:`muspy.Base.validate`: validate the data stored in an object
- :meth:`muspy.Base.is_valid`: return a boolean indicating if the stored data is valid
- :meth:`muspy.Base.adjust_time`: adjust the timing of an object


ComplexBase Class
=================

MusPy classes that contains list attributes also inherit from the :class:`muspy.ComplexBase` class. A :class:`muspy.ComplexBase` object supports the following operations.

- :meth:`muspy.ComplexBase.append`: append an object to the corresponding list
- :meth:`muspy.ComplexBase.remove_invalid`: remove invalid items from the lists
- :meth:`muspy.ComplexBase.sort`: sort the lists
- :meth:`muspy.ComplexBase.remove_duplicate`: remove duplicate items from the lists
34 changes: 6 additions & 28 deletions doc/source/classes/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@
MusPy Classes
=============

MusPy provides several classes for working with symbolic music. Here is an illustration of the relations between different MusPy classes.

.. image:: ../images/classes.svg


.. toctree::
:hidden:

base
music
track
metadata
Expand All @@ -15,31 +21,3 @@ MusPy Classes
annotation
note
chord

MusPy provides several classes for working with symbolic music. Here is an illustration of the relations between different MusPy classes.

.. image:: ../images/classes.svg


Base Class
==========

All MusPy classes inherit from the :class:`muspy.Base` class. A :class:`muspy.Base` object supports the following operations.

- :meth:`muspy.Base.to_ordered_dict`: convert the content into an ordered dictionary
- :meth:`muspy.Base.from_dict` (class method): create a MusPy object of a certain class
- :meth:`muspy.Base.print`: show the content in a YAML-like format
- :meth:`muspy.Base.validate`: validate the data stored in an object
- :meth:`muspy.Base.is_valid`: return a boolean indicating if the stored data is valid
- :meth:`muspy.Base.adjust_time`: adjust the timing of an object


ComplexBase Class
=================

MusPy classes that contains list attributes also inherit from the :class:`muspy.ComplexBase` class. A :class:`muspy.ComplexBase` object supports the following operations.

- :meth:`muspy.ComplexBase.append`: append an object to the corresponding list
- :meth:`muspy.ComplexBase.remove_invalid`: remove invalid items from the lists
- :meth:`muspy.ComplexBase.sort`: sort the lists
- :meth:`muspy.ComplexBase.remove_duplicate`: remove duplicate items from the lists
2 changes: 0 additions & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
project = "MusPy"
copyright = "2020, Hao-Wen Dong"
author = "Hao-Wen Dong"
version = muspy.__version__
release = muspy.__version__


# -- General configuration ---------------------------------------------------
Expand Down
23 changes: 23 additions & 0 deletions doc/source/datasets/datasets.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
==================
Supported Datasets
==================

Here is a list of the supported datasets.

============================ ======== ====== ======= ========= ====== ====== ==========
Dataset Format Hours Songs Genre Melody Chords Multitrack
============================ ======== ====== ======= ========= ====== ====== ==========
Lakh MIDI Dataset MIDI >5000 174,533 misc \* \* \*
MAESTRO Dataset MIDI 201.21 1,282 classical
Wikifonia Lead Sheet Dataset MusicXML 198.40 6,405 misc O O
Essen Folk Song Dataset ABC 56.62 9,034 folk O O
NES Music Database MIDI 46.11 5,278 game O O
Hymnal Tune Dataset MIDI 18.74 1,756 hymn O
Hymnal Dataset MIDI 17.50 1,723 hymn
music21's Corpus misc 16.86 613 misc \* \*
Nottingham Database ABC 10.54 1,036 folk O O
music21's JSBach Corpus MusicXML 3.46 410 classical O
JSBach Chorale Dataset MIDI 3.21 382 classical O
============================ ======== ====== ======= ========= ====== ====== ==========

(Asterisk marks indicate partial support.)
45 changes: 2 additions & 43 deletions doc/source/datasets/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,52 +22,11 @@ MusPy provides an easy-to-use dataset management system. Each supported dataset
dataset = nes.to_pytorch_dataset(representation="pianoroll")
Iterating over a MusPy Dataset object
=====================================

Here is an illustration of the two internal processing modes for iterating over
a MusPy Dataset object.

.. image:: ../images/on_the_fly.svg
:align: center
:width: 475px

.. image:: ../images/preconverted1.svg
:align: center
:width: 500px

.. image:: ../images/preconverted2.svg
:align: center
:width: 475px


Supported Datasets
==================

Here is a list of the supported datasets.

============================ ======== ====== ======= ========= ====== ====== ==========
Dataset Format Hours Songs Genre Melody Chords Multitrack
============================ ======== ====== ======= ========= ====== ====== ==========
Lakh MIDI Dataset MIDI >5000 174,533 misc \* \* \*
MAESTRO Dataset MIDI 201.21 1,282 classical
Wikifonia Lead Sheet Dataset MusicXML 198.40 6,405 misc O O
Essen Folk Song Dataset ABC 56.62 9,034 folk O O
NES Music Database MIDI 46.11 5,278 game O O
Hymnal Tune Dataset MIDI 18.74 1,756 hymn O
Hymnal Dataset MIDI 17.50 1,723 hymn
music21's Corpus misc 16.86 613 misc \* \*
Nottingham Database ABC 10.54 1,036 folk O O
music21's JSBach Corpus MusicXML 3.46 410 classical O
JSBach Chorale Dataset MIDI 3.21 382 classical O
============================ ======== ====== ======= ========= ====== ====== ==========

(Asterisk marks indicate partial support.)


.. toctree::
:hidden:

iterator
datasets
base
local
remote
18 changes: 18 additions & 0 deletions doc/source/datasets/iterator.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
=====================================
Iterating over a MusPy Dataset object
=====================================

Here is an illustration of the two internal processing modes for iterating over
a MusPy Dataset object.

.. image:: ../images/on_the_fly.svg
:align: center
:width: 475px

.. image:: ../images/preconverted1.svg
:align: center
:width: 500px

.. image:: ../images/preconverted2.svg
:align: center
:width: 475px
3 changes: 1 addition & 2 deletions doc/source/io/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ MusPy provides three type of data I/O interfaces.
- MusPy's native JSON and YAML formats: ``muspy.load_*`` and ``muspy.save_*``
- Other symbolic music libraries: ``muspy.from_*`` and ``muspy.to_*``

Here is a list of the supported interfaces.

.. toctree::
:titlesonly:
:hidden:

midi
musicxml
Expand Down
2 changes: 1 addition & 1 deletion docs/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: df18c40425533571f04d144c2a989f91
config: b1e7048c2d42530d6d3e45917004b0ae
tags: 645f666f9bcd5a90fca523b33c5a78b7
6 changes: 1 addition & 5 deletions docs/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Overview: module code &mdash; MusPy 0.0.0 documentation</title>
<title>Overview: module code &mdash; MusPy documentation</title>



Expand Down Expand Up @@ -62,10 +62,6 @@



<div class="version">
0.0.0
</div>




Expand Down
6 changes: 1 addition & 5 deletions docs/_modules/muspy/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>muspy.base &mdash; MusPy 0.0.0 documentation</title>
<title>muspy.base &mdash; MusPy documentation</title>



Expand Down Expand Up @@ -62,10 +62,6 @@



<div class="version">
0.0.0
</div>




Expand Down
6 changes: 1 addition & 5 deletions docs/_modules/muspy/classes.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>muspy.classes &mdash; MusPy 0.0.0 documentation</title>
<title>muspy.classes &mdash; MusPy documentation</title>



Expand Down Expand Up @@ -62,10 +62,6 @@



<div class="version">
0.0.0
</div>




Expand Down
6 changes: 1 addition & 5 deletions docs/_modules/muspy/core.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>muspy.core &mdash; MusPy 0.0.0 documentation</title>
<title>muspy.core &mdash; MusPy documentation</title>



Expand Down Expand Up @@ -62,10 +62,6 @@



<div class="version">
0.0.0
</div>




Expand Down
6 changes: 1 addition & 5 deletions docs/_modules/muspy/datasets/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>muspy.datasets.base &mdash; MusPy 0.0.0 documentation</title>
<title>muspy.datasets.base &mdash; MusPy documentation</title>



Expand Down Expand Up @@ -62,10 +62,6 @@



<div class="version">
0.0.0
</div>




Expand Down
6 changes: 1 addition & 5 deletions docs/_modules/muspy/datasets/essen.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>muspy.datasets.essen &mdash; MusPy 0.0.0 documentation</title>
<title>muspy.datasets.essen &mdash; MusPy documentation</title>



Expand Down Expand Up @@ -62,10 +62,6 @@



<div class="version">
0.0.0
</div>




Expand Down
6 changes: 1 addition & 5 deletions docs/_modules/muspy/datasets/hymnal.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>muspy.datasets.hymnal &mdash; MusPy 0.0.0 documentation</title>
<title>muspy.datasets.hymnal &mdash; MusPy documentation</title>



Expand Down Expand Up @@ -62,10 +62,6 @@



<div class="version">
0.0.0
</div>




Expand Down
6 changes: 1 addition & 5 deletions docs/_modules/muspy/datasets/jsb.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>muspy.datasets.jsb &mdash; MusPy 0.0.0 documentation</title>
<title>muspy.datasets.jsb &mdash; MusPy documentation</title>



Expand Down Expand Up @@ -62,10 +62,6 @@



<div class="version">
0.0.0
</div>




Expand Down
6 changes: 1 addition & 5 deletions docs/_modules/muspy/datasets/lmd.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>muspy.datasets.lmd &mdash; MusPy 0.0.0 documentation</title>
<title>muspy.datasets.lmd &mdash; MusPy documentation</title>



Expand Down Expand Up @@ -62,10 +62,6 @@



<div class="version">
0.0.0
</div>




Expand Down
Loading

0 comments on commit 57c2024

Please sign in to comment.