4

I am writing a score using Lilypond and I want the title of a staff to be "Concert D flat major". How would I replace the word "flat" with the corresponding marking?

Here is an example of what I have right now

\score {
  \new Staff {
    \clef bass
    \key des \major
    \time 4/4
    des4 ees4 f4 ges4
  }
  \header {
    piece = "Concert D flat major"
  }
}

And instead of the word "flat", I want the symbol for a flat to show on the pdf.

I didn't find anything like this in the Lilypond documentation (though the documentation is pretty hairy. I might have missed it).

6
  piece = \markup { "Concerto in D" \flat "Major" }

Via "Music notation inside markup" in the notation guide. You may also need \markup { \concat { "blah" \flat " blah" } } or something to improve the spacing?

  • 1
    The \markup{\concat{}} worked a charm! – usernumber Sep 5 '15 at 17:03
3

While LilyPond offers a \markup \flat you can employ here, it is from an actual music font and usually needs scaling and shifting and spacing until it works reasonably in the surrounding text. Instead you tend to be better off using an actual text flat, like "Concert D♭ major". If you have some Unicode-capable X Window GUI, chances are that <Compose> # b will generate a Unicode flat and <Compose> # # will generate a Unicode sharp (try your keyboard settings menu to figure out where your <Compose> key is or to define one). If things come to worst, you can use the \char markup command for inserting Unicode characters by code number.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.