no-chris / chord-symbol

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

Cadd4 is parsed as Csus(add3) #621

Closed darrylnoakes closed 8 months ago

darrylnoakes commented 1 year ago

Cadd4 is parsed as Csus(add3), which I would like to understand better.

  1. Is this the more technically "correct" name for the chord? If not, why is it parsed as it is?

  2. Is there any way I can keep/render the simpler version?

no-chris commented 1 year ago

Hello,

I guess that symbol will yield [1, 3, 4, 5] and that the parser consider that the 4th has a priority over the 3rd. I guess Cadd4 would definitely make more sense, but I'm a bit short of time to work on this currently.

I'm not sure what your use case is but a possible quickfix is to register a custom filter to tweak the rendering?

no-chris commented 8 months ago

This is actually not a bug but expected behavior as this symbol is part of the Realbook. https://github.com/no-chris/chord-symbol/blob/98d3616819932a436d7613dc8db059bdb2e758a9/packages/chord-symbol/tests/allChordsAndVariants.spec.js#L201

If a different rendering is needed then it is a use case for a custom filter

darrylnoakes commented 8 months ago

I do vaguely recall you saying somewhere on another issue (or maybe it was someone else and/or somewhere else) that an add4 isn't technically a "real" chord and should be notated as sus(add3).

A filter should work fine for me, thanks 👍