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

Major chords 1st inversion #242

Closed
flyingCarpet33 opened this issue Feb 9, 2021 · 5 comments
Closed

Major chords 1st inversion #242

flyingCarpet33 opened this issue Feb 9, 2021 · 5 comments

Comments

@flyingCarpet33
Copy link

Hi guys, not a programmer myself but i use this software to teach myself the piano. Gotta say, amazing work, absolutely love it!

The only minor issue I've noticed that all 1st inversions of major scales are indicated as minor #5s.

For example an F major chord (F A C) played in 1st inversion (A C F) is indicated as Am#5, where F/A would make more sense.

Keep up the good work!

@flyingCarpet33 flyingCarpet33 changed the title Major chords 2nd inversion Major chords 1st inversion Feb 9, 2021
@daladim
Copy link

daladim commented Jan 20, 2022

I have exactly the same issue (I am also learning reading chords using your great software, thanks)
I'm using chord-display if that matters, and it indeed puzzles me when trying to learn chords with inversions.

Minor chords are working as I expect: (C, Eb, G) displays as a Cm chord, as well as its inversions (Eb, G, C4 that is shown as Cm/Eb) and (G, C4, Eb4 that is shown as Cm/G)

However, for major chords:

  • (C, E, G) is correctly shown as C
  • (E, G, C4) is shown as Em#5 (I expected C/E)
  • (G, C4, E4) is correctly shown as C/G

I'm not good enough at music theory to know whether Em#5 is valid, but I'd like it to be shown as C, or C/E.

I'm not sure either whether that's a duplicate of #160

Do you have any opinion on this? Thanks

@ghost
Copy link

ghost commented Oct 12, 2022

I am running into the same issue, this time with D inversions.
The thing is, the order in whichchord.detect() is returning "inconsistent".
image
I was expecting DM/F# to be index 0, but it is not.

I did find a way to bypass the issue for now, the steps are as follow:

  1. Do chord.detect()
  2. Get [0]
  3. If the last character is a number, that means we have to take [1]

Here is a snippet that seems to work for for me with simple inversions (both 1st and 2nd on majors, minors, augmented and diminished). Haven't tested any edge cases

const chords = Chord.detect(notes);
const result = chords[0];

const char = result[result.length - 1];
if (Number(char)) {
    return chords[1];
}

return result;

Edit:
After further testing I ran into the following
image
Put: "Checking if a / exists, then remove everything after and including the /" between step 2 and 3 resolves this

@gotthehot
Copy link

gotthehot commented Nov 17, 2023

Using actual version of midi-jar with tonal v5 and bumping up to same issues with simple triad inversions.

First Example

E-A-C triad is expected to be displayed as Am/E but recognizing as C6/E.

am-inversion

Yes, it could be C6 with omitted V, but primary display should be basic minor triad.

Second Example

Soon I found that inversions are not recognized at all (as in Am/E case) or treating as very uncommon chords for primary display. For example when playing simple D major chord inversion from A (A-D-F#) midi-jar displays as main choice a very uncommon Gb6addb6/A chord and then small display of DM/A that is definitely more relevant in most cases.

d-inversion

It there any hope for issue to be fixed?

@danigb
Copy link
Collaborator

danigb commented Nov 19, 2023

Hi,

This seems to be a midi-jar, not a tonal issue. Tonal returns Am/E and DM/A for the examples you mention.

Also, choosing what to show first is a tricky thing. For now, tonal will return inversions always after chords in root position. You may need to change results order after processed by tonal.

Closing this issue.

@danigb danigb closed this as completed Nov 19, 2023
@ArTiSTiX
Copy link

@danigb @gotthehot Confirmed it's a bug on my end (midi-jar).
I updated the chord-detect algorithm to handle omissions from an updated dictionary (hope to submit a PR at one time), and i inverted the weight of omissions in inversions.

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

No branches or pull requests

5 participants