Dieses Wiki enthält einerseits Tipps&Tricks zum Thema Lilypond, andererseits Lilypond-Scores.
Elise-rechteHand.png

Vorlage:ContextBarNumberStaff

Wechseln zu: Navigation, Suche


Kopiervorlage[Bearbeiten]

This Context removes BarNumbers from Score and adds it to a new Staff Context named BarNumberStaff. The font size of the BarNumbers is increased, the color ist changed to grey, and BarNumber is displayed at every bar.

The using of different StaffGroup-Contexts demonstrates that the adding of the new Context to Score is sufficent to make all other StaffGroup-Contexts accept the new Context. Update: it's not, and I don't know why.

The setting of the current BarNumber and indent is disabled in the hidden code for including.

\version "2.19.56"

\language "deutsch"

\layout {
  indent = #0
  \context {
    \Score
    \remove "Bar_number_engraver"
    \accepts BarNumberStaff
    currentBarNumber = #11 %% sets the start of barnumber counting
    barNumberVisibility = #all-bar-numbers-visible %% works only if you add an empty barline before the first note \bar ""
    \override RehearsalMark.self-alignment-X = #-1
  }
  \context {
    \PianoStaff
    \accepts BarNumberStaff
  }
  \context {
    \Staff
    \name BarNumberStaff
    %% Staff with Bar Numbers
    \alias Staff
    \consists "Bar_number_engraver"
    %\override BarNumber.break-visibility =#center-invisible
    \override BarNumber.break-visibility =#end-of-line-invisible
    \override BarNumber.color = #grey
    \override BarNumber.layer = #-200
    \override BarNumber.outside-staff-priority =#'()
    \override BarNumber.padding = #1
    \override BarNumber.font-size = #1
    \override BarNumber.self-alignment-X = #0
  }
}

mus = \relative c'' { \bar "" c4 d e c d1 f e \break g,2 c c4 d, e c d1 f e \bar "|." }
\score {
  \new  BarNumberStaff { \mark "No special Staff added" \mus }
}

\score {
  \new PianoStaff \new  BarNumberStaff { \mark "PianoStaff" \mus }
}

\score {
  \new GrandStaff
  \new  BarNumberStaff { \mark "GrandStaff" \mus }
}

Output[Bearbeiten]

LilyWiki ContextBarNumberStaff

Kategorien[Bearbeiten]

Wer verlinkt auf diese Seite?