You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Chord.Parse stacks the natural 9th/11th under an altered one: "C13#11" sounds both F and F#, "C13b9" both Db and D #341
In Chord.ApplyExtensions (Semantics.Music/Chord.cs:437-444), the 13 branch always adds Nine | Eleven | Thirteen and the 11 branch always adds Nine | Eleven. Only the bare 9 branch (:445-451) skips Nine when FlatNine or SharpNine is already set. So an altered tension is added next to its natural version instead of replacing it.
Failure scenario
Probe output against HEAD:
Input
Tensions
Tones
Problem
C13b9
FlatNine, Nine, Eleven, Thirteen
[0,4,7,10,13,14,17,21]
Db and D
C13#11
…
[…,17,18,…]
F and F#
C13#9
…
[…,14,15,…]
D and D#
C11b9
…
[…,13,14,…]
Db and D
Anything built on ChordTones inherits the extra notes, Voice() included, so a voicing plays a minor second cluster the symbol never asked for.
The round-trip corpus doesn't catch this because the wrong chord round-trips: C13b9 prints C713b9, which reparses to the same wrong set.
Suggested fix
Apply the rule the 9 branch already uses:
In the 13 and 11 branches, add Nine only when neither FlatNine nor SharpNine is set.
Add Eleven only when SharpEleven is not set.
Acceptance criteria
Tone assertions for C13b9, C13#9, C13#11, C11b9 and a combined one such as C13b9#11 contain the altered tension and not the natural one.
Existing C13, C11 and C9 tone assertions are unchanged.
Activity
matt-edmondson commentedon Sep 30, 2026
Triage
Semantics.Music,Chord.ApplyExtensions.DetermineQuality), and Chord.ToString() writes an altered tension straight after the root: "C(#11)" prints as "C#11" and reparses as a C# dominant eleventh #336 coversToStringof altered tensions. Consider one Chord-parser PR for Chord.ToString() writes an altered tension straight after the root: "C(#11)" prints as "C#11" and reparses as a C# dominant eleventh #336, Chord.Parse reads "Cm7#5", "Cm#5" and "Cm+" as augmented chords with a major third (Cm7#5 comes back as Caug7) #340 and Chord.Parse stacks the natural 9th/11th under an altered one: "C13#11" sounds both F and F#, "C13b9" both Db and D #341. Not a duplicate.Generated by Claude Code
matt-edmondson commentedon Sep 30, 2026
Covered by #360, which redesigns this bug cluster as a whole. Implement it through that issue rather than individually.
Generated by Claude Code
[minor] Redesign chord symbols; fixes #300, #322, #336, #340, #341, #344