On 2025-01-29 03:55, Valentin Petzel wrote:
Hello Stu,

I sometimes add sticking to drum scores to assist readers by showing the
preferred hand for each stroke.

I'm aware of the ability to change the horizontal position of lyrics
using '\override LyricText.self-alignment-X'.

When I use '= #LEFT', the lyric is under the notehead, rather than the stem.

When it comes to sticking, and when the vocalist is a drummer, I'd like
to see the lyrics further left, i.e. right below the stem.  Is there a
tweak that will provide that?
Lyrics are generally aligned to the PaperColumn, not to the Notes, unless you
set an associated voice, in which case they are aligned to the associated note
columns.

So the cleanest solution would be to first align the Lyrics to a Voice:

```
\score {
   <<
     \new DrumStaff \new DrumVoice = "Drums" { \voiceTwo \Drums }
     \new Lyrics \lyricsto "Drums" { \Sticking }
   >>
}
```

and then change the X-parent of the Stickings from the note column to the stem
of the note column:

```
% Drums
Drums = \drummode {
    \repeat unfold 8 sn8
    \stemUp
    \repeat unfold 8 bd8
}

% Sticking
Sticking = \lyricmode {
    \override Lyrics.LyricText.font-series = #'bold
    \override Lyrics.LyricText.before-line-breaking =
    #(lambda (g)
       (let* ((note-column (ly:grob-parent g X))
              (stem (ly:grob-object note-column 'stem)))
         (if (ly:grob? stem)
             (ly:grob-set-parent! g X stem))))
    \override Lyrics.LyricText.self-alignment-X = #CENTER

    \repeat unfold 4 { R L }
    \repeat unfold 4 { R L }
}

\score {
   <<
     \new DrumStaff \new DrumVoice = "Drums" { \voiceTwo \Drums }
     \new Lyrics \lyricsto "Drums" { \Sticking }
   >>
}
```

Cheers,
Valentin

Thank you for the reply and the score Valentin.

I processed the content and the result doesn't have the sticking under the stems of the notes.

The first bar is slightly to the left of the stem, and the second bar is to the right of the stem.

Here's the output generated:



I managed to get the output that I want using:

Sticking = \lyricmode {
  \override Lyrics.LyricText.font-series = #'bold
  \override LyricText.self-alignment-X = #RIGHT

  \repeat unfold 4 { R8 L }
}

Here's the output as generated by that for sticking:



For Lyrics with more than 1 character using:

Lyrics = \lyricmode {
  \override Lyrics.LyricText.font-series = #'bold
  \override LyricText.self-alignment-X = #-0.8

  \repeat unfold 4 { Right8 Left }
}

Here's the output as generated by that for lyrics:



Thanks for your effort to assist with my post.

Reply via email to