lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding text to chord names or note names (solution)


From: Jean Abou Samra
Subject: Re: Adding text to chord names or note names (solution)
Date: Thu, 1 Dec 2022 20:28:26 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0

Le 01/12/2022 à 19:04, Koen van Walstijn a écrit :
Hello,

(Separately reply follows to some of the specific things that were written.)

In case there is interest, what I did now was tweaking the Current_chord_text_engraver from scheme_engravers.scm. It simply takes the first pitch specified in a chord as the root, takes the first one with property "bass" as the bass, and it additionally listens to text-script-events from which it takes the first specified one as the suffix. I use that in a custom context called "HarmonicBackground" for lack of something better, same as ChordNames but with this engraver instead of the original one. For the input I just use relative mode.

An example of how I specify the chord symbols now:

chords = \relative {
   <f \over ees>^"7"
des^"lyd"
}

\new HarmonicBackground {
    \chords
}

Code can be found here: https://gitlab.com/kbvw/lilypond-tweaks/-/blob/master/harmonic-background.ly

It's probably not foolproof; I'm a novice with both LilyPond and Scheme. Currently the text-script is hard-coded to go in the superscript of the chord, before the slash separator. Perhaps it would be nicer to look if the text-script is entered with ^ or _, and even nicer would be to use shorthands in an input mode such as the chord mode, but I didn't look at any of the input/parser code yet.

For myself that suffices for now; it looks good to me on the page and it's easy/flexible to enter.

If anyone more knowledgeable thinks it's worth continuing with, I'd be happy to discuss/help! (I can see several advantages and disadvantages.)

All the best, and thanks for the help,
Koen



I think that at this point we have largely stepped beyond the scope of this mailing list. I suggest that you open an issue at

https://gitlab.com/lilypond/lilypond/-/issues

to suggest the feature (linking to the discussion). Then we can discuss the details there.

Best,
Jean

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]