No more timing gaps. The leading string is held at 15% velocity
at the same beat position as the full chord via hold(), adding
strum texture without stealing time.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
hold() adds a note without advancing the beat position, so the
next note starts at the same time. Enables: piano sustain (bass
rings while melody plays), drone notes under melody, held chords
with moving lines.
Two lines in the renderer: skip beat_pos advance when _hold is set.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Grace notes created audible gap before chord and sounded like
separate plucks. Pure chord hit sounds better.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
G-D-Em-C at 120 BPM. Picked intro, strummed verse, electric lead
melody, strings swell, rock drums. The most popular chord progression
in pop history.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Random key, tempo, reverb space, instruments, and melodies.
Melodies walk the scale stepwise (not random jumps), arpeggios
follow chord tones in order, piano walks up/down. Tabla solo
always closes with random strokes. No seed — truly unique each play.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Didgeridoo drone throughout, granular abyss, kalimba light,
cello surfacing, piano + quiet uke, pedal steel + theremin solo
(searching → building → soaring peak), strings/flute/harp/timpani
at the peak, 4-part tabla solo finale (whisper → ghosts → 9-tuplet
call-response → 32nd triplet cascade + grand tihai).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- humanize=0.2 added to all melodic parts (leads, basses, bells)
- Subtle reverb (0.1-0.2) on bass parts that had none
- Per-note velocity dynamics on all leads (was static)
- Blues lead changed from trumpet to saxophone (more fitting)
- Songs 17-18, 20-26 left untouched (already well-crafted)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
play(), play_score(), _play_for() now catch Ctrl-C and stop
cleanly instead of crashing with a traceback. CLI demo also
wrapped.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
dreams, outback drone, highland, nashville tears, tabla fusion
All new synths represented in pytheory demo random rotation.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Ukulele: nylon string KS with small body resonance (350/700/1200Hz),
faster decay than guitar, mid-heavy character
- Strum sweep: 2 quiet grace notes (25% vel) before the chord hit,
gives audible strum feel without choppiness
- Default strum_time 0.08 → 0.05 for tighter feel
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Polyrhythm section uses musical phrases (ti-ra-ki-ta patterns)
in 5-groups, 7-groups, and 9-groups rather than mechanical grid
overlays. Reverb pulled back to 0.4 across the song.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Orchestral piece in 22-shruti JI with choir vowel pads, timpani
rolls, bansuri, cello, sitar, strings, harp, djembe→tabla→extended
tabla solo finale (whisper→ghosts→call/response→9-tuplets→32nd
triplet cascades→grand tihai→slam).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Formant synthesis: glottal buzz source through parallel bandpass
filters at vowel resonance frequencies. Supports 5 vowels (A E I O U)
with consonant onsets (plosives, sibilants, nasals, fricatives,
liquids, aspirates, glides). Per-note lyrics via Part.add(lyric=).
Best for choir pads — vowel sounds with cathedral reverb and detune.
Consonant synthesis is rudimentary (noise bursts, not real speech).
Presets: vocal (solo), choir (detuned ensemble).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Grain cloud synthesis: source waveform chopped into tiny overlapping
grains (40ms, 50/sec) with Hanning windows, random scatter, and
per-grain pitch variation. Creates textures impossible with other
synthesis. Two presets: granular_pad, granular_texture.
30 synth waveforms total.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Strings, cello, trumpet, clarinet, oboe all cut to 0.001 depth.
Much subtler in ensemble context.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- roll(tone, duration, velocity_start, velocity_end, speed) — rapid
repeated notes with velocity ramp. Works on any instrument.
- Saxophone reed noise boosted and bandpass filtered for more bite
- Timpani preset: cathedral reverb at 0.4
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replace pytuning with 30-line native implementations of EDO,
Pythagorean, and quarter-comma meantone scale generators
- Lazy-load scipy.signal (337ms) — only imported when audio rendering
is actually used, not on theory-only imports
- Removes pytuning and sympy from dependencies entirely
Import time: 0.479s → 0.056s (8.5x faster)
Closes#44
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
B#4 now correctly resolves to C5 (523.25 Hz), not C4 (261.63 Hz).
Cb4 now correctly resolves to B3 (246.94 Hz), not B4 (493.88 Hz).
When an accidental crosses the B/C octave boundary, the octave is
adjusted: sharps crossing B→C increment, flats crossing C→B decrement.
Also handles double sharps (B##→C#5) and double flats (Cbb→Bb3).
Closes#45
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Maqam system now uses just intonation ratios instead of 24-TET:
- Quarter-tone positions use Zalzalian (11-limit) ratios
- Mi↓ (the defining Rast note) is exactly 27/22 from Do
- Standard JI intervals for chromatic positions
- Septimal ratios (7-limit) for other quarter-tone positions
Research confirmed: Turkish 53-TET and Thai 7-TET are already
correct as equal temperaments. Gamelan has no universal ratios
(each ensemble is unique), so TET remains the best default.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Tone(0, system=edo22) works alongside Tone("0", ...)
- Tone(22, system=edo22) wraps to tone 0, octave+1
- Tone(-1) wraps to last tone, octave-1
- System.tone(name, octave) convenience method
- Shruti system now uses 5-limit just intonation ratios instead
of 22-TET approximation. Based on Pythagorean/harmonic ratios
from traditional Indian musicology. Pa is a pure 3/2, Ga is a
pure 5/4.
- System.ratios attribute overrides equal temperament when set
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Calculated edm_start from actual section lengths so pad/sub/sitar2
don't bleed into the tabla solo.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Solo now has 4 distinct parts:
1. Whisper — single hits with space, breath
2. Ghosts emerge — 16th note ghost fills between accents
3. Call and response — dayan vs bayan, 9-tuplet break
4. Blazing — 32nd triplet cascades, rapid alternating hands,
9-against-4 polyrhythm, grand tihai (3x, each louder), slam
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tabla solo with ghost notes, 32nd triplet cascade, tihai, then
slams into house beat. Sitar volume 0.22 → 0.4 in EDM section.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Single score, one reverb space (Taj Mahal), tanpura drone throughout.
Piano arpeggios alone → cello joins → harp/oboe/flute with djembe →
sitar over tabla → EDM section with sitar, synth pad, 808 sub, house
drums. 28 bars, 5 movements.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tanpura drone intro, quiet sitar Yaman phrases, tabla solo building
from gentle theka through ghost notes to blazing tiri kita with
bayan pitch bends, tihai, dramatic silence, slam finish. Taj Mahal
reverb throughout.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Drums and melodic notes now choke previous resonance with a quick
fade when a new hit/note starts. Prevents muddy buildup at fast
tempos. Added bayan pitch bend drum sound (TABLA_GE_BEND).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Render at base pitch using the actual synth, then variable-rate
resample to shift pitch over time. No more sine wave fallback or
retriggering artifacts. Three bend types: smooth (log), linear, late.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>