Skip to main content

Tool and library for manipulating LilyPond files

Project description

This package provides a Python library ly containing various Python modules to parse, manipulate or create documents in LilyPond format. A command line program ly is also provided that can be used to do various manipulations with LilyPond files.

The LilyPond format is a plain text input format that is used by the GNU music typesetter LilyPond (www.lilypond.org).

The python-ly package is Free Software, licensed under the GPL. This package is written by the Frescobaldi developers and is used extensively by the Frescobaldi project. The main author is Wilbert Berendsen.

The ly command line tool

With ly you can reformat, or re-indent LilyPond files, transpose music, translate pitch names, convert LilyPond to syntax-colored HTML, etc.

There is also experimental support for converting LilyPond to MusicXML.

Use:

ly -h

to get a full list of the features of the ly command.

Here is an example to re-indent and transpose a LilyPond file:

ly "indent; transpose c d" -o output.ly file.ly

To test the ly module from the current directory without installing, use:

python -m ly <args...>

This will behave like running the ly command when the package is installed.

The ly Python module

The ly module requires Python 3. This is a short description of some modules:

  • ly.slexer: generic tools to build parsers using regular expressions

  • ly.node: a generic list-like node object to build tree structures with

  • ly.document: a tokenized text document (LilyPond file)

  • ly.lex: a parser for LilyPond, Scheme, and other formats, using slexer

  • ly.music: a tree structure of the contents of a document

  • ly.pitch: functions for translating, transposing etc

  • ly.indent: indent LilyPond text

  • ly.reformat: format LilyPond text

  • ly.dom: (deprecated) tree structure to build LilyPond text from

  • ly.words: words for highlighting and autocompletion

  • ly.data: layout objects, properties, interfaces, font glyphs etc extracted from LilyPond

Documentation

The documentation is built using Sphinx and located in the doc directory. If you have Sphinx installed, you can build nicely formatted HTML documentation by typing make html in the doc directory.

You can also read the docs online at http://python-ly.readthedocs.org/.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_ly-0.9.9.tar.gz (250.0 kB view details)

Uploaded Source

Built Distribution

python_ly-0.9.9-py3-none-any.whl (227.6 kB view details)

Uploaded Python 3

File details

Details for the file python_ly-0.9.9.tar.gz.

File metadata

  • Download URL: python_ly-0.9.9.tar.gz
  • Upload date:
  • Size: 250.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for python_ly-0.9.9.tar.gz
Algorithm Hash digest
SHA256 cf1780fe53d367efc1f2642cb77c57246106ea7517f8c2d1126f0a36ee26567a
MD5 6ef9e51a92a8ee0c91eb797ff5b9ec7f
BLAKE2b-256 b625d82a762b4c8f068303259f9555fe6f8725f930318a64679a6bb9ffdf21c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_ly-0.9.9.tar.gz:

Publisher: release.yml on frescobaldi/python-ly

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file python_ly-0.9.9-py3-none-any.whl.

File metadata

  • Download URL: python_ly-0.9.9-py3-none-any.whl
  • Upload date:
  • Size: 227.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for python_ly-0.9.9-py3-none-any.whl
Algorithm Hash digest
SHA256 393ba21016b5b19f42fd2145881cef6b30bb359d94ee8c227c2656357cb1d7b7
MD5 89b54e28e84119ed7fe6c9007ecad444
BLAKE2b-256 76618d9070dd25934646aed5742bb266d24f22a9e521fc5fbbe49f080932ae9b

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_ly-0.9.9-py3-none-any.whl:

Publisher: release.yml on frescobaldi/python-ly

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page