テキスト スパナ

いくつかの演奏指示 – 例えば rallentandoaccelerando – は、テキストとして記述され、点線で複数の音符の上に伸ばされます。そのようなオブジェクト – “スパナ” と呼ばれます – は、以下の構文を用いることで、ある音符から他の音符までの範囲に作成することができます:

\relative {
  \override TextSpanner.bound-details.left.text = "rit."
  b'1\startTextSpan
  e,\stopTextSpan
}
[image of music]

譜刻される文字列はオブジェクト プロパティを通じてセットされます。デフォルトでは文字列はイタリック体で譜刻されます。しかしながら、テキストをフォーマットする で記述されているように、\markup ブロックを用いることで他の書体にすることができます。

\relative {
  \override TextSpanner.bound-details.left.text =
    \markup { \upright "rit." }
  b'1\startTextSpan c
  e,\stopTextSpan
}
[image of music]

テキスト文字列と同様に、線のスタイルもオブジェクト プロパティとして定義することができます。線スタイルの構文は ライン スタイル で記述されています。

定義済みコマンド

\textSpannerUp, \textSpannerDown, \textSpannerNeutral

既知の問題と警告

LilyPond が処理できるテキスト スパナは 1 ボイスにつき、1 つだけです。

Selected Snippets

Dynamics spanner with custom text

Postfix functions for custom crescendo text spanners. The spanners should start on the first note of the measure. One has to use -\mycresc, otherwise the spanner start will rather be assigned to the next note.

% Two functions for (de)crescendo spanners where you can explicitly
% give the spanner text.
mycresc =
#(define-music-function (mymarkup) (markup?)
   (make-music 'CrescendoEvent
               'span-direction START
               'span-type 'text
               'span-text mymarkup))
mydecresc =
#(define-music-function (mymarkup) (markup?)
   (make-music 'DecrescendoEvent
               'span-direction START
               'span-type 'text
               'span-text mymarkup))

\relative c' {
  c4-\mycresc "custom cresc" c4 c4 c4 |
  c4 c4 c4 c4 |
  c4-\mydecresc "custom decresc" c4 c4 c4 |
  c4 c4 c4 c4 |
  c4 c4\! c4 c4
}
[image of music]

参照

記譜法リファレンス: ライン スタイル, 強弱記号, テキストをフォーマットする

コード断片集: Text, Expressive marks

内部リファレンス: TextSpanner


LilyPond 記譜法リファレンス v2.25.32 (development-branch).