Programmatically generate Lilypond scores, with ease and elegance of pure Python
Project description
Klarenz (current release: v190624) 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/klarenz/version.py
file and runpython 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
Built Distribution
File details
Details for the file klarenz-190624.tar.gz
.
File metadata
- Download URL: klarenz-190624.tar.gz
- Upload date:
- Size: 43.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 587815607799d86ab66964bd24f55cd2d8379c3540bac8d3dfe46fb9c0bc8c30 |
|
MD5 | 769db90883001198e2feb9c71260a50a |
|
BLAKE2b-256 | 9d0faca2a601cd86b6248b7af7a5c0eea493f3f9c7f79c81d4fd21177ef3172f |
File details
Details for the file klarenz-190624-py3-none-any.whl
.
File metadata
- Download URL: klarenz-190624-py3-none-any.whl
- Upload date:
- Size: 45.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2de6910bdf3ad27026adbaea107d27d06746968a1938e8a8d6da80c8a96cd9d1 |
|
MD5 | ed7e6f3b51b7e0a5fb9121a988180d33 |
|
BLAKE2b-256 | 84e67beb38b643a4bf27081b426bc7075937c651987e1efa73123dbe6118b069 |