Repository navigation
[patch] Parse "minor" and "natural_minor" as the Aeolian mode - #398
Merged
Merged
Conversation
The mode alias table only mapped ionian to major, so the usual spelling of
a minor key failed: Key.TryParse("A minor") returned false and
Mode.Parse("minor") threw. Map minor and natural_minor to aeolian, so a
parsed "A minor" equals A aeolian and still prints as "A aeolian".
Fixes #302
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RsRLSwgcnfRH2EGHrQMMxb
The minor aliases made "aeolian" the fourth copy of the same literal in Mode.cs, which SonarCloud's S1192 check failed the quality gate on. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RsRLSwgcnfRH2EGHrQMMxb
|
This was referenced Oct 9, 2026
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.



Fixes #302
What was wrong
The mode alias table in
Semantics.Music/Mode.csonly mappedioniantomajor. As a resultKey.TryParse("A minor", out _)returnedfalseandMode.Parse("minor")threw, even though"A minor"is the usual way to write half of all keys.Change
minorandnatural_minortoaeolianinAliases. Lookup is case-insensitive, like the existing alias.TryParseremark to list the aliases.Tests
ModeTests.Parse_MinorAlias_EqualsAeolian:minor,Minorandnatural_minoreach parse toMode.Aeolian, andToString()still prints the canonicalaeolian.KeyTests.Parse_MinorSpelling_IsTheSameKeyAsAeolian:Key.Parse("A minor")equals A aeolian, andToString()still prints"A aeolian".Verification
Semantics.Testsuite passes: 1484 passed, 0 failed, 8 skipped (the same 8 are skipped onmain).Semantics.Musicbuilds with 0 warnings.🤖 Generated with Claude Code
https://claude.ai/code/session_01RsRLSwgcnfRH2EGHrQMMxb
Generated by Claude Code