yrammos/SubLilyPond

Note alterations

Closed this issue · 2 comments

Just an idea ; don't you think it could be interesting to have syntax highlighting for notes alterations as well ?

For instance, in a { c eb d }, I would actually like to see things like { c eb d }, which I think is a tiny wee bit more readable.

It could even be further extended for colorschemes that support it to actually colorize flats and sharps differently.

Thoughts ?

Nota: emphasis is on the b by pure laziness on my part. I was more thinking of having a less pronounced color - the name of the note is more important.

This is an interesting idea, @ceymard, and thanks for submitting it. But I'm not convinced. My first concern with highlighting note alterations differently from the note itself is that a "note" in LilyPond may have a number of extra options following its name and alteration. To take an extreme and highly unlikely example:

 fis='4..*2:3 

Here, '= is a register indication and ..*2:3 pertains to rhythm. You will agree, I hope, that it would be distracting to single out is and highlight it differently from the rest. In that case, one could also reasonably demand that the register or the note value be highlighted differently and, in the end, we would end up with a hodgepodge of colors. Please bear in mind that there is a limited number of scopes (roughly speaking: colors) available to use, and LilyPond is a complicated syntax. I think the purpose of the highlighter should be to facilitate the reading of higher-level entities than single pitches.

My second objection is more pragmatic: most musicians are accustomed to reading pitch names in black ink. Neither on scores nor in scholarship are alterations highlighted in any way. LilyPond syntax benefits from highlighting because it is far removed from musical notation but, on the contrary, pitch names are conventional (not LilyPond-specific) and trivial to make sense of.

If there was a way to parametrize a syntax definition in Sublime Text, and make your suggestion an optional feature, I would. But I don't see compelling reasons to make it a hard-wired feature. Thanks anyway!