Skip to content

Refactor/mode pitch collections aliases#5922

Open
Siddharth-732 wants to merge 3 commits intosugarlabs:masterfrom
Siddharth-732:refactor/mode-pitch-collections-aliases
Open

Refactor/mode pitch collections aliases#5922
Siddharth-732 wants to merge 3 commits intosugarlabs:masterfrom
Siddharth-732:refactor/mode-pitch-collections-aliases

Conversation

@Siddharth-732
Copy link
Contributor

fixes #5921

Summary

Refactors musical mode definitions in musicutils.js from a large flat MUSICALMODES map into canonical pitch collections plus alias mappings.

Changes

  • Added grouped canonical definitions in PITCH_COLLECTIONS (organized by note count).
  • Added PITCH_COLLECTION_ALIASES for equivalent mode names.
  • Rebuilt MUSICALMODES programmatically from canonical collections + aliases.
  • Kept MUSICALMODES["custom"] override behavior unchanged.
  • Removed the inline TODO about organizing/naming pitch collections.

Behavior/compatibility

  • No intended functional changes.
  • Existing lookups via MUSICALMODES[name] continue to work.
  • Alias names resolve to the same interval patterns as before.

Validation

  • A manual check was done to ensure no error in functionality.
  • Lint run completed.

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@Siddharth-732
Copy link
Contributor Author

@omsuneri, please review this when you have a moment.

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Chore] Refactor musical mode definitions into canonical pitch collections with aliases

1 participant