Graph-Oriented Computer-Assisted Composition in Python
Project description
Klotho
Klotho, from the Ancient Greek κλώθω (klṓthō), meaning "to spin." The mythological figure Clotho, one of the three Fates, takes her name from this same word.
Klotho is an open source computer-assisted composition toolkit implemented in Python. It is designed to work in tandem with external synthesis applications and as a resource for the methods, models, works, and frameworks associated with music composition and metacomposition.
Klotho adapts to multiple Python workflows, supporting traditional scripting, interactive notebook environments, and immediate computational tasks through the interpreter.
Companion Book
An interactive Jupyter Book exploring the theory, mathematics, and CAC practice behind Klotho — foundational graph structures, formal grammars, evolutionary algorithms, quantum fields, and beyond.
Readable directly in your browser with no installation required.
Read online: https://kr4g.github.io/klotho-book/
About
Klotho extends from a lineage of computer-assisted composition (CAC) theories, practices, and software environments. It draws particular influence from the computational paradigms explored in patching-based systems such as OpenMusic and the Bach/Cage ecosystem, while diverging from visual patching in favor of a scripting-first workflow.
In that sense, Klotho overlaps with the motivation behind OpusModus—bringing “patch-like” compositional thinking into text—but takes a different path: Klotho is free and open source, and it uses Python as its authoring language. This makes it possible to work directly within Python’s broader ecosystem (e.g., music21, librosa, pyo) and to combine computational composition with analytical and data-oriented workflows, without adopting a dedicated proprietary language for a single domain.
While Klotho supports conventional musical materials, its strengths are best realized when working with complex, abstract, or otherwise unconventional structures that are awkward to express—or difficult to iterate on—within traditional notation software or digital audio workstations.
Installation
Option 1: Install from PyPI (Recommended)
pip install klotho-cac
That's it. You're ready to go.
Option 2: Install from Source
Clone the repository to get a local copy of the Klotho source code, then install in editable mode:
git clone https://github.com/kr4g/Klotho.git
cd Klotho/
pip install -e .
Editable mode (-e) means changes you make to the source are immediately reflected without reinstalling.
For contributors: To also install testing and documentation tools, run
pip install -e .[dev]instead.
Integration with SuperCollider
To use Klotho with SuperCollider, see the Klotho-SC extension package: https://github.com/kr4g/Klotho-SC.git.
Documentation
📖 Online Documentation: https://klotho.readthedocs.io/
The complete documentation is available online and includes:
- Complete API reference for all modules
- Usage examples and tutorials
- NumPy-style docstring documentation
🛠️ Build Documentation Locally (Optional):
For developers who want to build the documentation locally or preview changes:
pip install klotho-cac[docs]
cd docs
make dev
License
Klotho © 2023–2026 by Ryan Millett is licensed under CC BY-SA 4.0.
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file klotho_cac-5.3.1.tar.gz.
File metadata
- Download URL: klotho_cac-5.3.1.tar.gz
- Upload date:
- Size: 435.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3d20ef035fab37151871eeb131c62dace76a0c76af2c2219d09a36725d45891
|
|
| MD5 |
f109c6a9e5af36563cdac61b098a7e5f
|
|
| BLAKE2b-256 |
7795de41dc450b3705f9f6e59038e343551d1d1905d29e8be040a85fe7e37f6d
|
File details
Details for the file klotho_cac-5.3.1-py3-none-any.whl.
File metadata
- Download URL: klotho_cac-5.3.1-py3-none-any.whl
- Upload date:
- Size: 497.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
144189d6832300dcd578dfd2d71c1cd1f3ce3a1cd6d49d7477857fc9bd1adbab
|
|
| MD5 |
bb7f3d54305fd2447af2961530066784
|
|
| BLAKE2b-256 |
39598bdec9466aaffcbe92da94967ffdac1f096d8b4674bb22d2b4c301359f2d
|