Skip to content
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

Edge case bug in Chord.components() #40

Open
hindman opened this issue May 12, 2020 · 3 comments
Open

Edge case bug in Chord.components() #40

hindman opened this issue May 12, 2020 · 3 comments

Comments

@hindman
Copy link

hindman commented May 12, 2020

An example:

In [12]: Chord('Abm').components()
Out[12]: ['Ab', 'B', 'Eb']          # Should be ['Ab', 'Cb', 'Eb']

I might be mistaken (not an expert in music theory), but I believe Cb is more correct, from a strict perspective.

Chord construction starts with note names: an A triad of any flavor must contain some flavor of A, C, and E. From there, you apply the sharps, flats, double-flats, or double-sharps as needed to achieve the desired chord root and quality. So, in our example, we start with an A triad (A, C, E), flatten everything because we want root of Ab (Ab, Cb, Eb). Since the
A-to-C distance is already minor, we're done.

Another example:

In [13]: Chord('Cbm').components()
Out[13]: ['B', 'D', 'Gb']          # Should be ['Cb', 'Ebb', 'Gb']

Start with C, E, G. Flatten everything to Cb, Eb, Gb. The C-to-E distance is major, so double-flatten it to get Cb, Ebb, Gb.

Thanks for taking a look and working on this project.

@yuma-m
Copy link
Owner

yuma-m commented Jun 20, 2020

Hi @hindman,

Thank you for your feedback. Yes, I think your comment is correct and pychord doesn't support double flat or double sharp currently. I can't fix this right now but let me tag this as an enhancement.

@philipmat
Copy link

I don't think that's the correct construction. A minor chord has root, minor third, and perfect fifth. Ab minor has a root Ab, a minor third Cb, and a P5 in Eb for Ab Cb Eb. Here's confirmation of Abm: https://pianochord.com/ab-minor

Cbb would be a correct notation for a diminished third in Ab (because we already have a Bb and the convention is to avoid two of the same letters in notation). I am also not an expert in music theory, but I think the only chord with a diminished third -- baring arbitrary triads -- would be an Italian augmented sixth (when in first inversion). See this discussion on Stack Exchange Music: https://music.stackexchange.com/questions/31189/what-is-a-chord-with-a-diminished-third-called

@hindman
Copy link
Author

hindman commented May 12, 2021

@philipmat You are correct. I fixed my comment and added a better double-flat example.

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

No branches or pull requests

3 participants