Parsing logic in chords_jazz.xml

• Apr 17, 2025 - 06:48

I have a custom chords_jazz.xml that has served me well, implementing slightly different scaling and positioning that match our evolving house style.

I'm still unclear about how the associated parsing logic works. I realize I could read the involved source, and that's probably what I should do...but I'd love to avoid crawling into that rabbit hole.

What I'd specifically like to do is recognize an element that looks like "/ < note >" (bass note of a chord, which I'd like to kern left -- and then shrink the size of the entire element; this is because in our scores, frequent use of bass/pedal notations leads to unreadable chord clusters. I haven't seen professional engraving done this way, but I've seen readable handwritten scores with e.g. C7#11/Bb where the "/Bb" is a bit smaller.

I understand how to recognize and draw individual tokens. But I am not clear how the syntax elements comprising multiple tokens get processed. The framework seems very geared to single tokens, other than the special case handling for extensions and modifiers. I guess I am looking at a new class of "special modifier."

I am thinking this case would be handled in the "part III: chord list" section -- but despite the commented-out examples and descriptive text, I'm just not getting a sense of how this section is actually used.

I'd be very grateful if anybody has some more concrete part III examples, besides the 6/9 and 6,9 examples provided, along with some clues about how these get recognized and processed.

Again, I can see that before trying to modify a set of parsing rules, I really ought to understand how the parser itself is working. But perhaps others have already figured this out, and can offer some guidance.

A revised chords_jazz.xml with a little more semantic detail would also certainly be appreciated. I'm trying to comment my own custom version so I remember what I figure out; but at present I'm still relying on guesswork and experimentation. I've been able to get the results I want, but I'm not absolutely clear why it works.

Thanks -- Trevor

Do you still have an unanswered question? Please log in first to post your question.