Skip to content

NamedForm.VerseChorus is declared but Form never produces it; the spec's own verse–chorus example comes out Unknown #321

Closed

Description

@matt-edmondson

Plan reference

  • Enum: https://github.com/ktsu-dev/Semantics/blob/7852eab73d673ab42ff1ad10cb1ad1124b8b0122/docs/superpowers/specs/2026-07-01-music-analysis-aggregate-design.md#L238-L241
  • Example song map: https://github.com/ktsu-dev/Semantics/blob/7852eab73d673ab42ff1ad10cb1ad1124b8b0122/docs/superpowers/specs/2026-07-01-music-analysis-aggregate-design.md#L230-L233

enum NamedForm { ThirtyTwoBarAABA, TwelveBarBlues, VerseChorus, Binary, Ternary, Rondo, Strophic, ThroughComposed, Unknown }

Repetition and song-map semantics are expressed by repeating Section entries in order (e.g. Verse, Chorus, Verse, Chorus, Bridge, Chorus).

What exists today

  • Semantics.Music/NamedForm.cs declares VerseChorus ("Verse-chorus form").
  • Form.RecognizePattern (Semantics.Music/Form.cs ~L103-112) has no branch that returns it, and no test references it.
  • Neither the spec nor the code records a deliberate deviation. Compare ChromaticKind.AugmentedSixth, whose doc explicitly marks it as reserved.

What's missing

  • There is no recognition rule, so the spec's own example (Verse, Chorus, Verse, Chorus, Bridge, Chorus → ABABCB) comes out Unknown.
  • The spec gives no letter pattern for this form. Recognition naturally keys on SectionType, which Form.Of has and Form.Parse(pattern) does not.

Acceptance criteria

  • Form.Of returns VerseChorus when an arrangement alternates Verse and Chorus sections: at least two of each, with each verse followed by a chorus. Intro, PreChorus, Bridge and Outro sections around them are allowed. Pin down the exact rule in the XML doc.
  • Form.Parse keeps letter-only recognition, and its doc states that it cannot produce VerseChorus (as with TwelveBarBlues).
  • Tests:
    • The spec example yields VerseChorus.
    • An all-verse arrangement stays Strophic.
  • If the form is not wanted after all, mark the member as reserved in its XML doc instead, as AugmentedSixth is.

Dependencies

None. #314 touches the same method but does not overlap with this.

Activity

  1. matt-edmondson commented on Sep 28, 2026

    @matt-edmondson
    ContributorAuthor

    Triage

    Suggested next step: decide whether to implement VerseChorus or mark it reserved, as AugmentedSixth is. If it is implemented, write the recognition rule in the XML doc first, since the spec gives no letter pattern for it.


    Generated by Claude Code

  2. matt-edmondson commented on Oct 29, 2026

    @matt-edmondson
    ContributorAuthor

    Fixed by #487 (commit 47dffbb, now on main). The commit cites this issue inline as "(#321)" rather than with a "Fixes" keyword, so GitHub didn't close it. Closing by hand.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions