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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file lento-301024.tar.gz.

File metadata

  • Download URL: lento-301024.tar.gz
  • Upload date:
  • Size: 43.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for lento-301024.tar.gz
Algorithm Hash digest
SHA256 0dc2f739d6b89a8d75595ef74f4c128fdd1dc2c7ff0a25c69864af5f7be765b1
MD5 de89381dffb8592ed1b647a0d8278685
BLAKE2b-256 082ec83fe2201cdb4fb9a4d68ff40c4653915c9c3dafbad1ff5f3c49abbf0024

See more details on using hashes here.

File details

Details for the file lento-301024-py3-none-any.whl.

File metadata

  • Download URL: lento-301024-py3-none-any.whl
  • Upload date:
  • Size: 45.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for lento-301024-py3-none-any.whl
Algorithm Hash digest
SHA256 ebb7dfa956e8e98f019f206d104677b961c3b8c219b9bad9784fe6fb9bce1ead
MD5 26f794cbf15750ab1d12e4cf877d9d1e
BLAKE2b-256 a1fb1f572c7e393914f890c655aa678549a364eaf9e124bac13918f1bd270d98

See more details on using hashes here.

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