@c -*- coding: utf-8; mode: texinfo; documentlanguage: ja -*-
@ignore
- Translation of GIT committish: 10fbcf1752dc0bec6ad1101c6948a94529128586
+ Translation of GIT committish: d5647c5fd1c38d4124d2374725b923f4901f3661
When revising a translation, copy the HEAD committish of the
version that you are working on. For details, see the Contributors'
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.14.0"
+@c \version "2.17.6"
@c Translators: Yoshiki Sawada
@c Translation status: post-GDP
このマニュアルは利用可能なすべての変数、関数、それにオプションを@c
リストアップしています。@c
これは HTML ドキュメントとして記述されていて、@c
-@uref{http://@/lilypond@/.org/@/doc/@/stable/@/Documentation/@/user/@/lilypond@/-internals/,オンライン}
+@uref{http://@/lilypond@/.org/@/doc/@/stable/@/Documentation/@/internals/,オンライン}
で入手可能であり、@c
LilyPond ドキュメント パッケージにも含まれています。
* コンテキストのプラグインを変更する::
* コンテキストのデフォルト設定を変更する::
* 新しいコンテキストを定義する::
-* ã\82³ã\83³ã\83\86ã\82ã\82¹ã\83\88ã\82\92æ\8f\83ã\81\88ã\82\8b::
+* ã\82³ã\83³ã\83\86ã\82ã\82¹ã\83\88ã\81®é\85\8dç½®é \86åº\8f::
@end menu
-
@seealso
学習マニュアル:
@rlearning{コンテキストとエングラーバ}
-インストール済みファイル:
+インストールされているファイル:
@file{ly/@/engraver@/-init@/.ly},
@file{ly/@/performer@/-init@/.ly}
プロパティを保存するだけなく、@c
@q{エングラーバ} と呼ばれる記譜要素を作成するプラグインを保持します。@c
例えば、@code{Voice} コンテキストは @code{Note_head_engraver} を保持し、@c
-@code{Staff} コンテキストは @code{Key_signature_engraver} を保持します。
+@code{Staff} コンテキストは @code{Key_engraver} を保持します。
各プラグインについての説明は、
@ifhtml
@code{Staff} コンテキストへ異動させることにより、@c
楽譜の各譜に独自の拍子記号を持たせることが可能になります。
-@cindex polymetric scores (複合拍子楽譜)
+@cindex polymetric scores (多拍子の楽譜)
@cindex Time signatures, multiple (複数の拍子記号)
@lilypond[quote,relative=1,ragged-right,verbatim,fragment]
@knownissues
+エングラーバを指定する順序は、エングラーバが処理を行う順序です。@c
通常、エングラーバが指定される順序は問題にはなりません。@c
しかしながら、いくつかの特殊なケースでは、この順序が重要になります。@c
例えば、あるエングラーバがプロパティを記述して、@c
それを他のエングラーバが読む場合、あるいは、@c
あるエングラーバがグラフィカル オブジェクトを作成し、@c
それを他のエングラーバが処理しなければならない場合です。@c
-エングラーバは指定された順序に従って呼び出され、処理を実行します。
以下の順序は重要です:
-通常、@code{Bar_engraver} を最初に指定し、@c
-@code{New_fingering_engraver} を @code{Script_column_engraver} の前で@c
-指定する必要があります。@c
-他にも指定順序が問題になるケースがあるかもしれません。
+
+@itemize
+@item
+通常、@code{Bar_engraver} を最初にする必要があります。
+
+@item
+@code{New_fingering_engraver} を @code{Script_column_engraver} の前に@c
+配置する必要があります。
+
+@item
+@code{Timing_translator} を @code{Bar_number_engraver} の前に配置する@c
+必要があります。
+
+@end itemize
+
+@seealso
+インストールされているファイル:
+@file{ly/engraver-init.ly}
@node コンテキストのデフォルト設定を変更する
@subsection コンテキストのデフォルト設定を変更する
@translationof Changing context default settings
-@code{Score}, @code{Staff} それに @code{Voice} コンテキストにおいて@c
-デフォルトで使用されるコンテキスト設定は、以下の例で示すように、@c
-@code{\layout} ブロックの中で指定することができます。@c
-@code{\layout} ブロックは、それを適用する @code{\score} ブロックの中で、かつ、@c
-音楽表記の外側に配置する必要があります。
+@cindex default context properties, changing (デフォルトのコンテキスト プロパティを変更する)
+@cindex context properties, changing defaults (デフォルトのコンテキスト プロパティを変更する)
+
+@ref{Modifying properties} で説明したように、コンテキストとグラフィカル
+オブジェクトのプロパティを @code{\set} コマンドや @code{\override}
+コマンドで変更することができます。@c
+これらのコマンドは音楽イベントを生成して、楽譜処理中にコマンドが出現する@c
+ポイントで変更に効果を発揮させます。
+
+対照的に、このセクションではコンテキストが作成された時点でコンテキストと@c
+グラフィカル オブジェクトのプロパティの @emph{デフォルト} 値を変更する@c
+方法を説明します。@c
+これを行う方法は 2 つあります。@c
+1 つはある特定のタイプの全コンテキストのデフォルト値を変更する方法で、@c
+もう 1 つはただ 1 つのコンテキストのインスタンスのデフォルト値を変更する@c
+方法です。
+
+@menu
+* 同じタイプの全コンテキストを変更する::
+* 指定したコンテキストだけを変更する::
+* 適用順序::
+@end menu
-以下のような方法でコンテキストのデフォルト値を指定する場合、@c
-@code{\set} コマンドとコンテキストを@c
-省略する必要があるということに注意してください:
+@node 同じタイプの全コンテキストを変更する
+@unnumberedsubsubsec 同じタイプの全コンテキストを変更する
+@translationof Changing all contexts of the same type
+
+@cindex \context in \layout block (\layout ブロックの中の \context)
+@funindex \context
+@funindex \layout
+
+@code{Score}, @code{Staff}, @code{Voice}, その他のコンテキストにおいて@c
+デフォルトで使用されるコンテキスト設定は、@code{\layout} ブロックの中の@c
+@code{\context} ブロックでで指定することができます。@c
+@code{\layout} ブロックは、それを適用する @code{\score} ブロックの中で、@c
+かつ、音楽表記の後に配置する必要があります。
+
+@example
+\layout @{
+ \context @{
+ \Voice
+ [すべての Voice コンテキストのコンテキスト設定]
+ @}
+ \context @{
+ \Staff
+ [context settings for all Staff contexts]
+ @}
+@}
+@end example
+
+以下のタイプの設定を指定することができます:
+
+@itemize
+@item
+@code{\override} コマンド -- コンテキスト名を省略します
@lilypond[quote,verbatim]
\score {
\relative c'' {
- a4^"Really small, thicker stems, no time signature" a a a
- a a a a
+ a4^"Thicker stems" a a a
+ a4 a a\ff a
+ }
+ \layout {
+ \context {
+ \Staff
+ \override Stem.thickness = #4.0
+ }
+ }
+}
+@end lilypond
+
+@item
+コンテキスト プロパティを直接設定します
+
+@lilypond[quote,verbatim]
+\score {
+ \relative c'' {
+ a4^"Smaller font" a a a
+ a4 a a\ff a
}
\layout {
\context {
\Staff
fontSize = #-4
- \override Stem #'thickness = #4.0
- \remove "Time_signature_engraver"
}
}
}
@end lilypond
-上記の例の中で、@code{\Staff} コマンドは、@c
-後に続く記述をその score ブロックの中にあるすべての譜に適用するということを@c
-指定しています。
+@item
+@code{\dynamicUp} や @code{\accidentalStyle dodecaphonic} のような音楽@c
+表記等、あらかじめ定義されているコマンド
-同様の方法で、@c
-@code{Score} コンテキストや @code{Voice} コンテキストに@c
-変更を適用することができます。
+@lilypond[quote,verbatim]
+\score {
+ \relative c'' {
+ a4^"Dynamics above" a a a
+ a4 a a\ff a
+ }
+ \layout {
+ \context {
+ \Voice
+ \dynamicUp
+ }
+ \context {
+ \Staff
+ \accidentalStyle dodecaphonic
+ }
+ }
+}
+@end lilypond
-@knownissues
+@item
+@code{\with} ブロックを有するユーザ定義変数 -- @code{\with} ブロックの@c
+詳細は @ref{Changing just one specific context} を参照してください。
-変数に加えられたコンテキストの変更を収集すること、それに、@c
-その変数を参照することでそれらの変更を @code{\context} 定義に@c
-適用することはできません。
+@lilypond[quote,verbatim]
+StaffDefaults = \with {
+ fontSize = #-4
+}
-@code{\RemoveEmptyStaffContext} はカレントの
-@code{\Staff} 設定を上書きします。@c
-@code{\RemoveEmptyStaffContext} を使用する staff
-のデフォルト設定を変更したいのならば、@c
-@code{\RemoveEmptyStaffContext} を呼び出した後に@c
-変更を加える必要があります。@c
-つまり、以下のようにします:
+\score {
+ \new Staff {
+ \relative c'' {
+ a4^"Smaller font" a a a
+ a4 a a a
+ }
+ }
+ \layout {
+ \context {
+ \Staff
+ \StaffDefaults
+ }
+ }
+}
+@end lilypond
-@example
-\layout @{
- \context @{
- \RemoveEmptyStaffContext
+@end itemize
- \override Stem #'thickness = #4.0
- @}
+プロパティ設定コマンドは、@code{\context} ブロックで囲まずに、@c
+@code{\layout} ブロックの中に配置することができます。@c
+そのような設定は、指定されたタイプの任意のコンテキストの開始時に@c
+プロパティ設定コマンドをインクルードするのと等価です。@c
+コンテキストを指定しない場合、@emph{すべての} 下位コンテキストに影響を@c
+与えます -- @ref{Bottom-level contexts - voices} を参照してください。@c
+@code{\layout} ブロックの中でのプロパティ設定コマンドの構文は、@c
+音楽ストリームの中で同じコマンドを記述するのと同じです。
+
+@lilypond[quote,verbatim]
+\score {
+ \new Staff {
+ \relative c'' {
+ a4^"Smaller font" a a a
+ a4 a a a
+ }
+ }
+ \layout {
+ \accidentalStyle dodecaphonic
+ \set fontSize = #-4
+ \override Voice.Stem.thickness = #4.0
+ }
+}
+@end lilypond
+
+
+@node 指定したコンテキストだけを変更する
+@unnumberedsubsubsec 指定したコンテキストだけを変更する
+@translationof Changing just one specific context
+
+@cindex \with
+@funindex \with
+
+@code{\with} ブロックで指定したコンテキスト インスタンスのコンテキスト
+プロパティだけを変更することができます。@c
+他の全ての同じタイプのコンテキスト インスタンスは、LilyPond に組み込まれて@c
+スコープ内の @code{\layout} ブロックによって変更されたデフォルト設定の@c
+ままです。@c
+@code{\with} ブロックは @code{\new} @var{context-type} コマンドの直後に@c
+配置する必要があります:
+
+@example
+\new Staff
+\with @{
+ [このコンテキスト インスタンスだけに適用されるコンテキスト設定]
+@} @{
+...
@}
@end example
-@c TODO: add \with in here.
+以下のタイプの設定を指定することができます:
+
+@itemize
+@item
+@code{\override} コマンド -- コンテキスト名を省略します
+
+@lilypond[quote,verbatim]
+\score {
+ \new Staff {
+ \new Voice
+ \with {
+ \override Stem.thickness = #4.0
+ }
+ {
+ \relative c'' {
+ a4^"Thick stems" a a a
+ a4 a a a
+ }
+ }
+ }
+}
+@end lilypond
+
+@item
+コンテキスト プロパティを直接設定します
+
+@lilypond[quote,verbatim]
+\score {
+ <<
+ \new Staff {
+ \relative c'' {
+ a4^"Default font" a a a
+ a4 a a a
+ }
+ }
+ \new Staff
+ \with {
+ fontSize = #-4
+ } {
+ \relative c'' {
+ a4^"Smaller font" a a a
+ a4 a a a
+ }
+ }
+ >>
+}
+@end lilypond
+
+@item
+@code{\dynamicUp} 等のあらかじめ定義されているコマンド
+
+@lilypond[quote,verbatim]
+\score {
+ <<
+ \new Staff {
+ \new Voice {
+ \relative c'' {
+ a4^"Dynamics below" a a a
+ a4 a a\ff a
+ }
+ }
+ }
+ \new Staff
+ \with { \accidentalStyle dodecaphonic }
+ {
+ \new Voice
+ \with { \dynamicUp }
+ {
+ \relative c'' {
+ a4^"Dynamics above" a a a
+ a4 a a\ff a
+ }
+ }
+ }
+ >>
+}
+@end lilypond
+
+@end itemize
+
+@node 適用順序
+@unnumberedsubsubsec 適用順序
+@translationof Order of precedence
+
+ある特定のタイミングで適用されるプロパティの値は以下のように決定されます:
+
+@itemize
+@item
+入力ストリームの中の @code{\override} コマンドや @code{\set} コマンドが
+ある場合、その値が用いられます。
+
+@item
+さもなければ、コンテキスト初期宣言の @code{\with} から取得したデフォルト値@c
+が用いられます。
+
+@item
+さもなければ、@code{\layout} ブロックの中にある直近で適切な @code{\context}
+ブロックから取得したデフォルト値が用いられます。
+
+@item
+さもなければ、LilyPond の組み込みデフォルト値が用いられます。
+@end itemize
+
+@seealso
+学習マニュアル:
+@rlearning{Modifying context properties}
+
+記譜法リファレンス:
+@ref{Contexts explained},
+@ref{Bottom-level contexts - voices},
+@ref{The set command},
+@ref{The override command},
+@ref{The \layout block}
@node 新しいコンテキストを定義する
\consists "Note_heads_engraver"
\consists "Rhythmic_column_engraver"
\consists "Text_engraver"
- \consists Pitch_squash_engraver
+ \consists "Pitch_squash_engraver"
squashedPosition = #0
- \override NoteHead #'style = #'slash
- \override Stem #'transparent = ##t
+ \override NoteHead.style = #'slash
+ \override Stem.transparent = ##t
+ \override Flag.transparent = ##t
\alias Voice
}
\context { \Staff
それらの機能を提供するエングラーバを付け加える必要があります:
@example
-\consists Note_heads_engraver
-\consists Text_engraver
+\consists "Note_heads_engraver"
+\consists "Text_engraver"
@end example
しかしながら、音符の代わりにスラッシュを譜の中央線上に配置します:
@example
-\consists Pitch_squash_engraver
+\consists "Pitch_squash_engraver"
squashedPosition = #0
@end example
音符はスラッシュで、符幹を持ちません:
@example
-\override NoteHead #'style = #'slash
-\override Stem #'transparent = ##t
-\override Flag #'transparent = ##t
+\override NoteHead.style = #'slash
+\override Stem.transparent = ##t
+\override Flag.transparent = ##t
@end example
これらのプラグインすべてが共同する必要があり、@c
\type "Engraver_group"
\consists "Note_heads_engraver"
\consists "Text_engraver"
- \consists Pitch_squash_engraver
+ \consists "Pitch_squash_engraver"
squashedPosition = #0
- \override NoteHead #'style = #'slash
- \override Stem #'transparent = ##t
- \override Flag #'transparent = ##t
+ \override NoteHead.style = #'slash
+ \override Stem.transparent = ##t
+ \override Flag.transparent = ##t
\alias Voice
@}
@end example
@end example
-@node ã\82³ã\83³ã\83\86ã\82ã\82¹ã\83\88ã\82\92æ\8f\83ã\81\88ã\82\8b
-@subsection ã\82³ã\83³ã\83\86ã\82ã\82¹ã\83\88ã\82\92æ\8f\83ã\81\88ã\82\8b
-@translationof Aligning contexts
+@node ã\82³ã\83³ã\83\86ã\82ã\82¹ã\83\88ã\81®é\85\8dç½®é \86åº\8f
+@subsection ã\82³ã\83³ã\83\86ã\82ã\82¹ã\83\88ã\81®é\85\8dç½®é \86åº\8f
+@translationof Context layout order
-新しいコンテキストを既存のコンテキストの上または下に揃えることができます。@c
-これはボーカル譜 (@rlearning{合唱}) を組む場合やオッシアで役に立ちます。
+@cindex contexts, layout order (コンテキストの配置順序)
+@funindex \accepts
+@funindex \denies
-@c TODO Better example needed. Ref LM, and expand on it.
+通常、コンテキストは入力ファイルの中で記述した順に楽譜の段の上から下に@c
+配置されます。@c
+コンテキストがネストされている場合、外側のコンテキストは入力ファイルの@c
+中で指定されたコンテキストを内側に保持して、内側のコンテキストは外側の@c
+コンテキストの @qq{accepts} リストに含まれます。@c
+ネストされたコンテキストのうち外側のコンテキストの @qq{accepts} リスト@c
+に含まれないものは、ネストされずに外側のコンテキストの下に再配置されます。
+
+コンテキストの @qq{accepts} リストを @code{\accepts} コマンドと
+@code{\denies} コマンドで変更することができます。@c
+@code{\accepts} はコンテキストを @qq{accepts} リストに追加して、@c
+@code{\denies} は @qq{accepts} リストからコンテキストを削除します。@c
+例えば、通常、コード ネームは @code{Staff} コンテキストの中にネスト@c
+されないため、@code{ChordNames} コンテキストはデフォルトでは @code{Staff}
+コンテキストの @qq{accepts} リストには含まれませんが、リストに含める必要が@c
+あれば含めることができます:
-@cindex ossia (オッシア)
-@funindex alignAboveContext
-@funindex alignBelowContext
+@lilypond[verbatim,quote]
+\score {
+ \new Staff {
+ c' d' e' f'
+ \chords { d1:m7 b1:min7.5- }
+ }
+}
+@end lilypond
-@lilypond[quote,ragged-right]
-ossia = { f4 f f f }
-\score{
- \relative c' \new Staff = "main" {
- c4 c c c
- <<
- \new Staff \with { alignAboveContext = #"main" } \ossia
- { d8 f d f d f d f }
- >>
+@lilypond[verbatim,quote]
+\score {
+ \new Staff {
+ c' d' e' f'
+ \chords { d1:m7 b1:min7.5- }
+ }
+ \layout {
+ \context {
+ \Staff
+ \accepts "ChordNames"
+ }
}
}
@end lilypond
-@cindex nested contexts (ネストされたコンテキスト)
-@cindex contexts, nested (ネストされたコンテキスト)
+@code{\denies} は主に、他のコンテキストをベースに新しいコンテキストを@c
+作成した時に、中にネストするコンテキストを変更するために用いられます。
-@funindex \accepts
-@funindex \denies
+例えば、@code{VaticanaStaff} コンテキストは @code{Staff} コンテキストを@c
+ベースにしていますが、@qq{accepts} リストでは @code{Voice} コンテキスト@c
+の代わりに @code{VaticanaVoice} コンテキストを保持しています。
-@code{PianoStaff} のようなコンテキストは、@c
-ネスト (入れ子) 構造をとって、@c
-他のコンテキストを内部に保持することができます。@c
-ネスト構造をとることができるコンテキストは、@c
-コンテキストの @qq{accepts} リストによって定義されています。@c
-このリストには存在しないコンテキストは、楽譜が譜刻されるとき、@c
-(@code{PianoStaff} などの) 親コンテキストの下に配置されます。@c
-例えば、@code{PianoStaff} コンテキストは、デフォルトで、@c
-@code{Staff} と @code{FiguredBass} コンテキストを内部に受け入れるよう@c
-定義されていますが、(例えば) @code{Lyrics} コンテキストは受け入れません。@c
-そのため、以下の例では、歌詞は 2 つの譜の間ではなく、@c
-ピアノ譜の下に配置されています:
+コンテキストに保持されるべきコマンドが出現して、それを保持するための@c
+適切なコンテキストが存在しない場合、コンテキストが暗黙的に作成される@c
+ということに注意してください。@c
+これは予期しない譜や楽譜を生み出す可能性があります。
-@lilypond[verbatim,quote,relative=1]
-\new PianoStaff
-<<
- \new Staff { e4 d c2 }
- \addlyrics { Three blind mice }
- \new Staff {
- \clef "bass"
- { c,1 }
- }
->>
-@end lilypond
+@cindex alignAboveContext
+@cindex alignBelowContext
+@funindex alignAboveContext
+@funindex alignBelowContext
-コンテキストの @qq{accepts} リストを変更することで、
-ネストされるコンテキストを追加するができます。@c
-ですから、歌詞を 2 つの譜の間に表示させたいのなら、以下のようにします:
+短い期間、あるコンテキストを存在させる必要がある場合があります。@c
+オッシアの譜コンテキストが良い例です。@c
+通常、これは主音楽の対応するセクションと並列に、適切な場所でコンテキスト@c
+定義を行うことで実現します。@c
+デフォルトでは、一時コンテキストは既存のすべてのコンテキストの下に配置@c
+されます。@c
+@qq{main} というコンテキストの上に配置し直すには以下のようにします:
-@lilypond[verbatim,quote,relative=1]
-\new PianoStaff \with { \accepts Lyrics }
-<<
- \new Staff { e4 d c2 }
- \addlyrics { Three blind mice }
- \new Staff {
- \clef "bass"
- { c,1 }
- }
->>
-@end lilypond
+@example
+@code{\new Staff \with @{ alignAboveContext = #"main" @} }
+@end example
-@code{\accepts} の反対は @code{\denies} です。@c
-これはコンテキストを @qq{accepts} リストから削除します。
+@code{ChoirStaff} のような複数の譜のレイアウトで一時的な歌詞を配置する場合
+-- 例えば、繰り返しセクションに 2 番目の歌詞を追加する場合 --
+にも同様な状況が発生します。@c
+デフォルトでは、一時的な歌詞は下段の譜の下に配置されます。@c
+一時的な歌詞コンテキストを @code{alignBelowContext} で定義することにより、@c
+1 番目の歌詞を保持する (名前付きの) 歌詞コンテキストの下に配置することが@c
+できます。
+
+一時コンテキストを再配置する例は他にもあります
+-- @rlearning{Nesting music expressions}、+@ref{Modifying single staves}、@c
+それに @ref{Techniques specific to lyrics} を参照してください。
+
+@seealso
+学習マニュアル:
+@rlearning{Nesting music expressions}
+
+記譜法リファレンス:
+@ref{Modifying single staves},
+@ref{Techniques specific to lyrics}
+
+アプリケーション使用方法:
+@rprogram{An extra staff appears}
+
+インストールされているファイル:
+@file{ly/engraver-init.ly}
@node 内部リファレンスの説明
@menu
* 内部リファレンスを使いこなす::
* レイアウト インターフェイス::
-* グラフィカル オブジェクトを決定する::
+* グラフィカル オブジェクト プロパティを決定する::
* 命名規約::
@end menu
(@rinternals{fingering-event}:
音楽イベント タイプ @code{fingering-event} は
@rinternals{FingeringEvent} という名前の音楽表記の中にあります)
-
@end itemize
このパスは、プログラム内部での情報フローとは逆向きです:
この定義から直接生成されたに過ぎません。
-@node グラフィカル オブジェクトを決定する
-@subsection グラフィカル オブジェクトを決定する
+@node グラフィカル オブジェクト プロパティを決定する
+@subsection グラフィカル オブジェクト プロパティを決定する
@translationof Determining the grob property
@c TODO remove this (it's in the LM)
以下のコマンドは、音符と運指記号の間に 3 譜スペースを挿入します:
@example
-\once \override Voice.Fingering #'padding = #3
+\once \override Voice.Fingering.padding = #3
@end example
このコマンドを @code{Fingering} オブジェクトが作成される前に挿入する
-- つまり @code{c2} の前に挿入する -- と、以下のような結果が得られます:
@lilypond[quote,relative=2,fragment,verbatim]
-\once \override Voice.Fingering #'padding = #3
+\once \override Voice.Fingering.padding = #3
c-2
\stemUp
f
@quotation
Fingering_engraver is part of contexts: @dots{} @rinternals{Voice}
+
(Fingering_engraver は次のコンテキストの一部です: @dots{} @rinternals{Voice})
@end quotation
-- 例: as-scheme-functions
@item グラフィカル オブジェクト インターフェイス: Scheme スタイルです
-- 例: scheme-style
-@c 未訳
@item バックエンド プロパティ: Scheme スタイルです (が、X と Y があります!)
@item コンテキスト (それに、音楽表記とグラフィカル オブジェクト):
大文字で始まる単語、あるいはそれらをつなげます
The command
@verbatim
-\override Staff.Stem #'thickness = #4.0
+\override Staff.Stem.thickness = #4.0
@end verbatim
@noindent
@lilypond[quote,verbatim,relative=2,fragment]
c4
-\override Staff.Stem #'thickness = #4.0
+\override Staff.Stem.thickness = #4.0
c4
c4
c4
@lilypond[quote,fragment,verbatim,relative=2]
c4
-\once \override Stem #'thickness = #4.0
+\once \override Stem.thickness = #4.0
c4
c4
@end lilypond
when the object is created. In this example,
@lilypond[quote,fragment,verbatim,relative=2]
-\override Slur #'thickness = #3.0
+\override Slur.thickness = #3.0
c8[( c
-\override Beam #'thickness = #0.6
+\override Beam.thickness = #0.6
c8 c])
@end lilypond
@code{\revert} in the next example does not do anything.
@example
-\override Voice.Stem #'thickness = #4.0
-\revert Staff.Stem #'thickness
+\override Voice.Stem.thickness = #4.0
+\revert Staff.Stem.thickness
@end example
Some tweakable options are called @q{subproperties} and reside inside
such as
@example
-\override Stem #'(details beamed-lengths) = #'(4 4 3)
+\override Stem.details.beamed-lengths = #'(4 4 3)
@end example
@end ignore
@end ifnothtml
@seealso
-
内部リファレンス:
-
@rinternals{Tunable context properties}
-
@cindex grob properties (グラフィカル オブジェクト プロパティ)
@cindex properties, grob (グラフィカル オブジェクト プロパティ)
@funindex \override
@lilypond[quote,verbatim,relative=2]
c4 c
-\override Voice.Stem #'thickness = #3.0
+\override Voice.Stem.thickness = #3.0
c4 c
@end lilypond
context is used:
@lilypond[quote,verbatim,relative=2]
-{ \override Staff.Stem #'thickness = #3.0
+{ \override Staff.Stem.thickness = #3.0
<<
{
e4 e
- \override Stem #'thickness = #0.5
+ \override Stem.thickness = #0.5
e4 e
} \\ {
c4 c c c
@lilypond[quote,verbatim,relative=2]
c4
-\override Voice.Stem #'thickness = #3.0
+\override Voice.Stem.thickness = #3.0
c4 c
-\revert Voice.Stem #'thickness
+\revert Voice.Stem.thickness
c4
@end lilypond
<<
{
e4
- \override Staff.Stem #'thickness = #3.0
+ \override Staff.Stem.thickness = #3.0
e4 e e
} \\ {
c4 c c
- \revert Staff.Stem #'thickness
+ \revert Staff.Stem.thickness
c4
}
>>
{
<<
{
- \override Stem #'thickness = #3.0
+ \override Stem.thickness = #3.0
e4 e e e
} \\ {
c4
- \once \override Stem #'thickness = #3.0
+ \once \override Stem.thickness = #3.0
c4 c c
}
>>
Commands which change output generally look like
@example
-\override Voice.Stem #'thickness = #3.0
+\override Voice.Stem.thickness = #3.0
@end example
@noindent
properties. To tweak those, use commands in the form
@example
-\override Stem #'(details beamed-lengths) = #'(4 4 3)
+\override Stem.details.beamed-lengths = #'(4 4 3)
@end example
@cindex internal documentation
@end ignore
@seealso
-
内部リファレンス:
@rinternals{Backend}
@code{\tweak} コマンドは以下のような構文を持ちます:
@example
-\tweak #'@code{grob-property} #@code{value}
+\tweak @var{layout-object} #'@var{grob-property} @var{value}
@end example
+@code{layout-object} の指定はオプションです。@c
@code{\tweak} コマンドは、音楽の流れの中で
-@code{value} のすぐ後に現れるオブジェクトに変更を適用します。
+@code{value} のすぐ後に現れる音楽オブジェクトに変更を適用します。
@ignore
In some cases, it is possible to take a short-cut for tuning
@lilypond[relative=2,verbatim,quote]
< c
- \tweak #'color #red
+ \tweak color #red
d
g
- \tweak #'duration-log #1
+ \tweak duration-log #1
a
> 4
--\tweak #'padding #8
+-\tweak padding #8
-^
@end lilypond
So, this works:
@lilypond[relative=2,verbatim,quote]
-<\tweak #'color #red c>4
+<\tweak color #red c>4
@end lilypond
@noindent
but this does not:
@lilypond[relative=2,verbatim,quote]
-\tweak #'color #red c4
+\tweak color #red c4
@end lilypond
@end ignore
@lilypond[relative=2,verbatim,quote]
< c
- \tweak #'color #red
+ \tweak color #red
d
g
- \tweak #'duration-log #1
+ \tweak duration-log #1
a
> 4
@end lilypond
@code{\tweak} を用いて、スラーを変更することができます:
@lilypond[verbatim,quote,relative=1]
-c-\tweak #'thickness #5 ( d e f)
+c-\tweak thickness #5 ( d e f)
@end lilypond
入力ファイルが音楽の流れに変換されたときに、@c
@code{\tweak} コマンドのすぐ後に@c
変更が適用されるオブジェクトが配置されている必要があります。
-LilyPond は、構文解釈処理時に、@c
-追加のオブジェクトを音楽の流れの中に挿入する場合があります。@c
-例えば、明示的には和音の一部になっていない音符を、@c
-LilyPond が音符の中に配置する場合があります。@c
-そのため、@code{\tweak} で変更される音符は、@c
-和音構造の中に配置されている必要があります:
+和音全体に対する調整は何の効果もありません。@c
+なぜなら、和音の音楽イベントはコンテナと機能するだけで、すべてのレイアウト
+オブジェクトは @code{EventChord} の内部にあるイベントによって作成される@c
+からです:
+
+@lilypond[relative=2,verbatim,quote]
+\tweak color #red c4
+\tweak color #red <c e>4
+<\tweak color #red c e>4
+@end lilypond
+
+単純な @code{\tweak} コマンドでは入力から直接作成されないオブジェクトを@c
+変更することはできません。@c
+特に、符幹、自動連桁、それに臨時記号には効果を持ちません。@c
+なぜなら、それらは入力ストリームの中の音楽要素によって生成される@c
+のではなく、後になって @code{NoteHead} レイアウト オブジェクトによって@c
+生成されるからです。
+
+そのような直接作成されないレイアウト オブジェクトは、明示的な形式の
+@code{\tweak} コマンドを用いることで調整することができます:
@lilypond[relative=2,verbatim,quote]
-\tweak #'color #red c4
-<\tweak #'color #red c>4
+\tweak Stem.color #red
+\tweak Beam.color #green c8 e
+<c e \tweak Accidental.font-size #-3 ges>4
@end lilypond
-@code{\tweak} コマンドは、@c
-入力ファイルの中で明示的に記述されていないオブジェクトを@c
-変更するために用いることはできません。@c
-特に、符幹、連桁、あるいは臨時記号を直接変更することはできません。@c
-なぜなら、それらは入力の中にある音楽要素の後ではなく、@c
-符頭の後に生成されるからです。@c
-さらに、音部記号や拍子記号を変更することもできません。@c
-なぜなら、コンテキストを指定するために必要とされる追加要素の自動挿入により、@c
-それらは前に配置された @code{\tweak} コマンドとは分離されるからです。@c
+@code{\tweak} コマンドで音部記号や拍子記号を変更することはできません。@c
+なぜなら、コンテキストを指定するために必要とされる追加要素の自動挿入に@c
+より、それらは前に配置された @code{\tweak} コマンドとは分離されるから@c
+です。
記譜要素の前に複数の @code{\tweak} コマンドを配置することができます
-- それらはすべて効果を持ちます:
@lilypond[verbatim,quote,relative=1]
c
--\tweak #'style #'dashed-line
--\tweak #'dash-fraction #0.2
--\tweak #'thickness #3
--\tweak #'color #red
+-\tweak style #'dashed-line
+-\tweak dash-fraction #0.2
+-\tweak thickness #3
+-\tweak color #red
\glissando
f'
@end lilypond
あるいは、@c
@code{\tweak} の適用で入力を調整する方法を決定するときに役に立つかもしれません。
-
@seealso
学習マニュアル:
@rlearning{調整手段}
拡張:
@rextend{Displaying music expressions}
-
@knownissues
-
-@cindex tweaks in a variable (変数の中での調整)
-@code{\tweak} コマンドを変数の中で用いることはできません。
-
-@cindex tweaks in lyrics (歌詞の中での調整)
-@code{\tweak} コマンドを @code{\lyricmode} の中で用いることはできません。
-
-@cindex tweaking control points (制御ポイントを調整する)
-@cindex control points, tweaking (制御ポイントを調整する)
-
-@code{\tweak} コマンドは、和音の中で生成される複数のタイのうち、@c
-最初のタイだけに適用されます。
-
+@code{\tweak} コマンドで和音の中にある複数のタイのうち 1 つだけの位置を@c
+変更することはできません。@c
+入力ファイルの中で最初に遭遇したタイの位置を変更してしまいます。
@node set 対 override
@subsection @code{\set} 対 @code{\override}
@translationof set versus override
-TODO -- This section is probably unnecessary now.
+@c TODO -- This section is probably unnecessary now.
@ignore
We have seen two methods of changing properties: @code{\set} and
% 譜間スペースを減らします
\new PianoStaff \with {
% this is the nested declaration
- \override StaffGrouper #'staff-staff-spacing #'basic-distance = #7
+ \override StaffGrouper.staff-staff-spacing.basic-distance = #7
} <<
\new Staff { \clef treble c''1 }
\new Staff { \clef bass c1 }
@lilypond[quote,verbatim]
\new PianoStaff \with {
- \override StaffGrouper #'staff-staff-spacing =
+ \override StaffGrouper.staff-staff-spacing =
#'((basic-distance . 0)
(minimum-distance . 0)
(padding . 0)
このため、以下の 2 つの宣言は等価です:
@example
-\override StaffGrouper #'staff-staff-spacing =
+\override StaffGrouper.staff-staff-spacing =
#'((basic-distance . 7))
-\override StaffGrouper #'staff-staff-spacing =
+\override StaffGrouper.staff-staff-spacing =
#'((basic-distance . 7)
(minimum-distance . 0)
(padding . 0)
@menu
* 入力モード::
* 向きと配置::
-* コンテキスト レイアウトの順序::
* 距離と距離の単位::
* 譜記号プロパティ::
* スパナ::
入力ファイルの中に保持されている記譜を解釈する方法は、@c
カレントの入力モードによって決定されます。
-@strong{コード モード}
+@strong{和音モード}
このモードは @code{\chordmode} コマンドで有効になり、@c
入力はコード記譜法の構文で解釈されるようになります。@c
@ref{Chord notation} を参照してください。@c
コードは、譜面上に音符として描画されます。
-コード モードは @code{\chords} コマンドでも有効になります。@c
+和音モードは @code{\chords} コマンドでも有効になります。@c
このコマンドは新たに @code{ChordNames} コンテキストも作成します。@c
入力はコード記譜法の構文で解釈され、@c
さらに @code{ChordNames} コンテキストの中にコード ネームとして描画されます。@c
@noindent
ここで、@code{xxxNeutral} は @qq{デフォルトの向きを使用する}
ことを意味します。@c
-@rlearning{譜表内部オブジェクト} を参照してください。
+@rlearning{譜内部オブジェクト} を参照してください。
いくつかのケースでは
-- 一般的な例としてはアルペジオしかありません --
c2( c)
@end lilypond
-
-@node コンテキスト レイアウトの順序
-@subsection コンテキスト レイアウトの順序
-@translationof Context layout order
-
-@cindex contexts, layout order (コンテキスト レイアウトの順序)
-
-通常、コンテキストは、入力ファイルの中で出現した順番に、@c
-システムの上から下へと配置されます。@c
-コンテキストがネストされている場合、@c
-入力ファイルの中で内側にネストされたコンテキストが@c
-外側のコンテキストの @q{accepts} リストの中に含まれているのなら、@c
-外側のコンテキストの内部に配置されます。@c
-外側のコンテキストの @qq{accepts} リストに含まれていない場合、@c
-外側のコンテキストの内部ではなく、下に再配置されます。
-
-入力ファイルの中で、@c
-出現したコマンドを保持する適当なコンテキストが存在しない場合、@c
-コンテキストが暗黙的に作成されます。@c
-これは、予期しない譜やスコアを生み出す可能性があります。
-
-コンテキストが配置される順序や @qq{accepts} リストは変更することができます。@c
-@ref{コンテキストを揃える} を参照してください。
+多声の音楽では、一般的にオブジェクトの向きを変えるよりも明示的に
+@code{voice} を指定した方が良いです。@c
+更なる情報は、@ref{Multiple voices} を参照してください。
@seealso
-アプリケーション使用方法:
-@rprogram{余計な譜が表示される}
+学習マニュアル:
+@rlearning{Within-staff objects}
+
+記譜法リファレンス:
+@ref{Multiple voices}
@node 距離と距離の単位
この関数の説明と使用例については、@c
@rlearning{オブジェクトの長さと太さ} を参照してください。
-
@seealso
学習マニュアル:
@rlearning{オブジェクトの長さと太さ}
@lilypond[verbatim,quote,relative=1]
\new Staff \with {
- \override StaffSymbol #'line-positions = #'(7 3 0 -4 -6 -7)
+ \override StaffSymbol.line-positions = #'(7 3 0 -4 -6 -7)
}
{ a4 e' f b | d1 }
@end lilypond
@lilypond[verbatim,quote,relative=1]
\new Staff \with {
- \override StaffSymbol #'width = #23
+ \override StaffSymbol.width = #23
}
{ a4 e' f b | d1 }
@end lilypond
いくつかのスパナ -- 2 つのオブジェクトの間に直線を描くもの -- は、さらに、@c
@code{line-spanner-interface} をサポートします。
-
@unnumberedsubsubsec @code{spanner-interface} を使用する
このインターフェイスは、@c
a~a
a
% タイの長さを増加させます
--\tweak #'minimum-length #5
+-\tweak minimum-length #5
~a
@end lilypond
\compressFullBarRests
R1*23
% 休符バーの長さを増加させます
-\once \override MultiMeasureRest #'minimum-length = #20
+\once \override MultiMeasureRest.minimum-length = #20
R1*23
a1
@end lilypond
@lilypond[verbatim,quote,relative=2]
a \< a a a \!
% ヘアピンの長さを増加させます
-\override Hairpin #'minimum-length = #20
+\override Hairpin.minimum-length = #20
a \< a a a \!
@end lilypond
@lilypond[verbatim,quote,relative=2]
a( a)
a
--\tweak #'minimum-length #5
+-\tweak minimum-length #5
( a)
a\( a\)
a
--\tweak #'minimum-length #5
+-\tweak minimum-length #5
\( a\)
@end lilypond
e \glissando c'
% 単独では効果を持ちません
-\once \override Glissando #'minimum-length = #20
+\once \override Glissando.minimum-length = #20
e, \glissando c'
% 以下の両方のオーバライドが存在する場合にのみ、効果を持ちます
-\once \override Glissando #'minimum-length = #20
-\once \override Glissando #'springs-and-rods = #ly:spanner::set-spacing-rods
+\once \override Glissando.minimum-length = #20
+\once \override Glissando.springs-and-rods = #ly:spanner::set-spacing-rods
e, \glissando c'
@end lilypond
@c KEEP LY
@lilypond[verbatim,quote,relative=1]
% 単独では効果を持ちません
-\once \override Beam #'minimum-length = #20
+\once \override Beam.minimum-length = #20
e8 e e e
% 以下の両方のオーバライドが存在する場合にのみ、効果を持ちます
-\once \override Beam #'minimum-length = #20
-\once \override Beam #'springs-and-rods = #ly:spanner::set-spacing-rods
+\once \override Beam.minimum-length = #20
+\once \override Beam.springs-and-rods = #ly:spanner::set-spacing-rods
e8 e e e
@end lilypond
-
@strong{@i{@code{to-barline} プロパティ}}
@code{spanner-interface} の 2 番目に有用なプロパティは
@lilypond[verbatim,quote,relative=2]
a \< a a a a \! a a a \break
-\override Hairpin #'to-barline = ##f
+\override Hairpin.to-barline = ##f
a \< a a a a \! a a a
@end lilypond
あるいは小節線で終了させることに意味が無い他のスパナに対して、@c
このプロパティを @code{#t} に設定しても効果がありません。
-
@unnumberedsubsubsec @code{line-spanner-interface} を使用する
@code{line-spanner-interface} をサポートするオブジェクトには@c
@lilypond[relative=2,quote,verbatim]
e2 \glissando b
-\once \override Glissando #'(bound-details left Y) = #3
-\once \override Glissando #'(bound-details right Y) = #-2
+\once \override Glissando.bound-details.left.Y = #3
+\once \override Glissando.bound-details.right.Y = #-2
e2 \glissando b
@end lilypond
例を示します:
@lilypond[relative=2,ragged-right,verbatim,fragment]
-\override Glissando #'breakable = ##t
-\override Glissando #'(bound-details right-broken Y) = #-3
+\override Glissando.breakable = ##t
+\override Glissando.bound-details.right-broken.Y = #-3
c1 \glissando \break
f1
@end lilypond
水平スパナに @i{cresc.}, @i{tr} それに他のテキストを配置するために使用されます。
@lilypond[quote,ragged-right,fragment,relative=2,verbatim]
-\override TextSpanner #'(bound-details left text)
+\override TextSpanner.bound-details.left.text
= \markup { \small \bold Slower }
c2\startTextSpan b c a\stopTextSpan
@end lilypond
記号が上下します:
@lilypond[relative=1,fragment,verbatim]
-\override TextSpanner
- #'(bound-details left stencil-align-dir-y) = #-2
-\override TextSpanner
- #'(bound-details right stencil-align-dir-y) = #UP
-
-\override TextSpanner
- #'(bound-details left text) = #"ggg"
-\override TextSpanner
- #'(bound-details right text) = #"hhh"
+\override TextSpanner.bound-details.left.stencil-align-dir-y = #-2
+\override TextSpanner.bound-details.right.stencil-align-dir-y = #UP
+
+\override TextSpanner.bound-details.left.text = #"ggg"
+\override TextSpanner.bound-details.right.text = #"hhh"
c4^\startTextSpan c c c \stopTextSpan
@end lilypond
@code{\startTextSpan} を @code{\endTextSpan} で閉じる必要はなく、@c
ヘアピンを @code{\!} で閉じる必要もありません。
-
@seealso
内部リファレンス:
@rinternals{TextSpanner},
@lilypond[quote,verbatim,relative=1]
a1 a
-\override Score.BarLine #'stencil = ##f
+\override Score.BarLine.stencil = ##f
a a
-\revert Score.BarLine #'stencil
+\revert Score.BarLine.stencil
a a a
@end lilypond
@lilypond[quote,verbatim,relative=2]
a4 a
-\once \override NoteHead #'transparent = ##t
+\once \override NoteHead.transparent = ##t
a a
@end lilypond
白いオブジェクトの画像が幽霊のように浮かび上がることがあります:
@lilypond[quote,verbatim,relative=2]
-\override Staff.Clef #'color = #white
+\override Staff.Clef.color = #white
a1
@end lilypond
音部記号を先に描画させる必要があります:
@lilypond[quote,verbatim,relative=2]
-\override Staff.Clef #'color = #white
-\override Staff.Clef #'layer = #-1
+\override Staff.Clef.color = #white
+\override Staff.Clef.layer = #-1
a1
@end lilypond
このファイルの中で、最後の 3 列がその列のヘッダで示される場所での@c
可視性を表しています:
-@multitable {@code{begin-of-line-invisible}} {@code{'#(#t #t #t)}} {yes} {yes} {yes}
-@headitem 関数 @tab ベクトル @tab 改行前 @tab 改行なし @tab 改行後
+@multitable {@code{begin-of-line-invisible}} {@code{'#(#t #t #t)}} {改行前} {改行なし} {改行後}
+@headitem 関数形式 @tab ベクトル形式 @tab 改行前 @tab 改行なし @tab 改行後
@item @code{all-visible} @tab @code{'#(#t #t #t)} @tab yes @tab yes @tab yes
@item @code{begin-of-line-visible} @tab @code{'#(#f #f #t)} @tab no @tab no @tab yes
f4 g a b
f4 g a b
% カレント行の最後で小節線を削除します
-\once \override Score.BarLine #'break-visibility = #'#(#f #t #t)
+\once \override Score.BarLine.break-visibility = #'#(#f #t #t)
\break
f4 g a b
f4 g a b
ベクトルの要素 3 つをすべて記述する必要がありますが、@c
それらすべてが各レイアウト オブジェクトに対して効果を持つわけではなく、@c
組み合わせによってはエラーになる場合もあります。@c
-
-even give errors. The following limitations apply:
+以下の制限があります:
@itemize @bullet
@item 小節線を行の先頭に描画することはできません。
\key g \major
f4 g a b
% すべての調号を削除しようと試みます
-\override Staff.KeySignature #'break-visibility = #all-invisible
+\override Staff.KeySignature.break-visibility = #all-invisible
\key bes \major
f4 g a b
\break
\key g \major
f4 g a b
\set Staff.explicitKeySignatureVisibility = #all-invisible
-\override Staff.KeySignature #'break-visibility = #all-invisible
+\override Staff.KeySignature.break-visibility = #all-invisible
\key bes \major
f4 g a b \break
f4 g a b
f4 g a b
\set Staff.explicitKeySignatureVisibility = #all-invisible
\set Staff.printKeyCancellation = ##f
-\override Staff.KeySignature #'break-visibility = #all-invisible
+\override Staff.KeySignature.break-visibility = #all-invisible
\key bes \major
f4 g a b \break
f4 g a b
@code{explicitClefVisibility} プロパティが@c
音部記号とそれに関連するオクターブ記号の両方を制御します。
-
@seealso
学習マニュアル:
@rlearning{オブジェクトの可視性と色}
@lilypond[relative=2,ragged-right,verbatim,fragment]
d2 \glissando d'2
-\once \override Glissando #'style = #'dashed-line
+\once \override Glissando.style = #'dashed-line
d,2 \glissando d'2
-\override Glissando #'style = #'dotted-line
+\override Glissando.style = #'dotted-line
d,2 \glissando d'2
-\override Glissando #'style = #'zigzag
+\override Glissando.style = #'zigzag
d,2 \glissando d'2
-\override Glissando #'style = #'trill
+\override Glissando.style = #'trill
d,2 \glissando d'2
@end lilypond
@c TODO Complete
@lilypond[relative=2,ragged-right,verbatim,quote]
e2 \glissando f
-\once \override Glissando #'(bound-details right Y) = #-2
+\once \override Glissando.bound-details.right.Y = #-2
e2 \glissando f
@end lilypond
@lilypond[quote,verbatim,relative=1]
g4\< e' d' f\!
-\override Hairpin #'rotation = #'(20 -1 0)
+\override Hairpin.rotation = #'(20 -1 0)
g,,4\< e' d' f\!
@end lilypond
そうしなければテキストのいくつかは高く押し上げられてしまいます。
@lilypond[quote,verbatim,relative=1]
-\override TextScript #'outside-staff-priority = ##f
+\override TextScript.outside-staff-priority = ##f
g4^\markup { \rotate #30 "a G" }
b^\markup { \rotate #30 "a B" }
des^\markup { \rotate #30 "a D-Flat" }
* グラフィカル オブジェクトを垂直方向にグループ化する::
* ステンシルを変更する::
* 形状を変更する::
+* unpure-pure コンテナ::
@end menu
-
@seealso
学習マニュアル:
@rlearning{出力を調整する},
@ref{内部リファレンスの説明},
@ref{プロパティを変更する}
-インストール済みファイル:
+拡張:
+@rextend{Interfaces for programmers}
+
+インストールされているファイル:
@file{scm/define-grobs.scm}
コード断片集:
@rlsr{Tweaks and overrides}
-拡張:
-@rextend{Interfaces for programmers}
-
内部リファレンス:
@rinternals{All layout objects}
@code{break-aligned-interface} の中に特別なプロパティがあります。
@seealso
+記譜法リファレンス:
@ref{break-alignable-interface を使用する},
+
+拡張:
@rextend{Callback functions}
@menu
@lilypond[verbatim,quote,relative=2]
a-3
a
--\tweak #'X-offset #0
--\tweak #'Y-offset #0
+-\tweak X-offset #0
+-\tweak Y-offset #0
-3
a
--\tweak #'X-offset #-1
--\tweak #'Y-offset #1
+-\tweak X-offset #-1
+-\tweak Y-offset #1
-3
@end lilypond
@lilypond[quote,verbatim,relative=1]
a'
--\tweak #'self-alignment-X #-1
+-\tweak self-alignment-X #-1
^"left-aligned"
--\tweak #'self-alignment-X #0
+-\tweak self-alignment-X #0
^"center-aligned"
--\tweak #'self-alignment-X #RIGHT
+-\tweak self-alignment-X #RIGHT
^"right-aligned"
--\tweak #'self-alignment-X #-2.5
+-\tweak self-alignment-X #-2.5
^"aligned further to the right"
@end lilypond
@c KEEP LY
@lilypond[quote,verbatim,relative=2]
a
--\tweak #'self-alignment-X #0.5 % 左方向に移動させます
--\tweak #'Y-offset #ly:self-alignment-interface::y-aligned-on-self
--\tweak #'self-alignment-Y #-1 % 上方向に移動させます
+-\tweak self-alignment-X #0.5 % 左方向に移動させます
+-\tweak Y-offset #ly:self-alignment-interface::y-aligned-on-self
+-\tweak self-alignment-Y #-1 % 上方向に移動させます
-3 % 3 の指
@end lilypond
@c KEEP LY
@lilypond[verbatim,quote,relative=1]
% リハーサル記号は音部記号の上に中央揃えされます
-\override Score.RehearsalMark #'break-align-symbols = #'(clef)
+\override Score.RehearsalMark.break-align-symbols = #'(clef)
\key a \major
\clef treble
\mark "↓"
e1
% リハーサル記号は拍子記号の上に中央揃えされます
-\override Score.RehearsalMark #'break-align-symbols = #'(time-signature)
+\override Score.RehearsalMark.break-align-symbols = #'(time-signature)
\key a \major
\clef treble
\time 3/4
\mark "↓"
e2.
% リハーサル記号はブレス記号の上に中央揃えされます
-\override Score.RehearsalMark #'break-align-symbols = #'(breathing-sign)
+\override Score.RehearsalMark.break-align-symbols = #'(breathing-sign)
\key a \major
\clef treble
\time 4/4
@c KEEP LY
@lilypond[verbatim,quote,relative=1]
% リハーサル記号は調号の上に中央揃えされます
-\override Score.RehearsalMark #'break-align-symbols = #'(key-signature clef)
+\override Score.RehearsalMark.break-align-symbols = #'(key-signature clef)
\key a \major
\clef treble
\mark "↓"
e1
% リハーサル記号は音部記号の上に中央揃えされます
\set Staff.explicitKeySignatureVisibility = #all-invisible
-\override Score.RehearsalMark #'break-align-symbols = #'(key-signature clef)
+\override Score.RehearsalMark.break-align-symbols = #'(key-signature clef)
\key a \minor
\clef bass
\mark "↓"
% リハーサル記号は小節線の上に中央揃えされます
\set Staff.explicitKeySignatureVisibility = #all-invisible
\set Staff.explicitClefVisibility = #all-invisible
-\override Score.RehearsalMark #'break-align-symbols = #'(key-signature clef)
+\override Score.RehearsalMark.break-align-symbols = #'(key-signature clef)
\key a \major
\clef treble
\mark "↓"
@c KEEP LY
@lilypond[verbatim,quote,relative=1]
% RehearsalMark は KeySignature の上に中央揃えされます
-\override Score.RehearsalMark #'break-align-symbols = #'(key-signature)
+\override Score.RehearsalMark.break-align-symbols = #'(key-signature)
\key a \major
\clef treble
\time 4/4
\mark "↓"
e1
% RehearsalMark は KeySignature の左端に揃えられます
-\once \override Score.KeySignature #'break-align-anchor-alignment = #LEFT
+\once \override Score.KeySignature.break-align-anchor-alignment = #LEFT
\mark "↓"
\key a \major
e
% RehearsalMark は KeySignature の右端に揃えられます
-\once \override Score.KeySignature #'break-align-anchor-alignment = #RIGHT
+\once \override Score.KeySignature.break-align-anchor-alignment = #RIGHT
\key a \major
\mark "↓"
e
@lilypond[verbatim,quote,relative=1]
% リハーサル記号は調号の左端に揃えられて
% さらに 3.5 譜スペース右にずらされます
-\override Score.RehearsalMark #'break-align-symbols = #'(key-signature)
-\once \override Score.KeySignature #'break-align-anchor = #3.5
+\override Score.RehearsalMark.break-align-symbols = #'(key-signature)
+\once \override Score.KeySignature.break-align-anchor = #3.5
\key a \major
\mark "↓"
e1
% リハーサル記号は調号の左端に揃えられて
% さらに 2 譜スペース左にずらされます
-\once \override Score.KeySignature #'break-align-anchor = #-2
+\once \override Score.KeySignature.break-align-anchor = #-2
\key a \major
\mark "↓"
e1
@lilypond[verbatim,quote]
XinO = {
- \once \override NoteHead #'stencil = #ly:text-interface::print
- \once \override NoteHead #'text = \markup {
+ \once \override NoteHead.stencil = #ly:text-interface::print
+ \once \override NoteHead.text = \markup {
\combine
\halign #-0.7 \draw-circle #0.85 #0.2 ##f
\musicglyph #"noteheads.s2cross"
@c TODO Add inserting Postscript or ref to later
-
@seealso
記譜法リファレンス:
@ref{マークアップ内部でのグラフィック記譜法},
@lilypond[verbatim,quote,relative=1]
<<
{
- \once \override Tie
- #'control-points = #'((1 . -1) (3 . 0.6) (12.5 . 0.6) (14.5 . -1))
+ \once \override Tie.control-points = #'((1 . -1) (3 . 0.6) (12.5 . 0.6) (14.5 . -1))
e1 ~ e
}
\\
@end lilypond
@knownissues
-
同じ音楽タイミングに複数のタイあるいはスラーが存在する場合、@c
@code{control-points} プロパティを変更しても@c
それらの形状を変更することはできません。@c
内部リファレンス:
@rinternals{TieColumn}
+@cindex Scheme, pure containers (Scheme pure コンテナ)
+@cindex Scheme, unpure containers (Scheme unpure コンテナ)
+@cindex pure containers, Scheme (Scheme pure コンテナ)
+@cindex unpure containers, Scheme (Scheme unpure コンテナ)
+@cindex horizontal spacing, overriding (水平方向のスペースを上書きする)
+
+
+@node unpure-pure コンテナ
+@subsection unpure-pure コンテナ
+@translationof Unpure-pure containers
+
+unpure-pure コンテナは @emph{Y-axis} スペース - 特に @code{Y-offset} と
+@code{Y-extent} - の算出を文字 (つまり、数字やペア) ではなく、Scheme 関数で@c
+上書きする際に有用です。
+
+ある特定のグラフィカル オブジェクトでは、@code{Y-extent} は @code{stencil}
+プロパティをベースにしていて、それらの @code{stencil} プロパティを上書きする場合は
+unpure-pure コンテナで @code{Y-extent} も上書きする必要があります。@c
+関数が @code{Y-offset} と/または @code{Y-extent} を上書きした場合、@c
+その関数はコンパイルの最中に改行の算出を早すぎるタイミングで引き起こすと見なされます。@c
+そのため、その関数はまったく評価されず (通常、@samp{0} または @samp{'(0 . 0)} の@c
+値を返します)、結果として衝突を引き起こすことがあります。@c
+@q{pure} 関数はプロパティ、オブジェクト、あるいはグラフィカル オブジェクトの消失に@c
+影響を与えないため、その関数の Y-axis に関する評価は常に正しく行われます。
+
+現在のところ @q{pure} と見なされる関数が約 30 あり、Unpure-pure コンテナを用いて
+@q{pure} ではない関数を @q{pure} な関数としてセットすることができます。@c
+@q{pure} 関数は改行の @emph{前に} 評価されるため、水平方向のスペースを
+@q{正しいタイミングで} 調節することができます。@c
+@q{unpure} 関数は改行の @emph{後に} 評価されます。
+
+@warning{@q{pure} な関数を常に把握していることは困難なので、作成する @q{pure}
+関数ではグラフィカル オブジェクト @code{Beam} や @code{VerticalAlignment} を@c
+使わないことをおすすめします。}
+
+unpure-pure コンテナは以下のように構築します:
+
+@code{(ly:make-unpure-pure-container f0 f1)}
+
+ここで @code{f0} は @var{n} (@var{n >= 1}) 個の引数を取る関数であり、最初の引数@c
+は常にグラフィカル オブジェクトである必要があります。@c
+これが実際に結果を返す関数です。@c
+@code{f1} は @q{pure} であると見なされる関数であり、@var{n + 2} 個の引数を@c
+取ります。@c
+@code{f1} も最初の引数は常にグラフィカル オブジェクトである必要があり、2 番目と
+3 番目の引数は @q{start} と @q{end} です。
+
+@q{start} と @q{end} は事実上、@code{Spanners} (つまり、@code{Hairpin} や
+@code{Beam}) だけで問題となるダミー値であり、
+@var{start} and @var{end} are, for all intents and purposes, dummy
+values that only matter for @code{Spanners} (i.e @code{Hairpin} or
+@code{Beam}), that can return different height estimations based on a
+starting and ending column.
+
+@code{f1} の残りの引数は @code{f0} の引数と同じです (@var{n = 1} である場合は@c
+残りの引数はありません)。
+
+関数 @code{f1} の結果は概算であり、@code{f0} が実際の値を得るのに用いられます。@c
+@code{f0} の結果はもっと後のスペースの処理で微調整に用いられます。
+
+@lilypond[verbatim,quote,ragged-right]
+#(define (square-line-circle-space grob)
+(let* ((pitch (ly:event-property (ly:grob-property grob 'cause) 'pitch))
+ (notename (ly:pitch-notename pitch)))
+ (if (= 0 (modulo notename 2))
+ (make-circle-stencil 0.5 0.0 #t)
+ (make-filled-box-stencil '(0 . 1.0)
+ '(-0.5 . 0.5)))))
+
+squareLineCircleSpace = {
+ \override NoteHead.stencil = #square-line-circle-space
+}
+
+smartSquareLineCircleSpace = {
+ \squareLineCircleSpace
+ \override NoteHead.Y-extent =
+ #(ly:make-unpure-pure-container
+ ly:grob::stencil-height
+ (lambda (grob start end) (ly:grob::stencil-height grob)))
+}
+
+\new Voice \with { \remove "Stem_engraver" }
+\relative c'' {
+ \squareLineCircleSpace
+ cis4 ces disis d
+ \smartSquareLineCircleSpace
+ cis4 ces disis d
+}
+@end lilypond
+
+最初の小節では unpure-pure コンテナを用いていないため、スペース算出エンジンは符頭の@c
+幅を知ることができず、符頭と臨時記号が衝突しています。@c
+次の小節では unpure-pure コンテナを用いているため、スペース算出エンジンは符頭の幅を@c
+知ることができ、それに応じて小節の幅を増やすことで衝突を回避しています。
+
+通常、簡単な計算では、unpure-pure コンテナの @q{unpure} パートと @q{pure} パート@c
+の両方に、引数の数とスコープを変えただけのほとんど同じ関数を用いることができます。
+
+@warning{@q{pure} と見なした関数が @q{pure} でなかった場合、予期しない結果となる@c
+ことがあります。}
+
@node 音楽関数を使用する
@section 音楽関数を使用する
@tab @code{@var{argN}} が @code{#t} を返す Scheme の @emph{型述語} (type predicate)。
@item @code{@var{@dots{}music@dots{}}}
-@tab 通常の LilyPond 入力。@code{$} を用いて引数を参照します
-(例: @samp{$arg1})。
+@tab 通常の LilyPond 入力。引数を参照するには @code{$} (LilyPond 構造が@c
+許可されている場合のみ) や @code{#} (引数を Scheme 値、音楽関数の引数、@c
+あるいは音楽リスト内部の音楽として使う場合) を用います
+(例: @samp{#arg1})。
@end multitable
です。
-@ignore
-共通の変数タイプについては @ref{共通の引数タイプ} で記述されています。@c
-変数タイプについてのもっと完全な記述は
-@rextend{Music function syntax} にあります。
-@end ignore
-
引数 @code{parser} と @code{location} を省略することはできず、@c
-@rextend{Music function syntax} で記述されている高度な状況で@c
+@rextend{Music functions} で記述されている高度な状況で@c
使用されることがあります。
置換関数において、必ずこれらの引数を記述してください。
@ref{Predefined type predicates} を参照してください。@c
ユーザが型述語を定義することもできます。
-
@seealso
-
記譜法リファレンス:
@ref{Predefined type predicates}
拡張:
-@rextend{Music function syntax}
+@rextend{Music functions}
インストールされているファイル:
@file{lily/music-scheme.cc},
@file{scm/lily.scm}
-@ignore
-@node 共通の引数タイプ
-@subsection 共通の引数タイプ
-@translationof Common argument types
-
-エラー チェックを考慮して、@c
-音楽関数に渡される各引数タイプを定義しておく必要があります。@c
-共通の引数タイプのいくつかを以下の表で示します。@c
-
-以下の入力タイプを音楽関数で変数として使用することができます。@c
-このリストは完全なものではありません。@c
-取り得る変数タイプについての更なる情報は、
-@rextend{Music function syntax} にあります。
-
-@multitable @columnfractions .33 .66
-@headitem 入力タイプ @tab @var{vari-type?} での記述方法
-@item 整数 @tab @code{integer?}
-@item 浮動小数点数 (10 進数) @tab @code{number?}
-@item テキスト文字列 @tab @code{string?}
-@item マークアップ @tab @code{markup?}
-@item 音楽表記 @tab @code{ly:music?}
-@item Scheme ペア @tab @code{pair?}
-@end multitable
-
-@seealso
-
-LilyPond の拡張:
-@rextend {Music function syntax}
-
-インストール済みファイル:
-@file{lily/music-scheme.cc},
-@file{scm/c++.scm}
-@end ignore
-
-
-@c ここから L3796
@node 置換関数の例
@subsection 置換関数の例
@translationof Substitution function examples
(parser location padding)
(number?)
#{
- \once \override TextScript #'padding = $padding
+ \once \override TextScript.padding = $padding
#})
\relative c''' {
数値のほかに、音符などの音楽表記を音楽関数への引数にすることができます:
-@c TODO: use a better example (the music argument is redundant).
-
@lilypond[quote,verbatim,ragged-right]
custosNote =
#(define-music-function
(parser location note)
(ly:music?)
#{
- \once \override Voice.NoteHead #'stencil =
- #ly:text-interface::print
- \once \override Voice.NoteHead #'text =
- \markup \musicglyph #"custodes.mensural.u0"
- \once \override Voice.Stem #'stencil = ##f
- $note
+ \tweak NoteHead.stencil #ly:text-interface::print
+ \tweak NoteHead.text
+ \markup \musicglyph #"custodes.mensural.u0"
+ \tweak Stem.stencil ##f
+ #note
#})
\relative c' { c4 d e f \custosNote g }
tempoPadded =
#(define-music-function
(parser location padding tempotext)
- (number? string?)
+ (number? markup?)
#{
- \once \override Score.MetronomeMark #'padding = $padding
- \tempo \markup { \bold $tempotext }
+ \once \override Score.MetronomeMark.padding = $padding
+ \tempo \markup { \bold #tempotext }
#})
\relative c'' {
\tempo \markup { "Low tempo" }
c4 d e f g1
- \tempoPadded #4.0 #"High tempo"
+ \tempoPadded #4.0 "High tempo"
g4 f e d c1
}
@end lilypond