lilypond-user
[Top][All Lists]
Advanced

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

Re: Instruction text between header and staff


From: Kieren MacMillan
Subject: Re: Instruction text between header and staff
Date: Mon, 4 Oct 2021 12:34:40 -0400

Hi Erika,

> I'm trying to add some instruction text in my score. I would like to position 
> it between the header and the music, but I cannot seem to figure out how to 
> do this, as markup cannot be placed inside a score block. I also tried taking 
> the header out of the score block which still seemed to produce the exact 
> same result.
> 
> (Another minor issue I had was the spacing between the title and the header. 
> I wanted a bit more space in between, which I was able to obtain by adding an 
> arranger field but leaving it blank. If someone has a better solution to 
> suggest, I'd be happy to hear that as well.)

There are multiple ways you can do this.


1. Use \vspace with your markup:

%%%  SNIPPET 1 BEGINS
\version "2.18.2"

\header {
  title = "A Piece"
  composer = "Someone"
}

\paper {
  scoreTitleMarkup = \markup {
     \fill-line {
      \null
      \fontsize #4 \bold \fromproperty #'header:piece
      \fromproperty #'header:opus
    }
  }
}

first = \relative c'' { \repeat unfold 32 { c4 } }

\header {
  piece = "I"
}

\markup \vspace #2
\markup {
  Here are some instructions on how you should play my piece.
}
\markup \vspace #2

\score {
  \new Staff { \first }
  \layout { indent = 0.0 }
}
%%%  SNIPPET 1 ENDS


2. Use the spacing parameters:

%%%  SNIPPET 2 BEGINS
\version "2.18.2"

\header {
  title = "A Piece"
  composer = "Someone"
}

\paper {
  scoreTitleMarkup = \markup {
     \fill-line {
      \null
      \fontsize #4 \bold \fromproperty #'header:piece
      \fromproperty #'header:opus
    }
  }
  markup-markup-spacing.padding = 8
  markup-score-spacing.padding = 8
}

first = \relative c'' { \repeat unfold 32 { c4 } }

\header {
  piece = "I"
}

\markup {
  Here are some instructions on how you should play my piece.
}

\score {
  \new Staff { \first }
  \layout { indent = 0.0 }
}
%%%  SNIPPET 2 ENDS


There are other solutions, of course, but hopefully one of these puts you on 
the right track.

Hope this helps!
Kieren.
________________________________

Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: kieren@kierenmacmillan.info




reply via email to

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