Skip to main content

aulos

English | 日本語

A Python library for pitches, chords, scales, tuning, and rhythm. Notation, tuning, and display are defined separately, with exact rational values for interval ratios and time.

Aulos is developed collaboratively by its author and AI.

Python 3.13+ · No runtime dependencies · MIT License

pip install aulos
CI/CD CI CD
Package pypi - version pypi - python versions
Meta Ruff ty License

Public API

Module Purpose
aulos.western.equal Western seven-letter notation with 12-tone equal temperament
aulos.western.just Western seven-letter notation with 5-limit just intonation
aulos.pentatonic An independent five-letter chain notation; supply a tuning to evaluate frequencies
aulos.rhythm Durations, positions, meter, cycles, and temporal structure
aulos.base Building blocks for custom notation, tuning, and display conventions

The public API consists of the names in each module's __all__ and attributes of public classes that do not start with _. aulos.core is internal.

Pitches, chords, and scales

All three notation systems expose PitchClass, Pitch, Voicing, Chord, and Scale with a shared interface.

from aulos.western.equal import Chord, Pitch, PitchClass, Scale, Voicing

pitch = Pitch("C#4")
pitch.pitch_class == PitchClass("C#")  # True
pitch.frequency(Pitch("A4"), 440.0)

fifth = Pitch("G4") - Pitch("C4")
str(Pitch("C4") + fifth)  # 'G4'

chord = Chord("Cm7")
chord.names                         # ('C4', 'Eb4', 'G4', 'Bb4')
chord.inversion(1).names            # ('Eb4', 'G4', 'Bb4', 'C5')
chord.transpose(fifth)
Voicing("m7").at(Pitch("D4"))       # Pitch objects for D4, F4, A4, C5

scale = Scale("C major")
scale.chord(1, count=4).names        # ('D4', 'F4', 'A4', 'C5')
str(scale.mode(1))                  # 'D dorian'
API Key operations and attributes
PitchClass from_spelling(), interval addition and subtraction
Pitch from_class(), pitch_class, register, frequency(), enharmonics()
Chord / Scale members, names, intervals, transpose(), frequencies(), from_members(), from_intervals()
Chord root, bass, voicing, inversion(), over()
Scale tonic, degrees, degree(), degree_of(), mode(), chord()
Voicing intervals, at(), from_intervals()

Use Chord.templates.names / Scale.templates.names to list available names. template_name matches exact interval ratios; structure_name matches interval spellings.

Interval ratios and tuning

from fractions import Fraction

from aulos.base import Temperament, Tuning
from aulos.western.just import Chord

chord = Chord("Cm7")
chord.names  # ('C4', 'Eb4↑', 'G4', 'Bb4↑')
tuple(interval.ratio() for interval in chord.intervals)  # (1, 6/5, 3/2, 9/5)

fifth = chord.notation.interval(Fraction(3, 2))
fifth.cents(chord.tuning)
chord.frequencies(chord.root, 261.626)

edo19 = Tuning(Temperament.equal_division((2, 3, 5), 19, Fraction(2)), (1200 / 19,))
chord.frequencies(chord.root, 261.626, edo19)

ratio() returns the notated ratio; cents() / frequency() / frequencies() evaluate it under a tuning.

Rhythm and time

from fractions import Fraction

from aulos.rhythm import Cycle, Duration, Event, Meter, NoteValue, Tempo
from aulos.western.equal import Chord, Pitch

quarter = Duration(Fraction(1, 4))
eighth = Duration(Fraction(1, 8))

NoteValue.of(quarter + eighth)       # Dotted quarter note
Meter((2, 3), eighth).weights        # (2, 0, 0, 1, 0, 0): 6/8
Cycle.euclidean(8, 3).steps          # (2, 3, 3)

melody = Event(quarter, Pitch("E4")) + Event(eighth) + Event(eighth, Pitch("G4"))
phrase = melody | Event(quarter * 2, Chord("C/E"))
phrase.events()                    # Events with start positions, durations, and values
Tempo(quarter, 120.0).seconds(phrase.duration)  # 1.0
API Purpose
Duration / Position Durations and positions with rational arithmetic
NoteValue / Meter Note values, dots, tuplets, meter, and metric weights
Cycle Periodic patterns, rotate(), mode(), repeat(), union |, and intersection &
Part / Event / Serial / Parallel / Placed Temporal structures holding arbitrary values: sequence +, parallel composition |, events(), stretch(), map()
Tempo / TempoMap Conversion to seconds at constant or changing tempos
RhythmError Errors in meter or cycle operations

Custom systems

Public API in aulos.base:

Purpose Names
System definitions and base classes Tag, NotationTag, Definition, PitchClass, Pitch, Voicing, Chord, Scale
Notation and intervals ChainNotation, ChainInterval, Notation, Interval, Quality, Comma
Display Symbols, CommaSymbols
Tuning Temperament, Tuning
Named interval structures Template, Templates, Realization
Exceptions NotationError, TemperamentError, RepresentationError

Examples: Display conventions · Tuning · Five-letter notation · Rhythm

Metadata

Release files for aulos 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aulos 0.2.0
File Size Uploaded Provenance Actions
aulos-0.2.0.tar.gz 41.3 kB With provenance Details for aulos-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aulos 0.2.0
File Interpreter ABI Platform Actions
aulos-0.2.0-py3-none-any.whl Python 3 none any Details for aulos-0.2.0-py3-none-any.whl

Total release size: 99.8 kB

Release files / aulos-0.2.0.tar.gz

Download URL aulos-0.2.0.tar.gz
Size 41.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f5ab807e4a480c9212ba874ada79f957e7c3bc98a65414d97da402b4233d3d99
BLAKE2b-256 checksum
How to use checksums
837dd7832f1f74b5ec63bd707c486a3cc337fd755f164fe6ba5796c4393f22eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

Release files / aulos-0.2.0-py3-none-any.whl

Download URL aulos-0.2.0-py3-none-any.whl
Size 58.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2076b0d6e4ec3d452d468d90f5e6d15670dadcb8eedba47d6b350ffd5b9c5c2a
BLAKE2b-256 checksum
How to use checksums
b6b73ee5e4f08dc7715ef74c087c8c6e1694670791acb17374d5e497d99625d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

Security for aulos 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for aulos-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page