bragefuglseth/fretboard

[BUG] Am/E reported as Esus4#5

Closed this issue · 3 comments

Describe the bug
The chord:

image

is reported as Esus4#5. Technically correct (I=E, III=suspended, IV=A, V=sharp=B#=C).

I doubt anybody would transcribe the chord as that unless it's coming from a specific context (like a line cliché). Most likely it would be transcribed as "Am/E" or even just plain "Am".

I can try to fix it, but I guess the problem is not trivial and while the specific case can be easily patched, there are probably other such cases and/or any generic fix could impact how other chords are reported.

Another weird case is the open D chord.

With:

  • XX0232 -> D
  • X00232 -> D/A
  • 2X0232 -> D/F#
  • 200232 -> F♯m♯5 . It really is just D/F#.

Hi, and thanks for catching those! I agree that this isn't ideal. Since it's hard to predict exactly what chord people are looking for when they draw a chord, I think our best bet is to select the match with the shortest chord name in the database. The lookup order of the database is already loosely based on name length, but only for the first few entries. I'll have a look at properly sorting it.

Yeah, that solved both of your examples, and plenty of other ones too.