LSR/515

< LSR
Zur Navigation springen Zur Suche springen
PD Der Inhalt dieser Seite wurde aus dem LilyPond Snippet Repository übernommen und steht unter folgender Lizenz: CC0.
See Public Domain Help Pages for more info.
PD
Using markup for a staff's instrumentName

LSR Snippet Nr. 515

Beschreibung

The instrumentName property of a staff or a staff group can take arbitrary markup. For example, rather than writing „Percussion“, you can also print two sticks to indicate percussion.

This example also shows how to combine several text markup objects and properly shift them before overlaying them.

auto
%% http://lsr.di.unimi.it/LSR/Item?id=515
%% see also http://lilypond.org/doc/v2.18/Documentation/notation/graphic

\new Staff = "Percussion" <<
  %Use a markup as the instrumentName for the staff!
  \set Staff.instrumentName = \markup {
    \combine
      \translate #(cons -1.25 0) \combine
        \draw-circle #0.65 #0 ##t
        \override #'(thickness . 2.5) \draw-line #'(3 . -3)
      \translate #(cons 1.25 0) \combine
        \draw-circle #0.65 #0 ##t
        \override #'(thickness . 2.5) \draw-line #'(-3 . -3)
  }
  \new Voice \relative c' { c1 }
>>
%% http://lsr.di.unimi.it/LSR/Item?id=515
%% see also http://lilypond.org/doc/v2.18/Documentation/notation/graphic

\new Staff = "Percussion" <<
  %Use a markup as the instrumentName for the staff!
  \set Staff.instrumentName = \markup {
    \combine
      \translate #(cons -1.25 0) \combine
        \draw-circle #0.65 #0 ##t
        \override #'(thickness . 2.5) \draw-line #'(3 . -3)
      \translate #(cons 1.25 0) \combine
        \draw-circle #0.65 #0 ##t
        \override #'(thickness . 2.5) \draw-line #'(-3 . -3)
  }
  \new Voice \relative c' { c1 }
>>

Unterseiten