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 round-trip breaks for a seventh with add11/add13: "C7add13" prints as "C713", which reparses as C13 with a 9th and 11th #300
Since #293 (ad24784), Chord.Parse accepts add11 and add13 after a seventh. For example, "C7add13" parses as a dominant seventh with tensions {13} only, and a check gives tones [0,4,7,10,21].
The formatter can't write that chord back. AppendTensions (Semantics.Music/Chord.cs:598-622) writes addN only when there is no seventh. With a seventh it writes the highest natural tension as a bare stacked number ("13", "11", "9"). On reparse, ApplyExtensions expands 13 into 9 + 11 + 13.
Priority: Medium. It breaks the parse/format round-trip. ToString() of a valid chord reparses as a different chord with extra tones, so any caller that stores chords as text silently corrupts them. Only seventh chords with add11 or add13 are affected.
Area / suggested assignment:Semantics.Music/Chord.cs (AppendTensions, lines 598-622) and ChordRoundTripTests.cs
Notes: The suggested fix is right: emit the highest contiguous natural stack as a number, then addN for the rest. Keeping #293 is better than rejecting addN again. Add the four failing inputs to the round-trip corpus first, so the fix is test-driven.
Activity
matt-edmondson commentedon Sep 28, 2026
Triage
ToString()of a valid chord reparses as a different chord with extra tones, so any caller that stores chords as text silently corrupts them. Only seventh chords withadd11oradd13are affected.Semantics.Music/Chord.cs(AppendTensions, lines 598-622) andChordRoundTripTests.csNotes: The suggested fix is right: emit the highest contiguous natural stack as a number, then
addNfor the rest. Keeping #293 is better than rejectingaddNagain. Add the four failing inputs to the round-trip corpus first, so the fix is test-driven.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