This extension adds an abc
directive to Sphinx in order to write sheet music
as text. The content of the directive will be rendered to SVG by
abcm2ps and included in the rendered
document.
Here are some inversions of a D-major triad.
.. abc::
X:1
L:1/4
K:C
"Root position"[D^FA] [DA^f] | "First inversion"[^FAd] [^Fda] | "Second inversion"[Ad^f] [Ad'^f] |
w: closed open closed open closed open
Here are some inversions of a D-major triad.
-
Install abcm2ps.
-
Install this extension:
pip install sphinx_abcnotation --user
-
Edit
conf.py
to includesphinx_abcnotation
in theextensions
list:extensions = ['sphinx_abcnotation']
-
Use the
.. abc ::
directive in your reStructuredText documents.
For info on abc notation itself I recommend this page by Steve Mansfield.