| [ << Expressive marks ] | [トップ][目次] | [ Simultaneous notes >> ] |
| [ < Expressive marks: 複数の音符にまたがる強弱記号を縦方向に揃える ] | [ 上へ : Top ] | [ Repeats: 繰り返し括弧を他の譜にも追加する > ] |
Repeats
| [ << Repeats ] | [トップ][目次] | [ Simultaneous notes >> ] |
| [ < Repeats ] | [ 上へ : Repeats ] | [ Repeats: 小節番号を中央揃えする > ] |
繰り返し括弧を他の譜にも追加する
デフォルトでは、Volta_engraver は Score コンテキストに属しており、繰り返しの括弧は通常最上段の譜の上にのみ表示されます。これを調整するには、Volta_engraver を、括弧を表示させたい譜の
Staff コンテキストに追加します。“複数譜に繰り返し括弧を表示する”
スニペットも参照してください。
<<
\new Staff { \repeat volta 2 { c'1 } \alternative { c' } }
\new Staff { \repeat volta 2 { c'1 } \alternative { c' } }
\new Staff \with { \consists "Volta_engraver" } { c'2 g' e' a' }
\new Staff { \repeat volta 2 { c'1 } \alternative { c' } }
>>
| [ << Repeats ] | [トップ][目次] | [ Simultaneous notes >> ] |
| [ < Repeats: 繰り返し括弧を他の譜にも追加する ] | [ 上へ : Repeats ] | [ Repeats: デフォルトの小節線を変更する > ] |
小節番号を中央揃えする
大きなアンサンブル スコアでは、小節番号がシステムの下に、また小節の中央に表示されるものがあります。このスニペットは Measure_counter_engraver を用いて、この慣習を模倣する方法を示しています。ここでは、Dynamics
コンテキストにエングラーバを追加しています。
\layout {
\context {
\Dynamics
\consists #Measure_counter_engraver
\override MeasureCounter.direction = #DOWN
\override MeasureCounter.font-encoding = #'latin1
\override MeasureCounter.font-shape = #'italic
% to control the distance of the Dynamics context from the staff:
\override VerticalAxisGroup.nonstaff-relatedstaff-spacing.padding = #2
}
\context {
\Score
\remove "Bar_number_engraver"
}
}
pattern = \repeat unfold 7 { c'4 d' e' f' }
\new StaffGroup <<
\new Staff {
\pattern
}
\new Staff {
\pattern
}
\new Dynamics {
\startMeasureCount
s1*7
\stopMeasureCount
}
>>
| [ << Repeats ] | [トップ][目次] | [ Simultaneous notes >> ] |
| [ < Repeats: 小節番号を中央揃えする ] | [ 上へ : Repeats ] | [ Repeats: 譜をまたがるトレモロ > ] |
デフォルトの小節線を変更する
デフォルトの小節線は、Score コンテキストで再定義することで変更することができます。
% http://lsr.di.unimi.it/LSR/Item?id=964
%%=> http://lists.gnu.org/archive/html/lilypond-user/2014-03/msg00126.html
%%=> http://lilypond.1069038.n5.nabble.com/Changing-the-default-end-repeat-bracket-tc169357.html
\layout {
\context {
\Score
%% Changing the defaults from engraver-init.ly
defaultBarType = #"!"
startRepeatType = #"[|:"
endRepeatType = #":|]"
doubleRepeatType = #":|][|:"
}
}
%% example:
{
c'1
\repeat volta 2 { \repeat unfold 2 c' }
\repeat volta 2 { \repeat unfold 2 c' }
\alternative {
{ c' }
{
%% v2.18 workaround
\once\override Score.VoltaBracket.shorten-pair = #'(1 . -1)
c'
}
}
\bar "|."
}
| [ << Repeats ] | [トップ][目次] | [ Simultaneous notes >> ] |
| [ < Repeats: デフォルトの小節線を変更する ] | [ 上へ : Repeats ] | [ Repeats: トレモロを符幹に接触せずに譜刻する > ] |
譜をまたがるトレモロ
\repeat tremolo は、和音のトレモロに対してはちょうど 2 つの引数を取らなければならないため、譜をまたがる和音のトレモロは
同じ括弧内に音を配置し、\change Staff コマンドで譜を変更する必要があります。
\new PianoStaff <<
\new Staff = "up" \relative c'' {
\key a \major
\time 3/8
s4.
}
\new Staff = "down" \relative c'' {
\key a \major
\time 3/8
\voiceOne
\repeat tremolo 6 {
<a e'>32
{
\change Staff = "up"
\voiceTwo
<cis a' dis>32
}
}
}
>>
| [ << Repeats ] | [トップ][目次] | [ Simultaneous notes >> ] |
| [ < Repeats: 譜をまたがるトレモロ ] | [ 上へ : Repeats ] | [ Repeats: 独立したパーセント繰り返し > ] |
トレモロを符幹に接触せずに譜刻する
トレモロの演奏時間が 4 分音符より短い場合や、ちょうど 2 分音符である場合、あるいは 2 分音符と全音符の間の長さである場合は、連桁を符幹と接触させて表示することが一般的です。スタイルによっては、いくつかの連桁が符幹に接触せずに中央に描かれる場合があります。このような符幹に接触しないトレモロの連桁の数は、Beam オブジェクトの gap-count
プロパティでコントロールされます。また、連桁と符幹との間隔は gap
プロパティでセットされます。
\relative c'' {
\repeat tremolo 8 { a32 f }
\override Beam.gap-count = #1
\repeat tremolo 8 { a32 f }
\override Beam.gap-count = #2
\repeat tremolo 8 { a32 f }
\override Beam.gap-count = #3
\repeat tremolo 8 { a32 f }
\override Beam.gap-count = #3
\override Beam.gap = #1.33
\repeat tremolo 8 { a32 f }
\override Beam.gap = #1
\repeat tremolo 8 { a32 f }
\override Beam.gap = #0.67
\repeat tremolo 8 { a32 f }
\override Beam.gap = #0.33
\repeat tremolo 8 { a32 f }
}
| [ << Repeats ] | [トップ][目次] | [ Simultaneous notes >> ] |
| [ < Repeats: トレモロを符幹に接触せずに譜刻する ] | [ 上へ : Repeats ] | [ Repeats: 小節カウンタ > ] |
独立したパーセント繰り返し
パーセント繰り返しを単独で表示することができます。
makePercent =
#(define-music-function (note) (ly:music?)
"Make a percent repeat the same length as NOTE."
(make-music 'PercentEvent
'length (ly:music-length note)))
\relative c'' {
\makePercent s1
}
| [ << Repeats ] | [トップ][目次] | [ Simultaneous notes >> ] |
| [ < Repeats: 独立したパーセント繰り返し ] | [ 上へ : Repeats ] | [ Repeats: 小節のグループに番号付けする > ] |
小節カウンタ
このスニペットは、透明なパーセント繰り返しを用いて、小節カウンタを表示する方法を示しています。
<<
\context Voice = "foo" {
\clef bass
c4 r g r
c4 r g r
c4 r g r
c4 r g r
}
\context Voice = "foo" {
\set countPercentRepeats = ##t
\hide PercentRepeat
\override PercentRepeatCounter.staff-padding = #1
\repeat percent 4 { s1 }
}
>>
| [ << Repeats ] | [トップ][目次] | [ Simultaneous notes >> ] |
| [ < Repeats: 小節カウンタ ] | [ 上へ : Repeats ] | [ Repeats: パーセント繰り返しのカウンタの可視性 > ] |
小節のグループに番号付けする
このスニペットは Measure_counter_engraver で、連続した小節をいくつかにグループ分けし、それぞれに番号を表示する方法を示しています。どのような範囲を取っても良く、繰り返しが含まれていてもかまいません。
エングラーバは適切なコンテキストに追加する必要があります。今回は
Staff コンテキストを使用しています。他の選択肢としては
Dynamics コンテキストがあります。
カウンタは \startMeasureCount で始まり、\stopMeasureCount
で終わります。番号はデフォルトで 1 から開始しますが、count-from
プロパティをオーバライドすることで変更することができます。
小節の途中で改行される場合、小節番号は 2 回表示されます。改行後の数字は括弧付きで表示されます。
\layout {
\context {
\Staff
\consists #Measure_counter_engraver
}
}
\new Staff {
\startMeasureCount
\repeat unfold 7 {
c'4 d' e' f'
}
\stopMeasureCount
\bar "||"
g'4 f' e' d'
\override Staff.MeasureCounter.count-from = #2
\startMeasureCount
\repeat unfold 5 {
g'4 f' e' d'
}
g'4 f'
\bar ""
\break
e'4 d'
\repeat unfold 7 {
g'4 f' e' d'
}
\stopMeasureCount
}
| [ << Repeats ] | [トップ][目次] | [ Simultaneous notes >> ] |
| [ < Repeats: 小節のグループに番号付けする ] | [ 上へ : Repeats ] | [ Repeats: パーセント繰り返しのカウンタ > ] |
パーセント繰り返しのカウンタの可視性
パーセント繰り返しのカウンタは repeatCountVisibility コンテキスト
プロパティをセットすることで一定間隔で表示することができます。
\relative c'' {
\set countPercentRepeats = ##t
\set repeatCountVisibility = #(every-nth-repeat-count-visible 5)
\repeat percent 10 { c1 } \break
\set repeatCountVisibility = #(every-nth-repeat-count-visible 2)
\repeat percent 6 { c1 d1 }
}
| [ << Repeats ] | [トップ][目次] | [ Simultaneous notes >> ] |
| [ < Repeats: パーセント繰り返しのカウンタの可視性 ] | [ 上へ : Repeats ] | [ Repeats: セーニョとコーダを (改行を挟んで) 配置する > ] |
パーセント繰り返しのカウンタ
パーセント記号による小節の繰り返しが 2 回以上続く場合には、この例のようにプロパティをセットすることで、カウンタを表示することができます。
\relative c'' {
\set countPercentRepeats = ##t
\repeat percent 4 { c1 }
}
| [ << Repeats ] | [トップ][目次] | [ Simultaneous notes >> ] |
| [ < Repeats: パーセント繰り返しのカウンタ ] | [ 上へ : Repeats ] | [ Repeats: 入れ替え部分がある場合の二重繰り返しのデフォルトをセットする > ] |
セーニョとコーダを (改行を挟んで) 配置する
出口となるセーニョ記号を配置し、隣の通常譜線がある位置に “D.S. al Coda” のようなテキストを加えたい場合、以下のスニペットを用いることができます。コーダは新しい行から始まります。また、このスニペットには、コーダが同じ行に続くバージョンも用意されています。
{
\clef treble
\key g \major
\time 4/4
\relative c'' {
\repeat unfold 4 {
c4 c c c
}
% Set segno sign as rehearsal mark and adjust size if needed
% \once \override Score.RehearsalMark.font-size = #3
\mark \markup { \musicglyph "scripts.segno" }
\repeat unfold 2 {
c4 c c c
}
% Set coda sign as rehearsal mark and adjust size if needed
\once \override Score.RehearsalMark.font-size = #4
\mark \markup { \musicglyph "scripts.coda" }
\repeat unfold 2 {
c4 c c c
}
% Should Coda be on anew line?
% Coda NOT on new line: use \nobreak
% Coda on new line: DON'T use \nobreak
% \noBreak
\bar "||"
% Set segno sign as rehearsal mark and adjust size if needed
\once \override Score.RehearsalMark.break-visibility =
#begin-of-line-invisible
% \once \override Score.RehearsalMark.font-size = #3
\mark \markup { \musicglyph "scripts.segno" }
% Here begins the trickery!
% \cadenzaOn will suppress the bar count
% and \stopStaff removes the staff lines.
\cadenzaOn
\stopStaff
% Some examples of possible text-displays
% text line-aligned
% ==================
% Move text to the desired position
% \once \override TextScript.extra-offset = #'( 2 . -3.5 )
% | <>^\markup { D.S. al Coda } }
% text center-aligned
% ====================
% Move text to the desired position
% \once \override TextScript.extra-offset = #'( 6 . -5.0 )
% | <>^\markup { \center-column { D.S. "al Coda" } }
% text and symbols center-aligned
% ===============================
% Move text to the desired position
% and tweak spacing for optimum text alignment
\repeat unfold 1 {
s1
\bar ""
}
\once \override TextScript.extra-offset = #'( 0 . -3.0 )
\once \override TextScript.word-space = #1.5
<>^\markup { \center-column { "D.S. al Coda"
\line {
\musicglyph "scripts.coda"
\musicglyph "scripts.tenuto"
\musicglyph "scripts.coda"} } }
% Increasing the unfold counter will expand the staff-free space
\repeat unfold 3 {
s1
\bar ""
}
% Resume bar count and show staff lines again
\startStaff
\cadenzaOff
% Should Coda be on new line?
% Coda NOT on new line: DON'T use \break
% Coda on new line: use \break
\break
% Show up, you clef and key!
\once \override Staff.KeySignature.break-visibility = #end-of-line-invisible
\once \override Staff.Clef.break-visibility = #end-of-line-invisible
% Set coda sign as rehearsal mark and adjust size and position
% Put the coda sign on top of the (treble-)clef
% depending on coda's line-position
% Coda NOT on new line, use this:
% \once \override Score.RehearsalMark.extra-offset = #'( -2 . 1.75 )
% Coda on new line, use this:
\once \override Score.RehearsalMark.extra-offset = #'( -5 . .5 )
\once \override Score.RehearsalMark.font-size = #5
\mark \markup { \musicglyph "scripts.coda" }
% The coda
\repeat unfold 6 {
c4 c c c
}
\bar"|."
}
}
| [ << Repeats ] | [トップ][目次] | [ Simultaneous notes >> ] |
| [ < Repeats: セーニョとコーダを (改行を挟んで) 配置する ] | [ 上へ : Repeats ] | [ Repeats: 繰り返し括弧を短くする > ] |
入れ替え部分がある場合の二重繰り返しのデフォルトをセットする
入れ替え部分がある場合の二重繰り返しのスタイルには 3 種類あります。これは doubleRepeatType でセットすることができます。
\relative c'' {
\repeat volta 1 { c1 }
\set Score.doubleRepeatType = #":..:"
\repeat volta 1 { c1 }
\set Score.doubleRepeatType = #":|.|:"
\repeat volta 1 { c1 }
\set Score.doubleRepeatType = #":|.:"
\repeat volta 1 { c1 }
}
| [ << Repeats ] | [トップ][目次] | [ Simultaneous notes >> ] |
| [ < Repeats: 入れ替え部分がある場合の二重繰り返しのデフォルトをセットする ] | [ 上へ : Repeats ] | [ Repeats: 繰り返し括弧をコード ネームの下に表示する > ] |
繰り返し括弧を短くする
デフォルトでは、繰り返し括弧は入れ替え部分全体に表示されますが、voltaSpannerDuration をセットすることで短くすることができます。次の例では、括弧は 1 小節、つまり 3/4 分だけ表示されます。
\relative c'' {
\time 3/4
c4 c c
\set Score.voltaSpannerDuration = #(ly:make-moment 3/4)
\repeat volta 5 { d4 d d }
\alternative {
{
e4 e e
f4 f f
}
{ g4 g g }
}
}
| [ << Repeats ] | [トップ][目次] | [ Simultaneous notes >> ] |
| [ < Repeats: 繰り返し括弧を短くする ] | [ 上へ : Repeats ] | [ Repeats: 複数譜に繰り返し括弧を表示する > ] |
繰り返し括弧をコード ネームの下に表示する
Volta_engraver を対応する譜に付け加えることで、繰り返し括弧をコード ネームの下に表示できます。
\score {
<<
\chords {
c1
c1
}
\new Staff \with {
\consists "Volta_engraver"
}
{
\repeat volta 2 { c'1 }
\alternative { c' }
}
>>
\layout {
\context {
\Score
\remove "Volta_engraver"
}
}
}
| [ << Repeats ] | [トップ][目次] | [ Simultaneous notes >> ] |
| [ < Repeats: 繰り返し括弧をコード ネームの下に表示する ] | [ 上へ : Repeats ] | [ Repeats: repeatCommands を用いて入れ替え部分のテキストにマークアップを使用する > ] |
複数譜に繰り返し括弧を表示する
Volta_engraver を譜に追加することで、繰り返し括弧を楽譜の最上段の譜以外にも表示することができます。
voltaMusic = \relative c'' {
\repeat volta 2 {
c1
}
\alternative {
d1
e1
}
}
<<
\new StaffGroup <<
\new Staff \voltaMusic
\new Staff \voltaMusic
>>
\new StaffGroup <<
\new Staff \with { \consists "Volta_engraver" }
\voltaMusic
\new Staff \voltaMusic
>>
>>
| [ << Repeats ] | [トップ][目次] | [ Simultaneous notes >> ] |
| [ < Repeats: 複数譜に繰り返し括弧を表示する ] | [ 上へ : Repeats ] | [ Simultaneous notes > ] |
repeatCommands を用いて入れ替え部分のテキストにマークアップを使用する
入れ替え部分のある繰り返しは \repeat volta を用いて指定するのが最善ですが、入れ替え部分のテキストを \markup によってフォーマットする必要がある場合は、repeatCommands コンテキスト
プロパティを用いる必要があります。
repeatCommands はリストを取るため、マークアップを含める簡単な方法は、マークアップを変数として定義し、Scheme 構文を用いてリストに埋め込むことです
(#(list (list 'volta textIdentifier)), textIdentifier
は変数名)。繰り返し小節線の指定を、リストの別の要素から行うことができます。
voltaAdLib = \markup { 1. 2. 3... \text \italic { ad lib. } }
\relative c'' {
c1
\set Score.repeatCommands = #(list (list 'volta voltaAdLib) 'start-repeat)
c4 b d e
\set Score.repeatCommands = #'((volta #f) (volta "4.") end-repeat)
f1
\set Score.repeatCommands = #'((volta #f))
}
| [ << Repeats ] | [トップ][目次] | [ Simultaneous notes >> ] |
| [ < Repeats: 複数譜に繰り返し括弧を表示する ] | [ 上へ : Repeats ] | [ Simultaneous notes > ] |