Thank you. Quoting it plus >> worked, though I still had to use the {}
around << >> to get it to work with lualatex.
On Tue, Mar 7, 2023, 12:08 PM Jean Abou Samra <[email protected]> wrote:
> Le mardi 07 mars 2023 à 11:55 -0500, Nate a écrit :
>
> I'm trying to set 'lyrics' (chords which do not match lilypond's
> interpretation of the notes) to notes on a RhythmicStaff, but I'm not
> seeing the lyrics. I thought maybe it was the rhythmicstaff that didn't
> like lyrics, but perhaps they need to be in a score? This is inside a
> snippet set inside a latex fbox. The notes print as expected, and the
> example seems to follow the docs except for the score. Do lyrics need to be
> inside a score? Did I miss something else?
>
> \lilypond[noindent, nofragment]{ \new RhythmicStaff \with {
> \remove "Staff_symbol_engraver" \remove "Clef_engraver" \remove
> "Time_signature_engraver"} {
> \new Voice = "melody" { \relative { c8 c4. c8 c8 } } }
> \new Lyrics { \lyricsto "melody" { 1 3 3 3 } }
> }
>
> If I understand correctly, you're seeking to literally print digits like
> “1” and “3” under the rhythmic staff. Is that right?
>
> Naked digits are LilyPond's syntax for durations. LilyPond gives errors
> messages like
>
> /tmp/frescobaldi-p_ajfnr0/tmp277_r7m5/document.ly:7:41: error: not a duration
> \new Lyrics { \lyricsto "melody" { 1
> 3 3 3 } }
>
> on your code because it tries to interpret "3" as a duration, while only
> "1", "2", "4", "8" (plus dotted durations etc.) are valid. If you want them
> literally, you need to quote them, as in
>
> \version "2.24.1"
>
> <<
> \new RhythmicStaff \with { \remove "Staff_symbol_engraver" \remove
> "Clef_engraver" \remove "Time_signature_engraver"} {
> \new Voice = "melody" { \relative { c8 c4. c8 c8 } }
> }
> \new Lyrics { \lyricsto "melody" { "1" "3" "3" "3" } }
> >>
>
> Also note that you should use << >>, not { }, around the \new
> RhythmicStaff and \new Lyrics commands, since { } is the syntax for
> putting expressions in sequence, and you want the lyrics at the same time
> as the melody, not after the melody has ended.
>