Skip to main content

Graph-Oriented Computer-Assisted Composition in Python

Project description

Klotho

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.


Installation

Option 1: Install from PyPI (Recommended)

Basic Installation:

pip install klotho-cac

Option 2: Install from Source

  1. Clone the Repository:

    Clone the Klotho repository:

    git clone https://github.com/kr4g/Klotho.git
    
  2. Navigate to the Klotho/ Directory:

    cd Klotho/
    
  3. Install in Development Mode:

    pip install -e .
    

    For development with all dependencies:

    pip install -e .[dev]
    

    Or install the required dependencies separately:

    pip install -r requirements.txt
    

Integration with SuperCollider

To use Klotho with SuperCollider, clone or download the Klotho-SC extension package (https://github.com/kr4g/Klotho-SC.git) and place it in your SuperCollider extensions directory. You can find the extensions directory by evaluating the following line in the SuperCollider code editor:

Platform.userExtensionDir

Tutorials

Interactive Tutorials: https://kr4g.github.io/Klotho/

Browse the Klotho tutorial series directly in your browser — no installation required. Tutorials with interactive widgets can be activated with the power button at the top of the page.


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

About

Klotho extends from a lineage of computer-assisted composition (CAC) theories, practices, and software environments. While it provides support for conventional musical materials, its strengths are best utilized when working with complex, abstract, or otherwise unconventional musical structures not easily accessible with traditional notation software or digital audio workstations.

Architecture

Klotho is organized into six primary modules, each addressing fundamental aspects of musical composition and computation:

Topos

The foundation of musical topology in its most abstract form. Topos operates independently of specific musical parameters or numerical constraints, modeling pure structural relationships, patterns, and processes. Topos provides topological scaffolding that can be instantiated into any musical context.

Chronos

Encompasses all temporal materials from microscopic rhythmic gestures to macroscopic formal architectures. Beyond local rhythm, Chronos provides frameworks for temporal formalism across time scales, handling complex and unconventional rhythmic techniques such as nested tuplets, irrational time signatures, metric modulation, poly-meter, and poly-tempi.

Tonos

Handles all aspects of pitch and harmonic material including individual tones, pitch collections, scales, chords, harmonic systems and spaces, interval relationships, and frequency-based transformations. Tonos includes traditional and extended approaches to pitch organization and harmonic analysis, supporting arbitrary n-TET and n-EDO systems, extended Just Intonation frameworks, and n-dimensional microtonal lattices and scale systems.

Dynatos

Dedicated to dynamics, articulations, and expressive envelopes. This module handles the conversion of symbolic dynamics (p, mf, ff, etc.) into precise dB/amplitude values, mapping of symbolic articulations to parametric envelopes, and designing custom expressive curves ranging from standard attack-decay-sustain-release models to polynomial functions for more complex shapes.

Thetos

The compositional complement to Topos, Thetos handles the concrete assembly and combination of musical materials across all dimensions—temporal, tonal, dynamic, instrumental, and parametric. It manages the systematic composition and positioning of musical elements into coherent structures.

Semeios

Manages all forms of musical representation including visualization, notation, plotting, animation, and multimedia output. Semeios converts computational processes into human-readable and performable representations as well as automated formats.

License

Klotho by Ryan Millett is licensed under CC BY-SA 4.0.

CC Icon BY Icon SA Icon

Klotho © 2023 by Ryan Millett is licensed under CC BY-SA 4.0. To view a copy of this license, visit http://creativecommons.org/licenses/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

klotho_cac-4.0.1.tar.gz (276.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

klotho_cac-4.0.1-py3-none-any.whl (297.2 kB view details)

Uploaded Python 3

File details

Details for the file klotho_cac-4.0.1.tar.gz.

File metadata

  • Download URL: klotho_cac-4.0.1.tar.gz
  • Upload date:
  • Size: 276.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for klotho_cac-4.0.1.tar.gz
Algorithm Hash digest
SHA256 8f0e242c29caf207f8c506580b6afed2dcf0b11ff95deea51214d2be33cca802
MD5 ae11f87bd587c985d8764515f1757530
BLAKE2b-256 9b55b2820d2e54bea46b1576e01cee857875e1402d48f633326aa2e11a271100

See more details on using hashes here.

File details

Details for the file klotho_cac-4.0.1-py3-none-any.whl.

File metadata

  • Download URL: klotho_cac-4.0.1-py3-none-any.whl
  • Upload date:
  • Size: 297.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for klotho_cac-4.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a6adce4d4db092ea29fee9292b4d6af66a4559e5bdb6aab3cb4ecd324c67e9b0
MD5 ec86dafa3eb6084ff49512a1a12fc3ef
BLAKE2b-256 5f51c54ee6ab8e2042797efbf66a2c94547b09c6d5d66e6192b7f4333b0bb878

See more details on using hashes here.

Supported by

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