feat(music): analysis aggregate layer — progressions, harmony, forms [minor]#110
Merged
Conversation
Phase 1 reframed around analysis: Progression + functional-harmony analysis (roman numerals, function, cadences, key inference, chromatic identification) nested inside Section -> Arrangement, with Form as the extracted structural pattern. Added to Semantics.Music; playback/notation concerns explicitly out of scope.
11 tasks across 3 milestones (Progression+roman/function/cadence, key inference+chromatic ID, Section/Arrangement/Form), TDD steps with complete code and per-task commits.
Root-only scoring cannot separate a key from its relative/parallel neighbours (Am Dm Em Am scores 1.0 for A major, A aeolian, and C major alike), so the prefer-major tie-break wrongly picked A major. Weight each chord by whether its triad quality matches the diatonic triad at that degree. Discovered during Task 6 implementation (implementer BLOCKED).
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Phase 1 of the semantic-domains roadmap (
docs/roadmap-semantic-domains.md), scoped to analysis. Adds an analysis-oriented aggregate layer to the existingSemantics.Musicpackage — harmony nested inside structure — built entirely on the existing primitives (Chord,Key,Scale,Duration,TimeSignature). No new package, no new dependency; target matrix unchanged (net8.0–net10.0+netstandard2.0/netstandard2.1).What's new
Progression(ChordEventsequence + bar-based harmonic rhythm;Parse("Dm7 | G7 | Cmaj7")) with five analyses:RomanNumerals(Key),Functions(Key)→HarmonicFunctionCadences(Key)→CadenceInstance/Cadence(authentic / plagal / half / deceptive)InferKey()/InferKeys()→KeyMatch(quality-weighted diatonic fit)ChromaticChords(Key)→ChromaticAnalysis/ChromaticKind(secondary dominant, borrowed, Neapolitan)Section/SectionType,Arrangement, andForm/NamedForm(AABA, ternary, binary, rondo, strophic, through-composed, and the 12-bar blues progression template).Design decisions
Score/Track/Voiceperformance containers are deliberately out of scope.ThirtyTwoBarAABAis recognized by the AABA letter pattern (bar-length not enforced) soForm.OfandForm.FromPatternagree;NamedForm.VerseChorusandChromaticKind.AugmentedSixthare declared but intentionally not auto-emitted (documented as reserved). Cadences are degree-based (no PAC/IAC split — no voice-leading model).Testing
ProgressionTests,HarmonicFunctionTests,CadenceTests,KeyInferenceTests,ChromaticAnalysisTests,SectionTests,ArrangementTests,FormTests.Docs
docs/superpowers/specs/2026-07-01-music-analysis-aggregate-design.md; plan:docs/superpowers/plans/2026-07-01-music-analysis-aggregate.md.Semantics.Musicproject-layout row.Versioning
Additive feature to an existing package — the merge commit should carry
[minor](included in the PR title).