7

I am typesetting scores using Lilypond and would like to print a Da Capo, but haven't found a standard command to do so. I am currently working around this issue by using

\mark "D.C."

However, the mark is sometimes placed on the next line. Also, I would rather use a single command and be sure I always get the same result than have to type the text out every time.

5

When some music notation is attached to a bar line that coincides with the end of a system in the score, you may want to print the notation at the end of that system, at the start of the next system, or even in both places (for example a key signature change).

Lilypond "knows" the standard rules for various types of notation. The defaults are listed in http://lilypond.org/doc/v2.18/Documentation/notation/visibility-of-objects#using-break_002dvisibility, but you can override them as shown on that page.

To force your "fake rehearsal mark" to appear in the middle of a system or at the end, but not at the beginning, use

\once \override Score.RehearsalMark.break-visibility = #begin-of-line-invisible
6

As alephzero noted you have to set the visibility of the mark. Because these kind of marks frequently need the same treatment you can setup your own commands for them so you don't have to remember the details of the visibility controls and clutter up your code.

For example I keep a common library file around with a bunch of commands that I use a lot. Among them are some commands for getting marks the way I like them. These can then be used in my music just by calling \DS or whichever variant I want:

DSfine = {
  \once \override Score.RehearsalMark #'break-visibility = #'#(#t #t #f)
  \mark \markup { \small "D.S. al fine" }
}

DS = {
  \once \override Score.RehearsalMark #'break-visibility = #'#(#t #t #f)
  \mark \markup { \small "D.S." }
}

DCfine = {
  \once \override Score.RehearsalMark #'break-visibility = #'#(#t #t #f)
  \mark \markup { \small "D.C. al fine" }
}

DCcoda = {
  \once \override Score.RehearsalMark #'break-visibility = #'#(#t #t #f)
  \mark \markup { \small "D.C. al coda" }
}

DScoda = {
  \once \override Score.RehearsalMark #'break-visibility = #'#(#t #t #f)
  \mark \markup { \small "D.S. al coda" }
}

Fine = {
  \once \override Score.RehearsalMark #'break-visibility = #'#(#t #t #f)
  \mark \markup { \small \italic "fine" }
}

GotoCoda = {
  \once \override Score.RehearsalMark #'break-visibility = #'#(#t #t #f)
  \mark \markup { \small \musicglyph #"scripts.coda" }
}

Coda = {
  \once \override Score.RehearsalMark #'break-visibility = #'#(#f #t #t)
  \mark \markup { \small \musicglyph #"scripts.coda" }
}

Segno = {
  \once \override Score.RehearsalMark #'break-visibility = #'#(#f #t #t)
  \mark \markup { \small \musicglyph #"scripts.segno" }
}

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.