v0.25.7: Detune, drum swing, improved drum sounds

- detune parameter: ±cents oscillator spread on any synth
- Drum swing: offbeats shift with score groove
- Snare: 220Hz + transient click + saturation
- Hi-hats: metallic harmonics (6k+8.5k+12k), crisper
- Detune documented in synths guide

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-25 22:04:08 -04:00
parent 7991516c3e
commit d2044f1f53
5 changed files with 45 additions and 3 deletions
+6
View File
@@ -2,6 +2,12 @@
All notable changes to PyTheory are documented here.
## 0.25.7
- Add `detune` parameter — ±cents oscillator spread on any synth (3 oscillators per note)
- Swing now applies to drum hits (offbeats shift with the groove)
- Improved snare and hi-hat sounds (metallic harmonics, faster attack)
## 0.25.6
- Swing now applies to drum hits — offbeats shift with the groove, everything locks into the same pocket
+36
View File
@@ -266,6 +266,42 @@ Name Character
``"none"`` Raw waveform, no amplitude shaping at all
=============== ================================================
Detune
------
Any synth can be fattened with the ``detune`` parameter — it renders
three oscillators per note: the center pitch plus one shifted up and
one shifted down by the specified number of cents. The slight frequency
differences create beating and width, like an analog synth with
oscillator drift.
.. code-block:: python
# Juno-style analog drift — subtle, warm
pad = score.part("pad", synth="saw", detune=15)
# Trance supersaw territory — wide, shimmery
lead = score.part("lead", synth="saw", detune=25)
# Subtle thickening on a bass
bass = score.part("bass", synth="pulse", detune=8)
# Works on any synth — even FM
bells = score.part("bells", synth="fm", detune=12)
Detune values:
- **510** = subtle thickening (barely noticeable, just warmer)
- **1218** = classic analog drift (Juno, Prophet)
- **2030** = wide and shimmery (trance, EDM)
- **40+** = extreme, almost chorus-like
This is different from the ``chorus`` effect — detune creates
additional oscillators at render time (three per note), while chorus
processes the audio after rendering with a modulated delay line.
Detune is "wider at the source," chorus is "wider after the fact."
Stack both for maximum fatness.
Choosing Synth and Envelope Combos
----------------------------------
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "pytheory"
version = "0.25.6"
version = "0.25.7"
description = "Music Theory for Humans"
readme = "README.md"
license = "MIT"
+1 -1
View File
@@ -1,6 +1,6 @@
"""PyTheory: Music Theory for Humans."""
__version__ = "0.25.6"
__version__ = "0.25.7"
from .tones import Tone, Interval
from .systems import System, SYSTEMS
Generated
+1 -1
View File
@@ -707,7 +707,7 @@ wheels = [
[[package]]
name = "pytheory"
version = "0.25.6"
version = "0.25.7"
source = { editable = "." }
dependencies = [
{ name = "numeral" },