PyTheory is a Python toolkit for exploring music theory, composing arrangements, synthesizing sound, and exporting musical ideas programmatically. It models concepts such as notes, intervals, scales, chords, keys, progressions, fretboards, modes, and multiple musical systems. A score API can combine melodic parts, bass lines, chords, drums, synthesis, effects, automation, and sequencing. Compositions can be played immediately or exported as MIDI for continued production in a digital audio workstation. The command-line interface includes chord analysis, progression generation, tuning, playback, live MIDI tools, and an interactive REPL. A browser playground provides access without installation, while optional integrations support Ableton Link and external MIDI input. The project also offers Claude Code skills for AI-assisted composition and analysis.

Features

  • Scales, chords, keys, and interval analysis
  • Multi-part score composition
  • Built-in synthesis, drums, and effects
  • MIDI generation and export
  • Interactive CLI and browser playground
  • Live MIDI, Ableton Link, and AI composition integrations

Project Samples

Project Activity

See All Activity >

Categories

Sound/Audio

License

MIT License

Follow pyTheory

pyTheory Web Site

Other Useful Business Software
$300 Free Credits to Build on Google Cloud Icon
$300 Free Credits to Build on Google Cloud

New customers can spin up VMs, build with AI, and query data at no cost.

Put your $300 in credit toward real workloads, then keep building with free monthly usage for 20+ products. No commitment and no charge until you upgrade.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of pyTheory!

Additional Project Details

Programming Language

Python

Related Categories

Python Sound Audio

Registered

2026-09-15