Skip to content

Refactor/harmony#547

Open
azfoo wants to merge 6 commits into
TimeLineAnnotator:devfrom
azfoo:refactor/harmony
Open

Refactor/harmony#547
azfoo wants to merge 6 commits into
TimeLineAnnotator:devfrom
azfoo:refactor/harmony

Conversation

@azfoo

@azfoo azfoo commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator
  • Roman numeral figured bass — dynamically computes MusAnalysis figured-bass suffixes for all chord qualities and inversions using music21's chord structure, replacing the previous hard-coded triad/seventh table. Handles triads, seventh, ninth, eleventh, and thirteenth chords at any inversion; extended chords drop implied intermediates (e.g. the 7th in a 9th chord). Augmented-sixth, suspended, and other bespoke qualities keep a static table.
  • Modal scale types — mode labels now display the mode name in a readable font alongside the tonic (e.g. "C Dorian", "B♭ Phrygian") rather than rendering the mode name through the MusAnalysis glyph font.
  • Quality-aware inversion clamping — when changing a chord's quality in the inspector or the add-harmony dialog, the inversion is clamped to the maximum valid for the new quality. Closes Crash when switching to chord that has no 3rd inversion #468.
  • Chord symbol fallback for uninvertible qualitiesletter_symbol now catches ChordException and falls back to root position when music21 cannot construct the requested inversion (e.g. minor-sixth at inversion 3). Closes 3rd Inversion of Minor 6th chord crashes the app #376.
  • Add-harmony dialog sync — selecting a note/quality/accidental from the combo boxes now writes the chord symbol back into the text field, so the two entry methods stay in sync.
  • Refactor — harmony constants (NOTE_NAME_TO_INT, INT_TO_NOTE_NAME, etc.) are now derived from music21 at import time rather than duplicated by hand; _INV_TO_STRING is the single source of truth for inversion labels across the dialog and inspector.

@azfoo azfoo force-pushed the refactor/harmony branch from da70326 to 3a3b7a0 Compare June 2, 2026 10:06
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.

1 participant