Files
pytheory/docs/index.rst
T
kennethreitz e94ef5dcfd Expand documentation with undocumented features and CLI guide
Tones: add from_frequency, from_midi, letter, midi, exists properties;
  interval naming with interval_to(); transpose(); MIDI section
Scales: add Key.signature, relative/parallel keys, borrowed chords,
  secondary dominants, random progressions, all_keys, scale transpose
Chords: add transpose, add_tone/remove_tone, root/quality properties;
  simplify identification examples with from_tones()
CLI: new guide covering all 8 commands (tone, scale, chord, key,
  fingering, progression, play, detect)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 20:11:01 -04:00

49 lines
1.0 KiB
ReStructuredText

PyTheory: Music Theory for Humans
=================================
**PyTheory** is a Python library that makes exploring music theory approachable.
Work with tones, scales, chords, and fretboards using a clean, Pythonic API.
.. code-block:: python
from pytheory import TonedScale, Fretboard, CHARTS
# Build a C major scale
c_major = TonedScale(tonic="C4")["major"]
print(c_major.note_names)
# ['C', 'D', 'E', 'F', 'G', 'A', 'B', 'C']
# Build a triad from the scale
chord = c_major.triad(0) # C major triad
for tone in chord:
print(f"{tone}: {tone.frequency:.1f} Hz")
# Get guitar fingerings
fb = Fretboard.guitar()
print(CHARTS["western"]["C"].fingering(fretboard=fb))
.. toctree::
:maxdepth: 2
:caption: User Guide
guide/quickstart
guide/theory
guide/tones
guide/scales
guide/chords
guide/fretboard
guide/systems
guide/playback
guide/cli
.. toctree::
:maxdepth: 2
:caption: API Reference
api/tones
api/scales
api/chords
api/charts
api/play
api/systems