Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
salu133445 committed Nov 4, 2020
1 parent 514ba46 commit 3781f12
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 26 deletions.
2 changes: 1 addition & 1 deletion doc/source/track.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Track Class
===========

Pypianoroll provides the `pypianoroll.Track`, `pypianoroll.BinaryTrack` and `pypianoroll.StandardTrack` classes for handling single-track piano rolls.
Pypianoroll provides three classes (`pypianoroll.Track`, `pypianoroll.BinaryTrack` and `pypianoroll.StandardTrack`) for handling single-track piano rolls.

.. autoclass:: pypianoroll.Track
:noindex:
Expand Down
7 changes: 1 addition & 6 deletions doc/source/visualization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
Visualization
=============

Pypianoroll supports visualizing piano rolls.

Here are some examples.
Pypianoroll provides tools for visualizing piano rolls. Here are some examples.

.. image:: images/visualization_track.png
:alt: Track visualization
Expand All @@ -15,9 +13,6 @@ Here are some examples.
.. image:: images/visualization_multitrack_closeup.png
:alt: Multitrack visualization closeup

.. note::
We assume the piano roll is in symbolic timing. You may visualize traditional piano rolls in absolute timing by setting up x-axis properties in the plotting function.


Functions
=========
Expand Down
2 changes: 1 addition & 1 deletion docs/_modules/pypianoroll/visualization.html
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ <h1>Source code for pypianoroll.visualization</h1><div class="highlight"><pre>
<span class="sd"> ----------</span>
<span class="sd"> ax : :class:`matplotlib.axes.Axes`</span>
<span class="sd"> Axes to plot the piano roll on.</span>
<span class="sd"> pianoroll : ndarray, shape=(?, 128) or (?, 128, 3) or (?, 128, 4)</span>
<span class="sd"> pianoroll : ndarray, shape=(?, 128), (?, 128, 3) or (?, 128, 4)</span>
<span class="sd"> Piano roll to plot. For a 3D piano-roll array, the last axis can</span>
<span class="sd"> be either RGB or RGBA.</span>
<span class="sd"> is_drum : bool</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/_sources/track.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Track Class
===========

Pypianoroll provides the `pypianoroll.Track`, `pypianoroll.BinaryTrack` and `pypianoroll.StandardTrack` classes for handling single-track piano rolls.
Pypianoroll provides three classes (`pypianoroll.Track`, `pypianoroll.BinaryTrack` and `pypianoroll.StandardTrack`) for handling single-track piano rolls.

.. autoclass:: pypianoroll.Track
:noindex:
Expand Down
7 changes: 1 addition & 6 deletions docs/_sources/visualization.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
Visualization
=============

Pypianoroll supports visualizing piano rolls.

Here are some examples.
Pypianoroll provides tools for visualizing piano rolls. Here are some examples.

.. image:: images/visualization_track.png
:alt: Track visualization
Expand All @@ -15,9 +13,6 @@ Here are some examples.
.. image:: images/visualization_multitrack_closeup.png
:alt: Multitrack visualization closeup

.. note::
We assume the piano roll is in symbolic timing. You may visualize traditional piano rolls in absolute timing by setting up x-axis properties in the plotting function.


Functions
=========
Expand Down
2 changes: 1 addition & 1 deletion docs/doc.html
Original file line number Diff line number Diff line change
Expand Up @@ -1580,7 +1580,7 @@ <h2>Features<a class="headerlink" href="#features" title="Permalink to this head
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>ax</strong> (<a class="reference external" href="https://matplotlib.org/api/axes_api.html#matplotlib.axes.Axes" title="(in Matplotlib v3.3.2)"><code class="xref py py-class docutils literal notranslate"><span class="pre">matplotlib.axes.Axes</span></code></a>) – Axes to plot the piano roll on.</p></li>
<li><p><strong>pianoroll</strong> (<em>ndarray</em><em>, </em><em>shape=</em><em>(</em><em>?</em><em>, </em><em>128</em><em>) or </em><em>(</em><em>?</em><em>, </em><em>128</em><em>, </em><em>3</em><em>) or </em><em>(</em><em>?</em><em>, </em><em>128</em><em>, </em><em>4</em><em>)</em>) – Piano roll to plot. For a 3D piano-roll array, the last axis can
<li><p><strong>pianoroll</strong> (<em>ndarray</em><em>, </em><em>shape=</em><em>(</em><em>?</em><em>, </em><em>128</em><em>)</em><em>, </em><em>(</em><em>?</em><em>, </em><em>128</em><em>, </em><em>3</em><em>) or </em><em>(</em><em>?</em><em>, </em><em>128</em><em>, </em><em>4</em><em>)</em>) – Piano roll to plot. For a 3D piano-roll array, the last axis can
be either RGB or RGBA.</p></li>
<li><p><strong>is_drum</strong> (<em>bool</em>) – Whether it is a percussion track. Defaults to False.</p></li>
<li><p><strong>resolution</strong> (<em>int</em>) – Time steps per quarter note. Required if <cite>xtick</cite> is ‘beat’.</p></li>
Expand Down
2 changes: 1 addition & 1 deletion docs/searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/track.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@

<div class="section" id="track-class">
<h1>Track Class<a class="headerlink" href="#track-class" title="Permalink to this headline"></a></h1>
<p>Pypianoroll provides the <cite>pypianoroll.Track</cite>, <cite>pypianoroll.BinaryTrack</cite> and <cite>pypianoroll.StandardTrack</cite> classes for handling single-track piano rolls.</p>
<p>Pypianoroll provides three classes (<cite>pypianoroll.Track</cite>, <cite>pypianoroll.BinaryTrack</cite> and <cite>pypianoroll.StandardTrack</cite>) for handling single-track piano rolls.</p>
<dl class="py class">
<dt>
<em class="property">class </em><code class="sig-prename descclassname">pypianoroll.</code><code class="sig-name descname">Track</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span><span class="p">:</span> <span class="n">Optional<span class="p">[</span>str<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">program</span><span class="p">:</span> <span class="n">Optional<span class="p">[</span>int<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">is_drum</span><span class="p">:</span> <span class="n">Optional<span class="p">[</span>bool<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">pianoroll</span><span class="p">:</span> <span class="n">Optional<span class="p">[</span><a class="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.19)">numpy.ndarray</a><span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypianoroll/track.html#Track"><span class="viewcode-link">[source]</span></a></dt>
Expand Down
9 changes: 2 additions & 7 deletions docs/visualization.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,10 @@

<div class="section" id="visualization">
<h1>Visualization<a class="headerlink" href="#visualization" title="Permalink to this headline"></a></h1>
<p>Pypianoroll supports visualizing piano rolls.</p>
<p>Here are some examples.</p>
<p>Pypianoroll provides tools for visualizing piano rolls. Here are some examples.</p>
<img alt="Track visualization" src="_images/visualization_track.png" />
<img alt="Multitrack visualization" src="_images/visualization_multitrack.png" />
<img alt="Multitrack visualization closeup" src="_images/visualization_multitrack_closeup.png" />
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>We assume the piano roll is in symbolic timing. You may visualize traditional piano rolls in absolute timing by setting up x-axis properties in the plotting function.</p>
</div>
<div class="section" id="functions">
<h2>Functions<a class="headerlink" href="#functions" title="Permalink to this headline"></a></h2>
<dl class="py function">
Expand Down Expand Up @@ -249,7 +244,7 @@ <h2>Functions<a class="headerlink" href="#functions" title="Permalink to this he
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>ax</strong> (<a class="reference external" href="https://matplotlib.org/api/axes_api.html#matplotlib.axes.Axes" title="(in Matplotlib v3.3.2)"><code class="xref py py-class docutils literal notranslate"><span class="pre">matplotlib.axes.Axes</span></code></a>) – Axes to plot the piano roll on.</p></li>
<li><p><strong>pianoroll</strong> (<em>ndarray</em><em>, </em><em>shape=</em><em>(</em><em>?</em><em>, </em><em>128</em><em>) or </em><em>(</em><em>?</em><em>, </em><em>128</em><em>, </em><em>3</em><em>) or </em><em>(</em><em>?</em><em>, </em><em>128</em><em>, </em><em>4</em><em>)</em>) – Piano roll to plot. For a 3D piano-roll array, the last axis can
<li><p><strong>pianoroll</strong> (<em>ndarray</em><em>, </em><em>shape=</em><em>(</em><em>?</em><em>, </em><em>128</em><em>)</em><em>, </em><em>(</em><em>?</em><em>, </em><em>128</em><em>, </em><em>3</em><em>) or </em><em>(</em><em>?</em><em>, </em><em>128</em><em>, </em><em>4</em><em>)</em>) – Piano roll to plot. For a 3D piano-roll array, the last axis can
be either RGB or RGBA.</p></li>
<li><p><strong>is_drum</strong> (<em>bool</em>) – Whether it is a percussion track. Defaults to False.</p></li>
<li><p><strong>resolution</strong> (<em>int</em>) – Time steps per quarter note. Required if <cite>xtick</cite> is ‘beat’.</p></li>
Expand Down
2 changes: 1 addition & 1 deletion pypianoroll/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def plot_pianoroll(
----------
ax : :class:`matplotlib.axes.Axes`
Axes to plot the piano roll on.
pianoroll : ndarray, shape=(?, 128) or (?, 128, 3) or (?, 128, 4)
pianoroll : ndarray, shape=(?, 128), (?, 128, 3) or (?, 128, 4)
Piano roll to plot. For a 3D piano-roll array, the last axis can
be either RGB or RGBA.
is_drum : bool
Expand Down

0 comments on commit 3781f12

Please sign in to comment.