Spacing
Spacing issues
歌詞の垂直方向のスペースを調整する
このスニペットは、歌詞をより譜に近づける方法を示しています。
% Default layout:
<<
  \new Staff \new Voice = melody \relative c' {
    c4 d e f
    g4 f e d
    c1
  }
  \new Lyrics \lyricsto melody { aa aa aa aa aa aa aa aa aa }
  \new Staff {
    \new Voice = melody \relative c' {
      c4 d e f
      g4 f e d
      c1
    }
  }
  % Reducing the minimum space below the staff and above the lyrics:
  \new Lyrics \with {
    \override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
      #'((basic-distance . 1))
  }
  \lyricsto melody { aa aa aa aa aa aa aa aa aa }
>>
  ![[image of music]](../8d/lily-406145c7.png)
運指記号を譜の内側に表示する
デフォルトでは、縦方向の運指記号は譜の外側に配置されます。この挙動を取り消すことができます。注意: この場合、和音でない場合にも <> を用いる必要があります。
\relative c' {
  <c-1 e-2 g-3 b-5>2
  \override Fingering.staff-padding = #'()
  <c-1 e-2 g-3 b-5>4 g'-0
  a8[-1 b]-2 g-0 r
  \override Fingering.add-stem-support = ##f
  a[-1 b]-2 g-0 r
  \override Fingering.add-stem-support = ##t
  a[-1 b]-2 g-0 r
  \override Fingering.add-stem-support = #only-if-beamed
  a[-1 b]-2 g-0 r
}
  ![[image of music]](../a3/lily-69f02f28.png)
ページ ラベル
ページ ラベルは音楽の中またはトップ レベルに配置でき、マークアップ内で参照できます。
\label license
\markup "This snippet is available under the Creative Commons
Public Domain Dedication license."
{
  \repeat volta 2 {
    \label startRepeat
    \repeat unfold 20 { c'2 2 }
    \pageBreak
    2 2
  }
  \textEndMark \markup {
    \with-link #'startRepeat \line {
      To page \page-ref #'startRepeat "0" "?"
    }
  }
}
\markup {
  See page \page-ref #'license "0" "?" for
  licensing information.
}
  ![[image of music]](../66/lily-4bbfa9c2.png)
プロポーショナル ノーテーションで厳格モードを使用する
strict-note-spacing がセットされている場合、音符のスペーシングはシステム内にある小節線や音部記号に影響されません。これらは対応する音符の直前に配置されます。これらが衝突を引き起こす場合があります。
\relative c'' <<
  \override Score.SpacingSpanner.strict-note-spacing = ##t
  \set Score.proportionalNotationDuration = #(ly:make-moment 1/16)
  \new Staff {
    c8[ c \clef alto c c \grace { d16 } c8 c] c4
    c2 \grace { c16[ c16] } c2
  }
  \new Staff {
    c2 \tuplet 3/2 { c8 \clef bass cis,, c } c4
    c1
  }
>>
  ![[image of music]](../c2/lily-02d7ed1e.png)
強弱記号やテキスト スクリプトを縦方向に揃える
全ての DynamicLineSpanner オブジェクト (ヘアピンや強弱記号テキスト)
は、他のアイテムが邪魔しない限り、譜から少なくとも staff-padding だけ離れた基準線に配置されます。staff-padding を十分に大きくすると、強弱記号を揃えることができます。
また、\textLengthOn を用いて、テキスト スクリプトをベースラインに揃えることができます。
music = \relative c' {
  a'2\p b\f
  e4\p f\f\> g, b\p
  c2^\markup { \huge gorgeous } c^\markup { \huge fantastic }
}
{
  \music
  \break
  \override DynamicLineSpanner.staff-padding = #3
  \textLengthOn
  \override TextScript.staff-padding = #1
  \music
}
  ![[image of music]](../37/lily-1563a90c.png)
オッシアと歌詞の縦方向の揃え位置
このスニペットは、歌詞とオッシアの位置を調整するために
alignBelowContext と alignAboveContext コンテキスト
プロパティを使用する方法を示しています。
\paper {
  ragged-right = ##t
}
\relative c' <<
  \new Staff = "1" { c4 c s2 }
  \new Staff = "2" { c4 c s2 }
  \new Staff = "3" { c4 c s2 }
  { \skip 2
    <<
      \lyrics {
        \set alignBelowContext = #"1"
        lyrics4 below
      }
      \new Staff \with {
        alignAboveContext = #"3"
        fontSize = #-2
        \override StaffSymbol.staff-space = #(magstep -2)
        \remove "Time_signature_engraver"
      } {
        \tuplet 6/4 {
          \override TextScript.padding = #3
          c8[^"ossia above" d e d e f]
        }
      }
    >>
  }
>>
  ![[image of music]](../8f/lily-7b5b5fb8.png)