Tonic icon indicating copy to clipboard operation
Tonic copied to clipboard

ChordType Overhaul

Open maksutovic opened this issue 1 year ago • 1 comments

Expand ChordType with Comprehensive Chord Extensions and Shorthand Syntax

Overview

This PR significantly expands the ChordType enum by adding nearly all available and theoretical chord extensions. While there may be some esoteric chords yet to include, this enhancement greatly increases Tonic's ability to create and identify chords.

Please note: These changes are breaking. Be sure to update your code accordingly when upgrading your Tonic package.

Changes

Extensive Chord Extensions Added

  • New Chord Types: Almost all known and theoretical chord types have been added to ChordType.
  • Improved Functionality: This expansion allows for more accurate and diverse chord creation and identification within Tonic.

Adoption of Shorthand Syntax

Due to the unwieldy length of some chord names in the previous long-form naming convention (e.g., .dominantThirteenthFlatNineSharp11FlatFive), we've adopted a shorthand syntax familiar to musicians and readers of chord charts and lead sheets.

Naming Conventions

  • Majormaj
  • Minormin
  • Dominantdom
  • Diminisheddim
  • Digits Instead of Spelled-Out Numbers: We now use numerical digits for chord extensions to optimize readability and manage complex types.

Example

  • Previous long-form: .dominantThirteenthFlatNineSharp11FlatFive
  • New shorthand: .dom13_flat9_sharp11_flat5

Breaking Changes

  • Naming Convention Update: The shift from long-form to shorthand chord type names means existing code using ChordType will need to be updated to match the new naming convention.
  • Action Required: Review and update your codebase to replace old chord type names with the new shorthand equivalents.

Testing

Given the substantial increase in available chords, we recognize the need for more extensive and deliberate testing.

  • Contributions Welcome: We encourage contributions to expand the test suite to cover the new chord types.
  • Testing Focus: Ensuring the correctness and reliability of chord creation and identification with the new chord types.

Acknowledgments

Huge thanks to @aure for his continuous support, brilliance, and enthusiasm.

maksutovic avatar Oct 18 '24 01:10 maksutovic