1.8.1 テキストを記述する

このセクションでは、楽譜にテキストを付け加えるいくつかの方法を紹介します。

Note: アクセント付きのテキストや特殊なテキスト (他の言語の文字など) を記述するには、単純にその文字を直接 LilyPond ファイルに挿入します。ファイルは UTF-8 で保存しなければなりません。更なる情報は テキスト エンコーディング を参照してください。


テキスト スクリプト

以下の例で示すように、シンプルな “引用符で囲まれたテキスト” 指示を楽譜に付け加えることができます。そのような指示は、向きと配置 で説明する構文を用いて、手動で譜の上または下に配置することができます。

a8^"pizz." g f e a4-"scherz." f

[image of music]

この構文は実際には短縮記法です。テキストをフォーマットする で記述されているように、\markup ブロックを用いて明示的に、より複雑なテキスト フォーマットを音符に付け加えることができます。

a8^\markup { \italic pizz. } g f e
a4_\markup { \tiny scherz. \bold molto } f

[image of music]

デフォルトでは、テキスト指示は音符の間隔に影響を与えません。しかしながら、テキスト指示の幅を考慮に入れることもできます: 以下の例では、最初のテキスト文字列は音符の間隔に影響を与えていませんが、2 番目のテキスト文字列は影響を与えています。

a8^"pizz." g f e
\textLengthOn
a4_"scherzando" f

[image of music]

テキスト スクリプトだけでなく、アーティキュレーションを音符に付けることもできます。更なる情報は アーティキュレーションと装飾 を参照してください。

テキスト スクリプトとアーティキュレーションの順序についての更なる情報は オブジェクトの配置 を参照してください。

定義済みコマンド

\textLengthOn, \textLengthOff

参照

学習マニュアル: オブジェクトの配置

記譜法リファレンス: テキストをフォーマットする, 向きと配置, アーティキュレーションと装飾

コード断片集: Text

内部リファレンス: TextScript

既知の問題と警告

テキスト スクリプトと歌詞がマージンに収まることを保証するためのチェックは計算量を増やします。処理速度を上げる必要がある場合は、以下を用います:

\override Score.PaperColumn #'keep-inside-line = ##f

テキスト スパナ

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

\override TextSpanner #'(bound-details left text) = "rit."
b1\startTextSpan
e,\stopTextSpan

[image of music]

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

\override TextSpanner #'(bound-details left text) =
  \markup { \upright "rit." }
b1\startTextSpan c
e,\stopTextSpan

[image of music]

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

定義済みコマンド

\textSpannerUp, \textSpannerDown, \textSpannerNeutral.

既知の問題と警告

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

Selected Snippets

Dynamics text spanner postfix

Custom text spanners can be defined and used with hairpin and text crescendos. \< and \> produce hairpins by default, \cresc etc. produce text spanners by default.

% Some sample text dynamic spanners, to be used as postfix operators
crpoco =
#(make-music 'CrescendoEvent
             'span-direction START
             'span-type 'text
             'span-text "cresc. poco a poco")

\relative c' {
  c4\cresc d4 e4 f4 |
  g4 a4\! b4\crpoco c4 |
  c4 d4 e4 f4 |
  g4 a4\! b4\< c4 |
  g4\dim a4 b4\decresc c4\!
}

[image of music]

Dynamics custom text spanner postfix

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 (parser location mymarkup) (markup?)
   (make-music 'CrescendoEvent
               'span-direction START
               'span-type 'text
               'span-text mymarkup))
mydecresc =
#(define-music-function (parser location 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
}

[image of music]

参照

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

コード断片集: Text , Expressive marks

内部リファレンス: TextSpanner


テキスト マーク

リハーサル記号 で記述されている構文を用いて、さまざまなテキスト要素を楽譜に付け加えることができます:

c4
\mark "Allegro"
c c c

[image of music]

この構文を用いることで、任意のテキストを小節線上に配置することが可能です。テキストをフォーマットする で記述されているように、\markup ブロックを用いてより複雑なテキスト フォーマットを付け加えることもできます:

<c e>1
\mark \markup { \italic { colla parte } }
<d f>2 <e g>
<c f aes>1

[image of music]

さらに、マークアップ内部での音楽記譜法 で説明されているように、この構文で適切なシンボル名を指定することによって、特殊な記号 – コーダ、セーニョ、フェルマータなど – を譜刻することが可能です:

<bes f>2 <aes d>
\mark \markup { \musicglyph #"scripts.ufermata" }
<e g>1

[image of music]

このようなオブジェクトを配置できる位置は、楽譜の最上段の譜の上だけです。オブジェクトを小節の終わりで指定するか、途中で指定するか次第で、小節線の上に配置されたり、音符の間に配置されたりします。改行位置で指定した場合、そのマークは次の行の先頭に譜刻されます。

\mark "Allegro"
c1 c
\mark "assai" \break
c  c

[image of music]

Selected Snippets

Printing marks at the end of a line

Marks can be printed at the end of the current line, instead of the beginning of the following line. In such cases, it might be preferable to align the right end of the mark with the bar line.

\relative c'' {
  g2 c
  d,2 a'
  \once \override Score.RehearsalMark #'break-visibility = #end-of-line-visible
  \once \override Score.RehearsalMark #'self-alignment-X = #RIGHT
  \mark "D.C. al Fine"
  \break
  g2 b,
  c1 \bar "||"
}

[image of music]

Aligning marks with various notation objects

If specified, text marks may be aligned with notation objects other than bar lines. These objects include ambitus, breathing-sign, clef, custos, staff-bar, left-edge, key-cancellation, key-signature, and time-signature.

In such cases, text marks will be horizontally centered above the object. However this can be changed, as demonstrated on the second line of this example (in a score with multiple staves, this setting should be done for all the staves).

\relative c' {
  e1

  % the RehearsalMark will be centered above the Clef
  \override Score.RehearsalMark #'break-align-symbols = #'(clef)
  \key a \major
  \clef treble
  \mark "↓"
  e1

  % the RehearsalMark will be centered above the TimeSignature
  \override Score.RehearsalMark #'break-align-symbols = #'(time-signature)
  \key a \major
  \clef treble
  \time 3/4
  \mark \markup { \char ##x2193 }
  e2.

  % the RehearsalMark will be centered above the KeySignature
  \override Score.RehearsalMark #'break-align-symbols = #'(key-signature)
  \key a \major
  \clef treble
  \time 4/4
  \mark \markup { \char ##x2193 }
  e1

  \break
  e1

  % the RehearsalMark will be aligned with the left edge of the KeySignature
  \once \override Score.KeySignature #'break-align-anchor-alignment = #LEFT
  \mark \markup { \char ##x2193 }
  \key a \major
  e1

  % the RehearsalMark will be aligned with the right edge of the KeySignature
  \once \override Score.KeySignature #'break-align-anchor-alignment = #RIGHT
  \key a \major
  \mark \markup { \char ##x2193 }
  e1

  % the RehearsalMark will be aligned with the left edge of the KeySignature
  % and then shifted right by one unit.
  \once \override Score.KeySignature #'break-align-anchor = #1
  \key a \major
  \mark \markup { \char ##x2193 }
  e1
}

[image of music]

Printing marks on every staff

Although text marks are normally only printed above the topmost staff, they may also be printed on every staff.

\score {
  <<
    \new Staff { c''1 \mark "molto" c'' }
    \new Staff { c'1 \mark "molto" c' }
  >>
  \layout {
    \context {
      \Score
      \remove "Mark_engraver"
      \remove "Staff_collecting_engraver"
    }
    \context {
      \Staff
      \consists "Mark_engraver"
      \consists "Staff_collecting_engraver"
    }
  }
}

[image of music]

参照

記譜法リファレンス: リハーサル記号, テキストをフォーマットする, マークアップ内部での音楽記譜法, The Feta font

コード断片集: Text

内部リファレンス: MarkEvent , Mark_engraver , RehearsalMark


独立したテキスト

\markup ブロックはそれ自体で、すべての \score ブロックの外側に、“最上位レベルの表記” として存在することができます。この構文は ファイル構造 で記述されています。

\markup {
  Tomorrow, and tomorrow, and tomorrow...
}

[image of music]

これによりテキストを音楽から分離して譜刻することが可能になります。これは、book の中にある複数の score で記述されているように、入力ファイルが複数の楽曲を保持している場合に特に有用です。

\score {
  c'1
}
\markup {
  Tomorrow, and tomorrow, and tomorrow...
}
\score {
  c'1
}

[image of music]

独立したテキスト ブロックは複数のページに広がることができます。これにより、テキスト ドキュメントやブック全体を LilyPond の中に譜刻することが可能になります。この機能と、この機能の構文は 複数ページにわたるマークアップ で記述されています。

定義済みコマンド

\markup, \markuplist

Selected Snippets

Stand-alone two-column markup

Stand-alone text may be arranged in several columns using \markup commands:

\markup {
  \fill-line {
    \hspace #1
    \column {
      \line { O sacrum convivium }
      \line { in quo Christus sumitur, }
      \line { recolitur memoria passionis ejus, }
      \line { mens impletur gratia, }
      \line { futurae gloriae nobis pignus datur. }
      \line { Amen. }
    }
    \hspace #2
    \column {
      \line { \italic { O sacred feast } }
      \line { \italic { in which Christ is received, } }
      \line { \italic { the memory of His Passion is renewed, } }
      \line { \italic { the mind is filled with grace, } }
      \line { \italic { and a pledge of future glory is given to us. } }
      \line { \italic { Amen. } }
    }
    \hspace #1
  }
}

[image of music]

参照

記譜法リファレンス: テキストをフォーマットする, ファイル構造, book の中にある複数の score, 複数ページにわたるマークアップ

コード断片集: Text

内部リファレンス: TextScript


他の言語: English, deutsch, español, français, italiano
About automatic language selection.

LilyPond — 記譜法リファレンス

inserted by FC2 system