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 multi-media 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)

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 .
    

    Or install the required dependencies separately:

    pip install -r requirements.txt
    

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, and unconventional musical structures not easily accessible with traditional notation software or digital audio workstations.

While drawing from the computational paradigms found in patching-based environments like OpenMusic, Bach, and Cage, Klotho diverges from the visual patching paradigm in favor of a high-level, text-based scripting syntax. As such, Klotho is closer in spirit to OpusModus, which also favors text-based scripting over visual patching, though its LISP-based proprietary language creates unnecessary barriers to entry and forecloses access to Python's diverse ecosystem—libraries like Librosa, Music21, and Pyo, as well as scientific tools that enable more analytical and data-oriented approaches to music generation. While such libraries operate outside Klotho's scope, they interface with it naturally—allowing Klotho to embody the underlying mathematical expressions governing musical materials from topological, algebraic, and computational perspectives.

Architecture

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

Topos (τόπος) - "place, location"

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. This module provides topological scaffolding that can be instantiated into any musical context.

Chronos (χρόνος) - "time"

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 (τόνος) - "tone, tension"

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 (δυνατός) - "powerful, capable"

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 and envelopes ranging from standard ADSR models to polynomial functions for more complex shapes.

Thetos (θετός) - "placed, positioned"

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 (σημεῖον) - "sign, mark"

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-3.0.3.tar.gz (112.0 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-3.0.3-py3-none-any.whl (134.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for klotho_cac-3.0.3.tar.gz
Algorithm Hash digest
SHA256 d05c8a7918ee1d79df9787accd5245ba73f843c8e53a5da9548f16f7f21ef7e5
MD5 0dd8b843eb1d52505e6290343a15967d
BLAKE2b-256 955fb0e6c60dd8218d0b5200c903060e01f4a617a732ee0a5e5e5aff8a2ae81d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: klotho_cac-3.0.3-py3-none-any.whl
  • Upload date:
  • Size: 134.5 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-3.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3acbe55970c60c68a963e0087881b09cb8056de82d83d9647c6c1e2f81761396
MD5 3a0a245a79adc7a350cccb249ce51441
BLAKE2b-256 43499f308ffbcd6ea2ff812a46e3fb860d73317036e5003c4d2020f4b2f651a1

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