X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Documentation%2Fja%2Fnotation%2Fchanging-defaults.itely;h=b9aa8ebc5431665b02f535ce4f0135c4a5adff3a;hb=09ef86c87175cc6c1071eedb022ed1d01a93bcaf;hp=809223b24e70e592b3eb944ab39b6b7843ca3e8a;hpb=26a079ca2393d053315ef8dbef626c897dc9645a;p=lilypond.git diff --git a/Documentation/ja/notation/changing-defaults.itely b/Documentation/ja/notation/changing-defaults.itely index 809223b24e..b9aa8ebc54 100644 --- a/Documentation/ja/notation/changing-defaults.itely +++ b/Documentation/ja/notation/changing-defaults.itely @@ -1,14 +1,14 @@ @c -*- coding: utf-8; mode: texinfo; documentlanguage: ja -*- @ignore - Translation of GIT committish: d5647c5fd1c38d4124d2374725b923f4901f3661 + Translation of GIT committish: c1b0482f63f881bd3f67845e5f76a3e04675ef2a 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.16.0" +@c \version "2.19.22" @c Translators: Yoshiki Sawada @c Translation status: post-GDP @@ -68,7 +68,7 @@ Scheme の要素は、@code{.ly} の中で、@c @menu * コンテキストの説明:: -* コンテキストを作成する:: +* コンテキストを作成して参照する:: * コンテキストを残しておく:: * コンテキストのプラグインを変更する:: * コンテキストのデフォルト設定を変更する:: @@ -286,152 +286,221 @@ context. @end ignore -@node コンテキストを作成する -@subsection コンテキストを作成する -@translationof Creating contexts -@c TODO more complete descriptions rather than learning style - -ボイスと譜が 1 つだけの楽譜では、コンテキストは自動的に作成されます。@c -もっと複雑な楽譜では、手動でコンテキストを作成する必要があります。@c -コンテキスを作成するために 3 つのコマンドがあります。 - -@itemize - -@item -もっとも簡単なコマンドは @code{\new} であり、@c -もっとも素早く入力できるコマンドでもあります。@c -このコマンドは音楽表記の前に置きます。例えば、以下のように: +@node コンテキストを作成して参照する +@subsection コンテキストを作成して参照する +@translationof Creating and referencing contexts @funindex \new +@funindex \context @cindex new contexts (新しいコンテキスト) -@cindex Context, creating (コンテキストを作成する) +@cindex referencing contexts (コンテキストを参照する) +@cindex Contexts, creating and referencing (コンテキストを作成して参照する) + +LilyPond は、適切なコンテキストが存在しないうちに音楽表記に遭遇すると、@c +自動的に下位コンテキストを作成します。@c +しかしながら、通常これは、シンプルな楽譜やドキュメントの中の楽譜断片@c +のような単純な場合にしかうまくいきません。@c +もっと複雑な楽譜の場合、すべてのコンテキストを @code{\new} コマンドや +@code{\context} コマンドを用いて明示的に指定することをお勧めします。@c +これら 2 つのコマンドの構文はほとんど同じです: @example -\new @var{type} @var{music expression} +[\new | \context] @var{Context} [ = @var{name}] [@var{music-expression}] @end example @noindent -ここで、@var{type} はコンテキスト名 (@code{Staff} や @code{Voice} など) です。@c -このコマンドは新しいコンテキストを作成し、@c -そのコンテキストに付属する @var{音楽表記} の解釈を開始します。 +ここで、@code{\new} と @code{\context} のどちらかを使用します。@c +@var{Context} は作成するコンテキストのタイプであり、@var{name} は@c +作成されるコンテキストにオプションで付けることができる名前であり、@c +@var{music-expression} はこのコンテキストのエングラーバとパフォーマに@c +よって処理される単一の音楽表記です。 -@code{\new} の実際的な使用例には、多くの譜を持つ楽譜があります。@c -それぞれの譜に配置される各パートの前に @code{\new Staff} を記述します。 +コンテキスト名を持たない @code{\new} コマンドは一般的に複数の譜を持つ +score を作成するのに用いられます: -@lilypond[quote,verbatim,relative=2,ragged-right,fragment] +@c KEEP LY +@lilypond[quote,verbatim] << - \new Staff { c4 c } - \new Staff { d4 d } + \new Staff \relative { + % 暗黙的に Voice コンテキストが作成されます + c''4 c + } + \new Staff \relative { + d''4 d + } >> @end lilypond -@code{\new} コマンドは、コンテキストに名前を与えることもできます: +@noindent +そして、1 つの譜に複数のボイスが配置されます: -@example -\new @var{type} = @var{id} @var{music} -@end example +@lilypond[quote,verbatim] +\new Staff << + \new Voice \relative { + \voiceOne + c''8 c c4 c c + } + \new Voice \relative { + \voiceTwo + g'4 g g g + } +>> +@end lilypond -しかしながら、ユーザが指定したコンテキスト名は、 -そのコンテキスト以前に同じ名前を与えられたコンテキストが無い場合にのみ、@c -使用できます。 +@noindent +@c 保留(意味のない文?) +@c @code{\new} should always be used to specify unnamed contexts. -@funindex \context +@code{\new} と @code{\context} は動作が異なります: +@itemize @item -@code{\new} と同様に、@c -@code{\context} コマンドも音楽表記をコンテキスト オブジェクトに代入します。@c -しかしながら、このコマンドはコンテキストに明示的に名前を与えます。@c -構文は以下の通りです: +@code{\new} はコンテキスト名を持っているか、いないかにかかわらず、@c +例え同じ名前を持つコンテキストが存在していたとしても、常に全く新たな@c +コンテキストを作成します: -@example -\context @var{type} = @var{id} @var{music} -@end example +@lilypond[quote,verbatim] +\new Staff << + \new Voice = "A" \relative { + \voiceOne + c''8 c c4 c c + } + \new Voice = "A" \relative { + \voiceTwo + g'4 g g g + } +>> +@end lilypond -この構文は @var{id} という名前の @var{type} タイプのコンテキストが@c -すで存在していないか検索します。@c -コンテキストがまだ存在していなければ、@c -指定された名前を持つコンテキストが新たに作成されます。@c -これは、コンテキストを後で参照する場合に有用です。@c -例えば、以下のように名前を付けられたメロディ: +@item +コンテキスト名を持つ @code{\context} は、階層、名前、それにタイプが@c +同じコンテキストが存在しない場合にのみ、新たなコンテキスを作成します。@c +存在する場合、@code{\context} はすでに作成されているコンテキストへの@c +参照となり、音楽表記はそのコンテキストに渡されて処理されます。 -@example -\context Voice = "@b{tenor}" @var{music} -@end example +名前を持つコンテキストの用途の 1 つとして、楽譜レイアウトと音楽コンテンツ@c +を分離させることができます。@c +以下の 2 つの形式はどちらも有効です: -@noindent -に、以下のように歌詞を設定すると、テキストは適切に音符に揃えられます: +@c KEEP LY +@lilypond[quote,verbatim] +\score { + << + % 楽譜レイアウト + \new Staff << + \new Voice = "one" { + \voiceOne + } + \new Voice = "two" { + \voiceTwo + } + >> -@example -\new Lyrics \lyricsto "@b{tenor}" @var{lyrics} -@end example + % 音楽コンテンツ + \context Voice = "one" { + \relative { + c''4 c c c + } + } + \context Voice = "two" { + \relative { + g'8 g g4 g g + } + } + >> +} +@end lilypond -@noindent +@c KEEP LY +@lilypond[quote,verbatim] +\score { + << + % 楽譜レイアウト + \new Staff << + \context Voice = "one" { + \voiceOne + } + \context Voice = "two" { + \voiceTwo + } + >> + + % 音楽コンテンツ + \context Voice = "one" { + \relative { + c''4 c c c + } + } + \context Voice = "two" { + \relative { + g'8 g g4 g g + } + } + >> +} +@end lilypond 名前付きコンテキストの他の使用例として、2 つの音楽表記をつなげて 1 つのコンテキストにすることができます。@c 以下の例では、アーティキュレーションと音符は別々に入力されています: +@noindent +変数を用いても同じことができます。@c +@rlearning{Organizing pieces with variables} を参照してください。 -@example -music = @{ c4 c4 @} -arts = @{ s4-. s4-> @} -@end example - -これらを同じ @code{Voice} コンテキストに送ることによって@c -組み合わせることができます: +@item +コンテキスト名を持たない @code{\context} は、階層とタイプが一致する@c +コンテキストのうち最初に作成されたものに適用され +(例えそのコンテキストが名前を持っていたとしても適用されます)、@c +音楽表記はそのコンテキストに渡されて処理されます。@c +この形式が有用なことは稀です。@c +しかしながら、コンテキスト名と音楽表記を持たない @code{\context} +は、コンテキスト内で @code{\applyContext} で記述した Scheme +プロシージャを実行させるのに用いられます: @example -<< - \new Staff \context Voice = "A" \music - \context Voice = "A" \arts ->> +\new Staff \relative @{ + c'1 + \context Timing + \applyContext #(lambda (ctx) + (newline) + (display (ly:context-current-moment ctx))) + c1 +@} @end example -@lilypond[quote,ragged-right] -music = { c4 c4 } -arts = { s4-. s4-> } -\relative c'' << - \new Staff \context Voice = "A" \music - \context Voice = "A" \arts ->> -@end lilypond - -このメカニズムを用いることで、原典版 (オリジナル版) を定義し、@c -オプションとしてそれに異なるアーティキュレーションを付けることができます。 -@cindex creating contexts (コンテキストを作成する) +@end itemize -@item -コンテキストを作成する 3 つ目のコマンドは以下の通りです: +後で参照するコンテキストには名前を付ける必要があります。@c +例えば、歌詞を音楽に関連付けるような場合です: @example -\context @var{type} @var{music} +\new Voice = "tenor" @var{music} +... +\new Lyrics \lyricsto "tenor" @var{lyrics} @end example @noindent -これは @code{= @var{id}} を持つ @code{\context} に似ていますが、@c -タイプ @var{type} のすべてのコンテキストに適用されます --- そのコンテキストに与えられた名前とは関係なく適用されます。@c +歌詞を音楽に関連付ける方法についての詳細は +@ref{Automatic syllable durations} を参照してください。 -この構文の変形版は、@c -異なる階層で解釈される可能性がある音楽表記に対して使用されます。@c -例えば、@code{\applyOutput} コマンド -(@rextend{Running a function on all layout objects} を参照してください) -です。@c -明示的に @code{\context} を指定しなければ、通常は @code{Voice} に適用されます。 +ある特定のタイプのすべてのコンテキストのプロパティを @code{\layout} +ブロックで変更することができます (構文は異なります) +-- @ref{Changing all contexts of the same type} を参照してください。@c +この構造でもレイアウトを音楽コンテンツから分離させることができます。@c +単一のコンテキストを変更するのであれば、@code{\with} ブロックを用いる@c +必要があります -- @ref{Changing just one specific context} を参照@c +してください。 -@example -\applyOutput #'@var{context} #@var{function} % Voice に適用されます -@end example - -@code{Score} レベルや @code{Staff} レベルで解釈させるには、以下のようにします: +@seealso -@example -\applyOutput #'Score #@var{function} -\applyOutput #'Staff #@var{function} -@end example +学習マニュアル: +@rlearning{Organizing pieces with variables} -@end itemize +記譜法リファレンス: +@ref{Changing just one specific context}, +@ref{Automatic syllable durations} @node コンテキストを残しておく @@ -478,8 +547,8 @@ arts = { s4-. s4-> } @c KEEP LY @lilypond[quote,verbatim] -musicA = \relative c'' { d4 d d d } -musicB = \relative c'' { g4 g g g } +musicA = \relative { d''4 d d d } +musicB = \relative { g'4 g g g } keepVoicesAlive = { << \new Voice = "A" { s1*5 } % Voice "A" を 5 小節の間、維持する @@ -518,8 +587,8 @@ music = { @c KEEP LY @lilypond[quote,verbatim] -melody = \relative c'' { a4 a a a } -accompaniment = \relative c' { d4 d d d } +melody = \relative { a'4 a a a } +accompaniment = \relative { d'4 d d d } words = \lyricmode { These words fol -- low the mel -- o -- dy } \score { << @@ -558,14 +627,14 @@ words = \lyricmode { These words fol -- low the mel -- o -- dy } @c KEEP LY @lilypond[quote,verbatim] -melody = \relative c'' { +melody = \relative { s1 % 1 小節スキップします - a4 a a a + a'4 a a a s1 % 1 小節スキップします a4 a a a } -accompaniment = \relative c' { - d4 d d d +accompaniment = \relative { + d'4 d d d d4 d d d d4 d d d d4 d d d @@ -795,14 +864,14 @@ Internals Reference @expansion{} Translation @expansion{} Context. @lilypond[quote,verbatim] \score { - \relative c'' { - a4^"Thicker stems" a a a + \relative { + a'4^"Thicker stems" a a a a4 a a\ff a } \layout { \context { \Staff - \override Stem #'thickness = #4.0 + \override Stem.thickness = #4.0 } } } @@ -813,8 +882,8 @@ Internals Reference @expansion{} Translation @expansion{} Context. @lilypond[quote,verbatim] \score { - \relative c'' { - a4^"Smaller font" a a a + \relative { + a'4^"Smaller font" a a a a4 a a\ff a } \layout { @@ -827,13 +896,13 @@ Internals Reference @expansion{} Translation @expansion{} Context. @end lilypond @item -@code{\dynamicUp} や @code{\accidentalStyle "dodecaphonic"} のような音楽@c +@code{\dynamicUp} や @code{\accidentalStyle dodecaphonic} のような音楽@c 表記等、あらかじめ定義されているコマンド @lilypond[quote,verbatim] \score { - \relative c'' { - a4^"Dynamics above" a a a + \relative { + a'4^"Dynamics above" a a a a4 a a\ff a } \layout { @@ -843,7 +912,7 @@ Internals Reference @expansion{} Translation @expansion{} Context. } \context { \Staff - \accidentalStyle "dodecaphonic" + \accidentalStyle dodecaphonic } } } @@ -860,8 +929,8 @@ StaffDefaults = \with { \score { \new Staff { - \relative c'' { - a4^"Smaller font" a a a + \relative { + a'4^"Smaller font" a a a a4 a a a } } @@ -888,15 +957,15 @@ StaffDefaults = \with { @lilypond[quote,verbatim] \score { \new Staff { - \relative c'' { - a4^"Smaller font" a a a + \relative { + a'4^"Smaller font" a a a a4 a a a } } \layout { - \accidentalStyle "dodecaphonic" + \accidentalStyle dodecaphonic \set fontSize = #-4 - \override Voice.Stem #'thickness = #4.0 + \override Voice.Stem.thickness = #4.0 } } @end lilypond @@ -937,11 +1006,11 @@ StaffDefaults = \with { \new Staff { \new Voice \with { - \override Stem #'thickness = #4.0 + \override Stem.thickness = #4.0 } { - \relative c'' { - a4^"Thick stems" a a a + \relative { + a'4^"Thick stems" a a a a4 a a a } } @@ -956,8 +1025,8 @@ StaffDefaults = \with { \score { << \new Staff { - \relative c'' { - a4^"Default font" a a a + \relative { + a'4^"Default font" a a a a4 a a a } } @@ -965,8 +1034,8 @@ StaffDefaults = \with { \with { fontSize = #-4 } { - \relative c'' { - a4^"Smaller font" a a a + \relative { + a'4^"Smaller font" a a a a4 a a a } } @@ -982,20 +1051,20 @@ StaffDefaults = \with { << \new Staff { \new Voice { - \relative c'' { - a4^"Dynamics below" a a a + \relative { + a'4^"Dynamics below" a a a a4 a a\ff a } } } \new Staff - \with { \accidentalStyle "dodecaphonic" } + \with { \accidentalStyle dodecaphonic } { \new Voice \with { \dynamicUp } { - \relative c'' { - a4^"Dynamics above" a a a + \relative { + a'4^"Dynamics above" a a a a4 a a\ff a } } @@ -1049,17 +1118,11 @@ StaffDefaults = \with { @cindex engravers, including in contexts (エングラーバをコンテキストに含める) @funindex \alias -@funindex alias @funindex \name -@funindex name @funindex \type -@funindex type @funindex \consists -@funindex consists @funindex \accepts -@funindex accepts @funindex \denies -@funindex denies @code{Staff} や @code{Voice} のようなコンテキストは、@c 簡単なブロックの組み合わせで構成されています。 @@ -1079,19 +1142,18 @@ StaffDefaults = \with { \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 Flag #'transparent = ##t + \override NoteHead.style = #'slash + \hide Stem \alias Voice } \context { \Staff \accepts "ImproVoice" }} -\relative c'' { - a4 d8 bes8 \new ImproVoice { c4^"ad lib" c +\relative { + a'4 d8 bes8 \new ImproVoice { c4^"ad lib" c c4 c^"undress" c_"while playing :)" c } a1 } @@ -1129,14 +1191,14 @@ StaffDefaults = \with { それらの機能を提供するエングラーバを付け加える必要があります: @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 @@ -1148,9 +1210,8 @@ squashedPosition = #0 音符はスラッシュで、符幹を持ちません: @example -\override NoteHead #'style = #'slash -\override Stem #'transparent = ##t -\override Flag #'transparent = ##t +\override NoteHead.style = #'slash +\hide Stem @end example これらのプラグインすべてが共同する必要があり、@c @@ -1170,11 +1231,10 @@ squashedPosition = #0 \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 + \hide Stem \alias Voice @} @end example @@ -1214,8 +1274,8 @@ squashedPosition = #0 それから、このサブセクションの最初にあった出力を入力します: @example -\relative c'' @{ - a4 d8 bes8 +\relative @{ + a'4 d8 bes8 \new ImproVoice @{ c4^"ad lib" c c4 c^"undress" @@ -1656,14 +1716,14 @@ Add this much extra space between objects that are next to each other. 以下のコマンドは、音符と運指記号の間に 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 @@ -1777,7 +1837,7 @@ discuss the functionality of this command. The command @verbatim -\override Staff.Stem #'thickness = #4.0 +\override Staff.Stem.thickness = #4.0 @end verbatim @noindent @@ -1788,7 +1848,7 @@ appearance. Here we see the command in action: @lilypond[quote,verbatim,relative=2,fragment] c4 -\override Staff.Stem #'thickness = #4.0 +\override Staff.Stem.thickness = #4.0 c4 c4 c4 @@ -1804,7 +1864,7 @@ causing the default context @code{Voice} to be used. Adding @lilypond[quote,fragment,verbatim,relative=2] c4 -\once \override Stem #'thickness = #4.0 +\once \override Stem.thickness = #4.0 c4 c4 @end lilypond @@ -1815,9 +1875,9 @@ or beams, the @code{\override} command must be executed at the moment 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.beam-thickness = #0.6 c8 c]) @end lilypond @@ -1831,8 +1891,8 @@ affects settings that were made in the same context. In other words, the @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 @@ -1847,7 +1907,7 @@ properties. To tweak those, use commands of the form such as @example -\override Stem #'(details beamed-lengths) = #'(4 4 3) +\override Stem.details.beamed-lengths = #'(4 4 3) @end example @end ignore @@ -1893,7 +1953,7 @@ Scheme 値の循環参照は、ハング アップまたはクラッシュ、@c 通常、コンテキスト プロパティの名前は、@c 小文字で始まる単語に大文字で始まる単語をつなげたものです。@c これらはたいてい音楽から記譜への翻訳を制御します --- 例えば、@code{localKeySignature} (臨時記号を表示するかどうかを決定します) +-- 例えば、@code{localAlterations} (臨時記号を表示するかどうかを決定します) や、@code{measurePosition} (小節線を表示するタイミングを決定します) です。@c コンテキスト プロパティは、楽曲の解釈をしている間、@c ずっと値を変更しておくことができます。@c @@ -1915,17 +1975,16 @@ R1*2 (一般に、@code{ChordNames}, @code{Voice}, @code{TabVoice}, あるいは @code{Lyrics} です)。 -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,fragment,verbatim] \set Score.autoBeaming = ##f -<< - { - e8 e e e - \set autoBeaming = ##t - e8 e e e - } \\ { - c8 c c c c8 c c c - } ->> +\relative { + e''8 e e e + \set autoBeaming = ##t + e8 e e e +} \\ +\relative { + c''8 c c c c8 c c c +} @end lilypond 変更は @q{オンザフライ} (その場、その時々) で適用されるため、@c @@ -1938,7 +1997,7 @@ R1*2 (この場合は、@code{Voice} です) にセットしようと試みても、効果はありません。@c なぜなら、@code{skipBars} は @code{Score} コンテキストのプロパティだからです。 -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,fragment,verbatim] R1*2 \set skipBars = ##t R1*2 @@ -1962,18 +2021,17 @@ R1*2 音楽表記を囲っているコンテキストにセットされたプロパティは、@c 囲まれているコンテキストの中にある @code{\unset} では変更されません: -@lilypond[quote,verbatim,relative=2] +@lilypond[quote,fragment,verbatim] \set Score.autoBeaming = ##t -<< - { - \unset autoBeaming - e8 e e e - \unset Score.autoBeaming - e8 e e e - } \\ { - c8 c c c c8 c c c - } ->> +\relative { + \unset autoBeaming + e''8 e e e + \unset Score.autoBeaming + e8 e e e +} \\ +\relative { + c''8 c c c c8 c c c +} @end lilypond @code{\set} と同様に、 @@ -1993,11 +2051,11 @@ R1*2 @code{\set} の前に @code{\once} を置くと、@c その設定は単一の時間ステップにだけ適用されます: -@lilypond[quote,verbatim,relative=2] -c4 +@lilypond[quote,fragment,verbatim] +c''4 \once \set fontSize = #4.7 -c4 -c4 +c''4 +c''4 @end lilypond 利用可能なすべてのコンテキスト プロパティについての完全な記述は、@c @@ -2014,15 +2072,15 @@ Translation @expansion{} Tunable context properties. 内部リファレンス: @rinternals{Tunable context properties} -@cindex grob properties (グラフィカル オブジェクト プロパティ) -@cindex properties, grob (グラフィカル オブジェクト プロパティ) -@funindex \override - @node override コマンド @subsection @code{\override} コマンド @translationof The override command +@cindex grob properties (グラフィカル オブジェクト プロパティ) +@cindex properties, grob (グラフィカル オブジェクト プロパティ) +@funindex \override + 特殊なタイプのコンテキスト プロパティがあります: グラフィカル オブジェクト記述です。@c グラフィカル オブジェクト記述には @code{StudlyCaps} という名前 @@ -2033,89 +2091,94 @@ Translation @expansion{} Tunable context properties. @file{scm/define-grobs.scm} を参照してください。@c 各グラフィカル オブジェクト記述は @code{\override} を用いて変更します。 -@code{\override} は、実際のところ、簡略化した記述です。 +@code{\override} コマンドの構文は以下の通りです: @example -\override @var{context}.@var{GrobName} #'@var{property} = #@var{value} +\override [@var{context}.]@var{GrobName}.@var{property} = #@var{value} @end example -@noindent -これは、以下と等価です: - -@c leave this long line -gp -@example -\set @var{context}.@var{GrobName} = - #(cons (cons '@var{property} @var{value}) - ) -@end example - -@code{context}.@code{GrobName} (alist) の値は、@c -個々のグラフィカル オブジェクトのプロパティを初期化するために使用されます。@c -グラフィカル オブジェクトは、Scheme スタイルの名前 -(小文字の単語を @code{-} でつないだもの) のプロパティを持ちます。@c -グラフィカル オブジェクト プロパティの値は、@c -フォーマット処理の間ずっと変更されています: -基本的に、フォーマット処理は、@c -コールバック関数を用いてプロパティを計算することに他なりません。@c - 例えば、@code{Stem} オブジェクトの @code{thickness} プロパティを@c オーバライドすることによって、符幹の太さを太くすることができます: -@lilypond[quote,verbatim,relative=2] -c4 c -\override Voice.Stem #'thickness = #3.0 -c4 c +@lilypond[quote,fragment,verbatim] +c''4 c'' +\override Voice.Stem.thickness = #3.0 +c''4 c'' @end lilypond -If no context is specified in an @code{\override}, the bottom -context is used: +@code{\override} でコンテキストが指定されていない場合、その下にある@c +コンテキストに適用されます: -@lilypond[quote,verbatim,relative=2] -{ \override Staff.Stem #'thickness = #3.0 - << - { - e4 e - \override Stem #'thickness = #0.5 - e4 e - } \\ { - c4 c c c - } - >> -} +@lilypond[quote,fragment,verbatim] +\override Staff.Stem.thickness = #3.0 +<< + \relative { + e''4 e + \override Stem.thickness = #0.5 + e4 e + } \\ + \relative { + c''4 c c c + } +>> @end lilypond +調整可能なオプションには @q{サブプロパティ} があり、これはプロパティの@c +内部に存在します。@c +これを調整するには、以下のような形式のコマンドを用います: + +@example +\override Stem.details.beamed-lengths = #'(4 4 3) +@end example + +また、スパナの端を変更するには、以下のようにします: + +@example +\override TextSpanner.bound-details.left.text = #"left text" +\override TextSpanner.bound-details.right.text = #"right text" +@end example + @funindex \revert @cindex reverting overrides (オーバライドを元に戻す) @cindex overrides, reverting (オーバライドを元に戻す) -@code{\override} の効果は、@code{\revert} によって元に戻すことができます: +@code{\override} の効果は、@code{\revert} によって元に戻すことができます。 -@lilypond[quote,verbatim,relative=2] -c4 -\override Voice.Stem #'thickness = #3.0 -c4 c -\revert Voice.Stem #'thickness -c4 +@code{\revert} の構文は以下の通りです: + +@example +\revert [@var{context}.]@var{GrobName}.@var{property} +@end example + +例を示します: + +@lilypond[quote,verbatim] +\relative { + c''4 + \override Voice.Stem.thickness = #3.0 + c4 c + \revert Voice.Stem.thickness + c4 +} @end lilypond @code{\override} と @code{\revert} の効果は、@c その時点から影響を受けるコンテキストの中にある@c すべてのグラフィカル オブジェクトに適用されます: -@lilypond[quote,verbatim,relative=2] -{ - << - { - e4 - \override Staff.Stem #'thickness = #3.0 - e4 e e - } \\ { - c4 c c - \revert Staff.Stem #'thickness - c4 - } - >> -} +@lilypond[quote,verbatim] +<< + \relative { + e''4 + \override Staff.Stem.thickness = #3.0 + e4 e e + } \\ + \relative { + c''4 c c + \revert Staff.Stem.thickness + c4 + } +>> @end lilypond @funindex \once @@ -2124,19 +2187,18 @@ c4 @code{\once} を @code{\override} と共に用いることで、@c カレントの時間ステップだけに効果を与えることができます: -@lilypond[quote,verbatim,relative=2] -{ - << - { - \override Stem #'thickness = #3.0 - e4 e e e - } \\ { - c4 - \once \override Stem #'thickness = #3.0 - c4 c c - } - >> -} +@lilypond[quote,verbatim] +<< + \relative c { + \override Stem.thickness = #3.0 + e''4 e e e + } \\ + \relative { + c''4 + \once \override Stem.thickness = #3.0 + c4 c c + } +>> @end lilypond @@ -2144,7 +2206,7 @@ c4 Commands which change output generally look like @example -\override Voice.Stem #'thickness = #3.0 +\override Voice.Stem.thickness = #3.0 @end example @noindent @@ -2157,13 +2219,6 @@ To construct this tweak we must determine these bits of information: @item a sensible value: here @code{3.0}. @end itemize -Some tweakable options are called @q{subproperties} and reside inside -properties. To tweak those, use commands in the form - -@example -\override Stem #'(details beamed-lengths) = #'(4 4 3) -@end example - @cindex internal documentation @cindex finding graphical objects @cindex graphical object descriptions @@ -2201,7 +2256,7 @@ and the program reference. @code{\tweak} コマンドは以下のような構文を持ちます: @example -\tweak @var{layout-object} #'@var{grob-property} @var{value} +\tweak [@var{layout-object}.]@var{grob-property} @var{value} @end example @code{layout-object} の指定はオプションです。@c @@ -2214,21 +2269,23 @@ graphical objects. For objects that are created directly from an item in the input file, you can use the @code{\tweak} command. For example: -@lilypond[relative=2,verbatim,quote] -< c - \tweak #'color #red - d - g - \tweak #'duration-log #1 - a -> 4 --\tweak #'padding #8 --^ +@lilypond[verbatim,quote] +\relative { + < c'' + \tweak color #red + d + g + \tweak duration-log #1 + a + > 4 + -\tweak padding #8 + -^ +} @end lilypond -But the main use of the @code{\tweak} command is to modify just +The main use of the @code{\tweak} command is to modify just one of a number of notation elements which start at the same musical moment, like the notes of a chord, or tuplet brackets which start at the same time. @@ -2249,15 +2306,15 @@ note, and able to modify it. So, this works: -@lilypond[relative=2,verbatim,quote] -<\tweak #'color #red c>4 +@lilypond[verbatim,fragment,quote] +<\tweak color #red c''>4 @end lilypond @noindent but this does not: -@lilypond[relative=2,verbatim,quote] -\tweak #'color #red c4 +@lilypond[verbatim,fragment,quote] +\tweak color #red c''4 @end lilypond @end ignore @@ -2286,20 +2343,20 @@ but this does not: 以下の例では、和音の中にある符頭の 1 つの色を変更し、@c さらに他の符頭のタイプを変更しています: -@lilypond[relative=2,verbatim,quote] -< c - \tweak #'color #red - d - g - \tweak #'duration-log #1 - a +@lilypond[verbatim,fragment,quote] +< c'' + \tweak color #red + d'' + g'' + \tweak duration-log #1 + a'' > 4 @end lilypond @code{\tweak} を用いて、スラーを変更することができます: -@lilypond[verbatim,quote,relative=1] -c-\tweak #'thickness #5 ( d e f) +@lilypond[verbatim,quote] +\relative { c'-\tweak thickness #5 ( d e f) } @end lilypond @@ -2312,10 +2369,10 @@ c-\tweak #'thickness #5 ( d e f) オブジェクトは @code{EventChord} の内部にあるイベントによって作成される@c からです: -@lilypond[relative=2,verbatim,quote] -\tweak #'color #red c4 -\tweak #'color #red 4 -<\tweak #'color #red c e>4 +@lilypond[verbatim,fragment,quote] +\tweak color #red c''4 +\tweak color #red 4 +<\tweak color #red c'' e''>4 @end lilypond 単純な @code{\tweak} コマンドでは入力から直接作成されないオブジェクトを@c @@ -2325,13 +2382,14 @@ c-\tweak #'thickness #5 ( d e f) のではなく、後になって @code{NoteHead} レイアウト オブジェクトによって@c 生成されるからです。 -そのような直接作成されないレイアウト オブジェクトは、明示的な形式の -@code{\tweak} コマンドを用いることで調整することができます: +そのような直接作成されないレイアウト オブジェクトは、グラフィカル +オブジェクト名を明示的に指定した @code{\tweak} コマンドを用いることで@c +調整することができます: -@lilypond[relative=2,verbatim,quote] -\tweak Stem #'color #red -\tweak Beam #'color #green c8 e -4 +@lilypond[fragment,verbatim,quote] +\tweak Stem.color #red +\tweak Beam.color #green c''8 e'' +4 @end lilypond @code{\tweak} コマンドで音部記号や拍子記号を変更することはできません。@c @@ -2342,14 +2400,14 @@ c-\tweak #'thickness #5 ( d e f) 記譜要素の前に複数の @code{\tweak} コマンドを配置することができます -- それらはすべて効果を持ちます: -@lilypond[verbatim,quote,relative=1] -c --\tweak #'style #'dashed-line --\tweak #'dash-fraction #0.2 --\tweak #'thickness #3 --\tweak #'color #red - \glissando -f' +@lilypond[verbatim,fragment,quote] +c' + -\tweak style #'dashed-line + -\tweak dash-fraction #0.2 + -\tweak thickness #3 + -\tweak color #red + \glissando +f'' @end lilypond 入力ファイルのあるセクションから生成される音楽の流れ @@ -2446,7 +2504,7 @@ property (modified with @code{\set}) was created. % 譜間スペースを減らします \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 } @@ -2463,7 +2521,7 @@ property (modified with @code{\set}) was created. @lilypond[quote,verbatim] \new PianoStaff \with { - \override StaffGrouper #'staff-staff-spacing = + \override StaffGrouper.staff-staff-spacing = #'((basic-distance . 0) (minimum-distance . 0) (padding . 0) @@ -2483,10 +2541,10 @@ property (modified with @code{\set}) was created. このため、以下の 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) @@ -2507,7 +2565,7 @@ property (modified with @code{\set}) was created. ネストされた宣言を用いてキー値を個々に更新する方が安全です。 @warning{ネストされた宣言は、コンテキスト プロパティ連想配列 -(@code{beamExceptions}, @code{keySignature}, @code{timeSignatureSettings} 等) +(@code{beamExceptions}, @code{keyAlterations}, @code{timeSignatureSettings} 等) に対しては機能しません。@c これらのプロパティを変更するには、@c 連想配列として丸ごと再定義するしかありません。} @@ -2649,7 +2707,14 @@ property (modified with @code{\set}) was created. これらの選択のほとんどは LilyPond によって自動的に決定されますが、@c 強制的に向きや配置を指定することが望ましい場合もあります。 -@strong{アーティキュレーションの方向指示子} +@menu +* アーティキュレーションの方向指示子:: +* 方向プロパティ:: +@end menu + +@node アーティキュレーションの方向指示子 +@unnumberedsubsubsec アーティキュレーションの方向指示子 +@translationof Articulation direction indicators デフォルトでは、アーティキュレーションのいくつかの向きは常に上または下に@c なっています (例えば、強弱記号やフェルマータ)。@c @@ -2677,14 +2742,18 @@ property (modified with @code{\set}) was created. 方向指示子は、その後にくる音符だけに効果を持ちます: -@lilypond[verbatim,quote,relative=2] -c2( c) -c2_( c) -c2( c) -c2^( c) +@lilypond[verbatim,quote] +\relative { + c''2( c) + c2_( c) + c2( c) + c2^( c) +} @end lilypond -@strong{方向プロパティ} +@node 方向プロパティ +@unnumberedsubsubsec 方向プロパティ +@translationof The direction property 多くのレイアウト オブジェクトの位置や向きは、@c @code{direction} プロパティによって制御されます。 @@ -2729,13 +2798,15 @@ TrillPitchGroup - not tried これらの指示子は、キャンセルされるまで効果を持ちます。 -@lilypond[verbatim,quote,relative=2] -c2( c) -\slurDown -c2( c) -c2( c) -\slurNeutral -c2( c) +@lilypond[verbatim,quote] +\relative { + c''2( c) + \slurDown + c2( c) + c2( c) + \slurNeutral + c2( c) +} @end lilypond 多声の音楽では、一般的にオブジェクトの向きを変えるよりも明示的に @@ -2772,7 +2843,7 @@ LilyPond における距離には 2 つのタイプがあります: 絶対距離 値の後ろに @code{\staff-space} を付けることにより、 比率で指定することもできます (次の段落を参照してください)。@c ページ レイアウトについての詳細は、@c -@ref{ページ レイアウト} に記述されています。 +@ref{Page layout} に記述されています。 相対距離は常に譜スペースを単位として指定されます -- 稀に、半譜スペースが使用されます。@c @@ -2808,7 +2879,7 @@ Scheme 関数 @code{magstep} を使用することができます。@c @rlearning{オブジェクトの長さと太さ} 記譜法リファレンス: -@ref{ページ レイアウト}, +@ref{Page layout}, @ref{譜サイズを設定する} @@ -2833,22 +2904,22 @@ Scheme 関数 @code{magstep} を使用することができます。@c 譜線の本数は、@code{'line-positions} の値リストの中にある要素数によって、@c 暗黙的に定義されます。} -@lilypond[verbatim,quote,relative=1] +@lilypond[verbatim,quote] \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 } +\relative { a4 e' f b | d1 } @end lilypond 譜の幅を変更することができます。@c 単位は譜スペースです。@c 譜内部のオブジェクトのスペースは、この設定によって影響を受けません。 -@lilypond[verbatim,quote,relative=1] +@lilypond[verbatim,quote] \new Staff \with { - \override StaffSymbol #'width = #23 + \override StaffSymbol.width = #23 } -{ a4 e' f b | d1 } +\relative { a4 e' f b | d1 } @end lilypond @@ -2869,12 +2940,19 @@ Scheme 関数 @code{magstep} を使用することができます。@c いくつかのスパナ -- 2 つのオブジェクトの間に直線を描くもの -- は、さらに、@c @code{line-spanner-interface} をサポートします。 +@menu +* spanner-interface を使用する:: +* line-spanner-interface を使用する:: +@end menu + +@node spanner-interface を使用する @unnumberedsubsubsec @code{spanner-interface} を使用する +@translationof Using the spanner-interface このインターフェイスは、@c いくつかのスパナに適用される 2 つのプロパティを提供します。 -@strong{@i{@code{minimum-length} プロパティ}} +@subsubsubheading The @code{minimum-length} プロパティ スパナの最短の長さは、@code{minimum-length} プロパティによって指定されます。@c 通常、このプロパティを増加させると、@c @@ -2905,12 +2983,12 @@ Works not at all for: @end ignore @c KEEP LY -@lilypond[verbatim,quote,relative=2] -a~a -a +@lilypond[verbatim,quote,fragment] +a'~ a' +a' % タイの長さを増加させます --\tweak #'minimum-length #5 -~a +-\tweak minimum-length #5 +~ a' @end lilypond @c KEEP LY @@ -2919,32 +2997,36 @@ a1 \compressFullBarRests R1*23 % 休符バーの長さを増加させます -\once \override MultiMeasureRest #'minimum-length = #20 +\once \override MultiMeasureRest.minimum-length = #20 R1*23 a1 @end lilypond @c KEEP LY -@lilypond[verbatim,quote,relative=2] -a \< a a a \! -% ヘアピンの長さを増加させます -\override Hairpin #'minimum-length = #20 -a \< a a a \! +@lilypond[verbatim,quote] +\relative { + a' \< a a a \! + % ヘアピンの長さを増加させます + \override Hairpin.minimum-length = #20 + a \< a a a \! +} @end lilypond さらに、このオーバライドはスラーとフレージング スラーの長さを@c 増加させるためにも使用されます: -@lilypond[verbatim,quote,relative=2] -a( a) -a --\tweak #'minimum-length #5 -( a) - -a\( a\) -a --\tweak #'minimum-length #5 -\( a\) +@lilypond[verbatim,quote] +\relative { + a'( g) + a + -\tweak minimum-length #5 + ( g) + + a\( g\) + a + -\tweak minimum-length #5 + \( g\) +} @end lilypond いくつかのレイアウト オブジェクトでは、@c @@ -2958,35 +3040,35 @@ a 効果を持ちません: @c KEEP LY -@lilypond[verbatim,quote,relative=1] +@lilypond[verbatim,fragment,quote] % デフォルト -e \glissando c' +e' \glissando c'' % 単独では効果を持ちません -\once \override Glissando #'minimum-length = #20 -e, \glissando c' +\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 -e, \glissando c' +\once \override Glissando.minimum-length = #20 +\once \override Glissando.springs-and-rods = #ly:spanner::set-spacing-rods +e' \glissando c'' @end lilypond @code{Beam} オブジェクトでも同じことが言えます: @c KEEP LY -@lilypond[verbatim,quote,relative=1] +@lilypond[verbatim,fragment,quote] % 単独では効果を持ちません -\once \override Beam #'minimum-length = #20 -e8 e e e +\once \override Beam.minimum-length = #20 +e'8 e' e' e' % 以下の両方のオーバライドが存在する場合にのみ、効果を持ちます -\once \override Beam #'minimum-length = #20 -\once \override Beam #'springs-and-rods = #ly:spanner::set-spacing-rods -e8 e e e +\once \override Beam.minimum-length = #20 +\once \override Beam.springs-and-rods = #ly:spanner::set-spacing-rods +e'8 e' e' e' @end lilypond -@strong{@i{@code{to-barline} プロパティ}} +@subsubsubheading The @code{to-barline} プロパティ @code{spanner-interface} の 2 番目に有用なプロパティは @code{to-barline} です。@c @@ -2995,10 +3077,12 @@ e8 e e e 直前の小節線のところで終了させられます。@c 偽に設定すると、スパナは小節線を越えて、音符のところで終了します: -@lilypond[verbatim,quote,relative=2] -a \< a a a a \! a a a \break -\override Hairpin #'to-barline = ##f -a \< a a a a \! a a a +@lilypond[verbatim,quote] +\relative { + a' \< a a a a \! a a a \break + \override Hairpin.to-barline = ##f + a \< a a a a \! a a a +} @end lilypond このプロパティはすべてのスパナに対して効果を持つわけではありません。@c @@ -3006,7 +3090,9 @@ a \< a a a a \! a a a あるいは小節線で終了させることに意味が無い他のスパナに対して、@c このプロパティを @code{#t} に設定しても効果がありません。 +@node line-spanner-interface を使用する @unnumberedsubsubsec @code{line-spanner-interface} を使用する +@translationof Using the line-spanner-interface @code{line-spanner-interface} をサポートするオブジェクトには@c 以下のものがあります: @@ -3029,11 +3115,11 @@ a \< a a a a \! a a a プロパティ階層内で 2 階層下にネストされていますが、@c この @code{\override} コマンドは非常にシンプルです: -@lilypond[relative=2,quote,verbatim] -e2 \glissando b -\once \override Glissando #'(bound-details left Y) = #3 -\once \override Glissando #'(bound-details right Y) = #-2 -e2 \glissando b +@lilypond[quote,fragment,verbatim] +e''2 \glissando b' +\once \override Glissando.bound-details.left.Y = #3 +\once \override Glissando.bound-details.right.Y = #-2 +e''2 \glissando b' @end lilypond @code{Y} プロパティの単位は @code{staff-space} であり、@c @@ -3049,8 +3135,8 @@ e2 \glissando b 例を示します: @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 @@ -3090,7 +3176,7 @@ f1 水平スパナに @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 @@ -3105,15 +3191,11 @@ c2\startTextSpan b c a\stopTextSpan 記号が上下します: @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 @@ -3202,11 +3284,11 @@ c2 \< c2 c2 関数は呼び出されず、そのオブジェクトは描画されません。@c @code{\rever} でデフォルトの動作に戻すことができます。 -@lilypond[quote,verbatim,relative=1] +@lilypond[quote,fragment,verbatim] a1 a -\override Score.BarLine #'stencil = ##f +\omit Score.BarLine a a -\revert Score.BarLine #'stencil +\undo \omit Score.BarLine a a a @end lilypond @@ -3221,10 +3303,10 @@ a a a @code{#t} にセットされると、そのオブジェクトはスペースを占めたままですが、@c 不可視になります。 -@lilypond[quote,verbatim,relative=2] -a4 a -\once \override NoteHead #'transparent = ##t -a a +@lilypond[quote,fragment,verbatim] +a'4 a' +\once \hide NoteHead +a' a' @end lilypond @node オブジェクトを白で描く @@ -3248,9 +3330,9 @@ a a これにより、以下に示すように、@c 白いオブジェクトの画像が幽霊のように浮かび上がることがあります: -@lilypond[quote,verbatim,relative=2] -\override Staff.Clef #'color = #white -a1 +@lilypond[quote,fragment,verbatim] +\override Staff.Clef.color = #white +a'1 @end lilypond オブジェクトの描画順序を変更することにより、これを回避することができます。@c @@ -3277,10 +3359,10 @@ a1 より小さな値 -- 例えば、@code{-1} -- を与えて、@c 音部記号を先に描画させる必要があります: -@lilypond[quote,verbatim,relative=2] -\override Staff.Clef #'color = #white -\override Staff.Clef #'layer = #-1 -a1 +@lilypond[quote,fragment,verbatim] +\override Staff.Clef.color = #white +\override Staff.Clef.layer = #-1 +a'1 @end lilypond @node break-visibility を用いる @@ -3356,12 +3438,11 @@ a1 @item @code{Clef} @tab @code{Staff} @tab @code{begin-of-line-visible} @item @code{Custos} @tab @code{Staff} @tab @code{end-of-line-visible} @item @code{DoublePercentRepeat} @tab @code{Voice} @tab @code{begin-of-line-invisible} -@c omit KeyCancellation until it can be explained -td -@c @item @code{KeyCancellation} @tab ?? @tab @code{begin-of-line-invisible} +@item @code{KeyCancellation} @tab @code{Staff} @tab @code{begin-of-line-invisible} @item @code{KeySignature} @tab @code{Staff} @tab @code{begin-of-line-visible} @c omit LeftEdge until it can be explained -td @c @item @code{LeftEdge} @tab @code{Score} @tab @code{center-invisible} -@item @code{OctavateEight} @tab @code{Staff} @tab @code{begin-of-line-visible} +@item @code{ClefModifier} @tab @code{Staff} @tab @code{begin-of-line-visible} @item @code{RehearsalMark} @tab @code{Score} @tab @code{end-of-line-invisible} @item @code{TimeSignature} @tab @code{Staff} @tab @code{all-visible} @@ -3370,14 +3451,16 @@ a1 以下の例は、小節線の可視性を制御するベクトルの使用方法を示しています: @c KEEP LY -@lilypond[quote,verbatim,relative=1,ragged-right] -f4 g a b -f4 g a b -% カレント行の最後で小節線を削除します -\once \override Score.BarLine #'break-visibility = #'#(#f #t #t) -\break -f4 g a b -f4 g a b +@lilypond[quote,verbatim,ragged-right] +\relative { + f'4 g a b + f4 g a b + % カレント行の最後で小節線を削除します + \once \override Score.BarLine.break-visibility = #'#(#f #t #t) + \break + f4 g a b + f4 g a b +} @end lilypond @code{break-visibility} をオーバライドするために使用される@c @@ -3396,14 +3479,14 @@ f4 g a b 描画するには @code{begin-of-line-invisible} を用い、@c 描画しないのなら @code{all-invisible} を用います。 @item Key signature -- 以下を参照してください -@item OctavateEight -- 以下を参照してください +@item ClefModifier -- 以下を参照してください @end itemize @node 特別な考慮を必要とするもの @unnumberedsubsubsec 特別な考慮を必要とするもの @translationof Special considerations -@strong{@emph{明示的な変更の後の可視性}} +@subsubsubheading 明示的な変更の後の可視性 @cindex key signature, visibility following explicit change (明示的な変更の後の調号の可視性) @cindex explicitKeySignatureVisibility @@ -3413,21 +3496,23 @@ f4 g a b @code{break-visibility} プロパティが調号の可視性と音部記号の変更を@c 制御するのは、行の先頭 -- つまり、改行の後 -- においてだけです。@c 行の途中や終わりでの明示的な調の変更や音部記号の変更の後に出現する@c -調合や音部記号の可視性には効果を持ちません。@c +調号や音部記号の可視性には効果を持ちません。@c 以下の例では、@code{all-invisible} がセットされていますが、@c B フラット メジャーへの明示的な変更の後に出現する調号は可視のままです。 @c KEEP LY -@lilypond[quote,verbatim,relative=1,ragged-right] -\key g \major -f4 g a b -% すべての調号を削除しようと試みます -\override Staff.KeySignature #'break-visibility = #all-invisible -\key bes \major -f4 g a b -\break -f4 g a b -f4 g a b +@lilypond[quote,verbatim,ragged-right] +\relative { + \key g \major + f'4 g a b + % すべての調号を削除しようと試みます + \override Staff.KeySignature.break-visibility = #all-invisible + \key bes \major + f4 g a b + \break + f4 g a b + f4 g a b +} @end lilypond そのような明示的な調号や音部記号の変更の可視性は @@ -3446,40 +3531,80 @@ f4 g a b オブジェクトを削除するには適切な @code{break-visibility} をオーバライドする必要があります。 -@lilypond[quote,verbatim,relative=1,ragged-right] -\key g \major -f4 g a b -\set Staff.explicitKeySignatureVisibility = #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 +@lilypond[quote,verbatim,ragged-right] +\relative { + \key g \major + f'4 g a b + \set Staff.explicitKeySignatureVisibility = #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 +} @end lilypond -@strong{@emph{忠告の臨時記号の可視性}} +@subsubsubheading 前の調をキャンセルする臨時記号の可視性 -明示的な調の変更で描画される忠告の臨時記号を削除するには、@c +明示的な調の変更で描画される前の調をキャンセルする臨時記号を削除するには、@c @code{Staff} コンテキスト プロパティ @code{printKeyCancellation} に @code{#f} をセットします: -@lilypond[quote,verbatim,relative=1,ragged-right] -\key g \major -f4 g a b -\set Staff.explicitKeySignatureVisibility = #all-invisible -\set Staff.printKeyCancellation = ##f -\override Staff.KeySignature #'break-visibility = #all-invisible -\key bes \major -f4 g a b \break -f4 g a b -f4 g a b +@lilypond[quote,verbatim,ragged-right] +\relative { + \key g \major + f'4 g a b + \set Staff.explicitKeySignatureVisibility = #all-invisible + \set Staff.printKeyCancellation = ##f + \override Staff.KeySignature.break-visibility = #all-invisible + \key bes \major + f4 g a b \break + f4 g a b + f4 g a b +} @end lilypond このオーバライドによって、調の変更を示す臨時記号だけが残ります。 +調を C@tie{}メジャーや A@tie{}マイナーに変更する時、前の調をキャンセル@c +する臨時記号は前の調のキャンセルしている @emph{だけ} であることに@c +注意してください。@c +そのようなケースでは、@code{printKeyCancellation} を @code{#f} に@c +設定しても効果はありません: + +@lilypond[quote,verbatim,ragged-right] +\relative { + \key g \major + f'4 g a b + \set Staff.explicitKeySignatureVisibility = #all-invisible + \set Staff.printKeyCancellation = ##f + \key c \major + f4 g a b \break + f4 g a b + f4 g a b +} +@end lilypond + +調を C@tie{}メジャーや A@tie{}マイナーに変更する場合に、@c +前の調をキャンセルする臨時記号を消すには、@code{KeyCancellation} +グラフィカル オブジェクトの可視性をオーバライドします: + +@lilypond[quote,verbatim,ragged-right] +\relative { + \key g \major + f'4 g a b + \set Staff.explicitKeySignatureVisibility = #all-invisible + \override Staff.KeyCancellation.break-visibility = #all-invisible + \key c \major + f4 g a b \break + f4 g a b + f4 g a b +} +@end lilypond + @c TODO Add visibility of cautionary accidentals before notes -@strong{@emph{自動小節線}} +@subsubsubheading 自動小節線 @cindex automaticBars @cindex bar lines, suppressing (小節線を消す) @@ -3497,18 +3622,18 @@ f4 g a b @c TODO Add example -@strong{@emph{オクターブ移調付きの音部記号}} +@subsubsubheading オクターブ移調付きの音部記号 -@cindex octavated clefs, visibility of (オクターブ移調付きの音部記号の可視性) -@cindex visibility of octavated clefs (オクターブ移調付きの音部記号の可視性) -@cindex clefs, visibility of octavation (オクターブ移調付きの音部記号の可視性) +@cindex transposed clefs, visibility of (オクターブ移調付きの音部記号の可視性) +@cindex visibility of transposed clefs (オクターブ移調付きの音部記号の可視性) +@cindex clefs, visibility of transposition (オクターブ移調付きの音部記号の可視性) オクターブ移調付きの音部記号上の小さなオクターブ記号は -@code{OctavateEight} レイアウト オブジェクトによって作り出されます。@c +@code{ClefModifier} レイアウト オブジェクトによって作り出されます。@c このオブジェクトの可視性は @code{Clef} オブジェクトの可視性とは独立して制御されます。@c そのため、各行の先頭においてそのような音部記号を完全に消そうとするなら、@c -@code{Clef} オブジェクトと @code{OctavateEight} オブジェクトの両方に対して@c +@code{Clef} オブジェクトと @code{ClefModifier} オブジェクトの両方に対して@c 必要な @code{break-visibility} のオーバライドを行う必要があります。 明示的な音部記号の変更では、@c @@ -3540,13 +3665,13 @@ f4 g a b @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 @@ -3555,10 +3680,12 @@ d,2 \glissando d'2 それらをオーバライドすることもできます: @c TODO Complete -@lilypond[relative=2,ragged-right,verbatim,quote] -e2 \glissando f -\once \override Glissando #'(bound-details right Y) = #-2 -e2 \glissando f +@lilypond[ragged-right,verbatim,quote] +\relative { + e''2 \glissando f + \once \override Glissando.bound-details.right.Y = #-2 + e2 \glissando f +} @end lilypond グリッサンドの終点の @code{Y} には @code{-2} がセットされています。@c @@ -3608,10 +3735,10 @@ e2 \glissando f レイアウト オブジェクトを回転させることが有用な状況はあまりありません。@c 以下の例は、有用であるかもしれないシチュエーションの 1 つを示しています: -@lilypond[quote,verbatim,relative=1] -g4\< e' d' f\! -\override Hairpin #'rotation = #'(20 -1 0) -g,,4\< e' d' f\! +@lilypond[quote,fragment,verbatim] +g4\< e' d'' f''\! +\override Hairpin.rotation = #'(20 -1 0) +g4\< e' d'' f''\! @end lilypond @node マークアップを回転させる @@ -3629,12 +3756,12 @@ g,,4\< e' d' f\! セットしています。@c そうしなければテキストのいくつかは高く押し上げられてしまいます。 -@lilypond[quote,verbatim,relative=1] -\override TextScript #'outside-staff-priority = ##f +@lilypond[quote,fragment,verbatim] +\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" } -fis^\markup { \rotate #30 "an F-Sharp" } +des'^\markup { \rotate #30 "a D-Flat" } +fis'^\markup { \rotate #30 "an F-Sharp" } @end lilypond @@ -3741,15 +3868,15 @@ fis^\markup { \rotate #30 "an F-Sharp" } 以下の例は、3 つの音符を示していて、1 つはデフォルト配置の運指記号を持ち、@c 他の 2 つの運指記号は @code{X-offset} と @code{Y-offset} が変更されています。 -@lilypond[verbatim,quote,relative=2] -a-3 -a --\tweak #'X-offset #0 --\tweak #'Y-offset #0 +@lilypond[verbatim,fragment,quote] +a'-3 +a' +-\tweak X-offset #0 +-\tweak Y-offset #0 -3 -a --\tweak #'X-offset #-1 --\tweak #'Y-offset #1 +a' +-\tweak X-offset #-1 +-\tweak Y-offset #1 -3 @end lilypond @@ -3805,7 +3932,7 @@ a @unnumberedsubsubsec @code{self-alignment-interface} を使用する @translationof Using the @code{self-alignment-interface} -@emph{オブジェクトを自動的に水平方向に揃える} +@subsubsubheading オブジェクトを自動的に水平方向に揃える @code{self-alignment-interface} をサポートするオブジェクトの水平方向の揃えは、@c @code{self-alignment-X} プロパティの値によって制御され、@c @@ -3829,19 +3956,19 @@ a @code{\tweak} コマンドを用いることで@c 単一の音符に付けられている複数の注釈を個別に揃えることができます: -@lilypond[quote,verbatim,relative=1] +@lilypond[quote,verbatim,fragment] 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 -@emph{オブジェクトを自動的に垂直方向に揃える} +@subsubsubheading オブジェクトを自動的に垂直方向に揃える オブジェクトの @code{Y-offset} プロパティに @code{ly:self-alignment-interface::y-aligned-on-self} がセットされていれば、@c @@ -3861,7 +3988,7 @@ a' 記号 @code{DOWN}, @code{CENTER}, それに @code{UP} は@c それぞれ @w{@code{-1}, @code{0}, それに @code{1}} に対応します。 -@emph{オブジェクトを自動的に両方向に揃える} +@subsubsubheading オブジェクトを自動的に両方向に揃える @code{X-offset} と @code{Y-offset} の両方の設定を行うことで、@c オブジェクトの水平方向と垂直方向の揃えを同時に行うことができます。 @@ -3869,11 +3996,11 @@ a' 以下の例は、運指記号を符頭に近づけるための調整方法を示しています。 @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 % 上方向に移動させます +@lilypond[quote,verbatim,fragment] +a' +-\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 @@ -3924,26 +4051,26 @@ example shows the difference: リハーサル記号と小節番号はオブジェクトの上で水平方向に中央揃えされます: @c KEEP LY -@lilypond[verbatim,quote,relative=1] +@lilypond[verbatim,quote,fragment] % リハーサル記号は音部記号の上に中央揃えされます -\override Score.RehearsalMark #'break-align-symbols = #'(clef) +\override Score.RehearsalMark.break-align-symbols = #'(clef) \key a \major \clef treble \mark "↓" -e1 +e'1 % リハーサル記号は拍子記号の上に中央揃えされます -\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. +e'2. % リハーサル記号はブレス記号の上に中央揃えされます -\override Score.RehearsalMark #'break-align-symbols = #'(breathing-sign) +\override Score.RehearsalMark.break-align-symbols = #'(breathing-sign) \key a \major \clef treble \time 4/4 -e1 +e'1 \breathe \mark "↓" @end lilypond @@ -3958,28 +4085,28 @@ e1 小節線が不可視である場合、小節線があるはずの場所に揃えられます。 @c KEEP LY -@lilypond[verbatim,quote,relative=1] +@lilypond[verbatim,quote,fragment] % リハーサル記号は調号の上に中央揃えされます -\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 +e'1 % リハーサル記号は音部記号の上に中央揃えされます \set Staff.explicitKeySignatureVisibility = #all-invisible -\override Score.RehearsalMark #'break-align-symbols = #'(key-signature clef) -\key a \minor +\override Score.RehearsalMark.break-align-symbols = #'(key-signature clef) +\key a \major \clef bass \mark "↓" -gis,,1 +gis,1 % リハーサル記号は小節線の上に中央揃えされます \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 "↓" -e''1 +e'1 @end lilypond 以下の例で示すように、@c @@ -3987,24 +4114,24 @@ e''1 複数の譜を持つ楽譜では、この設定はすべての譜に適用されます。 @c KEEP LY -@lilypond[verbatim,quote,relative=1] +@lilypond[verbatim,quote,fragment] % 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 +e'1 % 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 +e'1 % 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 +e'1 @end lilypond また、リハーサル記号を左端に揃えて、@c @@ -4012,20 +4139,20 @@ e 単位は譜スペースです: @c KEEP LY -@lilypond[verbatim,quote,relative=1] +@lilypond[verbatim,quote,fragment] % リハーサル記号は調号の左端に揃えられて % さらに 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 +e'1 % リハーサル記号は調号の左端に揃えられて % さらに 2 譜スペース左にずらされます -\once \override Score.KeySignature #'break-align-anchor = #-2 +\once \override Score.KeySignature.break-align-anchor = #-2 \key a \major \mark "↓" -e1 +e'1 @end lilypond @@ -4074,15 +4201,15 @@ Staff, Lyrics 等はそれ自体でそれぞれに VerticalAxisGroup を持ち @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" } } -\relative c'' { - a a \XinO a a +\relative { + a' a \XinO a a } @end lilypond @@ -4119,10 +4246,24 @@ Feta フォントに含まれる任意の図柄を提供することができま @cindex Bézier curves (ベジエ曲線) @cindex Bézier control points (ベジエ曲線の制御ポイント) -タイ、スラー、それにフレージング スラーは 3 次のベジエ曲線として描かれます。@c -自動的に算出されるタイあるいはスラーの形状が最適ではない場合、@c -3 次ベジエ曲線を定義するのに必要な 4 つの制御ポイントを@c -明示的に指定することによって、形状を変更することができます。 +@code{Tie}, @code{Slur}, @code{PhrasingSlur}, @code{LaissezVibrerTie}, +それに @code{RepeatTie} はすべて 3 次のベジエ曲線として描かれます。@c +自動的に算出されるタイやスラーの形状が最適ではない場合、以下の 2 つの@c +方法を用いて手動で形状を変更することができます:@c + +@enumerate a +@item +自動的に算出されるベジエ曲線の制御ポイントの移動させる + +@item +求める曲線を定義するのに必要な 4 つの制御ポイントの位置を明示的に指定する +@end enumerate + +2 つの方法について以下で説明します。@c +曲線の調節がわずかであれば、最初の方法が適しています。@c +2 番目の方法は単一の音符に関連付けられる曲線を作り出す場合に適しています。 + +@subsubsubheading 3 次ベジエ曲線 3 次あるいは 3 乗のベジエ曲線は、4 つの制御ポイントによって定義されます。@c 1 番目と 4 番目の制御ポイントは曲線の始点と終点になります。@c @@ -4134,54 +4275,176 @@ Web でベジエ曲線が描かれる様子を示すアニメーションを@c 徐々に 3 番目の制御ポイントの方へ向きを変えながら 4 番目の制御ポイントの方へ向かい続け、@c 3 番目の制御ポイントから 4 番目の制御ポイントに到達します。@c -ベジエ曲線は 4 つの制御ポイントからなる四角形の中に納まります。 +ベジエ曲線は 4 つの制御ポイントからなる四角形の中に納まります。@c +制御ポイントの平行移動、回転、伸縮はすべて同じ操作です。 + +@subsubsubheading 制御ポイントを移動させる -ここで、@c -タイが最適化されず、@code{\tieDown} が役に立たないケースを例として挙げます。 +@cindex shaping slurs and ties (スラーとタイの形状) +@funindex \shape + +以下の例では、タイの自動配置が最適ではなく、@code{\tieDown} も役に@c +立ちません。 @lilypond[verbatim,quote,relative=1] << - { e1 ~ e } + { e1 ~ 1 } \\ { r4 } >> @end lilypond -以下のようにタイの制御ポイントを手動で変更することにより、@c -このタイの形状を改善することができます。 - -ベジエ制御ポイントの座標は譜スペースを単位として指定されます。@c -X@tie{}座標はそのタイあるいはスラーを取り付けられる音符の参照ポイントからの@c -相対座標であり、Y@tie{}座標は譜の中央線からの相対座標です。@c -制御ポイント座標は 10 進数 (実数) のペアを 4 つ持つリストとして設定されます。@c -最適な制御ポイントを決定するための手順は、 -2 つの終点の座標を見積もり、それから 2 つの中間ポイントを推測することで、@c -制御ポイントの座標を決定します。@c -最適値はトライ&エラーで見つけ出します。 - -左右対称の曲線にするには制御ポイントを左右対称に配置する必要があるということを@c -覚えておくと役に立ちます。@c -また、ベジエ曲線の制御ポイントに平行移動、回転、それに拡大縮小などの変換を@c -適用することにより、@c -その曲線を変換できるという特性があるとも覚えておいてください。 - -上記の実例として、以下の例のオーバライドで満足のいくタイが得られています。@c -オーバライドを配置する場所 --- タイ (あるいはスラー) が開始する音符の直前に配置する必要があります -- -に注意してください。 +@code{\shape} でタイの制御ポイントを調節することで衝突を避けることが@c +できます。 + +@code{\shape} の構文は以下の通りです: -@lilypond[verbatim,quote,relative=1] +@example +[-]@code{\shape} @var{displacements} @var{item} +@end example + +これは @var{item} の制御ポイントを @var{displacements} だけ移動させます。@c +引数 @var{displacements} は数のペアのリスト、あるいはそのようなリストの@c +リストです。@c +ペアの要素は制御ポイントの座標の移動量を表しています。@c +@var{item} が文字列の場合、指定されたグラフィカル オブジェクト タイプ@c +に @code{\once \override} で適用されます。@c +@var{item} が音楽表記の場合、その音楽表記に調節が適用されます。 + +言い換えると、@code{\shape} 関数は、引数 @var{item} が @qq{Slur} +のようなグラフィカル オブジェクト名であるか @qq{(} のような音楽表記@c +であるかによって、@code{\once \override} コマンドあるいは @code{\tweak} +コマンドのどちらにでもなり得ます。@c +引数 @var{displacements} は 4 つの (dx . dy) ペアのリストで 4 つの@c +制御ポイントの移動を指定します -- 値の単位は譜スペースです。 +(曲線が複数のセグメントを持つ場合、引数 @var{displacements} は 4 つの@c +ペアを持つリストのリストになります。) + +@code{\tweak} 形式で用いる場合にのみ、先頭にハイフン @code{-} を付ける@c +必要があrます。 + +それでは、上記の例に @code{\once \override} 形式の @code{\shape} を@c +使ってタイを 0.5 譜スペースだけ上に移動させてみましょう: + +@lilypond[verbatim,quote] << { - \once \override Tie - #'control-points = #'((1 . -1) (3 . 0.6) (12.5 . 0.6) (14.5 . -1)) - e1 ~ e + \shape #'((0 . 0.5) (0 . 0.5) (0 . 0.5) (0 . 0.5)) Tie + e'1~ 1 } \\ - { r4 } + \relative { r4 } >> @end lilypond +タイの位置は改善されましたが、中央部分をもっと持ち上げるべきです。@c +以下の例で @code{\tweak} 形式でそれを行っています: + +@lilypond[verbatim,quote] +<< + { + e'1-\shape #'((0 . 0.5) (0 . 1) (0 . 1) (0 . 0.5)) ~ e' + } +\\ + \relative { r4 } +>> +@end lilypond + +同じ方法で制御ポイントを水平方向に移動させることもできて、同じ音楽@c +タイミングで発生する 2 つの曲線をうまく配置することができます: + +@lilypond[verbatim,quote,ragged-right] +\relative { + c''8(\( a) a'4 e c\) + \shape #'((0.7 . -0.4) (0.5 . -0.4) (0.3 . -0.3) (0 . -0.2)) Slur + \shape #'((0 . 0) (0 . 0.5) (0 . 0.5) (0 . 0)) PhrasingSlur + c8(\( a) a'4 e c\) +} +@end lilypond + +@code{\shape} 関数は改行を跨ぐ曲線の制御ポイントを移動させることも@c +できます。@c +分割される曲線それぞれにリストを与えて制御ポイントを移動させます。@c +片方の曲線は変更する必要がない場合、空のリストを渡します。@c +以下の例では、1 つのスラーが改行で 2 つに分割されています: + +@lilypond[verbatim,quote,ragged-right] +\relative { + c'4( f g c + \break + d,4 c' f, c) +} +@end lilypond + +分割されたスラーの形状を変更することで、改行を跨いで続くスラーである@c +ことがわかりやすくなります: + +@c KEEP LY +@lilypond[verbatim,quote,ragged-right] +% 片方のスラーを変更する必要がない場合、 +% () を ((0 . 0) (0 . 0) (0 . 0) (0 . 0)) の短縮形として使うことができます +\relative c' { + \shape #'( + (( 0 . 0) (0 . 0) (0 . 0) (0 . 1)) + ((0.5 . 1.5) (1 . 0) (0 . 0) (0 . -1.5)) + ) Slur + c4( f g c + \break + d,4 c' f, c) +} +@end lilypond + +S 字曲線が求められた場合は、常に制御ポイントを手動で調節する必要があります +--- LilyPond が自動的にそのような形状を選択することはありません。 + +@lilypond[verbatim,quote] +\relative c'' { + c8( e b-> f d' a e-> g) + \shape #'((0 . -1) (5.5 . -0.5) (-5.5 . -10.5) (0 . -5.5)) PhrasingSlur + c8\( e b-> f d' a e-> g\) +} +@end lilypond + +@subsubsubheading 制御ポイントの位置を明示的に指定する + +ベジエ曲線の制御ポイントの座標を指定します -- 単位は譜スペースです。@c +X@tie{}座標はタイあるいはスラーを取り付ける音符の参照ポイントからの@c +相対位置で、X@tie{}座標は譜の中央線からの相対位置です。@c +制御ポイントの座標をリストで指定します -- リストは数のペアを 4 つ持ちます。@c +両端の座標を推測して、それから 2 つ中間点の座標を推測します。@c +最適値はトライ&エラーで見つけます。@c +音楽やレイアウトに変更が加えられた場合、手動で値を調節する必要がある@c +ということに注意してください。 + +制御ポイントを移動させるよりも、位置を明示的に指定する方が望ましい@c +シチュエーションの 1 つは、単一の音符に関連付けられる曲線の場合です。@c +ここで、そのような例を示します。@c +繰り返しの差し替え部分まで延びるスラーを表示する方法を示しています。 + +@c KEEP LY +@lilypond[verbatim,quote] +\relative { + c''1 + \repeat volta 3 { c4 d( e f } + \alternative { + { g2) d } + { + g2 + % スラーを作成して、新しい位置に移動させます + % <> はスラーを終わらせるための空の和音です + -\tweak control-points #'((-2 . 3.8) (-1 . 3.9) (0 . 4) (1 . 3.4)) ( <> ) + f, + } + { + e'2 + % スラーを作成して、新しい位置に移動させます + -\tweak control-points #'((-2 . 3) (-1 . 3.1) (0 . 3.2) (1 . 2.4)) ( <> ) + f, + } + } +} +@end lilypond + @knownissues 同じ音楽タイミングに複数のタイあるいはスラーが存在する場合、@c @code{control-points} プロパティを変更しても@c @@ -4194,17 +4457,17 @@ X@tie{}座標はそのタイあるいはスラーを取り付けられる音符 内部リファレンス: @rinternals{TieColumn} + +@node unpure-pure コンテナ +@subsection unpure-pure コンテナ +@translationof Unpure-pure containers + @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 上書きする際に有用です。 @@ -4264,12 +4527,12 @@ starting and ending column. '(-0.5 . 0.5))))) squareLineCircleSpace = { - \override NoteHead #'stencil = #square-line-circle-space + \override NoteHead.stencil = #square-line-circle-space } smartSquareLineCircleSpace = { \squareLineCircleSpace - \override NoteHead #'Y-extent = + \override NoteHead.Y-extent = #(ly:make-unpure-pure-container ly:grob::stencil-height (lambda (grob start end) (ly:grob::stencil-height grob))) @@ -4278,9 +4541,9 @@ smartSquareLineCircleSpace = { \new Voice \with { \remove "Stem_engraver" } \relative c'' { \squareLineCircleSpace - cis4 ces cisis c + cis4 ces disis d \smartSquareLineCircleSpace - cis4 ces cisis c + cis4 ces disis d } @end lilypond @@ -4323,7 +4586,7 @@ smartSquareLineCircleSpace = { @example function = #(define-music-function - (parser location @var{arg1} @var{arg2} @dots{}) + (@var{arg1} @var{arg2} @dots{}) (@var{type1?} @var{type2?} @dots{}) #@{ @var{@dots{}music@dots{}} @@ -4399,14 +4662,14 @@ symbol? @lilypond[quote,verbatim,ragged-right] padText = #(define-music-function - (parser location padding) + (padding) (number?) #{ - \once \override TextScript #'padding = $padding + \once \override TextScript.padding = $padding #}) -\relative c''' { - c4^"piu mosso" b a b +\relative { + c'''4^"piu mosso" b a b \padText #1.8 c4^"piu mosso" d e f \padText #2.6 @@ -4419,17 +4682,17 @@ padText = @lilypond[quote,verbatim,ragged-right] custosNote = #(define-music-function - (parser location note) + (note) (ly:music?) #{ - \tweak NoteHead #'stencil #ly:text-interface::print - \tweak NoteHead #'text + \tweak NoteHead.stencil #ly:text-interface::print + \tweak NoteHead.text \markup \musicglyph #"custodes.mensural.u0" - \tweak Stem #'stencil ##f + \tweak Stem.stencil ##f #note #}) -\relative c' { c4 d e f \custosNote g } +\relative { c'4 d e f \custosNote g } @end lilypond 複数の引数をとる置換関数を定義することもできます: @@ -4437,16 +4700,16 @@ custosNote = @lilypond[quote,verbatim,ragged-right] tempoPadded = #(define-music-function - (parser location padding tempotext) + (padding tempotext) (number? markup?) #{ - \once \override Score.MetronomeMark #'padding = $padding + \once \override Score.MetronomeMark.padding = $padding \tempo \markup { \bold #tempotext } #}) -\relative c'' { +\relative { \tempo \markup { "Low tempo" } - c4 d e f g1 + c''4 d e f g1 \tempoPadded #4.0 "High tempo" g4 f e d c1 }