Closed infojunkie closed 3 years ago
Note that I don't need the chord.parserConfiguration
. I could get the altered degrees from chord.normalized.alterations
directly, instead of detecting alt
in there.
Hello!
Indeed this is part of the breaking change, though not properly documented 😅
The idea is that chord.parserConfiguration
should only contain what you configured, and not the default values. It used to contain the default values due to the weird way this configuration was previously handled.
But I see the use case and why it was convenient for you to have this list. tbh I'm too tired today to think about it properly. But I've also started the work on the musicxml filter on my side, so the solution will definitely come up at some point 😄
The idea is that chord.parserConfiguration should only contain what you configured, and not the default values. It used to contain the default values due to the weird way this configuration was previously handled.
From a user's perspective, I think the expectation is to access the current configuration, regardless of whether it's default or custom.
That would make sense indeed
For your immediate needs, you could also decide for yourself what should be the intervals yielded by the alt
modifier. After all, it's unlikely that this chord-symbol
configuration will ever be exposed to your public API.
I will consider this closed since the wanted information can now be found in the chord.normalized.alterations
array (see #392), as it should have been from the start, if only I would not have rushed alt
support! 🤷🏻♂️
Feel free to re-open if needed.
Thanks! When I build chord-symbol@v2.1.0
locally and point my module to it, my update branch builds successfully. However, because your branch does NOT contain the updated built library, using a github dependency will not work (since the library still contains pre-v2.1.0
code). Would be great to update your lib
folder in the various branches :pray:
Done
I'm upgrading
ireal-musicxml
to usechord-symbol v2.0.0
. Here's how I initializechord-symbol
:When I parse a chord, I find that
chord.parserConfiguration
is empty. I am therefore unable to access the defaultaltIntervals
as per https://github.com/infojunkie/ireal-musicxml/commit/88d3172a5ef00393d290880552dbe3c911ab767e#diff-5d77c7a8c22384d31a9d6748dae7d1f06ebd95a6c2f8d2cae3dce0150dc38a64R982Am I doing something wrong? I would expect the
chord.parserConfiguration
to include the defaults (as it did inv1.2.0
).