no-chris / chord-symbol

The definitive chord symbol parser and renderer for Javascript/NodeJS.
https://chord-symbol.netlify.app
MIT License
146 stars 8 forks source link

Gsus2 not parsing correctly #649

Open geddski opened 7 months ago

geddski commented 7 months ago

Given the chord Gsus2, Chord Symbol returns normalized.isSuspended value false. Whereas Gsus4 has true. Seems like a bug, unless there's something in music theory I'm not understanding?

no-chris commented 7 months ago

Well it is actually the expected behaviour, because of the reference music theory material used during the writing of this lib: https://www.harrisonmusic.com/store/c11/Music_Theory_Books_Audio.html

Basically Mark Harrison explains that there is no such thing as a "sus2" chord, and suggests G(add9,omit3) notation instead. Of course this is not really practical and does not reflects the actual usages, which is why I also implemented the possibility to render as sus2 (see https://github.com/no-chris/chord-symbol/tree/master/packages/chord-symbol#rendering-and-normalization)

Now you could argue that given this possibility then it would make sense to have normalized.isSuspended set to true when enabling short namings and rendering a sus2 chord. I need to live with the idea for a while, it could be done quite easily I think.

geddski commented 7 months ago

Gotcha, thanks for the explanation! I'm using the parser but not the renderer, so in my case adding isSuspended to the parser would be helpful.