From 833ab568571051fff8805335181af1bdd8f073e2 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Thu, 26 Mar 2026 21:26:35 -0400 Subject: [PATCH] Fix solo string instruments: clean triangle, no detune Solo violin/viola/cello/contrabass now use triangle + strings envelope (clean, clear). String ensemble keeps strings_synth + detune for thick ensemble textures. Solo instruments need clarity, not width. Co-Authored-By: Claude Opus 4.6 (1M context) --- pytheory/rhythm.py | 18 +++++++++--------- test_pytheory.py | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pytheory/rhythm.py b/pytheory/rhythm.py index 41f23af..c4e43ea 100644 --- a/pytheory/rhythm.py +++ b/pytheory/rhythm.py @@ -45,28 +45,28 @@ INSTRUMENTS = { # ── Strings ── "violin": { - "synth": "strings_synth", "envelope": "strings", - "detune": 4, "lowpass": 5000, + "synth": "triangle", "envelope": "strings", + "lowpass": 5000, "humanize": 0.15, }, "viola": { - "synth": "strings_synth", "envelope": "strings", - "detune": 4, "lowpass": 3500, + "synth": "triangle", "envelope": "strings", + "lowpass": 3500, "humanize": 0.15, }, "cello": { - "synth": "strings_synth", "envelope": "strings", - "detune": 4, "lowpass": 2500, + "synth": "triangle", "envelope": "strings", + "lowpass": 2500, "humanize": 0.15, }, "contrabass": { - "synth": "strings_synth", "envelope": "strings", - "detune": 3, "lowpass": 1500, + "synth": "triangle", "envelope": "strings", + "lowpass": 1500, "humanize": 0.1, }, "string_ensemble": { "synth": "strings_synth", "envelope": "pad", - "detune": 12, "spread": 0.6, + "detune": 10, "spread": 0.5, "chorus": 0.2, "chorus_rate": 0.5, "lowpass": 4000, }, diff --git a/test_pytheory.py b/test_pytheory.py index eedeff1..04659e3 100644 --- a/test_pytheory.py +++ b/test_pytheory.py @@ -6470,7 +6470,7 @@ def test_instrument_violin(): from pytheory import Score score = Score("4/4", bpm=120) p = score.part("v", instrument="violin") - assert p.synth == "strings_synth" + assert p.synth == "triangle" assert p.envelope == "strings" assert p.humanize == 0.15 assert p.lowpass == 5000