What's this? Searching the LSR Browse by date Contributing Snippet database | Browsing items 30−39 out of 924 |
Lilypond provides the \cueDuring
and \transposedCueDuring
commands to add cue notes. However, these commands do neither print any cue instrument name, nor do they allow the cue notes to be in a different clef than the quoting voice.
To be able to add cue instrument names and/or clef changes, as a workaround, you can define your own function that sets instrumentCueName and the clef for the staff. At the end of the cue music (typically R1*2), you'll have to reset them again. This snippet combines these steps into one function:
\namedCueDuring #"vIQuote" #UP #"V.I" #"Sop." { R1*3 }
... for adding instrument names, but no clef change
\cleffedCueDuring #"vIQuote" #UP #"V.I" #"treble" #"Basso" #"bass" { R1*3 }
... for instrument names plus clef change
The example also shows how to modify properties of the displayed cue instrument names: They are generated as InstrumentSwitch objects, which support all different kinds of interfaces, like the font-interface to modify font settings.
The disadvantage of this solution is that you always have to manually give the instrument name and clef of the quoting voice, because otherwise the function is not able to reset these. However, there is currently no way known to me how to set the instrument name and clef for a quoted voice automatically.
\addlyrics
command, and they will appear in both the layout and midi. The MIDI Karaoke standard allows for the concept of line breaks, usually introduced with either a slash or a backslash at the beginning of a lyric syllable, but placing either of those characters in the lyrics is both messy in the .ly
file and disruptive to the printable version (either character will display in the end result).
The perfect solution is to start the lyric syllable with \n
- at least, it seems to work with vanBasco's Karaoke Player for Windows (confirmation with other players requested!) However, this is immensely ugly in the LilyPond source:
\addlyrics { "\nDoe," a deer, a fe- male deer, "\nRay," a drop of gol- den sun, "\nMe," a name I call my- self, "\nFar," a long long way to run! }It's especially ugly if the first word of the line has more than one syllable (the quote in the middle of the word).
With a bit of Scheming, this can be made far cleaner. The function recursively searches its argument for LyricEvent
s and replaces any leading exclamation mark with a newline.
\addlyrics { \lyr { !Doe, a deer, a fe- male deer, !Ray, a drop of gol- den sun, !Me, a name I call my- self, !Far, a long long way to run! } }
To add a link to a grob stencil you can use add-link
as defined here.
It works both with \override
and \tweak
.
Drawback: point-and-click
is disturbed for the linked grobs.
Limitation: Works for PDF only.
The linked objects are colored with a separate command. Note that the links are not displayed and are not clickable from inside the LSR.