Covers the prompt, theory commands, composition flow, effects,
automation, LFOs, playback, export, and a full start-to-finish session.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1. readline: try/except for Windows compatibility
2. drums: only persist preset after successful load
3. chords: use analyze() for correct Roman numerals in minor keys
4. clear: full reset to initial state (key, bpm, drums, parts)
5. progression: add as alias for prog
6. lint: split one-line if statements (ruff E701)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Theory: circle, interval, identify, system (with correct per-system tonics)
Guitar: fingering, diagram (scale on fretboard)
22 new tests covering all REPL commands.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Single line: pytheory[key=Am | bpm=140]>
Multiline when >60 chars:
key=Am | bpm=140 | drums=bossa nova | →lead(saw) rev=0.3 lp=2000
♫>
Shows active part synth and effects in the prompt.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Shows key, bpm, drums preset, and active part in the prompt.
Fix: Part with 0 notes was falsy due to __len__, use 'is not None'.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Brief intro paragraph, theory/composition section intros, pytheory demo
context. Enough personality without the wall of text.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
197 → 85 lines. Theory example, composition example, pytheory demo,
one-line feature summary per category. No more walls of text
before the toctree.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Systems: fix "four" to "six", add cultural context for each system
(Indian ragas, Arabic maqam, Japanese koto, Blues Delta origins,
Gamelan's influence on Debussy). Each system feels alive now.
Fretboard: add scale_diagram chord highlighting, non-string instruments note.
Theory: warmer opening, cross-reference to composition guide.
Tones, scales, chords, cli: verified complete — no changes needed.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two clear paths: theory (no audio needed) and composition.
Theory section expanded with tones, intervals, keys, chords,
analysis, modulation, 6 systems, guitar — all pure Python.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Quickstart: zero to arrangement in 5 minutes, pytheory demo, MIDI export.
CLI: add demo command docs at the top.
Cookbook: acid house, dub reggae, jazz ballad, song sections, MIDI export recipes.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
sounddevice is now only imported when actually playing audio through
speakers. All other functions (save_midi, render_score, save) work
without PortAudio installed. Fixes 9 test failures in CI.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- `pytheory demo` plays a randomly generated track (6 moods, different every time)
- README rewritten to showcase full feature set: composition, effects, drums,
sidechain, automation, MIDI export, AI collaboration
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Effects: sidechain pump with parameters, practical examples, tip
about not sidechaining everything.
Sequencing: song sections with verse/chorus/repeat workflow,
custom names, real songwriting analogy.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Values, use cases, combo with swing for realistic feel.
Convolution reverb was already documented in effects guide.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Makes programmed parts feel like a real player. Random timing jitter
and velocity wobble applied at render time, score data stays clean.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Per-note velocity for dynamics and accents
- Swing/groove parameter on Score and per-Part override
- score.set_tempo() for mid-song tempo changes with tempo map engine
- Part.fade_in() and Part.fade_out() volume envelopes
- Arpeggiator velocity support
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sequencing: Score concept, time signatures for non-musicians, Parts as
DAW tracks, arpeggiator/legato/glide context with TB-303 and acid history.
Synths: synthesis philosophy, DX7/Juno/JP-8000 history, practical combos.
Effects: real-music context (The Edge, DJ knobs, shower reverb), why signal
chain order matters, automation as breathing, LFO as repeating automation.
Drums: drums-as-genre foundation, genre group cultural context, fills as
transition signals, drum synthesis as real drum machine techniques.
Playback: three output options context, MIDI as the working musician's path.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Part.lfo() generates automation points from oscillator shapes
- 4 shapes: sine, triangle, saw, square
- Rate, range, duration, and resolution all configurable
- Stack LFOs on different params for complex modulation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Part.arpeggio() with 5 patterns, octave spanning, division control
- Roman numeral parser handles bVI, bVII, bIII, #IV prefixes
- song_showoff.py: generative composition using every feature,
different every time (4 moods, matched keys/drums/effects)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Part.arpeggio() with up/down/updown/downup/random patterns
- Octave spanning and division control for arps
- Document legato, glide, and arpeggiator in rhythm guide
- Rename docs page to "Sequencing: Rhythm and Scores"
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Part(legato=True) renders continuous waveform without per-note retriggering
- Part(glide=0.04) adds 303-style pitch slides between notes
- Phase-accumulating oscillator for smooth frequency changes
- Exponential pitch interpolation for perceptually linear slides
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comprehensive effects docs with signal chain diagram, per-effect
reference, and combination examples (dub, acid, Drake-style 808).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Soft-clip distortion (tanh waveshaping) with drive and mix controls
- Dub Delay Madness: separate snare track with massive delay/reverb
- Liquid DnB: 174bpm rollers with flowing lead
- Late Night Texts: Drake-style trap with 808 bass + distortion
- 16 total example songs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Every song now uses the full effects chain. Added 3 new songs:
Kingston After Dark (dub), Minimal Techno, Gospel Shuffle.
Each demonstrates different effect combinations.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Schroeder reverb (4 comb + 2 allpass filters) with mix/decay
- Tempo-synced delay with feedback
- 12 dB/oct biquad lowpass with resonance (Q) control
- Effects set at part creation, applied per-part before mixing
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Pattern.fill() with 11 presets: rock, jazz, salsa, samba, funk, metal, blast, buildup, breakdown
- Score.fill() inserts a fill at the current position
- Score.drums() auto-fill support: fill_every=4 replaces every 4th bar
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Square wave: chiptune / 8-bit (odd harmonics at 1/n)
- Pulse wave: variable duty cycle NES-style timbres
- FM synthesis: DX7-style carrier/modulator for bells, e-piano, brass
- Noise: white noise for percussion and texture
- Supersaw: 7 detuned saws for trance/EDM pads
- Refactor Synth enum to string-valued with callable dispatch
- All 8 waveforms available via API, Part strings, and CLI
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Rhythm guide: full Part API docs with synths, envelopes, chaining,
raw float beats, headless rendering, complete bossa nova example
- Playback guide: rewrite intro with quick-start showing both simple
and expressive usage, update all Score examples to use named parts
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- All 10 songs now use score.part() for lead, bass, and chords
- Part.add() and .rest() accept raw float beats alongside Duration enums
- _RawDuration duck-type wrapper for arbitrary beat values
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Part: named voice with synth, envelope, and volume settings
- Score.part() creates and registers parts
- Score.add_pattern() for cleaner drum pattern attachment
- render_score() renders all parts + drums into one buffer
- play_score() updated to use the new multi-part renderer
- Backwards compatible: Score.add() still works for simple cases
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Bossa nova, bebop, salsa, afrobeat, reggae, funk, 12/8 blues, samba,
jazz waltz, and house — each with drum patterns, chord progressions,
and hand-written melody lines rendered through the synthesizer.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Hits were piling up at the same positions instead of being spread
across repeats. Now each repeat offsets by pattern.beats.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>