Files
pytheory/plugin
kennethreitz 42ac7292cb Guitar-aware LilyPond export (ChordNames/FretBoards/TabStaff)
Score.to_lilypond() gains chord_names/fretboards/tab flags (plus
chord_part and fretboard) that render a chord part as a lead sheet from a
single \chordmode block. Fret diagrams use PyTheory's own Fretboard
voicings via \storePredefinedDiagram, so they match what it would
actually play rather than LilyPond's computed defaults.

New helper _chord_to_chordmode(chord) derives the chordmode modifier from
Chord.quality (faithful even when the symbol re-spells, e.g. C6 -> Am7).
Default output is unchanged. Verified by compiling the output with
LilyPond 2.26 (lead sheet + a 17-quality battery, incl. m7+ and aug7).

Adds 7 tests (string assertions + a lilypond-compile test marked slow).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 14:07:53 -04:00
..
2026-06-14 13:18:47 -04:00
2026-06-14 13:18:47 -04:00

PyTheory for Claude Code

Compose music straight from a conversation. This is the official Claude Code plugin marketplace for PyTheory — say "write me a bossa nova in G minor" and Claude builds it, plays it, and exports MIDI or WAV, all in pure Python with no samples, plugins, or DAW required.

This repository is generated from the pytheory repo (the source of truth) via make sync-skill. Edit the skill there, not here.

Install

In Claude Code:

/plugin marketplace add kennethreitz/pytheory-skill
/plugin install composing-with-pytheory@pytheory

Then just ask for music — "make a four-chord pop loop", "lay down a funk beat with ghost-note snares", "turn iiVI in D minor into a short arrangement and save the MIDI".

You'll also want PyTheory itself available where Claude runs:

pip install pytheory

What's inside

Plugin What it does
composing-with-pytheory A skill that teaches Claude PyTheory's composition API — Score, parts, progressions, melodies, drums, layering — plus the house style (subtle detune, 0.2 humanize, sine/triangle love) and how to render to audio/MIDI/MusicXML/LilyPond/tab.

Privacy

This plugin collects no data — see PRIVACY.md.

License

MIT © Kenneth Reitz