lilypond-user
[Top][All Lists]
Advanced

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

Re: "Floating" markup


From: James Worlton
Subject: Re: "Floating" markup
Date: Tue, 15 Oct 2013 09:04:13 -0500

On Tue, Oct 15, 2013 at 8:34 AM, EdBeesley <address@hidden> wrote:
I'm trying to make some easy to read exercises for the little kiddies I
teach. As you can see in the example below I've labelled which line is for
sticking and which is for counting - the only way I could figure out of
getting the markup before any notes was to add it to a spacer grace note (so
as to not affect duration) but as you can see this creates a huge gap.
Switching on strict-note-spacing solves the gap but then pushes the text
very far to the left, and all my attempts at tweaking x-offsets or
\translates haven't worked. Also ideally I'd like to vertically align the
"Sticking" text so it's centred relative to the two lyric lines.

Does anyone have a better idea for getting what I'm after? I'm feeling the
grace note markup is very hacky but I can't think of a better way!

# (set-global-staff-size 30) % yep, 30!

 count = \lyricmode {
   "1" "2" "3" "4"
  }

\score {
    <<
      \new Staff ="staff" \with {\remove Time_signature_engraver} {
    \new Voice ="one"
    {
      \clef percussion
  %    \override Score.SpacingSpanner #'strict-note-spacing = ##t
       \override NoteHead #'extra-spacing-width = #'(3 . 3)
       \grace {s64 ^\markup \right-align \italic {Count:}  _\markup
\right-align \italic {Sticking:}}
       d'4 d' d' d' d' d' d' d' }
      }
    \new Lyrics \with { alignAboveContext = "staff" } { \lyricsto "one"
{\count \count} }
    \new Lyrics {\lyricsto "one" {R L R L R L R L }}
    \new Lyrics {\lyricsto "one" { L R L R L R L R }}
    >>
  }

This solution is also kind of hacky, but it looks like it may do more or less what you want. It also scales pretty well to other staff sizes. I'm not sure how to slide the staff names to the right, however:

\version "2.17.28" %also works in 2.16.1
# (set-global-staff-size 30) % yep, 30!

 count = \lyricmode {
   "1" "2" "3" "4"
  }

\score {
    <<
      \new Staff ="staff" \with {
        \remove Time_signature_engraver
        instrumentName = \markup { \vspace #1.5
          \center-column { \italic "Count:"
                           \vspace #2
                           \line { \italic "Sticking:" }
          }
        }
      }
      { \new Voice ="one"
        {  \clef percussion
           d'4 d' d' d' d' d' d' d'
        }
      }
      \new Lyrics \with { alignAboveContext = "staff" }
        { \lyricsto "one" {\count \count} }
      \new Lyrics {\lyricsto "one" {R L R L R L R L }}
      \new Lyrics {\lyricsto "one" { L R L R L R L R }}
    >>
}
 
James Worlton

reply via email to

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