Open adamnemecek opened 2 years ago
Hi @adamnemecek,
Thank you for raising this. PyChord supports slash chords that just rotated the original order.
find_chords_from_notes(["C", "E", "G"])
[<Chord: C>]
find_chords_from_notes(["E", "G", "C"])
[<Chord: C/E>]
find_chords_from_notes(["G", "C", "E"])
[<Chord: C/G>]
However, it doesn't support various inversion.
find_chords_from_notes(["C", "G", "E"]) ## Should return "C"?
[]
find_chords_from_notes(["G", "C", "E", "Bb"]) ## Should return "C7/G"
[]
Sorting the components will work for some cases but it may change the original chord. I have no quick solution for this issue, but let me consider how PyChord can cope with this.
A quick workaround for this issue is to add some Qualities using QualityManager.
from pychord import QualityManager
quality_manager = QualityManager()
quality_manager.set_quality("(inv)", (0, 7, 16))
find_chords_from_notes(["C", "G", "E"])
[<Chord: C(inv)>]
I ran into this issue. If you try to recognize a say cmaj like so
It works correctly.
However, if i reorder the notes in a way that is not a rotation of the chord
finds nothing.
Would sorting the nodes before recognizing the chord help?