-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getting four notes for a triad inversion #33
Comments
Hello @eyaler It is because, A/C# just means "C# root note" and "A major chord" in PyChrod. A/C# -> C# + [A, C#, E] You can remove duplicated note in components by using set: >>> Chord('A/C#').non_duplicated_components()
["C#", "A", "E"] # or ["C#", "E", "A"] ? |
thanks! i am not an expert on music theory but afaiu a/c# means inversion not doubling, when the new root is also part of the original chord. also in some other cases i do not see doubling in pychord |
by the way, the issue with set() is that it doesn't preserve order of course. this would be a separate issue, but one can think of different logic depending on if you care about voicing (order and octaves) or not. when i do not care about voicing i use: sorted(set([n%12 for n in components])) you could have: letters, numbers, letters unique+sorted, numbers mod%12+unique+sorted and i would use more intuitive name than "visible". eg: notes, numbers, notes_ignore_voicing, numbers_ignore voiceing, respectively for the above |
from pychord import Chord
print(Chord('A/C#').components())
['C#', 'A', 'C#', 'E'] #not sure why C# should appear twice?
The text was updated successfully, but these errors were encountered: