Skip to main content

Programmatically generate Lilypond scores, with ease and elegance of pure Python

Project description

Lento (current release: v301024) is a highly minimalist Python package (the entire API consists of a single class Part and a main processor function proc!) for compiling Lilypond sheet music.

For more information and examples please check the Documentation.

Some Coding Tips

Convert a collection of durations into a progressing beats collection by utilizing itertools.accumulate:

from random import choice
from itertools import accumulate

durs = [choice([.25, .5, .75, 1]) for _ in range(4)]
beats = list(accumulate(durs, initial=0))
print("Durations", durs)
print("Beats", beats)

# Durations: [0.25, 0.5, 0.5, 0.75]
# Beats: [0, 0.25, 0.75, 1.25, 2.0]

Contributing

If you wish to contribute your code to this repository, please consider the following points:

  • Packaging
    • Ensure to update the src/lento/version.py file and run python prebuild.py (and push the changes!) before initiating the build-upload process for each release with:

      python -m build && twine upload dist/*
      

This README is generated by prebuild.py. Never edit it directly by hand! Instead, modify the readme variable in the pre-build file.

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

lento-301024.tar.gz (43.5 kB view hashes)

Uploaded Source

Built Distribution

lento-301024-py3-none-any.whl (45.5 kB view hashes)

Uploaded Python 3

Supported by

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