| [Top][Contents] |
LilyPond — Snippets
|
This document shows a selected set of LilyPond snippets from the LilyPond Snippet Repository (LSR). It is in the public domain. We would like to address many thanks to Sebastiano Vigna for maintaining LSR web site and database, and the University of Milano for hosting LSR. Please note that this document is not an exact subset of LSR: some
snippets come from input/new LilyPond sources directory, and
snippets from LSR are converted through Snippets are grouped by tags; tags listed in the table of contents match a section of LilyPond notation manual. Snippets may have several tags, and not all LSR tags may appear in this document. In the HTML version of this document, you can click on the file name or figure for each example to see the corresponding input file. |
|
このマニュアルと他のドキュメントの関係について、あるいは、このマニュアルを他の形式で読む方法についての情報は、マニュアル を参照してください。 マニュアルのいずれかを見失ってしまった場合、https://lilypond.org/ にマニュアルがすべて揃っています。 |
| [ << Top ] | [Top][Contents] | [ Rhythms >> ] |
| [ < Top ] | [ Up: Top ] | [ 音域をボイスごとに追加する > ] |
1 Pitches
See also Pitches.
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < Pitches ] | [ Up: Pitches ] | [ オッターバを単一のボイスに対して適用する > ] |
音域をボイスごとに追加する
音域をボイスごとに追加することができます。この場合、衝突を避けるために
Ambitus を手動で移動する必要があります。
\new Staff << \new Voice \with { \consists "Ambitus_engraver" } \relative c'' { \override Ambitus.X-offset = 2.0 \voiceOne c4 a d e f1 } \new Voice \with { \consists "Ambitus_engraver" } \relative c' { \voiceTwo es4 f g as b1 } >>
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < 音域をボイスごとに追加する ] | [ Up: Pitches ] | [ Aiken head thin variant noteheads > ] |
オッターバを単一のボイスに対して適用する
譜に 2 つ以上のボイスがある場合、オッターバを設定すると、囲みの中にある全てのボイスの音符が移動してしまいます。オッターバを単一のボイスに対して適用したい場合には、middleCPosition とオッターバ囲みを明示的にセットする必要があります。ヘ音記号の middleCPosition は本来 6 にセットされており、これは譜の中央の線から 6 つ上であることを示しています。このスニペットでは、オッターバ部分の middleCPosition を 7 加算して、1 オクターブ移動しています。
\layout { \context { \Staff \remove Ottava_spanner_engraver } \context { \Voice \consists Ottava_spanner_engraver } } { \clef bass << { <g d'>1~ q2 <c' e'> } \\ { r2. \ottava -1 <b,,, b,,>4 ~ | q2 \ottava 0 <c e>2 } >> }
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < オッターバを単一のボイスに対して適用する ] | [ Up: Pitches ] | [ 連桁で繋がれた音符の符幹の長さを変更する > ] |
Aiken head thin variant noteheads
Aiken head white notes get harder to read at smaller staff sizes, especially with ledger lines. Losing interior white space makes them appear as quarter notes.
\score { { \aikenHeads c''2 a' c' a % Switch to thin-variant noteheads \set shapeNoteStyles = ##(doThin reThin miThin faThin sol laThin tiThin) c'' a' c' a } }
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < Aiken head thin variant noteheads ] | [ Up: Pitches ] | [ 音域 > ] |
連桁で繋がれた音符の符幹の長さを変更する
連桁で繋がれた音符の符幹の長さは、Stem.details の
beamed-lengths プロパティをオーバライドすることで変更できます。引数として単一の値が与えられた場合、設定された長さは連桁内の全ての音符に適用されます。複数の引数が与えられた場合、1 つ目は 8 分音符に対して、2 つ目は 16 分音符に対してというように適用されます。最後の引数は、それより音価の短い音符全てに対しても適用されます。整数でない値を用いることができます。
\relative c'' { \override Stem.details.beamed-lengths = #'(2) a8[ a] a16[ a] a32[ a] \override Stem.details.beamed-lengths = #'(8 10 12) a8[ a] a16[ a] a32[ a] r8 \override Stem.details.beamed-lengths = #'(8) a8[ a] \override Stem.details.beamed-lengths = #'(8.5) a8[ a] \revert Stem.details.beamed-lengths a8[ a] a16[ a] a32[ a] r16 }
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < 連桁で繋がれた音符の符幹の長さを変更する ] | [ Up: Pitches ] | [ Ambitus after key signature > ] |
音域
音域を表示します。
最高音や最低音が調号に含まれない場合には臨時記号が表示されます。Grob AmbitusNoteHead には加線を含みます。
\layout { \context { \Voice \consists "Ambitus_engraver" } } << \new Staff { \relative c' { \time 2/4 c4 f' } } \new Staff { \relative c' { \time 2/4 \key d \major cis4 as' } } >>
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < 音域 ] | [ Up: Pitches ] | [ 複数のボイスを持つ譜での音域 > ] |
Ambitus after key signature
By default, ambitus are positioned at the left of the clef. The
\ambitusAfter function allows for changing this placement.
Syntax is \ambitusAfter grob-interface; see
Graphical
Object Interfaces for a list of possible values for
grob-interface.
A common use case is printing the ambitus between key signature and time signature.
\new Staff \with { \consists Ambitus_engraver } \relative { \ambitusAfter key-signature \key d \major es'8 g bes cis d2 }
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < Ambitus after key signature ] | [ Up: Pitches ] | [ 音階に応じて異なる符頭のスタイルを適用する > ] |
複数のボイスを持つ譜での音域
Staff コンテキストに Ambitus_engraver を追加すると、譜にボイスが複数ある場合でも、譜ごとに音域を表示します。
\new Staff \with { \consists "Ambitus_engraver" } << \new Voice \relative c'' { \voiceOne c4 a d e f1 } \new Voice \relative c' { \voiceTwo es4 f g as b1 } >>
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < 複数のボイスを持つ譜での音域 ] | [ Up: Pitches ] | [ メロディに合わせて譜の中央にある音符の符幹の向きを自動で変更する > ] |
音階に応じて異なる符頭のスタイルを適用する
shapeNoteStyles プロパティは、音階
(調号と、tonic プロパティによる) に応じて符頭の形を変化させるために用いることができます。このプロパティは形のセットを与える必要がありますが、(triangle, cross, xcircle などの図形表現を用いて) 自由に定義できるほか、階名を使用して、アメリカの古い伝統の形を基に定義することができます (いくつかのラテン語の階名も使用することができます)。
古いアメリカの歌集を模倣するには、\aikenHeads や
\sacredHarpHeads といった定義済みのコマンドを符頭のスタイルとして用いることができます。
この例では、シェイプ ノートの符頭を得るいくつかの方法を示しています。また、和声機能と符頭の対応を維持しながらメロディを移調する機能も示しています。
fragment = { \key c \major c2 d e2 f g2 a b2 c } \new Staff { \transpose c d \relative c' { \set shapeNoteStyles = ##(do re mi fa #f la ti) \fragment } \break \relative c' { \set shapeNoteStyles = ##(cross triangle fa #f mensural xcircle diamond) \fragment } }
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < 音階に応じて異なる符頭のスタイルを適用する ] | [ Up: Pitches ] | [ オッターバ囲みのテキストを変更する > ] |
メロディに合わせて譜の中央にある音符の符幹の向きを自動で変更する
LilyPond では、Voice コンテキストに Melody_engraver を追加し、Stem の neutral-direction をオーバライドすることで、譜の中央にある音符の符幹の向きを、メロディに合わせて変更することができます。
\relative c'' { \time 3/4 a8 b g f b g | \set suspendMelodyDecisions = ##t a b g f b g | \unset suspendMelodyDecisions c b d c b c | } \layout { \context { \Voice \consists "Melody_engraver" \autoBeamOff } }
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < メロディに合わせて譜の中央にある音符の符幹の向きを自動で変更する ] | [ Up: Pitches ] | [ 音域の隙間を変更する > ] |
オッターバ囲みのテキストを変更する
内部的には、\ottava は ottavation プロパティを
(例えば、8va や 8vb に) セットし、middleCPosition プロパティを変更します。オッターバ囲みのテキストを変更するには、\ottava の後に
ottavation をセットするようにしてください。
オッターバ囲みが短い場合には、テキストを短くすると良いでしょう。
{ c'2 \ottava 1 \set Staff.ottavation = "8" c''2 \ottava 0 c'1 \ottava 1 \set Staff.ottavation = "Text" c''1 }
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < オッターバ囲みのテキストを変更する ] | [ Up: Pitches ] | [ 譜線の音程を変更する > ] |
音域の隙間を変更する
音域表示において、デフォルトの符頭と線との隙間を変更することができます。
\layout { \context { \Voice \consists "Ambitus_engraver" } } \new Staff { \time 2/4 % Default setting c'4 g'' } \new Staff { \time 2/4 \override AmbitusLine.gap = 0 c'4 g'' } \new Staff { \time 2/4 \override AmbitusLine.gap = 1 c'4 g'' } \new Staff { \time 2/4 \override AmbitusLine.gap = 1.5 c'4 g'' }
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < 音域の隙間を変更する ] | [ Up: Pitches ] | [ 音部記号を移動する > ] |
譜線の音程を変更する
音符の位置を変更するためには、staffLineLayoutFunction を使用します。このスニペットは、これを ly:pitch-semitones にセットし、半音が間隔 1 つ分になるクロマティック スケールを作り出しています。
scale = \relative c' { a4 ais b c cis4 d dis e f4 fis g gis a1 } \new Staff \with { \remove "Accidental_engraver" staffLineLayoutFunction = #ly:pitch-semitones } { << \scale \context NoteNames { \set printOctaveNames = ##f \scale } >> }
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < 譜線の音程を変更する ] | [ Up: Pitches ] | [ ピッチに応じて符頭の色を変更する > ] |
音部記号を移動する
音部記号をオクターブだけでなく、任意の位置に移動することができます。
\relative c' { \clef treble c4 c c c \clef "treble_8" c4 c c c \clef "treble_5" c4 c c c \clef "treble^3" c4 c c c }
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < 音部記号を移動する ] | [ Up: Pitches ] | [ 異なるピッチの音符列を作成する > ] |
ピッチに応じて符頭の色を変更する
符頭の色を、ピッチや名前に応じて変更することができます: この例で使われている関数では、異名同音を区別しています。
% Association list of pitches to colors. #(define color-mapping (list (cons (ly:make-pitch 0 0 NATURAL) (x11-color 'red)) (cons (ly:make-pitch 0 0 SHARP) (x11-color 'green)) (cons (ly:make-pitch 0 1 FLAT) (x11-color 'green)) (cons (ly:make-pitch 0 2 NATURAL) (x11-color 'red)) (cons (ly:make-pitch 0 2 SHARP) (x11-color 'green)) (cons (ly:make-pitch 0 3 FLAT) (x11-color 'red)) (cons (ly:make-pitch 0 3 NATURAL) (x11-color 'green)) (cons (ly:make-pitch 0 4 SHARP) (x11-color 'red)) (cons (ly:make-pitch 0 5 NATURAL) (x11-color 'green)) (cons (ly:make-pitch 0 5 FLAT) (x11-color 'red)) (cons (ly:make-pitch 0 6 SHARP) (x11-color 'red)) (cons (ly:make-pitch 0 1 NATURAL) (x11-color 'blue)) (cons (ly:make-pitch 0 3 SHARP) (x11-color 'blue)) (cons (ly:make-pitch 0 4 FLAT) (x11-color 'blue)) (cons (ly:make-pitch 0 5 SHARP) (x11-color 'blue)) (cons (ly:make-pitch 0 6 FLAT) (x11-color 'blue)))) % Compare pitch and alteration (not octave). #(define (pitch-equals? p1 p2) (and (= (ly:pitch-alteration p1) (ly:pitch-alteration p2)) (= (ly:pitch-notename p1) (ly:pitch-notename p2)))) #(define (pitch-to-color pitch) (let ((color (assoc pitch color-mapping pitch-equals?))) (if color (cdr color)))) #(define (color-notehead grob) (pitch-to-color (ly:event-property (event-cause grob) 'pitch))) \score { \new Staff \relative c' { \override NoteHead.color = #color-notehead c8 b d dis ees f g aes } }
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < ピッチに応じて符頭の色を変更する ] | [ Up: Pitches ] | [ カスタマイズされた調号を作成する > ] |
異なるピッチの音符列を作成する
同じ音符列が異なる音高で複数出現する音楽では、次の音楽関数が便利です。これは音符を引数として取り、その音高のみが使用されます。この例では Holst の The Planets の一曲、Mars に使用されるリズムを作り出しています。
rhythm = #(define-music-function (p) (ly:pitch?) "Make the rhythm in Mars (the Planets) at the given pitch" #{ \tuplet 3/2 { $p 8 8 8 } 4 4 8 8 4 #}) \new Staff { \time 5/4 \rhythm c' \rhythm c'' \rhythm g }
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < 異なるピッチの音符列を作成する ] | [ Up: Pitches ] | [ Direction of merged ‘fa’ shape note heads > ] |
カスタマイズされた調号を作成する
LilyPond はカスタマイズされた調号をサポートしています。この例では、フラットを広範囲に表示する D マイナーを作成しています。
\new Staff \with { \override StaffSymbol.line-count = #8 \override KeySignature.flat-positions = #'((-7 . 6)) \override KeyCancellation.flat-positions = #'((-7 . 6)) \override KeySignature.sharp-positions = #'((-6 . 7)) \override KeyCancellation.sharp-positions = #'((-6 . 7)) \override Clef.stencil = #(lambda (grob) (grob-interpret-markup grob #{ \markup\combine \musicglyph "clefs.C" \translate #'(-3 . -2) \musicglyph "clefs.F" #})) clefPosition = #3 middleCPosition = #3 middleCClefPosition = #3 } { \key d\minor f bes, f bes, | \key d\major fis b, fis b, | }
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < カスタマイズされた調号を作成する ] | [ Up: Pitches ] | [ Force a cancellation natural before accidentals > ] |
Direction of merged ‘fa’ shape note heads
Using property NoteCollision.fa-merge-direction, the direction
of “fa” shape note heads (“fa”, “faThin”, etc.) can be controlled
independently of the stem direction if two voices with the same pitch
and different stem directions are merged. If this property is not set,
the “down” glyph variant is used.
{ \clef bass << { \aikenHeads f2 \override Staff.NoteCollision.fa-merge-direction = #UP f2 } \\ { \aikenHeads f2 f2 } >> }
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < Direction of merged ‘fa’ shape note heads ] | [ Up: Pitches ] | [ 音部記号を強制的に表示する > ] |
Force a cancellation natural before accidentals
The following example shows how to force a natural sign before an accidental.
\relative c' { \key es \major bes c des \tweak Accidental.restore-first ##t eis }
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < Force a cancellation natural before accidentals ] | [ Up: Pitches ] | [ ランダムな音符を生成する > ] |
音部記号を強制的に表示する
音部記号がその前に表示されており、別の音部記号に変化していない場合、\clef コマンドで音部記号を指定しても何も表示されません。\set Staff.forceClef = ##t を指定することで、音部記号を強制的に再表示させることができます。
\relative c' { \clef treble c1 \clef treble c1 \set Staff.forceClef = ##t c1 \clef treble c1 }
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < 音部記号を強制的に表示する ] | [ Up: Pitches ] | [ タイで繋がれた音符が改行した際の臨時記号を隠す > ] |
ランダムな音符を生成する
この Scheme ベースのスニペットは、24 の (あるいは必要な分の) ランダムな音符を、現在の時間から (あるいは毎回同じ結果を得るために指定した数から) 生成します。別の音符列を生成したい場合は、数字を変更します。
randomNotes = #(define-music-function (n from to dur) (integer? ly:pitch? ly:pitch? ly:duration?) (let ((from-step (ly:pitch-steps from)) (to-step (ly:pitch-steps to))) (make-sequential-music (map (lambda (_) (let* ((step (+ from-step (random (- to-step from-step)))) (pitch (ly:make-pitch 0 step 0))) #{ $pitch $dur #})) (iota n))))) \randomNotes 24 c' g'' 8
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < ランダムな音符を生成する ] | [ Up: Pitches ] | [ 音部記号の変更を大きく表示する > ] |
タイで繋がれた音符が改行した際の臨時記号を隠す
タイで繋がれた音符が改行した際の臨時記号を隠す方法を示しています。
\relative c'' { \override Accidental.hide-tied-accidental-after-break = ##t cis1~ cis~ \break cis }
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < タイで繋がれた音符が改行した際の臨時記号を隠す ] | [ Up: Pitches ] | [ マカームの例 > ] |
音部記号の変更を大きく表示する
音部記号が変更される際、その音部記号は行頭のものよりも小さく表示されます。これは full-size-change で変更することができます。
\relative c' { \clef "treble" c1 \clef "bass" c1 \clef "treble" c1 \override Staff.Clef.full-size-change = ##t \clef "bass" c1 \clef "treble" c1 \revert Staff.Clef.full-size-change \clef "bass" c1 \clef "treble" c1 }
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < 音部記号の変更を大きく表示する ] | [ Up: Pitches ] | [ オッターヴァのスパナの傾きを変更する > ] |
マカームの例
マカームはトルコ発祥の旋法で、1/9 音の微分音を使用します。ピッチの名前や調号についての詳細は、初期化ファイル ‘ly/makam.ly’ を参照してください。
\include "makam.ly" \relative c' { \set Staff.keyAlterations = #`((6 . ,(- KOMA)) (3 . ,BAKIYE)) c4 cc db fk gbm4 gfc gfb efk fk4 db cc c }
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < マカームの例 ] | [ Up: Pitches ] | [ 非伝統的な調号 > ] |
オッターヴァのスパナの傾きを変更する
オッターヴァのスパナの傾きを変更することができます。
\relative c'' { \override Staff.OttavaBracket.stencil = #ly:line-spanner::print \override Staff.OttavaBracket.bound-details = #`((left . ((Y . 0) (attach-dir . ,LEFT) (padding . 0) (stencil-align-dir-y . ,CENTER))) (right . ((Y . 5.0) ; Change the number here (padding . 0) (attach-dir . ,RIGHT) (text . ,(make-draw-dashed-line-markup (cons 0 -1.2)))))) \override Staff.OttavaBracket.left-bound-info = #ly:horizontal-line-spanner::calc-left-bound-info-and-text \override Staff.OttavaBracket.right-bound-info = #ly:horizontal-line-spanner::calc-right-bound-info \ottava 1 c1 c'''1 }
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < オッターヴァのスパナの傾きを変更する ] | [ Up: Pitches ] | [ 演奏を容易にする記譜法で数字を使用する > ] |
非伝統的な調号
広く使われている \key コマンドは、Staff コンテキストの
keyAlterations をセットしています。非標準な調号を作成するには、このプロパティを直接セットします。
コマンドの形式は以下のようなリストです:
\set Staff.keyAlterations = #`(((octave . step) . alter) ((octave
. step) . alter) ...)
が構文です。リストの各要素について、octave がオクターブを指定し
(0 がミドル C からその上の B まで)、step はオクターブ内の音階 (0 が C, 6 が B)、alter が ,SHARP ,FLAT ,DOUBLE-SHARP
などです。
または、各要素についてより簡潔な形式があり、(step . alter) は全てのオクターブに対して変化記号が適用されます。“シャープ” が 100 セントではない微分音のスケールでは、alter
を 200 セントの全音を 1 とした数値で指定できます。
\include "arabic.ly" \relative do' { \set Staff.keyAlterations = #`((0 . ,SEMI-FLAT) (1 . ,SEMI-FLAT) (2 . ,FLAT) (5 . ,FLAT) (6 . ,SEMI-FLAT)) % \set Staff.extraNatural = ##f re reb \dwn reb resd dod dob dosd \dwn dob | dobsb dodsd do do | }
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < 非伝統的な調号 ] | [ Up: Pitches ] | [ オーケストラ、コーラス、ピアノのテンプレート > ] |
演奏を容易にする記譜法で数字を使用する
演奏を容易にする記譜法では、NoteHead オブジェクトの note-names
プロパティを使用し、符頭の内側に表示される文字を決定しています。このプロパティをオーバライドすることで、スケールの度数を表す数字を符頭に表示することができます。
全ての符頭オブジェクトに対してこれを適用するために、簡単なエングラーバを作成することができます。
#(define Ez_numbers_engraver (make-engraver (acknowledgers ((note-head-interface engraver grob source-engraver) (let* ((context (ly:translator-context engraver)) (tonic-pitch (ly:context-property context 'tonic)) (tonic-name (ly:pitch-notename tonic-pitch)) (grob-pitch (ly:event-property (event-cause grob) 'pitch)) (grob-name (ly:pitch-notename grob-pitch)) (delta (modulo (- grob-name tonic-name) 7)) (note-names (make-vector 7 (number->string (1+ delta))))) (ly:grob-set-property! grob 'note-names note-names)))))) #(set-global-staff-size 30) \layout { ragged-right = ##t \context { \Voice \consists \Ez_numbers_engraver } } \relative c' { \easyHeadsOn c4 d e f g4 a b c \break \key a \major a,4 b cis d e4 fis gis a \break \key d \dorian d,4 e f g a4 b c d }
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < 演奏を容易にする記譜法で数字を使用する ] | [ Up: Pitches ] | [ 追加のナチュラル記号が自動で追加されないようにする > ] |
オーケストラ、コーラス、ピアノのテンプレート
このテンプレートは StaffGroup と GrandStaff コンテキストをネストさせて用いることで、楽器のサブ グループを表示しています。また、\transpose を使用して、移調楽器の音符をコンサート ピッチの状態で変数に格納しています。
#(set-global-staff-size 17) \paper { indent = 3.0\cm % add space for instrumentName short-indent = 1.5\cm % add less space for shortInstrumentName } fluteMusic = \relative c' { \key g \major g'1 b } % Pitches as written on a manuscript for Clarinet in A % are transposed to concert pitch. clarinetMusic = \transpose c' a \relative c'' { \key bes \major bes1 d } trumpetMusic = \relative c { \key g \major g''1 b } % Key signature is often omitted for horns hornMusic = \transpose c' f \relative c { d'1 fis } percussionMusic = \relative c { \key g \major g1 b } sopranoMusic = \relative c'' { \key g \major g'1 b } sopranoLyrics = \lyricmode { Lyr -- ics } altoIMusic = \relative c' { \key g \major g'1 b } altoILyrics = \sopranoLyrics altoIIMusic = \relative c' { \key g \major g'1 b } altoIILyrics = \lyricmode { Ah -- ah } tenorMusic = \relative c' { \clef "treble_8" \key g \major g1 b } tenorLyrics = \sopranoLyrics pianoRHMusic = \relative c { \key g \major g''1 b } pianoLHMusic = \relative c { \clef bass \key g \major g1 b } violinIMusic = \relative c' { \key g \major g'1 b } violinIIMusic = \relative c' { \key g \major g'1 b } violaMusic = \relative c { \clef alto \key g \major g'1 b } celloMusic = \relative c { \clef bass \key g \major g1 b } bassMusic = \relative c { \clef "bass_8" \key g \major g,1 b } \book { \score { << \new StaffGroup = "StaffGroup_woodwinds" << \new Staff = "Staff_flute" \with { instrumentName = "Flute" } \fluteMusic \new Staff = "Staff_clarinet" \with { instrumentName = \markup { \concat { "Clarinet in B" \flat } } } % Declare that written Middle C in the music % to follow sounds a concert B flat, for % output using sounded pitches such as MIDI. %\transposition bes % Print music for a B-flat clarinet \transpose bes c' \clarinetMusic >> \new StaffGroup = "StaffGroup_brass" << \new Staff = "Staff_hornI" \with { instrumentName = "Horn in F" } % \transposition f \transpose f c' \hornMusic \new Staff = "Staff_trumpet" \with { instrumentName = "Trumpet in C" } \trumpetMusic >> \new RhythmicStaff = "RhythmicStaff_percussion" \with { instrumentName = "Percussion" } \percussionMusic \new PianoStaff \with { instrumentName = "Piano" } << \new Staff { \pianoRHMusic } \new Staff { \pianoLHMusic } >> \new ChoirStaff = "ChoirStaff_choir" << \new Staff = "Staff_soprano" \with { instrumentName = "Soprano" } \new Voice = "soprano" \sopranoMusic \new Lyrics \lyricsto "soprano" { \sopranoLyrics } \new GrandStaff = "GrandStaff_altos" \with { \accepts Lyrics } << \new Staff = "Staff_altoI" \with { instrumentName = "Alto I" } \new Voice = "altoI" \altoIMusic \new Lyrics \lyricsto "altoI" { \altoILyrics } \new Staff = "Staff_altoII" \with { instrumentName = "Alto II" } \new Voice = "altoII" \altoIIMusic \new Lyrics \lyricsto "altoII" { \altoIILyrics } >> \new Staff = "Staff_tenor" \with { instrumentName = "Tenor" } \new Voice = "tenor" \tenorMusic \new Lyrics \lyricsto "tenor" { \tenorLyrics } >> \new StaffGroup = "StaffGroup_strings" << \new GrandStaff = "GrandStaff_violins" << \new Staff = "Staff_violinI" \with { instrumentName = "Violin I" } \violinIMusic \new Staff = "Staff_violinII" \with { instrumentName = "Violin II" } \violinIIMusic >> \new Staff = "Staff_viola" \with { instrumentName = "Viola" } \violaMusic \new Staff = "Staff_cello" \with { instrumentName = "Cello" } \celloMusic \new Staff = "Staff_bass" \with { instrumentName = "Double Bass" } \bassMusic >> >> } }
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < オーケストラ、コーラス、ピアノのテンプレート ] | [ Up: Pitches ] | [ 調号が変化する際にナチュラル記号が表示されないようにする > ] |
追加のナチュラル記号が自動で追加されないようにする
伝統的な譜刻のスタイルに合わせて、前に出現したダブルシャープやダブルフラットがシャープやフラットでキャンセルされた場合には、ナチュラル記号が表示されます。これを現代の慣習に合わせて変更するには、Staff コンテキストの
extraNatural プロパティを f に設定します。
\relative c'' { aeses4 aes ais a \set Staff.extraNatural = ##f aeses4 aes ais a }
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < 追加のナチュラル記号が自動で追加されないようにする ] | [ Up: Pitches ] | [ 移調を含む他のボイスの引用 > ] |
調号が変化する際にナチュラル記号が表示されないようにする
調号が変化する際、前の調号を打ち消すナチュラル記号が自動的に表示されます。これは Staff コンテキストの printKeyCancellation プロパティを
f にセットすることで防止することができます。
\relative c' { \key d \major a4 b cis d \key g \minor a4 bes c d \set Staff.printKeyCancellation = ##f \key d \major a4 b cis d \key g \minor a4 bes c d }
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < 調号が変化する際にナチュラル記号が表示されないようにする ] | [ Up: Pitches ] | [ 調号の取り消し表示を新たな調号から離す > ] |
移調を含む他のボイスの引用
音楽の引用では、ソースとターゲットの両方で移調が考慮されます。この例では、全ての楽器が絶対ピッチとしてミドル C を演奏します。ターゲットは
F 管の楽器です。ターゲットとなるパート内で \transpose を用いて移調することができ、この場合は全てのピッチが移調されます
(訳注: 以前は引用を含めたピッチが移調されていましたが、2.18 時点で挙動が変更されており、引用のピッチが変更されないようになっています)。
\addQuote clarinet { \transposition bes \repeat unfold 8 { d'16 d' d'8 } } \addQuote sax { \transposition es' \repeat unfold 16 { a8 } } quoteTest = { % french horn \transposition f g'4 << \quoteDuring "clarinet" { \skip 4 } s4^"clar." >> << \quoteDuring "sax" { \skip 4 } s4^"sax." >> g'4 } { \new Staff \with { instrumentName = \markup { \column { Horn "in F" } } } \quoteTest \transpose c' d' << \quoteTest s4_"up a tone" >> }
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < 移調を含む他のボイスの引用 ] | [ Up: Pitches ] | [ Transposing pitches with minimum accidentals (“smart” transpose) > ] |
調号の取り消し表示を新たな調号から離す
デフォルトでは、調号が変更される際のナチュラルによる取り消し表示は、新たな調号のすぐ隣に配置されます。この挙動は、BreakAlignment Grob の
break-align-orders プロパティをオーバライドすることで変更できます。
break-align-orders は長さ 3 のベクトルで、それぞれが改行可能なアイテムを要素とした quote リストを取ります。この例では
2 つ目のリストのみを変更しており、key-cancellation を staff-bar
の前に移動しています。2 番目の要素はシステムの途中における配置に影響し、行頭あるいは行末には影響しません。
#(define (insert-before where what lst) (cond ((null? lst) ; If the list is empty, (list what)) ; return a single-element list. ((eq? where (car lst)) ; If we find symbol `where`, (cons what lst)) ; insert `what` before curr. position. (else ; Otherwise keep building the list by (cons (car lst) ; adding the current element and ; recursing with the next element. (insert-before where what (cdr lst)))))) cancellationFirst = \override Score.BreakAlignment.break-align-orders = #(grob-transformer 'break-align-orders (lambda (grob orig) (let* ((middle (vector-ref orig 1)) (middle (delq 'key-cancellation middle)) (middle (insert-before 'staff-bar 'key-cancellation middle))) (vector ;; end of line (vector-ref orig 0) ;; middle of line middle ;; beginning of line (vector-ref orig 2))))) music = { \key es \major d'1 \bar "||" \key a \major d'1 } { <>^\markup "default" \music } { <>^\markup "cancellation first" \cancellationFirst \music }
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < 調号の取り消し表示を新たな調号から離す ] | [ Up: Pitches ] | [ Turkish Makam example > ] |
Transposing pitches with minimum accidentals (“smart” transpose)
This example uses some Scheme code to enforce enharmonic modifications for notes in order to have the minimum number of accidentals. In this case, the following rules apply:
- double accidentals should be removed
- b sharp → c
- e sharp → f
- c flat → b
- f flat → e
In this manner, the most natural enharmonic notes are chosen.
#(define (naturalize-pitch p) (let ((o (ly:pitch-octave p)) ;; `ly:pitch-alteration` returns quarter tone steps. (a (* 4 (ly:pitch-alteration p))) (n (ly:pitch-notename p))) (cond ((and (> a 1) (or (eqv? n 6) (eqv? n 2))) (set! a (- a 2)) (set! n (+ n 1))) ((and (< a -1) (or (eqv? n 0) (eqv? n 3))) (set! a (+ a 2)) (set! n (- n 1)))) (cond ((> a 2) (set! a (- a 4)) (set! n (+ n 1))) ((< a -2) (set! a (+ a 4)) (set! n (- n 1)))) (when (< n 0) (set! o (- o 1)) (set! n (+ n 7))) (when (> n 6) (set! o (+ o 1)) (set! n (- n 7))) (ly:make-pitch o n (/ a 4)))) #(define (naturalize music) (let ((es (ly:music-property music 'elements)) (e (ly:music-property music 'element)) (p (ly:music-property music 'pitch))) (when (pair? es) (ly:music-set-property! music 'elements (map naturalize es))) (when (ly:music? e) (ly:music-set-property! music 'element (naturalize e))) (when (ly:pitch? p) (set! p (naturalize-pitch p)) (ly:music-set-property! music 'pitch p)) music)) naturalizeMusic = #(define-music-function (m) (ly:music?) (naturalize m)) music = \relative c' { c4 d e g } \new Staff { \transpose c ais { \music } \naturalizeMusic \transpose c ais { \music } \transpose c deses { \music } \naturalizeMusic \transpose c deses { \music } }
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < Transposing pitches with minimum accidentals (“smart” transpose) ] | [ Up: Pitches ] | [ 音部記号のプロパティを調整する > ] |
Turkish Makam example
This template uses the start of a well-known Turkish Saz Semai that is familiar in the repertoire in order to illustrate some of the elements of Turkish music notation.
#(set-default-paper-size "a6" 'landscape) \include "turkish-makam.ly" \header { title = "Hüseyni Saz Semaisi" composer = "Lavtacı Andon" tagline = ##f } \relative { \set Staff.extraNatural = ##f \set Staff.autoBeaming = ##f \key a \huseyni \time 10/8 a'4 g'16[ fb] e8.[ d16] d[ c d e] c[ d c8] bfc | a16[ bfc a8] bfc c16[ d c8] d16[ e d8] e4 fb8 | d4 a'8 a16[ g fb e] fb8[ g] a8.[ b16] a16[ g] | g4 g16[ fb] fb8.[ e16] e[ g fb e] e4 r8 | } \layout { indent = 0 }
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < Turkish Makam example ] | [ Up: Pitches ] | [ Using \autoChange with more than one voice > ] |
音部記号のプロパティを調整する
音部記号のグリフ、位置、オクターブ記号を変更するだけでは、変更後の音符の位置は変更されません。調号を正しい位置に表示するためには、middleCClefPosition
も設定する必要があります。これは、“ミドル C” の位置を、中央の譜線を 0、上方向を正、下方向を負として設定します。
例えば、\clef "treble_8" は、clefGlyph, clefPosition,
(音部記号自体の縦位置) middleCPosition, clefTransposition
を設定するのと同等です。これらのプロパティの (middleCPosition を除く)
どれかが変更された場合、新たに音部記号が表示されます。
次の例は、これらのプロパティを手動でセットする方法を示しています。最初の行では音部記号と音符の位置関係は通常通りですが、次の行ではそうではありません。
{ % The default treble clef. \key f \major c'1 % The standard bass clef \set Staff.clefGlyph = "clefs.F" \set Staff.clefPosition = 2 \set Staff.middleCPosition = 6 \set Staff.middleCClefPosition = 6 \key g \major c'1 % The baritone clef. \set Staff.clefGlyph = "clefs.C" \set Staff.clefPosition = 4 \set Staff.middleCPosition = 4 \set Staff.middleCClefPosition = 4 \key f \major c'1 % The standard choral tenor clef. \set Staff.clefGlyph = "clefs.G" \set Staff.clefPosition = -2 \set Staff.clefTransposition = -7 \set Staff.middleCPosition = 1 \set Staff.middleCClefPosition = 1 \key f \major c'1 % A non-standard clef. \set Staff.clefPosition = 0 \set Staff.clefTransposition = 0 \set Staff.middleCPosition = -4 \set Staff.middleCClefPosition = -4 \key g \major c'1 \break % The following clef changes do not preserve % the normal relationship between notes, key signatures % and clefs. \set Staff.clefGlyph = "clefs.F" \set Staff.clefPosition = 2 c'1 \set Staff.clefGlyph = "clefs.G" c'1 \set Staff.clefGlyph = "clefs.C" c'1 \set Staff.clefTransposition = 7 c'1 \set Staff.clefTransposition = 0 \set Staff.clefPosition = 0 c'1 % Return to the normal clef. \set Staff.middleCPosition = 0 c'1 }
| [ << Pitches ] | [Top][Contents] | [ Rhythms >> ] |
| [ < 音部記号のプロパティを調整する ] | [ Up: Pitches ] | [ Rhythms > ] |
Using \autoChange with more than one voice
Here is a demonstration of how to use \autoChange with more
than one voice.
\score { \new PianoStaff << \new Staff = "up" { << \set Timing.beamExceptions = #'() \set Timing.beatStructure = #'(4) \new Voice { \voiceOne \autoChange \relative c' { g8 a b c d e f g g,8 a b c d e f g } } \new Voice { \voiceTwo \autoChange \relative c' { g8 a b c d e f g g,,8 a b c d e f g } } >> } \new Staff = "down" { \clef bass } >> }
| [ << Pitches ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < Using \autoChange with more than one voice ] | [ Up: Top ] | [ Adding beams, slurs, ties, etc., when using tuplet and non-tuplet rhythms > ] |
2 Rhythms
See also Rhythms.
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < Rhythms ] | [ Up: Rhythms ] | [ ドラム パートを追加する > ] |
Adding beams, slurs, ties, etc., when using tuplet and non-tuplet rhythms
LilyPond primarily uses postfix syntax for inputting parentheses, brackets, etc., which might feel unintuitive for novices.
For example, when entering a manual beam, the left square bracket has to be placed after the starting note and its duration, not before. Similarly, the right square bracket should directly follow the note which is to be at the end of the requested beaming, even if this note happens to be inside a tuplet section.
This snippet demonstrates how to combine manual beaming, manual slurs, ties, and phrasing slurs with tuplet sections (enclosed within curly braces).
{ r16[ g16 \tuplet 3/2 { r16 e'8] } g16( a \tuplet 3/2 { b d' e') } g8[( a \tuplet 3/2 { b d') e']\( ~ } \time 2/4 \tuplet 5/4 { e'32 a b d' e' } a'4.\) }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < Adding beams, slurs, ties, etc., when using tuplet and non-tuplet rhythms ] | [ Up: Rhythms ] | [ 装飾音符のスペースを調整する > ] |
ドラム パートを追加する
\drummode のような、予め設定された強力なツールと
DrumStaff コンテキストを用いることで、ドラム パートを入力することは非常に簡単になります: ドラム パートは (特殊な音部記号を持つ) 独自の譜として配置され、ドラムに対応した符頭を持ちます。ドラムに記号を追加したり、線の数を制限することも可能です。
drh = \drummode { cymc4.^"crash" hhc16^"h.h." hh hhc8 hho hhc8 hh16 hh hhc4 r4 r2 } drl = \drummode { bd4 sn8 bd bd4 << bd ss >> bd8 tommh tommh bd toml toml bd tomfh16 tomfh } timb = \drummode { timh4 ssh timl8 ssh r timh r4 ssh8 timl r4 cb8 cb } \score { << \new DrumStaff \with { instrumentName = "timbales" drumStyleTable = #timbales-style \override StaffSymbol.line-count = #2 \override BarLine.bar-extent = #'(-1 . 1) } << \timb >> \new DrumStaff \with { instrumentName = "drums" } << \new DrumVoice { \stemUp \drh } \new DrumVoice { \stemDown \drl } >> >> \layout { } \midi { \tempo 4 = 120 } }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < ドラム パートを追加する ] | [ Up: Rhythms ] | [ 小節番号を揃える > ] |
装飾音符のスペースを調整する
装飾音符のスペーシングは Score.GraceSpacing の spacing-increment
プロパティで調整することができます。
graceNotes = { \grace { c4 c8 c16 c32 } c8 } \relative c'' { c8 \graceNotes \override Score.GraceSpacing.spacing-increment = #2.0 \graceNotes \revert Score.GraceSpacing.spacing-increment \graceNotes }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 装飾音符のスペースを調整する ] | [ Up: Rhythms ] | [ 二全音符を変更する > ] |
小節番号を揃える
デフォルトで小節番号は親オブジェクトに右揃えされます。つまり、小節番号は行の左端に、行内に表示される場合には小節線の左端に表示されます。これを中央揃えあるいは左揃えにすることができます。
\relative c' { \set Score.currentBarNumber = 111 \override Score.BarNumber.break-visibility = #all-visible % Increase the size of the bar number by 2 \override Score.BarNumber.font-size = 2 % Print a bar number every second measure \set Score.barNumberVisibility = #(every-nth-bar-number-visible 2) c1 | c1 | c1 | \break c1 | c1 | c1 | \break \override Score.BarNumber.self-alignment-X = #(break-alignment-list CENTER RIGHT CENTER) c1 | c1 | c1 | \break c1 | c1 | c1 | } \paper { line-width = 70\mm }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 小節番号を揃える ] | [ Up: Rhythms ] | [ Appoggiatura or grace note before a bar line > ] |
二全音符を変更する
二全音符の表示を、符頭の左右に線が 1 本あるバロック式の表示から、2 本あるものに変更することができます。
\relative c'' { \time 4/2 c\breve | \override Staff.NoteHead.style = #'altdefault b\breve \override Staff.NoteHead.style = #'baroque b\breve \revert Staff.NoteHead.style a\breve }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 二全音符を変更する ] | [ Up: Rhythms ] | [ 自動的な連桁細分 > ] |
Appoggiatura or grace note before a bar line
By default, appoggiaturas and grace notes that occur on the first beat of a measure are printed after the bar line. A possible solution for single staves to print it before the bar line is to add an invisible bar line and then the visible one.
In multi-staff systems, however, adding an invisible bar line distorts
the positioning of full-bar rests in other staves; they are no longer
centered but slightly shifted to the left. A better solution for such
situations is to use the \afterGrace command with setting
afterGraceFraction appropriately.
<< { \appoggiatura d''8 c''4 r2. | \appoggiatura { \bar "" d''8 \bar "|" } | c''4 r2. } { R1 | R1 } >> afterGraceFraction = 15/16 << { \appoggiatura d''8 c''4 \afterGrace r2. d''8( | c''4) r2. } { R1 | R1 } >>
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < Appoggiatura or grace note before a bar line ] | [ Up: Rhythms ] | [ 自動で音価を変更する > ] |
自動的な連桁細分
連桁の細分は自動で行われます。プロパティ subdivideBeams をセットすることで、(beatBase で指定できるような) 拍の位置で連桁が細分されます。
\new Staff { \relative c'' { << { \voiceOne \set subdivideBeams = ##t b32[^"subdivide beams" a g f c' b a g b32 a g f c' b a g] } \new Voice { \voiceTwo b32_"default"[ a g f c' b a g b32 a g f c' b a g] } >> \oneVoice \once \set beamMinimumSubdivision = #1/8 b32^\markup \center-column { "beamMinimum-" "Subdivision 1/8" } [ a g f c' b a g] \once \set beamMaximumSubdivision = #1/16 b32^\markup \center-column { "beamMaximum-" "Subdivision 1/16" } [ a g f c' b a g] } }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 自動的な連桁細分 ] | [ Up: Rhythms ] | [ Score コンテキストでの自動連桁 > ] |
自動で音価を変更する
ある音楽の音符の長さを変更するために*、shiftDurations を使用することができます。これは 2 つの引数を取ります – 1 つ目は
2 のべき乗で与えられる倍率、2 つ目は付け加える付点の数を表す正の整数です。
music = \relative c'' { a1 b2 c4 d8 r } { \time 4/2 \music \time 4/4 \shiftDurations 1 0 \music \time 2/4 \shiftDurations 2 0 \music \time 4/1 \shiftDurations -1 0 \music \time 8/1 \shiftDurations -2 0 \music \time 6/2 \shiftDurations 0 1 \music \time 7/2 \shiftDurations 0 2 \music }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 自動で音価を変更する ] | [ Up: Rhythms ] | [ Beam nibs > ] |
Score コンテキストでの自動連桁
Score コンテキストに設定された自動連桁の設定は全ての譜に適用されますが、Staff や Voce レベルで設定することもできます。
\relative c'' { \time 5/4 % Set default beaming for all staves \set Score.beatBase = #1/8 \set Score.beatStructure = 3,4,3 << \new Staff { c8 c c c c c c c c c } \new Staff { % Modify beaming for just this staff \set Staff.beatStructure = 6,4 c8 c c c c c c c c c } \new Staff { % Inherit beaming from Score context << { \voiceOne c8 c c c c c c c c c } % Modify beaming for this voice only \new Voice { \voiceTwo \set Voice.beatStructure = 6,4 a8 a a a a a a a a a } >> } >> }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < Score コンテキストでの自動連桁 ] | [ Up: Rhythms ] | [ 改行に跨る連桁 > ] |
Beam nibs
Beam nibs at the start and end of beams together with beams attached to
solitary notes that look like flat flags are possible with a
combination of stemLeftBeamCount, stemRightBeamCount, and
paired [] beam indicators.
For imitating right-pointing flat flags on lone notes, use paired
[] beam indicators and set stemLeftBeamCount to zero. For
imitating left-pointing flat flags on lone notes, set
stemRightBeamCount to zero instead (line one).
For right-pointing nibs at the end of a run of beamed notes, set
stemRightBeamCount to a positive value. For left-pointing nibs
at the start of a run of beamed notes, set stemLeftBeamCount
instead (line two).
Sometimes it may make sense for a lone note surrounded by rests to
carry both a left- and right-pointing nib. Do this with paired
[] beam indicators alone (line three).
Note that \set stemLeftBeamCount is always equivalent to
\once \set. In other words, the beam count settings are not
“sticky”, so the pair of nibs attached to the lone 16th note in the
last example has nothing to do with the \set command for the
beam before.
\score { << \new RhythmicStaff { \set stemLeftBeamCount = 0 c16[] r8. r8. \set stemRightBeamCount = 0 16[] } \new RhythmicStaff { 16 16 \set stemRightBeamCount = 2 16 r r \set stemLeftBeamCount = 2 16 16 16 } \new RhythmicStaff { 16 16 \set stemRightBeamCount = 2 16 r16 16[] r16 \set stemLeftBeamCount = 2 16 16 } >> }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < Beam nibs ] | [ Up: Rhythms ] | [ 向きの変わる連桁が作られる符頭間の距離を変更する > ] |
改行に跨る連桁
連桁が小節線を跨ぐ場合、改行は通常禁止されます。この挙動は以下のようにして変更することができます。
music = { \repeat unfold 8 c8 c8 \repeat unfold 7 { c[ c] } c \repeat unfold 8 c8 } \relative c'' { <>^\markup { \typewriter Beam.breakable set to \typewriter "#t" } \override Beam.breakable = ##t \music } \relative c'' { <>^\markup { \typewriter Beam.breakable not set } \music } \paper { line-width = 100\mm }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 改行に跨る連桁 ] | [ Up: Rhythms ] | [ 複数小節にまたがる休符の形を変更する > ] |
向きの変わる連桁が作られる符頭間の距離を変更する
向きが変わる連桁は、符頭と符頭が大きく離れている場合に自動的に作られます。この挙動は auto-knee-gap プロパティで調整することができます。符頭間の距離が auto-knee-gap と連桁オブジェクトの幅を[c
足したものよりも大きい場合に、向きの変わる連桁が作られます
(連桁オブジェクトの幅は、音符の長さや、連桁の傾きによって異なります)。デフォルトでは、auto-knee-gap は 5.5 譜スペースにセットされています。
{ f8 f''8 f8 f''8 \override Beam.auto-knee-gap = #6 f8 f''8 f8 f''8 }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 向きの変わる連桁が作られる符頭間の距離を変更する ] | [ Up: Rhythms ] | [ 音符ごとに付点の数を独立して変更する > ] |
複数小節にまたがる休符の形を変更する
休符が複数小節に渡り、それが 10 小節以下の場合には、四全休符や二全休符が並んだものとして表記されます (ドイツ語で Kirchenpausen –
教会休符と呼ばれます)。10 小節より長い場合は、単純な線として表示されます。このデフォルトの 10 を変更するには、expand-limit プロパティをオーバライドします。
\relative c'' { \compressMMRests { R1*2 | R1*5 | R1*9 \override MultiMeasureRest.expand-limit = 3 R1*2 | R1*5 | R1*9 } }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 複数小節にまたがる休符の形を変更する ] | [ Up: Rhythms ] | [ メトロノーム記号を表示せずにテンポを変更する > ] |
音符ごとに付点の数を独立して変更する
音符ごとに、入力したドットの数とは独立して付点の数を変更することができます。
\relative c' { c4.. a16 r2 | \override Dots.dot-count = 4 c4.. a16 r2 | \override Dots.dot-count = 0 c4.. a16 r2 | \revert Dots.dot-count c4.. a16 r2 | }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 音符ごとに付点の数を独立して変更する ] | [ Up: Rhythms ] | [ 連符の数字を変更する > ] |
メトロノーム記号を表示せずにテンポを変更する
楽譜には何も出力せずに MIDI 出力のテンポのみを変更するには、メトロノーム記号を非表示にします。
\score { \new Staff \relative c' { \tempo 4 = 160 c4 e g b c4 b d c \set Score.tempoHideNote = ##t \tempo 4 = 96 d,4 fis a cis d4 cis e d } \layout { } \midi { } }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < メトロノーム記号を表示せずにテンポを変更する ] | [ Up: Rhythms ] | [ \scaleDurations を使用した多拍子の部分で拍子記号を変更する > ] |
連符の数字を変更する
デフォルトでは、連符の上には \tuplet の引数として与えられた数字のみが表示されます。
代わりに、3:2 のような形の数字を表示することができます。また、数字を非表示にすることもできます。
\relative c'' { \tuplet 3/2 { c8 c c } \tuplet 3/2 { c8 c c } \override TupletNumber.text = #tuplet-number::calc-fraction-text \tuplet 3/2 { c8 c c } \omit TupletNumber \tuplet 3/2 { c8 c c } }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 連符の数字を変更する ] | [ Up: Rhythms ] | [ Chant or psalm notation > ] |
\scaleDurations を使用した多拍子の部分で拍子記号を変更する
measureLength, measurePosition プロパティは、小節線がどのタイミングで必要になるかを決定しています。しかし、\scaleDurations を使用する際、拍子記号と整合性が取れなくなることがあります。この場合には、measureLength を ly:make-moment
コールバックを用いて手動でセットします。2 つ目の引数は \scaleDurations
の 2 つ目の引数と一致している必要があります。
\layout { \context { \Score \remove "Timing_translator" \accepts TimingStaffGroup } \context { \StaffGroup \name TimingStaffGroup \alias StaffGroup \consists "Timing_translator" } } << \new TimingStaffGroup << \new Staff { \scaleDurations 8/5 { \time 6/5 % to set measure length in Timing \context Staff \polymetric \time 6/8 b8 b b b b b \time 4/5 % to set measure length in Timing \context Staff \polymetric \time 2/4 b4 b } } >> \new TimingStaffGroup << \new Staff { \clef bass \time 2/4 c2 d e f } >> >>
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < \scaleDurations を使用した多拍子の部分で拍子記号を変更する ] | [ Up: Rhythms ] | [ 複合拍子 > ] |
Chant or psalm notation
This form of notation is used for psalm chant, where verses aren’t always of the same length.
stemOff = \hide Staff.Stem stemOn = \undo \stemOff \score { \new Staff \with { \remove "Time_signature_engraver" } { \key g \minor \cadenzaOn \stemOff a'\breve bes'4 g'4 \stemOn a'2 \section \stemOff a'\breve g'4 a'4 \stemOn f'2 \section \stemOff a'\breve^\markup { \italic flexe } \stemOn g'2 \fine } }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < Chant or psalm notation ] | [ Up: Rhythms ] | [ 小節のグループ化記号 > ] |
複合拍子
20 世紀の変拍子 (例えば "5/8") は、よく2 つ以上の拍子記号を合わせた複合拍子として演奏されます ("3/8 + 2/8" などのように)。
LilyPond は、このような音楽を読みやすく、また演奏しやすくすることができます。明示的に複合拍子を表示し、自動連桁の振る舞いをそれに合わせて変更することができます。
\relative c' { \compoundMeter #'((2 8) (3 8)) \set Timing.beamExceptions = #'() \set Timing.beatStructure = 2,3 c8 d e fis gis c8 fis, gis e d c8 d e4 gis8 }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 複合拍子 ] | [ Up: Rhythms ] | [ 連符の括弧の可視性をコントロールする > ] |
小節のグループ化記号
小節内の拍のまとまりは、beatStructure コンテキスト プロパティによりコントロールされます。beatStructure の値はscm/time-signature-settings.scm に、多くの拍子記号に対して設定されています。beatStructure の値は、\set で変更することができます。あるいは、\time を拍子記号と beatStructure の明示的な変更のために用いることができます。そのためには、拍子記号の前に小節内部の拍のグループを数値のリストで (Scheme の構文で) 与えます。
\time は Timing コンテキストに適用されるため、Voice のような他のより低いレベルのコンテキストにセットされた
beatStructure や beatBase の値を上書きしません。
Measure_grouping_engraver がコンテキストに含まれている場合、拍のグループを示す記号が表示されます。この記号はリズムが複雑な現代音楽を読みやすくします。この例では、9/8 の小節が 2 つの方法で 2 つのパターンにグループ化されています。5/8 は scm/time-signature-settings.scm のデフォルト設定を用いています。
\score { \new Voice \relative c'' { \time 9/8 g8 g d d g g a( bes g) | \set Timing.beatStructure = 2,2,2,3 g8 g d d g g a( bes g) | \time 4,5 9/8 g8 g d d g g a( bes g) | \time 5/8 a4. g4 | \time 3,3,2 4/4 \set Timing.beatBase = #1/8 f4 d8 f4 d8 g4 } \layout { \context { \Staff \consists "Measure_grouping_engraver" } } }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 小節のグループ化記号 ] | [ Up: Rhythms ] | [ Cow and ride bell example > ] |
連符の括弧の可視性をコントロールする
連符の括弧の可視性についての挙動は、デフォルトでは同じ長さの連桁がある場合に表示されないようになっています。これをコントロールするには、bracket-bisibility プロパティを #t (常に表示),
#'if-no-beam (連桁が無い場合にのみ表示。デフォルトの振る舞い),
#f (常に非表示) のいずれかにセットします。
3 つ目の選択肢は、実際には TupletBracket オブジェクトを出力から完全に省略することに相当します。
music = \relative c'' { \tuplet 3/2 { c16[ d e } f8] \tuplet 3/2 { c8 d e } \tuplet 3/2 { c4 d e } } \new Voice { \relative c' { \override Score.TextMark.non-musical = ##f \textMark "default" \music \override TupletBracket.bracket-visibility = #'if-no-beam \textMark \markup \typewriter "'if-no-beam" \music \override TupletBracket.bracket-visibility = ##t \textMark \markup \typewriter "#t" \music \override TupletBracket.bracket-visibility = ##f \textMark \markup \typewriter "#f" \music \omit TupletBracket \textMark \markup \typewriter "omit" \music } }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 連符の括弧の可視性をコントロールする ] | [ Up: Rhythms ] | [ マークアップ モードでメトロノーム記号を作成する > ] |
Cow and ride bell example
Two different bells, entered with ‘cb’ (cow bell) and ‘rb’ (ride bell).
#(define mydrums '((ridebell default #f 3) (cowbell default #f -2))) \new DrumStaff \with { instrumentName = #"Different Bells" } \drummode { \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums) \set DrumStaff.clefPosition = 0.5 \override DrumStaff.StaffSymbol.line-positions = #'(-2 3) \override Staff.BarLine.bar-extent = #'(-1.0 . 1.5) \time 2/4 rb8 8 cb8 16 rb16-> ~ | 16 8 16 cb8 8 | }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < Cow and ride bell example ] | [ Up: Rhythms ] | [ タイを手動で譜刻する > ] |
マークアップ モードでメトロノーム記号を作成する
新しいメトロノーム記号はマークアップ モードで作成できますが、MIDI 出力のテンポは変更されません。
\relative c' { \tempo \markup { \concat { ( \smaller \general-align #Y #DOWN \note { 16. } #UP " = " \smaller \general-align #Y #DOWN \note { 8 } #UP ) } } c1 c4 c' c,2 }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < マークアップ モードでメトロノーム記号を作成する ] | [ Up: Rhythms ] | [ トレモロを符幹に接触せずに譜刻する > ] |
タイを手動で譜刻する
タイは TieColumn オブジェクトの tie-configuration プロパティを変更することで手動で譜刻することができます。最初の数値が中央の譜線からの距離を譜スペースの半分の単位で表し、次の数値が向きを表します (1 = 上, -1 = 下)。
LilyPond は最初の数値の正確な値と不正確な値を区別することに注意してください。正確な値 (つまり、整数または (/ 4 5) のような分数) を使用する場合、値はおおよその垂直位置として機能し、LilyPond によってさらに調整され、タイが譜線を避けるようにします。浮動小数点数のような不正確な値を使用する場合は、それ以上調整せずに垂直位置と見なされます。
\relative c' { <>^"default" g'1 ^~ g <>^"0" \once \override Tie.staff-position = 0 g1 ^~ g <>^"0.0" \once \override Tie.staff-position = 0.0 g1 ^~ g <>^"reset" \revert Tie.staff-position g1 ^~ g } \relative c' { \override TextScript.outside-staff-priority = ##f \override TextScript.padding = 0 <>^"default" <c e g>1~ <c e g> <>^"0, -2, -4" \override TieColumn.tie-configuration = #'((0 . 1) (-2 . 1) (-4 . 1)) <c e g>1~ <c e g> <>^"0.0, -2.0, -4.0" \override TieColumn.tie-configuration = #'((0.0 . 1) (-2.0 . 1) (-4.0 . 1)) <c e g>1~ <c e g> <>^"reset" \override TieColumn.tie-configuration = ##f <c e g>1~ <c e g> }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < タイを手動で譜刻する ] | [ Up: Rhythms ] | [ 一つの \tuplet コマンドで複数の連符を入力する > ] |
トレモロを符幹に接触せずに譜刻する
トレモロの演奏時間が 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 } }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < トレモロを符幹に接触せずに譜刻する ] | [ Up: Rhythms ] | [ リハーサル記号を指定した番号や文字から始める > ] |
一つの \tuplet コマンドで複数の連符を入力する
tupletSpannerDuration プロパティは、一つの \tuplet コマンド内にある音符が、どれぐらいの長さで連符一つ分を作るかを指定します。これにより、一つの \tuplet コマンドで多くの連続した連符を作成することができ、入力が簡潔になります。
tupletSpannerDuration を設定する方法はいくつかあります。\tupletSpan コマンドは、プロパティを与えられた長さにセットし、長さではなく \default が与えられた場合はリセットします。もう一つの方法は、\tuplet のオプション引数を用いることです。
\relative c' { \time 2/4 \tupletSpan 4 \tuplet 3/2 { c8^"\\tupletSpan 4" c c c c c } \tupletSpan \default \tuplet 3/2 { c8^"\\tupletSpan \\default" c c c c c } \tuplet 3/2 4 { c8^"\\tuplet 3/2 4 {...}" c c c c c } }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 一つの \tuplet コマンドで複数の連符を入力する ] | [ Up: Rhythms ] | [ 符尾をカスタマイズする > ] |
リハーサル記号を指定した番号や文字から始める
このスニペットは、リハーサル記号の自動付番を、指定した番号や文字から始める例を示しています。
\relative c'' { \override Score.RehearsalMark.Y-offset = #3.5 c1 \mark \default c1 \mark \default c1 \mark \default c1 \mark #14 c1 \mark \default c1 \mark \default c1 \mark \default c1 }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < リハーサル記号を指定した番号や文字から始める ] | [ Up: Rhythms ] | [ ギター ストロークのリズム > ] |
符尾をカスタマイズする
Flag Grob の stencil プロパティをカスタム Scheme 関数にセットし、符尾のグリフを生成することができます。
#(define-public (weight-flag grob) (let* ((stem-grob (ly:grob-parent grob X)) (log (- (ly:grob-property stem-grob 'duration-log) 2)) (is-up? (eqv? (ly:grob-property stem-grob 'direction) UP)) (yext (if is-up? (cons (* log -0.8) 0) (cons 0 (* log 0.8)))) (flag-stencil (make-filled-box-stencil '(-0.4 . 0.4) yext)) (stroke-style (ly:grob-property grob 'stroke-style)) (stroke-stencil (if (equal? stroke-style "grace") (make-line-stencil 0.2 -0.9 -0.4 0.9 -0.4) empty-stencil))) (ly:stencil-add flag-stencil stroke-stencil))) % Create a flag stencil by looking up the glyph from the font #(define (inverted-flag grob) (let* ((stem-grob (ly:grob-parent grob X)) (dir (if (eqv? (ly:grob-property stem-grob 'direction) UP) "d" "u")) (flag (retrieve-glyph-flag "" dir "" grob)) (line-thickness (ly:staff-symbol-line-thickness grob)) (stem-thickness (ly:grob-property stem-grob 'thickness)) (stem-width (* line-thickness stem-thickness)) (stroke-style (ly:grob-property grob 'stroke-style)) (stencil (if (null? stroke-style) flag (add-stroke-glyph flag stem-grob dir stroke-style ""))) (rotated-flag (ly:stencil-rotate-absolute stencil 180 0 0))) (ly:stencil-translate rotated-flag (cons (- (/ stem-width 2)) 0)))) snippetexamplenotes = { \autoBeamOff c'8 d'16 c'32 d'64 \acciaccatura {c'8} d'64 } { \time 1/4 <>^"Normal flags" \snippetexamplenotes <>_"Custom flag: inverted" \override Flag.stencil = #inverted-flag \snippetexamplenotes <>^"Custom flag: weight" \override Flag.stencil = #weight-flag \snippetexamplenotes <>_"Revert to normal" \revert Flag.stencil \snippetexamplenotes }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 符尾をカスタマイズする ] | [ Up: Rhythms ] | [ 多拍子記号を大きくカスタマイズする > ] |
ギター ストロークのリズム
ギター音楽では、メロディの音符、コードネーム、フレット図と共に、ストロークのリズムを表示することができます。
\include "predefined-guitar-fretboards.ly" << \new ChordNames \chordmode { c1 | f | g | c } \new FretBoards \chordmode { c1 | f | g | c } \new Voice \with { \consists "Pitch_squash_engraver" } \relative c'' { \improvisationOn c4 c8 c c4 c8 c f4 f8 f f4 f8 f g4 g8 g g4 g8 g c4 c8 c c4 c8 c } \new Voice = "melody" \relative c'' { c2 e4 e4 f2. r4 g2. a4 e4 c2. } \new Lyrics \lyricsto "melody" { This is my song. I like to sing. } >>
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < ギター ストロークのリズム ] | [ Up: Rhythms ] | [ High and low woodblock example > ] |
多拍子記号を大きくカスタマイズする
多拍子を示す記号は必ずしも必要というわけではありませんが、この楽譜では拍を示すために使用しています (これは実際のバルカン音楽のテンプレートになっています!)
melody = \relative c'' { \key g \major \compoundMeter #'((3 8) (2 8) (2 8) (3 8) (2 8) (2 8) (2 8) (2 8) (3 8) (2 8) (2 8)) \set Timing.beamExceptions = #'() \set Timing.beatStructure = 3,2,2,3,2,2,2,2,3,2,2 c8 c c d4 c8 c b c b a4 g fis8 e d c b' c d e4-^ fis8 g \break c,4. d4 c4 d4. c4 d c2 d4. e4-^ d4 c4. d4 c4 d4. c4 d c2 d4. e4-^ d4 \break } drum = \new DrumStaff \drummode { \repeat volta 2 { bd4.^\markup { Drums } sn4 bd \bar ";" sn4. bd4 sn \bar ";" bd sn bd4. sn4 bd } } \new Staff { \melody \drum }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 多拍子記号を大きくカスタマイズする ] | [ Up: Rhythms ] | [ Making an object invisible using the ‘transparent’ property > ] |
High and low woodblock example
Two Woodblocks, entered with ‘wbh’ (high woodblock) and ‘wbl’ (low
woodblock). The length of the bar line has been altered with an
\override command, otherwise it would be too short. The
positions of the two staff lines also have to be explicitly defined.
% These lines define the position of the woodblocks in the stave; % if you like, you can change it or you can use special note heads % for the woodblocks. #(define mydrums '((hiwoodblock default #f 3) (lowoodblock default #f -2))) woodstaff = { % This defines a staff with only two lines. % It also defines the positions of the two lines. \override Staff.StaffSymbol.line-positions = #'(-2 3) % This is necessary; if not entered, % the barline would be too short! \override Staff.BarLine.bar-extent = #'(-1.0 . 1.5) % small correction for the clef: \set DrumStaff.clefPosition = 0.5 } \new DrumStaff { % with this you load your new drum style table \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums) \woodstaff \drummode { \time 2/4 wbh8 16 16 8-> 8 | wbl8 16 16-> ~ 16 16 r8 | } }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < High and low woodblock example ] | [ Up: Rhythms ] | [ 複雑な破線のスラーを作成する > ] |
Making an object invisible using the ‘transparent’ property
Setting the transparent property will cause an object to be
printed in “invisible ink”: the object is not printed, but all its
other behavior is retained. The object still takes up space, it takes
part in collisions, and slurs, ties and beams can be attached to it.
This snippet demonstrates how to connect different voices using ties. Normally, ties only connect two notes in the same voice. By introducing a tie in a different voice, and blanking the first up-stem in that voice, the tie appears to cross voices.
\relative { \time 2/4 << { \once \hide Stem \once \override Stem.length = #8 b'8 ~ 8\noBeam \once \hide Stem \once \override Stem.length = #8 g8 ~ 8\noBeam } \\ { b8 g g e } >> } \paper { line-width = 40\mm ragged-right = ##f }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < Making an object invisible using the ‘transparent’ property ] | [ Up: Rhythms ] | [ 連桁の位置を手動でコントロールする > ] |
複雑な破線のスラーを作成する
dash-definition プロパティをセットすることで、スラーに複雑な破線パターンを追加することができます。dash-definition は
dash-element のリストになっています。dash-element
はスラーの各部分に対する破線パターンのパラメータ リストです。
スラーはベジエ曲線の媒介変数 t (左端が 0, 右端が 1) の関数として定義されます。dash-element は、(start-t stop-t dash-fraction dash-period)
のリストになっています。start-t から stop-t までの範囲が、dash-period の長さにつき dash-fraction が黒になるような破線となります。dash-period は譜スペースの単位です。dash-fraction
を 1 にすると実線のスラーになります。
\relative c' { \once \override Slur.dash-definition = #'(( 0 0.3 0.1 0.75) (0.3 0.6 1 1 ) (0.65 1.0 0.4 0.75)) c4( d e f) \once \override Slur.dash-definition = #'((0 0.25 1 1 ) (0.3 0.7 0.4 0.75) (0.75 1.0 1 1 )) c4( d e f) }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 複雑な破線のスラーを作成する ] | [ Up: Rhythms ] | [ 多声の部分で複数小節にまたがる休符を統合する > ] |
連桁の位置を手動でコントロールする
連桁の位置は、Beam Grob の positions をオーバライドすることで手動でコントロールすることができます。
\relative c' { \time 2/4 % from upper staff-line (position 2) to center (position 0) \override Beam.positions = #'(2 . 0) c8 c % from center to one above center (position 1) \override Beam.positions = #'(0 . 1) c8 c }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 連桁の位置を手動でコントロールする ] | [ Up: Rhythms ] | [ 連符のブラケットの長さを変更する > ] |
多声の部分で複数小節にまたがる休符を統合する
多声の譜で複数小節にまたがる休符を用いる場合は、休符の位置が属しているボイスによって変化します。しかし、次の設定をすることで、それらを同じ位置に表示することができます。
normalPos = \once \revert MultiMeasureRest.direction << { c''1 R c'' \normalPos R c'' R } \\ { c'1 R c' \normalPos R c' R } >>
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 多声の部分で複数小節にまたがる休符を統合する ] | [ Up: Rhythms ] | [ 多声の音楽で付点付きの音符を移動する > ] |
連符のブラケットの長さを変更する
連符のブラケットの終端位置を変更することが出来ます。デフォルトでは連符内にある最後の音符の右端が終端となりますが、tupletFullLength と
tupletFullLength を #t
にすることで、音部記号、拍子記号、調号などを含めた次の音符の直前までが連符で囲まれます。tupletFullLengthNote を #f にすることで、音部記号などを除いた、音符が音価としてスペースを取っている部分までが連符で囲まれるようになります。この例では、以上の設定を変更して、それぞれの設定で連符がどのオブジェクトにまでまたがるかを示しています。
\new RhythmicStaff { % Defaults. \time 2/4 \tuplet 3/2 { c4 4 4 } \time 4/4 \tuplet 5/4 { 4 1 } \time 3/4 2. } \new RhythmicStaff { % Set tuplets to be extendable... \set tupletFullLength = ##t % ...to cover all items up to the next note \set tupletFullLengthNote = ##t \time 2/4 \tuplet 3/2 { c4 4 4 } % ...or to cover just whitespace. \set tupletFullLengthNote = ##f \time 4/4 \tuplet 5/4 { 4 1 } \time 3/4 2. }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 連符のブラケットの長さを変更する ] | [ Up: Rhythms ] | [ 複数小節にまたがる休符の長さをコントロールする > ] |
多声の音楽で付点付きの音符を移動する
上のボイスにある付点付きの音符が、下の音符との衝突を避けるために移動する場合、デフォルトでは右側に移動します。この挙動は、NoteCollision の
prefer-dotted-right プロパティをオーバライドすることで変更できます。
\new Staff \relative c' << { f2. f4 \override Staff.NoteCollision.prefer-dotted-right = ##f f2. f4 \override Staff.NoteCollision.prefer-dotted-right = ##t f2. f4 } \\ { e4 e e e e e e e e e e e } >>
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 多声の音楽で付点付きの音符を移動する ] | [ Up: Rhythms ] | [ 複数小節にまたがる休符にマークアップを付加する > ] |
複数小節にまたがる休符の長さをコントロールする
複数小節にまたがる休符の長さは、休符の長さに依存しますが、MultiMeasureRest.space-increment によってコントロールされます。デフォルト値は 2.0 です。
\relative c' { \omit Staff.TimeSignature \compressEmptyMeasures R1*2 R1*4 R1*64 R1*16 \break \override MultiMeasureRest.space-increment = 4 R1*2 R1*4 R1*64 R1*16 } \layout { ragged-right = ##t }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 複数小節にまたがる休符の長さをコントロールする ] | [ Up: Rhythms ] | [ デフォルトでない連符の数字 > ] |
複数小節にまたがる休符にマークアップを付加する
複数小節にまたがる休符に付加されるマークアップは、休符の上または下に中央揃えされます。マークアップが長い場合であっても、休符が広げられることはありません。休符をマークアップに合わせて広げる場合は、休符の前に空の和音を追加して、それにマークアップを付加してください。
このような方法で付加されたテキストは、空の和音が本来表示されるべき場所に合わせて左揃えされます。しかし、小節の長さをテキストに合わせるようにすれば、テキストが中央揃えされたように見えます。
\relative c' { \compressMMRests { \textLengthOn <>^\markup { [MAJOR GENERAL] } R1*19 <>_\markup { \italic { Cue: ... it is yours } } <>^\markup { A } R1*30^\markup { [MABEL] } \textLengthOff c4^\markup { CHORUS } d f c } }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 複数小節にまたがる休符にマークアップを付加する ] | [ Up: Rhythms ] | [ 単一の小節の休符に数字を付ける > ] |
デフォルトでない連符の数字
LilyPond は連符に表示される数字として、実際の音価の比率とは異なる値を整形して表示する関数が用意されています。連符の数や比だけでなく、音価を示す音符を表示することもできます。
\relative c'' { \once \override TupletNumber.text = #(tuplet-number::non-default-tuplet-denominator-text 7) \tuplet 3/2 { c4. c4. c4. c4. } \once \override TupletNumber.text = #(tuplet-number::non-default-tuplet-fraction-text 12 7) \tuplet 3/2 { c4. c4. c4. c4. } \once \override TupletNumber.text = #(tuplet-number::append-note-wrapper (tuplet-number::non-default-tuplet-fraction-text 12 7) (ly:make-duration 3 0)) \tuplet 3/2 { c4. c4. c4. c4. } \once \override TupletNumber.text = #(tuplet-number::append-note-wrapper tuplet-number::calc-denominator-text (ly:make-duration 2 0)) \tuplet 3/2 { c8 c8 c8 c8 c8 c8 } \once \override TupletNumber.text = #(tuplet-number::append-note-wrapper tuplet-number::calc-fraction-text (ly:make-duration 2 0)) \tuplet 3/2 { c8 c8 c8 c8 c8 c8 } \once \override TupletNumber.text = #(tuplet-number::fraction-with-notes (ly:make-duration 2 1) (ly:make-duration 3 0)) \tuplet 3/2 { c4. c4. c4. c4. } \once \override TupletNumber.text = #(tuplet-number::non-default-fraction-with-notes 12 (ly:make-duration 3 0) 4 (ly:make-duration 2 0)) \tuplet 3/2 { c4. c4. c4. c4. } }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < デフォルトでない連符の数字 ] | [ Up: Rhythms ] | [ Partcombine and \autoBeamOff > ] |
単一の小節の休符に数字を付ける
複数小節にまたがる休符は、単一の小節を除いて、長さを数字で表示します。これは、restNumberThreshold を設定することで変更できます。
{ \compressEmptyMeasures R1 R1*10 R1*11 \bar "||" \set restNumberThreshold = 0 R1 R1*10 R1*11 \bar "||" \set restNumberThreshold = 10 R1 R1*10 R1*11 }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 単一の小節の休符に数字を付ける ] | [ Up: Rhythms ] | [ Percussion example > ] |
Partcombine and \autoBeamOff
The function of \autoBeamOff when used with
\partCombine can be difficult to understand. It may be
preferable to use
\set Staff.autoBeaming = ##f
instead to ensure that auto-beaming is turned off for the entire staff. Use this at a spot in your score where no beam generated by the auto-beamer is still active.
Internally, \partCombine works with four voices – up-stem
single, down-stem single, combined, and solo. In order to use
\autoBeamOff to stop all auto-beaming when used with
\partCombine, it is necessary to use four calls to
\autoBeamOff.
{ % \set Staff.autoBeaming = ##f % turns off all auto-beaming \partCombine { \autoBeamOff % applies to split up-stems \repeat unfold 4 a'16 % \autoBeamOff % applies to combined stems \repeat unfold 4 a'8 \repeat unfold 4 a'16 % \autoBeamOff % applies to solo \repeat unfold 4 a'16 r4 } { % \autoBeamOff % applies to split down-stems \repeat unfold 4 f'8 \repeat unfold 8 f'16 | r4 \repeat unfold 4 a'16 } }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < Partcombine and \autoBeamOff ] | [ Up: Rhythms ] | [ 連桁で繋がれた連符の途中で改行する > ] |
Percussion example
A short example taken from Stravinsky’s L’histoire du Soldat.
#(define mydrums '((bassdrum default #f 4) (snare default #f -4) (tambourine default #f 0))) U = \stemUp D = \stemDown global = { \time 3/8 s4. \time 2/4 s2*2 \time 3/8 s4. \time 2/4 s2 } drumsA = { \context DrumVoice << \global \drummode { \autoBeamOff \D sn8 \U tamb s | sn4 \D sn4 | \U tamb8 \D sn \U sn16 \D sn \U sn8 | \D sn8 \U tamb s | \U sn4 s8 \U tamb } >> } drumsB = \drummode { s4 bd8 s2*2 s4 bd8 s4 bd8 s } \layout { indent = 40\mm \context { \DrumStaff drumStyleTable = #(alist->hash-table mydrums) } } \score { \new StaffGroup << \new DrumStaff \with { instrumentName = \markup \center-column { "Tambourine" "et" "caisse claire s. timbre" } } \drumsA \new DrumStaff \with { instrumentName = "Grosse Caisse" }\drumsB >> }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < Percussion example ] | [ Up: Rhythms ] | [ 装飾音符の連桁を通常の連桁の高さと同じになるよう配置する > ] |
連桁で繋がれた連符の途中で改行する
この作為的な例は、連桁で繋がれた連符の途中で手動あるいは自動の改行を許可する方法を示しています。ただし、拍に収まらない連符は手動で連桁を繋ぐ必要があります。
\layout { \context { \Voice % Permit automatic line breaks within tuplets. \remove "Forbid_line_break_engraver" % Allow beams to be broken at line breaks. \override Beam.breakable = ##t } } \relative c'' { <>^"manually forced line break" a8 \repeat unfold 5 { \tuplet 3/2 { c8[ b g16 a] } } \tuplet 3/2 { c8[ b \break g16 a] } \repeat unfold 5 { \tuplet 3/2 { c8[ b g16 a] } } c8 \bar "||" } \relative c'' { <>^"automatic line break" \repeat unfold 28 a16 \tuplet 11/8 { a16[ b c d e f e d c b a] } \repeat unfold 28 a16 \bar "||" }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 連桁で繋がれた連符の途中で改行する ] | [ Up: Rhythms ] | [ 装飾音符を浮いたスペースに配置する > ] |
装飾音符の連桁を通常の連桁の高さと同じになるよう配置する
音符が加線上に配置されている場合は、連桁は通常譜の中央まで伸びます。装飾音符の連桁はより短く、譜の外に配置される場合があります。この装飾音符の連桁に関する挙動をオーバライドすることができます。
\relative c { f8[ e] \grace { f8[ e] \override Stem.no-stem-extend = ##f f8[ e] \revert Stem.no-stem-extend } f8[ e] }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 装飾音符の連桁を通常の連桁の高さと同じになるよう配置する ] | [ Up: Rhythms ] | [ 複数小節にまたがる休符の位置を変更する > ] |
装飾音符を浮いたスペースに配置する
strict-grace-spacing プロパティをセットすることで、装飾音符を列として ’浮いた’ 状態にすることができます。つまり、装飾音符ではない音符のスペーシングと独立させることができます: まず、通常の音符がスペーシングされ、その後に装飾音符が左側に配置されます。
shiftedGrace = #(define-music-function (offset music) (number? ly:music?) #{ \override NoteHead.X-offset = #(- offset 0.85) \override Stem.X-offset = #offset \grace { $music } \revert NoteHead.X-offset \revert Stem.X-offset #}) \relative c'' << { g4 \shiftedGrace #-1.3 a32 \shiftedGrace #-0.5 { bes c d } es4 } { f,32 e d c f e d c f4 } >> \layout { \context { \Score \override SpacingSpanner.strict-grace-spacing = ##t } }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 装飾音符を浮いたスペースに配置する ] | [ Up: Rhythms ] | [ Positioning opposing fermatas on a bar line > ] |
複数小節にまたがる休符の位置を変更する
通常の休符と異なり、音符に付加することによって複数小節にまたがる休符の位置を変更するコマンドは用意されていません。しかし、多声の音楽では、奇数番号のボイスと偶数番号のボイスで休符の位置が分けられます。複数小節にまたがる休符の位置は以下のようにコントロールできます:
\relative c'' { % Multi-measure rests by default are set under the fourth line. R1 % They can be moved using an override. \override MultiMeasureRest.staff-position = -2 R1 \override MultiMeasureRest.staff-position = 0 R1 \override MultiMeasureRest.staff-position = 2 R1 \override MultiMeasureRest.staff-position = 3 R1 \override MultiMeasureRest.staff-position = 6 R1 \revert MultiMeasureRest.staff-position \break % In two Voices, odd-numbered voices are under the top line. << { R1 } \\ { a1 } >> % Even-numbered voices are under the bottom line. << { a1 } \\ { R1 } >> % Multi-measure rests in both voices remain separate. << { R1 } \\ { R1 } >> % Separating multi-measure rests in more than two voices % requires an override. << { R1 } \\ { R1 } \\ \once \override MultiMeasureRest.staff-position = 0 { R1 } >> % Using compressed bars in multiple voices requires another override % in all voices to avoid multiple instances being printed. \compressMMRests << \revert MultiMeasureRest.direction { R1*3 } \\ \revert MultiMeasureRest.direction { R1*3 } >> }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 複数小節にまたがる休符の位置を変更する ] | [ Up: Rhythms ] | [ 最後にリハーサル記号を配置した際に連符が削除されないようにする > ] |
Positioning opposing fermatas on a bar line
This snippet demonstrates a command that prints fermatas both above and below a bar line. If there would not otherwise be a bar line, it adds a double bar line. Semantically, the command codes a longer-than-normal caesura, which might be considered misuse depending on the situation.
twoWayFermata = { \once \set Staff.caesuraType = #'((underlying-bar-line . "||")) \once \set Staff.caesuraTypeTransform = ##f \caesura ^\fermata _\fermata } music = { f'1 \twoWayFermata R1 f'2 \twoWayFermata f'2 R1 b'1 \twoWayFermata \fine } \new GrandStaff << \new Staff \music \new Staff \music >>
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < Positioning opposing fermatas on a bar line ] | [ Up: Rhythms ] | [ 一定間隔で小節番号を表示する > ] |
最後にリハーサル記号を配置した際に連符が削除されないようにする
楽譜の最後に \mark を追加すると、最後にある連符が表示されません。これは TupletBracket.full-length-to-extent を #f
にすることで対処できます。
\new Staff { \set tupletFullLength = ##t \time 1/8 \tuplet 3/2 8 { c'16 c' c' c' c' c' c' c' c' } \tweak direction #DOWN \textEndMark "1234" } \new Staff { \set tupletFullLength = ##t \override TupletBracket.full-length-to-extent = ##f \time 1/8 \tuplet 3/2 8 { c'16 c' c' c' c' c' c' c' c' } \tweak direction #DOWN \textEndMark "1234" }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 最後にリハーサル記号を配置した際に連符が削除されないようにする ] | [ Up: Rhythms ] | [ Printing bar numbers for broken measures > ] |
一定間隔で小節番号を表示する
barNumberVisibility プロパティをセットすることで、小節番号を一定間隔で表示することができます。以下の例では、行末を除いて、2 小節ごとに小節番号が表示されています。
\relative c' { \override Score.BarNumber.break-visibility = #end-of-line-invisible \set Score.currentBarNumber = 11 % Print a bar number every second measure \set Score.barNumberVisibility = #(every-nth-bar-number-visible 2) c1 | c | c | c | c \break c1 | c | c | c | c }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 一定間隔で小節番号を表示する ] | [ Up: Rhythms ] | [ 小節番号を四角や丸の中に表示する > ] |
Printing bar numbers for broken measures
By default, a bar number of a broken measure is not repeated at the
beginning of the new line. Use
first-bar-number-invisible-save-broken-bars for
barNumberVisibility to get a parenthesized BarNumber
there.
\layout { \context { \Score barNumberVisibility = #first-bar-number-invisible-save-broken-bars \override BarNumber.break-visibility = ##(#f #t #t) } } \relative c' { c1 | d | e | f2 \break fis2 | g1 | e2 \break <>^"reenabled default" % back to default - % \unset Score.barNumberVisibility would do so as well \set Score.barNumberVisibility = #first-bar-number-invisible-and-no-parenthesized-bar-numbers es2 | d1 | c }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < Printing bar numbers for broken measures ] | [ Up: Rhythms ] | [ Printing bar numbers using modulo-bar-number-visible > ] |
小節番号を四角や丸の中に表示する
小節番号は四角や丸の中に表示することができます。
\relative c' { % Center bar numbers except at the beginning of a staff. \override Score.BarNumber.self-alignment-X = #(break-alignment-list CENTER CENTER 0.3) % Prevent bar numbers at the end of a line and permit them elsewhere. \override Score.BarNumber.break-visibility = #end-of-line-invisible \set Score.barNumberVisibility = #(every-nth-bar-number-visible 4) % Increase the size of the bar number by 2. \override Score.BarNumber.font-size = 2 % Draw a circle round the following bar number(s). \override Score.BarNumber.stencil = #(make-stencil-circler 0.1 0.25 ly:text-interface::print) \repeat unfold 7 { c1 } \break % Draw a box round the following bar number(s). \override Score.BarNumber.stencil = #(make-stencil-boxer 0.1 0.25 ly:text-interface::print) \repeat unfold 7 { c1 } \bar "|." }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 小節番号を四角や丸の中に表示する ] | [ Up: Rhythms ] | [ 小節番号が表示される間隔を変更する > ] |
Printing bar numbers using modulo-bar-number-visible
If the remainder of the division of the current bar number by the first
argument of modulo-bar-number-visible equals its second
argument, print a bar number.
This is useful to print the bar number at certain distances. Some examples:
-
(modulo-bar-number-visible 3 2)→ prints 2, 5, 8, ... -
(modulo-bar-number-visible 4 2)→ prints 2, 6, 10, ... -
(modulo-bar-number-visible 2 1)→ prints 3, 5, 7, ... -
(modulo-bar-number-visible 5 0)→ prints 5, 10, 15, ...
\layout { \context { \Score \override BarNumber.break-visibility = ##(#f #t #t) barNumberVisibility = #(modulo-bar-number-visible 5 0) } } \relative c' { c1 | d | e | f \break g1 | e | d | c }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < Printing bar numbers using modulo-bar-number-visible ] | [ Up: Rhythms ] | [ メトロノーム記号やリハーサル記号を譜の下に表示する > ] |
小節番号が表示される間隔を変更する
小節番号が表示される間隔は {set-bar-number-visibility} コンテキスト関数を変更することで変更することもできます。
\relative c' { \override Score.BarNumber.break-visibility = #end-of-line-invisible \context Score \applyContext #(set-bar-number-visibility 4) \repeat unfold 10 c'1 \context Score \applyContext #(set-bar-number-visibility 2) \repeat unfold 10 c }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 小節番号が表示される間隔を変更する ] | [ Up: Rhythms ] | [ 音楽を異なる拍子記号で表示する > ] |
メトロノーム記号やリハーサル記号を譜の下に表示する
デフォルトでは、メトロノーム記号やリハーサル記号は譜の上に表示されます。これらを譜の下に表示するには、MetronomeMark や RehearsalMark
の direction プロパティを正しくセットします。
\layout { ragged-right = ##f } { % Metronome marks below the staff \override Score.MetronomeMark.direction = #DOWN \tempo 8. = 120 c''1 % Rehearsal marks below the staff \override Score.RehearsalMark.direction = #DOWN \mark \default c''1 }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < メトロノーム記号やリハーサル記号を譜の下に表示する ] | [ Up: Rhythms ] | [ 最初の小節に小節番号を表示する > ] |
音楽を異なる拍子記号で表示する
次のスニペットでは、2 つのパートが完全に異なる拍子記号を持っていますが、タイミングは揃っています。小節線はパート毎に独立して表示するため
Score のレベルでは表示されず、Timing_translator が
Score コンテキストから Staff コンテキストに移動しています。
小節番号が必要な場合、Bar_number_engraver も移動する必要があります。このエングラーバは Timing_translator によってセットされるプロパティに依存するためです。小節番号を表示したい譜に \with
を用いることができます。
global = { \time 3/4 s2.*3 \break s2.*3 } \layout { \context { \Score \remove "Timing_translator" \remove "Bar_number_engraver" \override SpacingSpanner.uniform-stretching = ##t \override SpacingSpanner.strict-note-spacing = ##t proportionalNotationDuration = #1/64 } \context { \Staff \consists "Timing_translator" } \context { \Voice \remove "Forbid_line_break_engraver" tupletFullLength = ##t } } Bassklarinette = \new Staff \with { \consists "Bar_number_engraver" barNumberVisibility = #(every-nth-bar-number-visible 2) \override BarNumber.break-visibility = #end-of-line-invisible } << \global { \clef treble \time 3/8 d''4. | \time 3/4 r8 des''2( c''8) | \time 7/8 r4. ees''2 ~ | \time 2/4 \tupletUp \tuplet 3/2 { ees''4 r4 d''4 ~ } | \time 3/8 \tupletUp \tuplet 4/3 { d''4 r4 } | \time 2/4 e''2 | \time 3/8 es''4. | \time 3/4 r8 d''2 r8 | } >> Perkussion = \new StaffGroup << \new Staff << \global { \clef percussion \time 3/4 r4 c'2 ~ | c'2. | R2. | r2 g'4 ~ | g'2. ~ | g'2. | } >> \new Staff << \global { \clef percussion \time 3/4 R2. | g'2. ~ | g'2. | r4 g'2 ~ | g'2 r4 | g'2. | } >> >> \score { << \Bassklarinette \Perkussion >> }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 音楽を異なる拍子記号で表示する ] | [ Up: Rhythms ] | [ Printing tuplet brackets on the note head side > ] |
最初の小節に小節番号を表示する
デフォルトでは、最初の小節番号が ’1’ 以下の場合、表示が抑制されます。barNumberVisibility を all-bar-numbers-visible にセットすることで、最初の小節にも小節番号を表示することができます。しかし、これを動作させるためには更に、最初の音符の前に空白の小節線を挿入する必要があります。
\paper { line-width = 50\mm } \relative c' { \set Score.barNumberVisibility = #all-bar-numbers-visible c1 | d | e | f \break g1 | e | d | c }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 最初の小節に小節番号を表示する ] | [ Up: Rhythms ] | [ 装飾音符のデフォルトの挙動を再定義する > ] |
Printing tuplet brackets on the note head side
Whichever option you choose for controlling the tuplet bracket
visibility, it will show or hide the tuplet bracket irrespectively of
tuplet bracket placement (stem side or note head side). However, when
placing the tuplet bracket on the note head side some authors recommend
always printing the tuplet bracket. The option
visible-over-note-heads can be used to achieve this.
music = \relative c'' { \tupletNeutral \tuplet 3/2 { c16[ d e } f8] \tupletUp \tuplet 3/2 { c8 d e } } \new Voice { \relative c' { \override TextScript.staff-padding = #2.5 \time 2/4 \override TupletBracket.visible-over-note-heads = ##t \override Score.TextMark.non-musical = ##f <>^\markup "default" \music \override TupletBracket.bracket-visibility = #'if-no-beam <>^\markup \typewriter "if-no-beam" \music } }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < Printing tuplet brackets on the note head side ] | [ Up: Rhythms ] | [ 楽譜から小節番号を削除する > ] |
装飾音符のデフォルトの挙動を再定義する
装飾音符に関するデフォルトの識別子は
startGraceMusic, stopGraceMusic,
startAcciaccaturaMusic, stopAcciaccaturaMusic,
startAppoggiaturaMusic, stopAppoggiaturaMusic
であり、ly/grace-init.ly に定義されています。これらを再定義することで、装飾音符の挙動を変更することができます。
startAcciaccaturaMusic = { <>( \override Flag.stroke-style = "grace" \slurDashed } stopAcciaccaturaMusic = { \revert Flag.stroke-style \slurSolid <>) } \relative c'' { \acciaccatura d8 c1 }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 装飾音符のデフォルトの挙動を再定義する ] | [ Up: Rhythms ] | [ 休符のスタイル > ] |
楽譜から小節番号を削除する
Score コンテキストから Bar_number_engraver を削除することで、小節番号を完全に削除することができます。
\layout { \context { \Score \omit BarNumber % or: % \remove "Bar_number_engraver" } } \relative c'' { c4 c c c \break c4 c c c }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 楽譜から小節番号を削除する ] | [ Up: Rhythms ] | [ デフォルトの連桁のグループ化規則を置き換える > ] |
休符のスタイル
休符には様々なスタイルが使用できます。
restsA = { r\maxima r\longa r\breve r1 r2 r4 r8 r16 s32 s64 s128 s256 s512 s1024 s1024 } restsB = { r\maxima r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r256 r512 r1024 s1024 } \new Staff \relative c { \omit Score.TimeSignature \cadenzaOn \override Staff.Rest.style = #'mensural <>^\markup \typewriter { mensural } \restsA \bar "" \break \override Staff.Rest.style = #'neomensural <>^\markup \typewriter { neomensural } \restsA \bar "" \break \override Staff.Rest.style = #'classical <>^\markup \typewriter { classical } \restsB \bar "" \break \override Staff.Rest.style = #'z <>^\markup \typewriter { z-style } \restsB \bar "" \break \override Staff.Rest.style = #'default <>^\markup \typewriter { default } \restsB \bar "" \break }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 休符のスタイル ] | [ Up: Rhythms ] | [ リズム スラッシュ > ] |
デフォルトの連桁のグループ化規則を置き換える
12/8 拍子で連桁を 3-4-3-2 でグループ化する場合、12/8 におけるデフォルトの連桁規則をオーバライドし、新たな規則を設定する必要があります。
\relative c'' { \time 12/8 % Default beaming a8 a a a a a a a a a a a % Set new values for beam endings \set Score.beatStructure = 3,4,3,2 a8 a a a a a a a a a a a }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < デフォルトの連桁のグループ化規則を置き換える ] | [ Up: Rhythms ] | [ 歌詞モードでのスキップ > ] |
リズム スラッシュ
“シンプルな” リード シートでは、実際の音符を書かずに、代わりに“リズム パターン” とコード ネームのみを書き、曲の構造を示すことがあります。これは、曲の構造だけを作成あるいは転写する際や、リード シートをギタリストやジャズ
ミュージシャンに共有する際などに有用です。これを実現するために \repeat percent を用いるのは不適切です。\repeat percent では、最初の音符や休符として何かを指定しなければならないからです。次の例では 2 つの解決法を示しています。どちらも通常の休符をスラッシュとして表示するものです。(拍の長さを 4 分音符から変えたい場合は、定義中にある
r4 を適切に変更してください。)
startPat = { \improvisationOn \omit Stem } stopPat = { \improvisationOff \undo \omit Stem } \new Voice \with { \consists Pitch_squash_engraver } { c'4 d' e' f' | \startPat 4 4 4 4 | \stopPat f'4 e' d' c' }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < リズム スラッシュ ] | [ Up: Rhythms ] | [ 歌詞モードでのスキップ (2) > ] |
歌詞モードでのスキップ
s によるスキップは音符モードや和音モードのみで有効です。歌詞モードなどの他の場合では、\skip コマンドを使用することが推奨されます。
<< \relative c'' { a1 | a } \new Lyrics \lyricmode { \skip1 bla1 } >>
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 歌詞モードでのスキップ ] | [ Up: Rhythms ] | [ 小符幹 (ステムレット) > ] |
歌詞モードでのスキップ (2)
s は \lyricmode では使用できません
(“s” という歌詞が入力されるだけです) が、ダブルクォート ("")
やアンダースコア (_) を使用することができます。例:
<< \relative c'' { a4 b c d } \new Lyrics \lyricmode { a4 "" _ gap } >>
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 歌詞モードでのスキップ (2) ] | [ Up: Rhythms ] | [ 厳密な拍に基づく連桁 > ] |
小符幹 (ステムレット)
慣習によっては、連桁が休符を含むことが許されます。好みにより、連桁から休符に向かって ’小符幹 (ステムレット)’ を伸ばし、リズムを見やすくする場合があります。現代音楽では、休符自体が省略され小符幹のみが表示される場合もあります。
このスニペットでは伝統的な記譜法からの変遷を示しています。休符を含む連桁、小符幹付きの休符、小符幹のみの順番です。小符幹は Stem の
stemlet-length プロパティをオーバライドすることで生成できます。休符は transparent = ##t によって非表示にします。
異なる記譜を示すために \markup を用いています。
\paper { ragged-right = ##f } { c'16^\markup { traditional } d' r f' g'16[^\markup \column { "beams" "over rests" } f' r d'] % N.B. use Score.Stem to set for the whole score. \override Staff.Stem.stemlet-length = #0.75 c'16[^\markup \column { "stemlets" "over rests" } d' r f'] g'16[^\markup \column { "stemlets" "and no rests" } f' \once \hide Rest r16 d'] }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 小符幹 (ステムレット) ] | [ Up: Rhythms ] | [ 連桁を細分する > ] |
厳密な拍に基づく連桁
16 分音符以下の連桁の向きは、音符が属する拍に基づいて決定することができます。最初の連桁では突き出るものが避けられ (デフォルト)、次の連桁は拍に厳密に従います。
\relative c'' { \time 6/8 a8. a16 a a \set strictBeatBeaming = ##t a8. a16 a a }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 厳密な拍に基づく連桁 ] | [ Up: Rhythms ] | [ Tam-tam example > ] |
連桁を細分する
16 分音符 (あるいはそれより短い音符) の連桁は、デフォルトでは細分されません。つまり、3 つ以上の音符全体が分かれることなく平等に連桁で繋がれます。この挙動は、subdivideBeams プロパティをセットすることで、連桁を細分するように変更することができます。このプロパティがセットされると、連桁が現在の beatBase の間隔で細分されて表示されるようになります。分割された後の音符全体の長さが分割長より短い (不完全な連桁) 場合は、連桁の本数は可能な最長分割グループが基になります。しかし、分割された後の音符が 1 つしか存在しない場合、この制限は適用されません。
beatBase は、明示的にセットされなければ、現在の拍子記号の分母分の 1 に設定されます。beatBase は、このスニペットのように
ly:make-moment 関数を用いて、連桁を分割する単位となる長さを分数で指定する必要があります。また、beatBase が変更された場合、beatStructure も新たな
beatBase に合わせて変更する必要があります:
\relative c'' { \time 1/4 <>^"default" c32 c c c c c c c <>^"with subdivision" \set subdivideBeams = ##t c32 c c c c c c c <>^"min 1/8" \once \set beamMinimumSubdivision = #1/8 c32 c c c c c c c <>^"max 1/16" \once \set beamMaximumSubdivision = #1/16 c32 c c c c c c c <>^"max 3/8" \once \set beamMaximumSubdivision = #3/8 \repeat unfold 16 c64 <>^"min 1/32, max 1/64" % Set maximum beam subdivision interval to 1/64 to limit % subdivision depth, despite not being metrically correct. \once \set beamMinimumSubdivision = #1/32 \once \set beamMaximumSubdivision = #1/64 \repeat unfold 32 c128 \break <>^"beams with incomplete subdivisions" c32 c c c c c c r32 c32 c c c c r16. <>^\markup { "the same with" \typewriter { "respectIncomplete=#t" } } \set respectIncompleteBeams = ##t % The incomplete subgroup extends the completed subgroup. c32 c c c c c c r32 % No visual change since we have only two stems in the % incomplete subgroup. c32 c c c c r16. }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 連桁を細分する ] | [ Up: Rhythms ] | [ Tambourine example > ] |
Tam-tam example
A tam-tam example, entered with ‘tt’.
#(define mydrums '((tamtam default #f 0))) \new DrumStaff \with { instrumentName = #"Tamtam" } \drummode { \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums) \override Staff.StaffSymbol.line-positions = #'( 0 ) \override Staff.BarLine.bar-extent = #'(-1.5 . 1.5) tt 1 \pp \laissezVibrer }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < Tam-tam example ] | [ Up: Rhythms ] | [ 3 方向ボックス > ] |
Tambourine example
A tambourine example, entered with ‘tamb’.
#(define mydrums '((tambourine default #f 0))) \new DrumStaff \with { instrumentName = #"Tambourine" } \drummode { \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums) \override Staff.StaffSymbol.line-positions = #'( 0 ) \override Staff.BarLine.bar-extent = #'(-1.5 . 1.5) \time 6/8 tamb8. 16 8 8 8 8 | tamb4. 8 8 8 | % The trick with the scaled duration and the shorter rest % is neccessary for the correct ending of the trill-span! tamb2.*5/6 \startTrillSpan s8 \stopTrillSpan | }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < Tambourine example ] | [ Up: Rhythms ] | [ Time signature in brackets > ] |
3 方向ボックス
この例は、テキスト (や他のマークアップ) の周りの 3 方向のみを囲うボックスを作成するマークアップ コマンドを追加する方法を示しています。
% New command to add a three-sided box, with sides north, west, and south. % Based on the `box-stencil` command defined in `scm/stencil.scm`. % Note that ";;" is used to comment a line in Scheme. #(define-public (NWS-box-stencil stencil thickness padding) "Add a box around STENCIL, producing a new stencil." (let* ((x-ext (interval-widen (ly:stencil-extent stencil X) padding)) (y-ext (interval-widen (ly:stencil-extent stencil Y) padding)) (y-rule (make-filled-box-stencil (cons 0 thickness) y-ext)) (x-rule (make-filled-box-stencil (interval-widen x-ext thickness) (cons 0 thickness)))) ;; (set! stencil (ly:stencil-combine-at-edge stencil X 1 y-rule padding)) (set! stencil (ly:stencil-combine-at-edge stencil X LEFT y-rule padding)) (set! stencil (ly:stencil-combine-at-edge stencil Y UP x-rule 0.0)) (set! stencil (ly:stencil-combine-at-edge stencil Y DOWN x-rule 0.0)) stencil)) % The corresponding markup command, based on the `\box` command defined % in `scm/define-markup-commands.scm`. #(define-markup-command (NWS-box layout props arg) (markup?) #:properties ((thickness 0.1) (font-size 0) (box-padding 0.2)) "Draw a box round ARG. Look at THICKNESS, BOX-PADDING, and FONT-SIZE properties to determine line thickness and padding around the markup." (let ((pad (* (magstep font-size) box-padding)) (m (interpret-markup layout props arg))) (NWS-box-stencil m thickness pad))) \relative c' { c1^\markup { \NWS-box ABCD } c1^\markup { \NWS-box \note {4} #1.0 } }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 3 方向ボックス ] | [ Up: Rhythms ] | [ 括弧に囲まれた拍子記号 > ] |
Time signature in brackets
The time signature can be enclosed within brackets.
\relative c'' { \override Staff.TimeSignature.stencil = #(lambda (grob) (bracketify-stencil (ly:time-signature::print grob) Y 0.1 0.2 0.1)) \time 2/4 a4 b8 c }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < Time signature in brackets ] | [ Up: Rhythms ] | [ 拍子記号の (分数ではなく) 分子のみを数字で表示する > ] |
括弧に囲まれた拍子記号
拍子記号は括弧で囲むことができます。
\relative c'' { \override Staff.TimeSignature.stencil = #(lambda (grob) (parenthesize-stencil (ly:time-signature::print grob) 0.1 0.4 0.4 0.1)) \time 2/4 a4 b8 c }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 括弧に囲まれた拍子記号 ] | [ Up: Rhythms ] | [ 装飾音符のスタイルを調整する > ] |
拍子記号の (分数ではなく) 分子のみを数字で表示する
拍子記号の分数全体を表示せず、分子のみ (今回は 7) を表示したい場合があります。これは \override Staff.TimeSignature.style = #'single-number を用いてスタイルを永続的に変更することで簡単に実現できます。\revert Staff.TimeSignature.style を使用することで、この設定を元に戻すことが出来ます。1 つの拍子記号に対してのみ単一の数字で表示したい場合は、\override の前に \once を記述します。
\relative c'' { \time 3/4 c4 c c % Change the style permanently \override Staff.TimeSignature.style = #'single-number \time 2/4 c4 c \time 3/4 c4 c c % Revert to default style: \revert Staff.TimeSignature.style \time 2/4 c4 c % single-number style only for the next time signature \once \override Staff.TimeSignature.style = #'single-number \time 5/4 c4 c c c c \time 2/4 c4 c }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 拍子記号の (分数ではなく) 分子のみを数字で表示する ] | [ Up: Rhythms ] | [ ユーザ定義の拍子記号 > ] |
装飾音符のスタイルを調整する
add-grace-property, remove-grace-property を用いて、装飾音符のスタイルを楽譜全体にわたって変更することができます。次の例は
常に上向きとなっている Stem の向きの設定を無効にして、またデフォルトの符頭をクロスに変更しています。
\relative c'' { \new Staff { $(remove-grace-property 'Voice 'Stem 'direction) $(add-grace-property 'Voice 'NoteHead 'style 'cross) \new Voice { \acciaccatura { f16 } g4 \grace { d16 e } f4 \appoggiatura { f,32 g a } e2 } } }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 装飾音符のスタイルを調整する ] | [ Up: Rhythms ] | [ 符尾のスタイルを変更する > ] |
ユーザ定義の拍子記号
新たな拍子記号のスタイルを定義することができます。2 小節目の拍子記号はどちらの譜でも上下が逆になっています。
#(add-simple-time-signature-style 'topsy-turvy (lambda (fraction) (make-rotate-markup 180 (make-compound-meter-markup fraction)))) << \new Staff { \time 3/4 f'2. \override Score.TimeSignature.style = #'topsy-turvy \time 3/4 R2. \bar "|." } \new Staff { R2. e'' } >>
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < ユーザ定義の拍子記号 ] | [ Up: Rhythms ] | [ 通常の符頭で装飾音符のスラッシュを使用する > ] |
符尾のスタイルを変更する
8 分音符やそれより短い音符の符尾は、Flag の stencil
プロパティをオーバライドすることで変更できます。有効な値は
modern-straight-flag, old-straight-flag,
flat-flag です。
"@" = #(define-music-function (music) (ly:music?) #{ \set stemLeftBeamCount = 0 $music [] #}) testnotes = { \autoBeamOff c8 d16 e''32 f64 \acciaccatura { g,,,8 } a128 b } \relative c' { \override TextScript.staff-padding = 6 \time 1/4 <>^"default" \testnotes \override Flag.stencil = #modern-straight-flag <>_"modern straight" \testnotes \override Flag.stencil = #old-straight-flag <>^"old straight" \testnotes \override Flag.stencil = #flat-flag <>_"flat" \testnotes \revert Flag.stencil \flagStyleStacked <>^"stacked" \testnotes \flagStyleDefault <>_"default" \testnotes } \relative c' { \time 3/4 \override Flag.stencil = #flat-flag <>^"flat" c8 c[ c] d16 d[ d] e''32 e[ e] f64 f[ f] \acciaccatura { g,,,8 } a128 a[ a a a a] <>^"beam-like" @c8 c[ c] @d16 d[ d] @e''32 e[ e] @f64 f[ f] \acciaccatura { g,,,8 } @a128 a[ a a a a] } \layout { indent = 0 \context { \Score \override NonMusicalPaperColumn.line-break-permission = ##f } }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 符尾のスタイルを変更する ] | [ Up: Rhythms ] | [ アルペジオにタイを使用する > ] |
通常の符頭で装飾音符のスラッシュを使用する
アッチャカトゥーラに付加されるスラッシュを、他の場面で使用することができます。
\relative c'' { \override Flag.stroke-style = "grace" c8( d2) e8( f4) }
| [ << Rhythms ] | [Top][Contents] | [ Expressive marks >> ] |
| [ < 通常の符頭で装飾音符のスラッシュを使用する ] | [ Up: Rhythms ] | [ Expressive marks > ] |
アルペジオにタイを使用する
タイはアルペジオを表記する際にも使われます。この場合、タイの始端となる複数の音符は同時である必要はありません。これは tieWaitForNote
プロパティを #t にセットすることで実現できます。この機能は例えば、和音のトレモロにタイを繋ぐ場合などに有用ですが、通常の音符に対して用いることもできます。
\relative c' { \set tieWaitForNote = ##t \grace { c16[ ~ e ~ g] ~ } <c, e g>2 \repeat tremolo 8 { c32 ~ c' ~ } <c c,>1 e8 ~ c ~ a ~ f ~ <e' c a f>2 \tieUp c8 ~ a \tieDown \tieDotted g8 ~ c g2 }
| [ << Rhythms ] | [Top][Contents] | [ Repeats >> ] |
| [ < アルペジオにタイを使用する ] | [ Up: Top ] | [ 発想記号や和音の音符に括弧を追加する > ] |
3 Expressive marks
See also Expressive marks.
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < Expressive marks ] | [ Up: Expressive marks ] | [ 長いグリッサンドにタイミング マークを追加する > ] |
発想記号や和音の音符に括弧を追加する
\parenthesize 関数は、オブジェクトを括弧で囲む特殊な調整関数です。Grob は Parentheses になります。
\relative c' { c2-\parenthesize -> \override Parentheses.padding = #0.1 \override Parentheses.font-size = #-4 <d \parenthesize f a>2 }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < 発想記号や和音の音符に括弧を追加する ] | [ Up: Expressive marks ] | [ Adjusting slur positions vertically > ] |
長いグリッサンドにタイミング マークを追加する
長いグリッサンド部分の拍をタイミング マークで表示する場合があります。これは通例符頭が無く符幹だけの音符として表され、この中間部分に発想記号を付け加えることもできます。
符幹がグリッサンドにうまく揃わない場合には、わずかに配置を調整する必要があるかもしれません。
glissandoSkipOn = { \override NoteColumn.glissando-skip = ##t \hide NoteHead \override NoteHead.no-ledgers = ##t } glissandoSkipOff = { \revert NoteColumn.glissando-skip \undo \hide NoteHead \revert NoteHead.no-ledgers } \relative c'' { r8 f8\glissando \glissandoSkipOn f4 g a a8\noBeam \glissandoSkipOff a8 r8 f8\glissando \glissandoSkipOn g4 a8 \glissandoSkipOff a8 | r4 f\glissando \< \glissandoSkipOn a4\f \> \glissandoSkipOff b8\! r | }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < 長いグリッサンドにタイミング マークを追加する ] | [ Up: Expressive marks ] | [ fall や doit の形を調整する > ] |
Adjusting slur positions vertically
Using \override Slur.positions it is possible to set the
vertical position of the start and end points of a slur to absolute
values (or rather, forcing LilyPond’s slur algorithm to consider these
values as desired). In many cases, this means a lot of trial and error
until good values are found. You probably have tried the
\offset command next just to find out that it doesn’t work for
slurs, emitting a warning instead.
The code in this snippet allows you to tweak the vertical start and end
positions by specifying relative changes, similar to
\offset.
Syntax: \offsetPositions #'(dy1 . dy2)
offsetPositions = #(define-music-function (offsets) (number-pair?) #{ \once \override Slur.control-points = #(lambda (grob) (match-let ((((_ . y1) _ _ (_ . y2)) (ly:slur::calc-control-points grob)) ((off1 . off2) offsets)) (set! (ly:grob-property grob 'positions) (cons (+ y1 off1) (+ y2 off2))) (ly:slur::calc-control-points grob))) #}) \relative c'' { c4(^"default" c, d2) \offsetPositions #'(0 . 1) c'4(^"(0 . 1)" c, d2) \offsetPositions #'(0 . 2) c'4(^"(0 . 2)" c, d2) \bar "||" g4(^"default" a d'2) \offsetPositions #'(1 . 0) g,,4(^"(1 . 0)" a d'2) \offsetPositions #'(2 . 0) g,,4(^"(2 . 0)" a d'2) }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < Adjusting slur positions vertically ] | [ Up: Expressive marks ] | [ Aligning the ends of hairpins to NoteColumn directions > ] |
fall や doit の形を調整する
fall や doit の形を調整するために、
shortest-duration-space プロパティを変更することができます。
\relative c'' { \override Score.SpacingSpanner.shortest-duration-space = 4.0 c2-\bendAfter 5 c2-\bendAfter -4.75 c2-\bendAfter 8.5 c2-\bendAfter -6 }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < fall や doit の形を調整する ] | [ Up: Expressive marks ] | [ 二全音符を変更する > ] |
Aligning the ends of hairpins to NoteColumn directions
The ends of hairpins may be aligned to the LEFT, CENTER,
or RIGHT of NoteColumn grobs by overriding the property
endpoint-alignments, which is a pair of numbers representing the
left and right ends of the hairpin. endpoint-alignments are
expected to be directions (either -1, 0 or 1). Other values will
be transformed with a warning. The right end of a hairpin terminating
at a rest is not affected, always ending at the left edge of the rest.
{ c'2\< <c' d'>\! | \override Hairpin.endpoint-alignments = #'(1 . -1) c'2\< <c' d'>\! | \override Hairpin.endpoint-alignments = #`(,LEFT . ,CENTER) c'2\< <c' d'>\! | }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < Aligning the ends of hairpins to NoteColumn directions ] | [ Up: Expressive marks ] | [ 非対称なスラー > ] |
二全音符を変更する
二全音符の表示を、符頭の左右に線が 1 本あるバロック式の表示から、2 本あるものに変更することができます。
\relative c'' { \time 4/2 c\breve | \override Staff.NoteHead.style = #'altdefault b\breve \override Staff.NoteHead.style = #'baroque b\breve \revert Staff.NoteHead.style a\breve }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < 二全音符を変更する ] | [ Up: Expressive marks ] | [ ブレス記号 > ] |
非対称なスラー
音符の流れが対象的な形をしていない場合、それに合わせてスラーを非対称にすることができます。
slurNotes = { d,8( a' d f a f' d, a) } \relative c' { \stemDown \slurUp \slurNotes \once \override Slur.eccentricity = #3.0 \slurNotes }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < 非対称なスラー ] | [ Up: Expressive marks ] | [ 一部が隠されたクレッシェンドのヘアピン > ] |
ブレス記号
ブレス記号にはいくつかの図形を設定できます: カンマ (デフォルト), ティック (斜め線), V字, “線路記号” (カエスーラ) です。
\new Staff \relative c'' { \key es \major \time 3/4 % this bar contains no \breathe << { g4 as g } \\ { es4 bes es } >> | % Modern notation: % by default, \breathe uses the rcomma, just as if saying: % \override BreathingSign.text = % #(make-musicglyph-markup "scripts.rcomma") << { g4 as g } \\ { es4 \breathe bes es } >> | % rvarcomma and lvarcomma are variations of the default rcomma % and lcomma % N.B.: must use Staff context here, since we start a Voice below \override Staff.BreathingSign.text = \markup { \musicglyph "scripts.rvarcomma" } << { g4 as g } \\ { es4 \breathe bes es } >> | % raltcomma and laltcomma are alternative variations of the % default rcomma and lcomma \override Staff.BreathingSign.text = \markup { \musicglyph "scripts.raltcomma" } << { g4 as g } \\ { es4 \breathe bes es } >> | % vee \override BreathingSign.text = \markup { \musicglyph "scripts.uupbow" } es8[ d es f g] \breathe f | % caesura \override BreathingSign.text = \markup { \musicglyph "scripts.caesura.curved" } es8[ d] \breathe es[ f g f] | es2 r4 \bar "||" }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < ブレス記号 ] | [ Up: Expressive marks ] | [ Caesura (“railtracks”) with fermata > ] |
一部が隠されたクレッシェンドのヘアピン
クレッシェンドのヘアピンの一部を非表示にするには、白い長方形を対応する部分の上から描画します。長方形は、テキスト マークアップの内部で PostScript コードとして定義します。
マークアップ コマンド with-dimensions は、スペーシングの際に
(訳注: y 軸方向のバウンディングボックスを #'(0 . 0) にすることで)
長方形の下端部分のみが考慮されるようにし、staff-padding プロパティは、長方形がヘアピンと譜の間に配置されないようにしています。
ヘアピンが長方形によって隠されるために、ヘアピンのレイヤをテキスト マークアップよりも低く設定してください。
\relative c' { << { \dynamicUp r2 r16 c'8.\pp r4 } \\ { \override DynamicLineSpanner.layer = #0 des,2\mf\< ~ \override TextScript.layer = #2 \once\override TextScript.staff-padding = #6 \once\override TextScript.vertical-skylines = #'() des16_\markup \with-dimensions #'(2 . 7) #'(0 . 0) \with-color #white \filled-box #'(2 . 7) #'(0 . 2) #0 r8. des4 ~ des16->\sff r8. } >> }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < 一部が隠されたクレッシェンドのヘアピン ] | [ Up: Expressive marks ] | [ ヘアピンの下にテキストを中央揃えする > ] |
Caesura (“railtracks”) with fermata
A caesura is sometimes denoted by a double “railtracks” breath mark with a fermata sign positioned above. This snippet shows an optically pleasing combination of railtracks and fermata.
\relative c'' { c2. % construct the symbol \override BreathingSign.text = \markup { \override #'(direction . 1) \override #'(baseline-skip . 1.8) \dir-column { \translate #'(0.155 . 0) \center-align \musicglyph "scripts.caesura.curved" \center-align \musicglyph "scripts.ufermata" } } \breathe c4 % set the breath mark back to normal \revert BreathingSign.text c2. \breathe c4 \bar "|." }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < Caesura (“railtracks”) with fermata ] | [ Up: Expressive marks ] | [ テキストによる強弱記号のテキストとスパナのスタイルを変更する > ] |
ヘアピンの下にテキストを中央揃えする
この例はヘアピンの (デ) クレッシェンドの下に “molto” や “poco” のようなテキストを追加する機能を提供しています。テキストの向きは、ヘアピンの向きに応じて変更されます。ヘアピンは DynamicText に揃えられます。
この例は Scheme コードを用いて、オブジェクトが通常どのように表示されるかを変更する方法も示しています。
hairpinWithCenteredText = #(define-music-function (text) (markup?) #{ \once \override Voice.Hairpin.after-line-breaking = #(lambda (grob) (let* ((stencil (ly:hairpin::print grob)) (par-y (ly:grob-parent grob Y)) (dir (ly:grob-property par-y 'direction)) (staff-line-thickness (ly:output-def-lookup (ly:grob-layout grob) 'line-thickness)) (new-stencil (ly:stencil-aligned-to (ly:stencil-combine-at-edge (ly:stencil-aligned-to stencil X CENTER) Y dir (ly:stencil-aligned-to (grob-interpret-markup grob (make-fontsize-markup (magnification->font-size (+ (ly:staff-symbol-staff-space grob) (/ staff-line-thickness 2))) text)) X CENTER)) X LEFT)) (staff-space (ly:output-def-lookup (ly:grob-layout grob) 'staff-space)) (par-x (ly:grob-parent grob X)) (dyn-text (grob::has-interface par-x 'dynamic-text-interface)) (dyn-text-stencil-x-length (if dyn-text (interval-length (ly:stencil-extent (ly:grob-property par-x 'stencil) X)) 0)) (x-shift (if dyn-text (- (+ staff-space dyn-text-stencil-x-length) (* 0.5 staff-line-thickness)) 0))) (ly:grob-set-property! grob 'Y-offset 0) (ly:grob-set-property! grob 'stencil (ly:stencil-translate-axis new-stencil x-shift X)))) #}) hairpinMolto = \hairpinWithCenteredText \markup { \italic molto } hairpinMore = \hairpinWithCenteredText \markup { \larger moltissimo } \relative c' { \hairpinMolto c2\< c\f \hairpinMore c2\ppppp\< c\f \break \hairpinMolto c2^\< c\f \hairpinMore c2\ppppp\< c\f }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < ヘアピンの下にテキストを中央揃えする ] | [ Up: Expressive marks ] | [ スラーを実線から点線や破線に変更する > ] |
テキストによる強弱記号のテキストとスパナのスタイルを変更する
クレッシェンドやデクレッシェンドに使われるテキストは crescendoText,
decrescendoText コンテキスト プロパティをセットすることで変更できます。
スパナの線は、DynamicTextSpanner の style プロパティをセットすることでスタイルを変更できます。デフォルトの値は 'dashed-line
であり、他に 'line, 'dotted-line, 'none が設定できます。
\relative c'' { \set crescendoText = \markup { \italic { cresc. poco } } \set crescendoSpanner = #'text \override DynamicTextSpanner.style = #'dotted-line a2\< a a2 a a2 a a2 a\mf }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < テキストによる強弱記号のテキストとスパナのスタイルを変更する ] | [ Up: Expressive marks ] | [ ブレス記号を変更する > ] |
スラーを実線から点線や破線に変更する
スラーの見た目を実線から点線や破線に変更することができます。
\relative c' { c4( d e c) \slurDotted c4( d e c) \slurSolid c4( d e c) \slurDashed c4( d e c) \slurSolid c4( d e c) }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < スラーを実線から点線や破線に変更する ] | [ Up: Expressive marks ] | [ 音符ごとに付点の数を独立して変更する > ] |
ブレス記号を変更する
ブレス記号のグリフは BreathingSign レイアウト オブジェクトの
text プロパティをオーバライドすることで、任意のマークアップ
テキストに変更することができます。
\relative c'' { c2 \override BreathingSign.text = \markup { \musicglyph "scripts.rvarcomma" } \breathe d2 }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < ブレス記号を変更する ] | [ Up: Expressive marks ] | [ 強弱記号をマークアップ テキストと結合する > ] |
音符ごとに付点の数を独立して変更する
音符ごとに、入力したドットの数とは独立して付点の数を変更することができます。
\relative c' { c4.. a16 r2 | \override Dots.dot-count = 4 c4.. a16 r2 | \override Dots.dot-count = 0 c4.. a16 r2 | \revert Dots.dot-count c4.. a16 r2 | }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < 音符ごとに付点の数を独立して変更する ] | [ Up: Expressive marks ] | [ Combining dynamics with markup texts (2) > ] |
強弱記号をマークアップ テキストと結合する
強弱記号の中には、テキスト表示を含むものがあります (“più forte” や
“piano subito” など)。これらは \markup コマンドで作り出すことができます。
piuF = \markup { \italic più \dynamic f } \markup \with-true-dimensions % work around a cropping issue \score { \relative c'' { c2\f c-\piuF } }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < 強弱記号をマークアップ テキストと結合する ] | [ Up: Expressive marks ] | [ 現代のグリッサンド > ] |
Combining dynamics with markup texts (2)
Some dynamics may involve text indications (such as “più f” or
“p subito”). These can be produced using the
make-dynamic-script Scheme function; the resulting object
behaves like a DynamicText grob.
See also “Combining dynamics with markup texts”.
piuF = #(make-dynamic-script #{ \markup { \normal-text \italic più \dynamic f } #}) \score { \relative c'' { c2\f c\piuF } }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < Combining dynamics with markup texts (2) ] | [ Up: Expressive marks ] | [ 改行後のスパナの可視性をコントロールする > ] |
現代のグリッサンド
終端の音符が存在しない現代のグリッサンドは、不可視の音符とカデンツァを使用することで作ることができます。
\relative c'' { \time 3/4 \override Glissando.style = #'zigzag c4 c \cadenzaOn c4\glissando \hideNotes c,,4 \unHideNotes \cadenzaOff \bar "|" }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < 現代のグリッサンド ] | [ Up: Expressive marks ] | [ 和音内の運指記号の位置をコントロールする > ] |
改行後のスパナの可視性をコントロールする
改行のすぐ後の音符で終了するスパナの可視性は、after-line-breaking のコールバック ly:spanner::kill-zero-spanned-time によりコントロールされます。
グリッサンドやヘアピンのようなオブジェクトは、デフォルトで改行後のスパナを表示しないようにしています。このコールバックを無効化することで、改行後のスパナが表示されるようになります。
逆に、テキスト スパナなどはデフォルトで改行後に表示されるようになっていますが、コールバックを有効にすることで削除することができます。
\paper { line-width = 50\mm } \relative c'' { \override Hairpin.to-barline = ##f \override Glissando.breakable = ##t % show hairpin \override Hairpin.after-line-breaking = ##t % hide text span \override TextSpanner.after-line-breaking = #ly:spanner::kill-zero-spanned-time e2\<\startTextSpan % show glissando \override Glissando.after-line-breaking = ##t f2\glissando \break f,1\!\stopTextSpan }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < 改行後のスパナの可視性をコントロールする ] | [ Up: Expressive marks ] | [ スクリプトの縦方向の優先順位をコントロールする > ] |
和音内の運指記号の位置をコントロールする
運指番号の位置を精密にコントロールすることができます。位置の設定が適用されるためには、単一の音符であっても和音構造 <> を用いる必要があります。
\relative c' { \set fingeringOrientations = #'(left) <c-1 e-3 a-5>4 \set fingeringOrientations = #'(down) <c-1 e-3 a-5>4 \set fingeringOrientations = #'(down right up) <c-1 e-3 a-5>4 \set fingeringOrientations = #'(up) <c-1 e-3 a-5>4 \set fingeringOrientations = #'(left) <c-1>2 \set fingeringOrientations = #'(down) <e-3>2 \set stringNumberOrientations = #'(up left down) <f\3 a\2 c\1>1 \set strokeFingerOrientations = #'(down right up) <c\rightHandFinger 1 e\rightHandFinger 2 c'\rightHandFinger 4 > }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < 和音内の運指記号の位置をコントロールする ] | [ Up: Expressive marks ] | [ Creating “real” parenthesized dynamics > ] |
スクリプトの縦方向の優先順位をコントロールする
スクリプト (音符に付加する記号) の縦方向の優先順位は、script-priority プロパティでコントロールされます。値が小さいほど、音符の近くに配置されます。この例では、1 つ目は
TextScript (シャープ記号) を低い優先度を持つようにしており、一番低い位置に表示されます。2 つ目はトリル (Script) が低い優先度を持ち、内側に表示されるようになっています。2 つのオブジェクトが同じ優先度を持つ場合には、入力された順番が配置に影響します。
\relative c''' { \once \override TextScript.script-priority = -100 a2^\prall^\markup { \sharp } \once \override Script.script-priority = -100 a2^\prall^\markup { \sharp } \set fingeringOrientations = #'(up) <c-2 a-1>2 <a-1 c\tweak script-priority -100 -2>2 }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < スクリプトの縦方向の優先順位をコントロールする ] | [ Up: Expressive marks ] | [ 遅れターンを作成する > ] |
Creating “real” parenthesized dynamics
Although the easiest way to add parentheses to a dynamic mark is to use
a \markup block, this method has a downside: the created
objects behave like text markups and not like dynamics.
However, it is possible to create a similar object using the equivalent
Scheme code (as described in the Notation Reference), combined with the
make-dynamic-script function. This way, the markup is regarded
as a dynamic and therefore remains compatible with commands such as
\dynamicUp or \dynamicDown.
paren = #(define-event-function (dyn) (ly:event?) (make-dynamic-script #{ \markup \concat { \normal-text \italic \fontsize #2 ( \pad-x #0.2 #(ly:music-property dyn 'text) \normal-text \italic \fontsize #2 ) } #})) \relative c'' { c4\paren\f c c \dynamicUp c\paren\p }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < Creating “real” parenthesized dynamics ] | [ Up: Expressive marks ] | [ 異なるボイスにまたがるアルペジオを作成する > ] |
遅れターンを作成する
下の音符が臨時記号を持つような遅れターンを作るには、いくつかのオーバライドが必要です。outside-staff-priority プロパティを #f にセットしなければ、avoid-slur プロパティよりも優先されてしまい、スラーの内側に記号が入りません。分数 2/3 と 1/3 は、水平位置を調整しています。
\relative c'' { \after 2*2/3 \turn c2( d4) r | \after 4 \turn c4.( d8) \after 4 { \once \set suggestAccidentals = ##t \once \override AccidentalSuggestion.outside-staff-priority = ##f \once \override AccidentalSuggestion.avoid-slur = #'inside \once \override AccidentalSuggestion.font-size = -3 \once \override AccidentalSuggestion.script-priority = -1 \once \hideNotes cis8\turn \noBeam } d4.( e8) }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < 遅れターンを作成する ] | [ Up: Expressive marks ] | [ ピアノ譜で譜をまたがるアルペジオを作成する > ] |
異なるボイスにまたがるアルペジオを作成する
Staff コンテキストに Span_arpeggio_engraver が追加された場合、アルペジオは同じ譜にある異なるボイスにまたがって表示されます。
\new Staff \with { \consists "Span_arpeggio_engraver" } \relative c' { \set Staff.connectArpeggios = ##t << { <e' g>4\arpeggio <d f> <d f>2 } \\ { <d, f>2\arpeggio <g b>2 } >> }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < 異なるボイスにまたがるアルペジオを作成する ] | [ Up: Expressive marks ] | [ 他のコンテキストで譜をまたがるアルペジオを作成する > ] |
ピアノ譜で譜をまたがるアルペジオを作成する
PianoStaff 内では、PianoStaff.connectArpeggios プロパティをセットすることで、譜をまたがるアルペジオを作成することができます。
\new PianoStaff \relative c'' << \set PianoStaff.connectArpeggios = ##t \new Staff { <c e g c>4\arpeggio <g c e g>4\arpeggio <e g c e>4\arpeggio <c e g c>4\arpeggio } \new Staff { \clef bass \repeat unfold 4 { <c,, e g c>4\arpeggio } } >>
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < ピアノ譜で譜をまたがるアルペジオを作成する ] | [ Up: Expressive marks ] | [ 2 桁の運指記号を作成する > ] |
他のコンテキストで譜をまたがるアルペジオを作成する
譜をまたがるアルペジオは Span_arpeggio_engraver が Score
コンテキストに追加されていれば、GrandStaff, PianoStaff, StaffGroup
以外にも作成することができます。
<< \new PianoStaff << \new Voice \relative c' { <c e>2\arpeggio <d f>2\arpeggio <c e>1\arpeggio } \new Voice \relative c { \clef bass <c g'>2\arpeggio <b g'>2\arpeggio <c g'>1\arpeggio } >> \new Staff \relative c { \set Score.connectArpeggios = ##t \clef bass c2\arpeggio g\arpeggio c1\arpeggio } >> \layout { \context { \Score \consists "Span_arpeggio_engraver" } }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < 他のコンテキストで譜をまたがるアルペジオを作成する ] | [ Up: Expressive marks ] | [ ボイスをまたがるスラーを作成する > ] |
2 桁の運指記号を作成する
5 よりも大きな運指記号を作成することができます。
\relative c' { c1-10 c1-50 c1-36 c1-29 }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < 2 桁の運指記号を作成する ] | [ Up: Expressive marks ] | [ テキスト スパナを作成する > ] |
ボイスをまたがるスラーを作成する
異なるボイスを繋ぐスラーを作成しなければならない場合があります。
解決法は、\hideNotes を用いて片方のボイスに不可視の音符を追加することです。
この例は、Bach の Partita for Violin No. 2 (BWV 1004) の 235 小節目です。
\relative c' { << { d16( a') s a s a[ s a] s a[ s a] } \\ { \slurUp bes,16[ s e]( \hideNotes a) \unHideNotes f[( \hideNotes a) \unHideNotes fis]( \hideNotes a) \unHideNotes g[( \hideNotes a) \unHideNotes gis]( \hideNotes a) } >> }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < ボイスをまたがるスラーを作成する ] | [ Up: Expressive marks ] | [ Dynamics spanner with custom text > ] |
テキスト スパナを作成する
\startTextSpan と \stopTextSpan コマンドは、ペダル記号やオッターバのようにテキスト スパナを容易に作成できます。TextSpanner オブジェクトのプロパティをオーバライドすることで、出力を変更することができます。
\paper { ragged-right = ##f } \relative c'' { \override TextSpanner.bound-details.left.text = #"bla" \override TextSpanner.bound-details.right.text = #"blu" a4 \startTextSpan b4 c a4 \stopTextSpan \override TextSpanner.style = #'line \once \override TextSpanner.bound-details.left.stencil-align-dir-y = #CENTER a4 \startTextSpan b4 c a4 \stopTextSpan \override TextSpanner.style = #'dashed-line \override TextSpanner.bound-details.left.text = \markup { \draw-line #'(0 . 1) } \override TextSpanner.bound-details.right.text = \markup { \draw-line #'(0 . -2) } \once \override TextSpanner.bound-details.right.padding = #-2 a4 \startTextSpan b4 c a4 \stopTextSpan \override TextSpanner.dash-period = #10 \override TextSpanner.dash-fraction = #0.5 \override TextSpanner.thickness = #10 a4 \startTextSpan b4 c a4 \stopTextSpan }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < テキスト スパナを作成する ] | [ Up: Expressive marks ] | [ Grob をスキップするグリッサンド > ] |
Dynamics spanner with custom text
Postfix functions for custom crescendo text spanners. The spanners
should start on the first note of the measure. One has to use
-\mycresc, otherwise the spanner start will rather be assigned
to the next note.
% Two functions for (de)crescendo spanners where you can explicitly % give the spanner text. mycresc = #(define-music-function (mymarkup) (markup?) (make-music 'CrescendoEvent 'span-direction START 'span-type 'text 'span-text mymarkup)) mydecresc = #(define-music-function (mymarkup) (markup?) (make-music 'DecrescendoEvent 'span-direction START 'span-type 'text 'span-text mymarkup)) \relative c' { c4-\mycresc "custom cresc" c4 c4 c4 | c4 c4 c4 c4 | c4-\mydecresc "custom decresc" c4 c4 c4 | c4 c4 c4 c4 | c4 c4\! c4 c4 }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < Dynamics spanner with custom text ] | [ Up: Expressive marks ] | [ 異なるライン スタイルのヘアピン > ] |
Grob をスキップするグリッサンド
NoteColumn Grob をグリッサンドが飛び越すように設定することができます。
\relative c' { a2 \glissando \once \override NoteColumn.glissando-skip = ##t f''4 d, }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < Grob をスキップするグリッサンド ] | [ Up: Expressive marks ] | [ テキスト強弱記号の線を隠す > ] |
異なるライン スタイルのヘアピン
ヘアピンには line-interface のスタイルを用いることができます:
dashed-line, dotted-line, line, trill, zigzag です。
\relative c' { c2\< c\! \override Hairpin.style = #'dashed-line c2\< c\! \override Hairpin.style = #'dotted-line c2\< c\! \override Hairpin.style = #'line c2\< c\! \override Hairpin.style = #'trill c2\< c\! \override Hairpin.style = #'zigzag c2\< c\! \revert Hairpin.style c2\< c\! }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < 異なるライン スタイルのヘアピン ] | [ Up: Expressive marks ] | [ Horizontally aligning custom dynamics like “più f” > ] |
テキスト強弱記号の線を隠す
(cresc. や dim. のような) 強弱を変更するテキストは、その範囲を破線で示しています。次のようにしてこの線を表示しないようにすることができます。
\relative c'' { \override DynamicTextSpanner.style = #'none \crescTextCresc c1\< | d | b | c\! }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < テキスト強弱記号の線を隠す ] | [ Up: Expressive marks ] | [ カエスーラを挿入する > ] |
Horizontally aligning custom dynamics like “più f”
Some dynamic expressions involve additional text, like “sempre pp”. Since dynamics are usually centered under the note, the \pp would be displayed way after the note it applies to.
To correctly align the “sempre pp” horizontally so that it is aligned as if it were only the \pp, there are several approaches:
- Simply use
\once\override DynamicText.X-offset = #-9.2before the note with the dynamics to manually shift it to the correct position. Drawback: This has to be done manually each time you use that dynamic markup... - Add some padding (
#:hspace 7.1) into the definition of your custom dynamic mark so that after LilyPond center-aligns it, it is already correctly aligned. Drawback: The padding really takes up that space and does not allow any other markup or dynamics to be shown in that position. - Shift the dynamic script
\once\override ... .X-offset = .... Drawback:\once\overrideis needed for every invocation! - Set the dimensions of the additional text to 0 (using
#:with-dimensions '(0 . 0) '(0 . 0)). Drawback: For LilyPond, “sempre” has no extent now. This means it might put other stuff there, causing collisions (which are not detected by LilyPond’s collision detection algorithm!). There also seems to be some spacing, so it is not exactly the same alignment as without the additional text. - Add an explicit shift directly inside the scheme function for the dynamic script.
- Set an explicit alignment inside the dynamic script. By default, this
won’t have any effect, only if one sets
X-offset! Drawback: One needs to setDynamicText.X-offset, which will apply to all dynamic texts! Also, it is aligned at the right edge of the additional text, not at the center of \pp.
\paper { ragged-right = ##f indent = 5\cm } % Solution 1: Using a simple markup with a particular halign value % Drawback: It's a markup, not a dynamic command, so \dynamicDown % etc. will have no effect semppMarkup = \markup { \halign #1.4 \italic "sempre" \dynamic "pp" } % Solution 2: Using a dynamic script & shifting with % \once \override ...X-offset = .. % Drawback: \once \override needed for every invocation semppK = #(make-dynamic-script (markup #:line (#:normal-text #:italic "sempre" #:dynamic "pp"))) % Solution 3: Padding the dynamic script so the center-alignment % puts it at the correct position % Drawback: the padding really reserves the space, nothing else can be there semppT = #(make-dynamic-script (markup #:line (#:normal-text #:italic "sempre" #:dynamic "pp" #:hspace 7.1))) % Solution 4: Dynamic, setting the dimensions of the additional text to 0 % Drawback: To lilypond "sempre" has no extent, so it might put % other stuff there => collisions % Drawback: Also, there seems to be some spacing, so it's not exactly the % same alignment as without the additional text semppM = #(make-dynamic-script (markup #:line (#:with-dimensions '(0 . 0) '(0 . 0) #:right-align #:normal-text #:italic "sempre" #:dynamic "pp"))) % Solution 5: Dynamic with explicit shifting inside the scheme function semppG = #(make-dynamic-script (markup #:hspace 0 #:translate '(-18.85 . 0) #:line (#:normal-text #:italic "sempre" #:dynamic "pp"))) % Solution 6: Dynamic with explicit alignment. This has only effect % if one sets X-offset! % Drawback: One needs to set DynamicText.X-offset! % Drawback: Aligned at the right edge of the additional text, % not at the center of pp semppMII = #(make-dynamic-script (markup #:line (#:right-align #:normal-text #:italic "sempre" #:dynamic "pp"))) \new StaffGroup << \new Staff \with { instrumentName = "standard" } \relative c'' { \key es \major c4\pp c\p c c | c\ff c c\pp c } \new Staff \with {instrumentName = "normal markup" } \relative c'' { \key es \major c4-\semppMarkup c\p c c | c\ff c c-\semppMarkup c } \new Staff \with { instrumentName = "explicit shifting" } \relative c'' { \key es \major \once \override DynamicText.X-offset = #-9.2 c4\semppK c\p c c c4\ff c \once \override DynamicText.X-offset = #-9.2 c4\semppK c } \new Staff \with { instrumentName = "right padding" } \relative c'' { \key es \major c4\semppT c\p c c | c\ff c c\semppT c } \new Staff \with { instrumentName = "set dimension to zero" } \relative c'' { \key es \major c4\semppM c\p c c | c\ff c c\semppM c } \new Staff \with { instrumentName = "shift inside dynamics" } \relative c'' { \key es \major c4\semppG c\p c c | c\ff c c\semppG c } \new Staff \with { instrumentName = "alignment inside dynamics" } \relative c'' { \key es \major \override DynamicText.X-offset = #-1 c4\semppMII c\p c c | c\ff c c\semppMII c } >> \layout { \override Staff.InstrumentName.self-alignment-X = #LEFT }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < Horizontally aligning custom dynamics like “più f” ] | [ Up: Expressive marks ] | [ レセ ヴィブレのタイ > ] |
カエスーラを挿入する
カエスーラ記号は BreathingSign オブジェクトの text プロパティをオーバライドすることで作成することができます。曲がったカエスーラ記号も使用することができます。
\relative c'' { \override BreathingSign.text = \markup { \musicglyph "scripts.caesura.straight" } c8 e4. \breathe g8. e16 c4 \override BreathingSign.text = \markup { \musicglyph "scripts.caesura.curved" } g8 e'4. \breathe g8. e16 c4 }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < カエスーラを挿入する ] | [ Up: Expressive marks ] | [ 矢印 > ] |
レセ ヴィブレのタイ
レセ ヴィブレのタイの大きさは固定されています。tie-configuration
によって配置を調整することができます。
\relative c' { <c e g>4\laissezVibrer r <c f g>\laissezVibrer r <c d f g>4\laissezVibrer r <c d f g>4.\laissezVibrer r8 <c d e f>4\laissezVibrer r \override LaissezVibrerTieColumn.tie-configuration = #`((-7 . ,DOWN) (-5 . ,DOWN) (-3 . ,UP) (-1 . ,UP)) <c d e f>4\laissezVibrer r }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < レセ ヴィブレのタイ ] | [ Up: Expressive marks ] | [ 複雑な破線のスラーを作成する > ] |
矢印
text-spanner, line-spanner (例えば Glissando) に対して矢印を用いることができます。
\relative c'' { \override TextSpanner.bound-padding = #1.0 \override TextSpanner.style = #'line \override TextSpanner.bound-details.right.arrow = ##t \override TextSpanner.bound-details.left.text = #"fof" \override TextSpanner.bound-details.right.text = #"gag" \override TextSpanner.bound-details.right.padding = #0.6 \override TextSpanner.bound-details.right.stencil-align-dir-y = #CENTER \override TextSpanner.bound-details.left.stencil-align-dir-y = #CENTER \override Glissando.bound-details.right.arrow = ##t \override Glissando.arrow-length = #0.5 \override Glissando.arrow-width = #0.25 a8\startTextSpan gis a4 b\glissando b, g'4 c\stopTextSpan c2 }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < 矢印 ] | [ Up: Expressive marks ] | [ アーティキュレーションの省略記法のデフォルト値を書き換える > ] |
複雑な破線のスラーを作成する
dash-definition プロパティをセットすることで、スラーに複雑な破線パターンを追加することができます。dash-definition は
dash-element のリストになっています。dash-element
はスラーの各部分に対する破線パターンのパラメータ リストです。
スラーはベジエ曲線の媒介変数 t (左端が 0, 右端が 1) の関数として定義されます。dash-element は、(start-t stop-t dash-fraction dash-period)
のリストになっています。start-t から stop-t までの範囲が、dash-period の長さにつき dash-fraction が黒になるような破線となります。dash-period は譜スペースの単位です。dash-fraction
を 1 にすると実線のスラーになります。
\relative c' { \once \override Slur.dash-definition = #'(( 0 0.3 0.1 0.75) (0.3 0.6 1 1 ) (0.65 1.0 0.4 0.75)) c4( d e f) \once \override Slur.dash-definition = #'((0 0.25 1 1 ) (0.3 0.7 0.4 0.75) (0.75 1.0 1 1 )) c4( d e f) }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < 複雑な破線のスラーを作成する ] | [ Up: Expressive marks ] | [ スラーの縦方向の位置を移動する > ] |
アーティキュレーションの省略記法のデフォルト値を書き換える
アーティキュレーションの省略記法は ly/script-init.ly に定義されており、変数 dashHat, dashPlus, dashDash,
dashBang, dashLarger, dashDot,
dashUnderscore にデフォルト設定がセットされています。これらを変更することができます。この例では、dashPlus 変数に
trill をセットすることで、-+ を入力した際にデフォルトの + 記号の代わりにトリル記号が表示されるようにしています。
\relative c'' { c1-+ } dashPlus = \trill \relative c'' { c1-+ }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < アーティキュレーションの省略記法のデフォルト値を書き換える ] | [ Up: Expressive marks ] | [ ヘアピンの端点を移動する > ] |
スラーの縦方向の位置を移動する
スラーの縦方向の位置は Slur の positions プロパティによって調整することができます。このプロパティは 2 つのパラメータを取り、1 つ目はスラーの左端、2 つ目はスラーの右端です。このパラメータの値は、スラーの正確な位置を決定するために用いられるわけではありません – LilyPond ではどのようなスラーが見た目として最善かを、このパラメータを基にして決定します。正の値はスラーを上方向に移動するため、符幹が下向きの音符に対して有効です。負の値はスラーを下方向に移動します。
\relative c' { \stemDown e4( a) \override Slur.positions = #'(1 . 1) e4( a) \override Slur.positions = #'(2 . 2) e4( a) \override Slur.positions = #'(3 . 3) e4( a) \override Slur.positions = #'(4 . 4) e4( a) \override Slur.positions = #'(5 . 5) e4( a) \override Slur.positions = #'(0 . 5) e4( a) \override Slur.positions = #'(5 . 0) e4( a) \stemUp \override Slur.positions = #'(-5 . -5) e4( a) \stemDown \revert Slur.positions e4( a) }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < スラーの縦方向の位置を移動する ] | [ Up: Expressive marks ] | [ アルペジオの配置 > ] |
ヘアピンの端点を移動する
ヘアピンの端点は Hairpin オブジェクトの shorten-pair をセットすることで移動できます。正の値は端点を右に移動し、負の値は左に移動します。minimum-length プロパティとは異なり、このプロパティはヘアピンのみの見た目に影響します。水平方向のスペーシングには影響しません
(始点や終点にある強弱記号もです)。そのため、この方法はヘアピンを割り当てられた領域の中で微調整するのに適しています。
{ c'1~\< c'2~ c'\! \once \override Hairpin.shorten-pair = #'(2 . 2) c'1~\< c'2~ c'\! \once \override Hairpin.shorten-pair = #'(-2 . -2) c'1~\< c'2~ c'\! c'1~\p-\tweak shorten-pair #'(2 . 0)\< c'2~ c'\ffff }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < ヘアピンの端点を移動する ] | [ Up: Expressive marks ] | [ テキスト マークアップをスラーの内側に配置する > ] |
アルペジオの配置
アルペジオの長さを変更したい場合、上端と下端の位置を独立に変更することができます。
\relative c' { <c e g b>1\arpeggio \once \override Arpeggio.positions = #'(-5 . 0) <c e g b>1\arpeggio \once \override Arpeggio.positions = #'(0 . 5) <c e g b>1\arpeggio \once \override Arpeggio.positions = #'(-5 . 5) <c e g b>1\arpeggio }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < アルペジオの配置 ] | [ Up: Expressive marks ] | [ ヘアピンを様々なスタイルで表示する > ] |
テキスト マークアップをスラーの内側に配置する
テキスト マークアップをスラーの内側に配置するには、outside-staff-priority
プロパティを #f に設定する必要があります。
\relative c'' { \override TextScript.avoid-slur = #'inside \override TextScript.outside-staff-priority = ##f c2(^\markup { \halign #-10 \natural } d4.) c8 }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < テキスト マークアップをスラーの内側に配置する ] | [ Up: Expressive marks ] | [ ヘアピンの表示に al niente 記譜法を用いる > ] |
ヘアピンを様々なスタイルで表示する
ヘアピン強弱記号は様々なスタイルで作成できます。
\relative c'' { \override Hairpin.stencil = #flared-hairpin a4\< a a a\f a4\p\< a a a\ff a4\sfz\< a a a\! \override Hairpin.stencil = #constante-hairpin a4\< a a a\f a4\p\< a a a\ff a4\sfz\< a a a\! \override Hairpin.stencil = #flared-hairpin a4\> a a a\f a4\p\> a a a\ff a4\sfz\> a a a\! \override Hairpin.stencil = #constante-hairpin a4\> a a a\f a4\p\> a a a\ff a4\sfz\> a a a\! }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < ヘアピンを様々なスタイルで表示する ] | [ Up: Expressive marks ] | [ メトロノーム記号やリハーサル記号を譜の下に表示する > ] |
ヘアピンの表示に al niente 記譜法を用いる
ヘアピン強弱記号は、Hairpin オブジェクトの circled-tip
プロパティを #t にセットすることで、端に丸を付けて (“al niente” 記譜法) 表示することができます。
\relative c'' { \override Hairpin.circled-tip = ##t c2\< c\! c4\> c\< c2\! }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < ヘアピンの表示に al niente 記譜法を用いる ] | [ Up: Expressive marks ] | [ 小節線にぶつかるヘアピンの挙動を設定する > ] |
メトロノーム記号やリハーサル記号を譜の下に表示する
デフォルトでは、メトロノーム記号やリハーサル記号は譜の上に表示されます。これらを譜の下に表示するには、MetronomeMark や RehearsalMark
の direction プロパティを正しくセットします。
\layout { ragged-right = ##f } { % Metronome marks below the staff \override Score.MetronomeMark.direction = #DOWN \tempo 8. = 120 c''1 % Rehearsal marks below the staff \override Score.RehearsalMark.direction = #DOWN \mark \default c''1 }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < メトロノーム記号やリハーサル記号を譜の下に表示する ] | [ Up: Expressive marks ] | [ ヘアピンの最小長さをセットする > ] |
小節線にぶつかるヘアピンの挙動を設定する
ヘアピンの終端となる音符が強拍にある場合、ヘアピンはその前にある小節線の直前が終端となります。この挙動は to-barline プロパティをオーバライドすることで調整できます。
\relative c'' { e4\< e2. e1\! \override Hairpin.to-barline = ##f e4\< e2. e1\! }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < 小節線にぶつかるヘアピンの挙動を設定する ] | [ Up: Expressive marks ] | [ 同じアーティキュレーションを音符や和音の上と下の両方に表示する > ] |
ヘアピンの最小長さをセットする
ヘアピンが短すぎる場合、Hairpin オブジェクトの minimum-length
プロパティを変更することで長くすることができます。
<< { \after 4 \< \after 2 \> \after 2. \! f'1 \override Hairpin.minimum-length = 8 \after 4 \< \after 2 \> \after 2. \! f'1 } { \repeat unfold 8 c'4 } >>
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < ヘアピンの最小長さをセットする ] | [ Up: Expressive marks ] | [ Snap pizzicato (“Bartok” pizzicato) > ] |
同じアーティキュレーションを音符や和音の上と下の両方に表示する
デフォルトでは、LilyPond は同じアーティキュレーション
(例えばアクセント、フェルマータ、フラジョレットなど) を音符の上と下に表示することを認めていません。例えば、c4_\fermata^\fermata では、フェルマータが音符の下のみに表示され、上に表示するよう指定したフェルマータは無視されます。しかし、和音表記を用いてその内部にアーティキュレーションを配置すると、(運指記号と同じように)
アーティキュレーションを好きなだけ表示することができます。このアプローチでは符幹を無視し、アーティキュレーションを符頭との相対位置で配置します。これはこのスニペットのフラジョレットに見られます。和音外に配置されるアーティキュレーションと同じ挙動を得るには、add-stem-support が必要となります。そのため、解決策は音符を和音として表記し、<...> の中にアーティキュレーションを追加することです。
向きは常に上向きですが、\tweak によって変更することができます:
<c-\tweak direction #DOWN-\fermata^\fermata>
\relative c' { <>^"Wrong" c2_\fermata^\fermata % The second fermata is ignored! <e d'>2^\flageolet_\flageolet \stopStaff s1 \startStaff <>^"Works if written inside a chord" <e_\flageolet d'^\flageolet>2 <e_\flageolet d'^\flageolet>2 <e_\flageolet^\flageolet>2 <e_\fermata^\fermata>2 }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < 同じアーティキュレーションを音符や和音の上と下の両方に表示する ] | [ Up: Expressive marks ] | [ Using \arpeggioBracket to make divisi more visible > ] |
Snap pizzicato (“Bartok” pizzicato)
A snap pizzicato (also known as “Bartok pizzicato”) is a “strong pizzicato where the string is plucked vertically by snapping and rebounds off the fingerboard of the instrument” (Wikipedia). It is denoted by a circle with a vertical line going from the center upwards outside the circle.
\relative c' { c4\snappizzicato <c' e g>4\snappizzicato <c' e g>4^\snappizzicato <c, e g>4_\snappizzicato }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < Snap pizzicato (“Bartok” pizzicato) ] | [ Up: Expressive marks ] | [ ブレス記号にチェックを使用する > ] |
Using \arpeggioBracket to make divisi more visible
The \arpeggioBracket command can be used to indicate the
division of voices where there are no stems to provide the information.
This is often seen in choral music.
\include "english.ly" \score { \relative c'' { \key a \major \time 2/2 << \new Voice = "upper" << { \voiceOne \arpeggioBracket a2( b2 <b d>1\arpeggio) <cs e>\arpeggio ~ <cs e>4 } \addlyrics { \lyricmode { A -- men. } } >> \new Voice = "lower" { \voiceTwo a1 ~ a a ~ a4 \bar "|." } >> } }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < Using \arpeggioBracket to make divisi more visible ] | [ Up: Expressive marks ] | [ 和音のレガートに 2 つのスラーを使用する > ] |
ブレス記号にチェックを使用する
歌曲や管楽では、ブレス記号によくチェック マークを使用します。これはコンマ記号で示すように短い間を挿入するものではなく、マークの前にある音符を少しだけ短くすることでブレスを行います。マークを譜から離すために、上方向に少し移動しています。
\relative c'' { c2 \breathe d2 \override BreathingSign.Y-offset = #2.6 \override BreathingSign.text = \markup { \musicglyph "scripts.tickmark" } c2 \breathe d2 }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < ブレス記号にチェックを使用する ] | [ Up: Expressive marks ] | [ whiteout プロパティを使用する > ] |
和音のレガートに 2 つのスラーを使用する
和音をレガートで演奏する場合、2 つのスラーを書く場合があります。これは
doubleSlurs をセットすることで実現できます。
\relative c' { \set doubleSlurs = ##t <c e>4( <d f> <c e> <d f>) }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < 和音のレガートに 2 つのスラーを使用する ] | [ Up: Expressive marks ] | [ バロック音楽の縦線アーティキュレーション マーク > ] |
whiteout プロパティを使用する
下にあるオブジェクトの一部分をマスクするために、任意のグラフィカル
オブジェクトを白い背景の上に表示することができます。これは、衝突を解決するためにオブジェクトを移動するのが困難であるような複雑な状況において、見た目を改善するのに有効です。layer プロパティを明示的に設定して、どのオブジェクトが白でマスクされるかを指定しなければなりません。
この例では、タイと拍子記号が重なる部分について、タイの方をマスクしています。そのためには TimeSignature の whiteout プロパティを設定し、TimeSignature を Tie の上のレイヤに移動する必要があります。Tie のデフォルトのレイヤは 1 であるため、TimeSignature
のレイヤ値をそれより大きくします。また、StaffSymbol がマスクされないように、更に上位のレイヤに配置する必要があります。
{ \override Score.StaffSymbol.layer = 4 \override Staff.TimeSignature.layer = 3 b'2 b'~ \once \override Staff.TimeSignature.whiteout = ##t \time 3/4 b' r4 }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < whiteout プロパティを使用する ] | [ Up: Expressive marks ] | [ 複数の音符にまたがる強弱記号を縦方向に揃える > ] |
バロック音楽の縦線アーティキュレーション マーク
音符の上にある短い線は、バロック音楽で広く用いられるものです。意味は様々ですが、通常は音符をより“重く”演奏することを指示しています。次の例は、この記譜をどのように実現するかを示しています。
upline = \tweak stencil #(lambda (grob) (grob-interpret-markup grob #{ \markup \draw-line #'(0 . 1) #})) \stopped \relative c' { a'4^\upline a( c d')_\upline }
| [ << Expressive marks ] | [Top][Contents] | [ Repeats >> ] |
| [ < バロック音楽の縦線アーティキュレーション マーク ] | [ Up: Expressive marks ] | [ Repeats > ] |
複数の音符にまたがる強弱記号を縦方向に揃える
同じ音符に配置されている、または開始あるいは終了する強弱記号は、縦方向に揃えられます。同じ音符に配置されない強弱記号も揃えるためには、DynamicLineSpanner オブジェクトの staff-padding
プロパティを大きな値にします。
\relative c' { \override DynamicLineSpanner.staff-padding = #4 c2\p f\mf g2\< b4\> c\! }
| [ << Expressive marks ] | [Top][Contents] | [ Simultaneous notes >> ] |
| [ < 複数の音符にまたがる強弱記号を縦方向に揃える ] | [ Up: Top ] | [ デフォルトの小節線を変更する > ] |
4 Repeats
See also Repeats.
| [ << Repeats ] | [Top][Contents] | [ Simultaneous notes >> ] |
| [ < Repeats ] | [ Up: Repeats ] | [ Controlling the appearance of tremolo slashes > ] |
デフォルトの小節線を変更する
デフォルトの小節線は、Score コンテキストで再定義することで変更することができます。
\layout { \context { \Score % Changing the defaults from engraver-init.ly measureBarType = "!" startRepeatBarType = "[|:" endRepeatBarType = ":|]" doubleRepeatBarType = ":|][|:" } } { c'1 \repeat volta 2 { c' c' } \repeat volta 2 { c' c' \alternative { \volta 1 { c' } \volta 2 { c' } } } \bar "|." }
| [ << Repeats ] | [Top][Contents] | [ Simultaneous notes >> ] |
| [ < デフォルトの小節線を変更する ] | [ Up: Repeats ] | [ 譜をまたがるトレモロ > ] |
Controlling the appearance of tremolo slashes
Using various properties of the StemTremolo grob it is possible
to control the appearance of tremolo slashes.
- Property
slopesets the slope for tremolo slashes. - Property
shapedetermines whether tremolo slashes look like rectangles (valuerectangle) or like very small beams (valuebeam-like). - Property
stylesets both the slope and the shape depending on whether the note has flags, beams, or only a plain stem. This is in contrast to the previous two properties, which change the slope and shape unconditionally. There are two styles defined.-
default: slashes for down-stem flags are longer and more sloped than slashes for up-stem flags; slashes on beamed notes have a rectangular shape and are parallel to the beam. -
constant: all slashes are beam-like and have the same slope except for down-stem flags.
-
music = { a''4:32 a': e''8: \noBeam e': a'':[ a':] f':[ g':] d':[ d':] } \new Staff { <>^\markup "default" \music } \new Staff { <>^\markup \typewriter "style = #'constant" \override StemTremolo.style = #'constant \music } \new Staff { <>^\markup \typewriter "shape = #'rectangle" \override StemTremolo.shape = #'rectangle \music } \new Staff { <>^\markup \typewriter "shape = #'beam-like" \override StemTremolo.shape = #'beam-like \music } \new Staff { <>^\markup \typewriter "slope = -0.2" \override StemTremolo.slope = -0.2 \music }
| [ << Repeats ] | [Top][Contents] | [ Simultaneous notes >> ] |
| [ < Controlling the appearance of tremolo slashes ] | [ Up: 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 ] | [Top][Contents] | [ Simultaneous notes >> ] |
| [ < 譜をまたがるトレモロ ] | [ Up: 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 ] | [Top][Contents] | [ Simultaneous notes >> ] |
| [ < トレモロを符幹に接触せずに譜刻する ] | [ Up: Repeats ] | [ Measure counters > ] |
独立したパーセント繰り返し
パーセント繰り返しを単独で表示することができます。
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 ] | [Top][Contents] | [ Simultaneous notes >> ] |
| [ < 独立したパーセント繰り返し ] | [ Up: Repeats ] | [ パーセント繰り返しのカウンタの可視性 > ] |
Measure counters
This snippet demonstrates the use of the
Measure_counter_engraver to number groups of successive
measures. Any stretch of measures may be numbered, whether consisting
of repetitions or not.
The engraver must be added to the appropriate context. Here, a
Staff context is used; another possibility is a Dynamics
context.
The counter is begun with \startMeasureCount and ended with
\stopMeasureCount. Numbering will start by default with 1,
but this behavior may be modified by overriding the count-from
property.
When a measure extends across a line break, the number will appear twice, the second time in parentheses.
\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 ] | [Top][Contents] | [ Simultaneous notes >> ] |
| [ < Measure counters ] | [ Up: 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 ] | [Top][Contents] | [ Simultaneous notes >> ] |
| [ < パーセント繰り返しのカウンタの可視性 ] | [ Up: Repeats ] | [ セーニョとコーダを (改行を挟んで) 配置する > ] |
パーセント繰り返しのカウンタ
パーセント記号による小節の繰り返しが 2 回以上続く場合には、この例のようにプロパティをセットすることで、カウンタを表示することができます。
\relative c'' { \set countPercentRepeats = ##t \repeat percent 4 { c1 } }
| [ << Repeats ] | [Top][Contents] | [ Simultaneous notes >> ] |
| [ < パーセント繰り返しのカウンタ ] | [ Up: Repeats ] | [ 入れ替え部分がある場合の二重繰り返しのデフォルトをセットする > ] |
セーニョとコーダを (改行を挟んで) 配置する
出口となるセーニョ記号を配置し、隣の通常譜線がある位置に “D.S. al Coda” のようなテキストを加えたい場合、以下のスニペットを用いることができます。コーダは新しい行から始まります。また、このスニペットには、コーダが同じ行に続くバージョンも用意されています。
\relative c'' { c4 c c c | c c c c | \repeat segno 2 { c4 c c c | c c c c | \alternative { \volta 1 { c4 c c c | c c c c | % If you don't use \break at Coda, use \noBreak here % and after \bar "" below. \noBreak \section % double bar line \cadenzaOn % pause bar count \stopStaff % remove staff lines % Increasing the unfold counter will expand the staff-free space \repeat unfold 4 { s1 \bar "" } % Place JumpScript where the staff would normally be. \once \override Score.JumpScript.outside-staff-priority = ##f \once \override Score.JumpScript.Y-offset = 0 \startStaff % resume bar count \cadenzaOff % show staff lines again } } } \sectionLabel "Coda" % Show Coda on a new line \break \repeat unfold 6 { c4 c c c } \fine }
| [ << Repeats ] | [Top][Contents] | [ Simultaneous notes >> ] |
| [ < セーニョとコーダを (改行を挟んで) 配置する ] | [ Up: Repeats ] | [ 繰り返し括弧を短くする > ] |
入れ替え部分がある場合の二重繰り返しのデフォルトをセットする
入れ替え部分がある場合の二重繰り返しのスタイルには 3 種類あります。これは doubleRepeatBarType でセットすることができます。
\relative c'' { \repeat volta 2 { c1 } \set Score.doubleRepeatBarType = ":..:" \repeat volta 2 { c1 } \set Score.doubleRepeatBarType = ":|.|:" \repeat volta 2 { c1 } \set Score.doubleRepeatBarType = ":|.:" \repeat volta 2 { c1 } }
| [ << Repeats ] | [Top][Contents] | [ Simultaneous notes >> ] |
| [ < 入れ替え部分がある場合の二重繰り返しのデフォルトをセットする ] | [ Up: Repeats ] | [ Unfolding tremolo repeats > ] |
繰り返し括弧を短くする
デフォルトでは、繰り返し括弧は入れ替え部分全体に表示されますが、voltaSpannerDuration をセットすることで短くすることができます。次の例では、括弧は 1 小節、つまり 3/4 分だけ表示されます。
\fixed c'' { \time 3/4 c4 c c \repeat volta 5 { d4 d d \alternative { \volta 1,2,3,4 { \once \override Score.VoltaBracket.musical-length = \musicLength 2. e4 e e f4 f f } \volta 5 { g4 g g g2. } } } }
| [ << Repeats ] | [Top][Contents] | [ Simultaneous notes >> ] |
| [ < 繰り返し括弧を短くする ] | [ Up: Repeats ] | [ 繰り返し括弧をコード ネームの下に表示する > ] |
Unfolding tremolo repeats
Currently, note:duration, which is a more
or less a shortcut for \repeat tremolo, is not unfolded by
\unfoldRepeats (this is tracked in
issue #6145).
The function given in this snippet provides a workaround.
fixTremolos = #(define-music-function (music) (ly:music?) (music-map (lambda (m) (let ((event (any (lambda (a) (and (music-is-of-type? a 'tremolo-event) a)) (ly:music-property m 'articulations)))) (if event (let* ((total-tremolo-duration (ly:music-property m 'duration)) (tremolo-type (ly:music-property event 'tremolo-type)) (one-tremolo-note-duration (ly:make-duration (ly:intlog2 tremolo-type))) (tremolo-note-count (/ tremolo-type (expt 2 (ly:duration-log total-tremolo-duration))))) (set! (ly:music-property m 'duration) one-tremolo-note-duration) (set! (ly:music-property m 'articulations) (delete! event (ly:music-property m 'articulations))) (make-music 'TremoloRepeatedMusic 'repeat-count tremolo-note-count 'element m)) m))) music)) unfoldRepeats = \unfoldRepeats #'() \fixTremolos \etc music = { \repeat tremolo 8 c'16 c'2:16 } { \music \unfoldRepeats \music }
| [ << Repeats ] | [Top][Contents] | [ Simultaneous notes >> ] |
| [ < Unfolding tremolo repeats ] | [ Up: Repeats ] | [ Volta brackets in multiple staves > ] |
繰り返し括弧をコード ネームの下に表示する
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 ] | [Top][Contents] | [ Simultaneous notes >> ] |
| [ < 繰り返し括弧をコード ネームの下に表示する ] | [ Up: Repeats ] | [ repeatCommands を用いて入れ替え部分のテキストにマークアップを使用する > ] |
Volta brackets in multiple staves
By adding the Volta_engraver to the relevant staff, volte can be
put over staves other than the topmost one in a score.
\repeat and related commands should be present in all staves.
voltaMusic = \relative c'' { \repeat volta 2 { c1 \alternative { \volta 1 { d1 } \volta 2 { e1 } } } } << \new StaffGroup << \new Staff \voltaMusic \new Staff \voltaMusic >> \new StaffGroup << \new Staff \with { \consists "Volta_engraver" } \voltaMusic \new Staff \voltaMusic >> >>
| [ << Repeats ] | [Top][Contents] | [ Simultaneous notes >> ] |
| [ < Volta brackets in multiple staves ] | [ Up: Repeats ] | [ Simultaneous notes > ] |
repeatCommands を用いて入れ替え部分のテキストにマークアップを使用する
入れ替え部分のある繰り返しは \repeat volta を用いて指定するのが最善ですが、入れ替え部分のテキストを \markup によってフォーマットする必要がある場合は、repeatCommands コンテキスト
プロパティを用いる必要があります。
repeatCommands はリストを取るため、マークアップを含める簡単な方法は、マークアップを変数として定義し、Scheme 構文を用いてリストに埋め込むことです
(#(list (list 'volta textIdentifier)), textIdentifier
は変数名)。繰り返し小節線の指定を、リストの別の要素から行うことができます。
voltaAdLib = \markup { \volta-number { 1. 2. 3... } \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 ] | [Top][Contents] | [ Staff notation >> ] |
| [ < repeatCommands を用いて入れ替え部分のテキストにマークアップを使用する ] | [ Up: Top ] | [ 衝突を避けるための追加のボイス > ] |
5 Simultaneous notes
See also Simultaneous notes.
| [ << Simultaneous notes ] | [Top][Contents] | [ Staff notation >> ] |
| [ < Simultaneous notes ] | [ Up: Simultaneous notes ] | [ Changing \partCombine texts > ] |
衝突を避けるための追加のボイス
複雑な多声音楽では、音符どうしの衝突を避けるために追加のボイスが必要になる場合があります。4 つ以上の並列ボイスが必要な場合には、追加のボイスは Scheme 関数 context-spec-music を用いて変数を定義することで追加できます。
voiceFive = #(context-spec-music (make-voice-props-set 4) 'Voice) \relative c'' { \time 3/4 \key d \minor \partial 2 << \new Voice { \voiceOne a4. a8 e'4 e4. e8 f4 d4. c8 } \new Voice { \voiceTwo d,2 d4 cis2 d4 bes2 } \new Voice { \voiceThree f'2 bes4 a2 a4 s2 } \new Voice { \voiceFive s2 g4 g2 f4 f2 } >> }
| [ << Simultaneous notes ] | [Top][Contents] | [ Staff notation >> ] |
| [ < 衝突を避けるための追加のボイス ] | [ Up: Simultaneous notes ] | [ Changing a single note’s size in a chord > ] |
Changing \partCombine texts
When using the automatic part combining feature, the printed text for the solo and unison sections may be changed.
\new Staff << \set Staff.soloText = "girl" \set Staff.soloIIText = "boy" \set Staff.aDueText = "together" \partCombine \relative c'' { g4 g r r a2 g } \relative c'' { r4 r a( b) a2 g } >>
| [ << Simultaneous notes ] | [Top][Contents] | [ Staff notation >> ] |
| [ < Changing \partCombine texts ] | [ Up: Simultaneous notes ] | [ クラスタ > ] |
Changing a single note’s size in a chord
Individual note heads in a chord can be modified with the
\tweak command inside a chord, by altering the font-size
property.
Inside the chord (within the brackets < >), before the note to
be altered, place the \tweak command, followed by
font-size and define the proper size like #-2 (a tiny
note head).
\relative c' { <\tweak font-size #+2 c e g c \tweak font-size #-2 e>1 ^\markup { A tiny e }_\markup { A big c } }
| [ << Simultaneous notes ] | [Top][Contents] | [ Staff notation >> ] |
| [ < Changing a single note’s size in a chord ] | [ Up: Simultaneous notes ] | [ 2 つのパートを 1 つの譜にまとめる > ] |
クラスタ
クラスタは、範囲内の音符が同時に演奏されることを示す手段です。
fragment = \relative c' { c4 f <e d'>4 <g a>8 <e a> a4 c2 <d b>4 e2 c } << \new Staff \fragment \new Staff \makeClusters \fragment >>
| [ << Simultaneous notes ] | [Top][Contents] | [ Staff notation >> ] |
| [ < クラスタ ] | [ Up: Simultaneous notes ] | [ 複雑な和音を表示する > ] |
2 つのパートを 1 つの譜にまとめる
自動パート結合ツール (\partCombine コマンド) は、いくつかの異なるパートを同じ譜にまとめるものです。“solo” や “a2” といったテキスト指示は、デフォルトで追加されます。これらを削除するには、printPartCombineTexts プロパティを f
にセットします。賛美歌のような歌曲では、“solo/a2” のテキストを追加する必要は無いため、これらを削除すると良いでしょう。しかしながら、これらを削除した場合、ソロの指示も表示されなくなるため問題があるかもしれません。このような場合は、通常の多声構文を用いると良いでしょう。
このスニペットは、2 つのパートを 1 つの譜に表示する 3 つの方法を示しています:
通常の多声、テキストを削除した \partCombine、テキストのある
\partCombine の順です。
musicUp = \relative c'' { \time 4/4 a4 c4.( g8) a4 | g4 e' g,( a8 b) | c b a2. } musicDown = \relative c'' { g4 e4.( d8) c4 | r2 g'4( f8 e) | d2 \stemDown a } \score { << \new Staff \with { instrumentName = "standard polyphony" } << \musicUp \\ \musicDown >> \new Staff \with { instrumentName = \markup { \typewriter "\\partCombine" without text} printPartCombineTexts = ##f } \partCombine \musicUp \musicDown \new Staff \with { instrumentName = \markup { \typewriter "\\partCombine" with text} } \partCombine \musicUp \musicDown >> \layout { indent = 6.0\cm \context { \Score % Setting this to a large value avoids a bar line at the % beginning that would connect the three staves otherwise. \override SystemStartBar.collapse-height = 30 } } }
| [ << Simultaneous notes ] | [Top][Contents] | [ Staff notation >> ] |
| [ < 2 つのパートを 1 つの譜にまとめる ] | [ Up: Simultaneous notes ] | [ 音符の水平位置を強制的に調整する > ] |
複雑な和音を表示する
同じ位置にあり臨時記号が異なる音符を含む和音を表示する方法です。
fixA = { \once \override Stem.length = #12 } fixB = { \once \override NoteHead.X-offset = #1.7 \once \override Stem.length = #7 \once \override Stem.rotation = #'(45 0 0) \once \override Stem.extra-offset = #'(-0.1 . -0.2) \once \override Flag.style = #'no-flag \once \override Accidental.extra-offset = #'(4 . -.1) } \relative c' { << { \fixA <b d!>8 } \\ { \voiceThree \fixB dis } >> s }
| [ << Simultaneous notes ] | [Top][Contents] | [ Staff notation >> ] |
| [ < 複雑な和音を表示する ] | [ Up: Simultaneous notes ] | [ Making an object invisible using the ‘transparent’ property > ] |
音符の水平位置を強制的に調整する
組版エンジンがうまく対処できない場合、次の構文で音符の水平位置をオーバライドすることができます。単位は譜スペースです。
\relative c' << { <d g>2 <d g> } \\ { <b f'>2 \once \override NoteColumn.force-hshift = 1.7 <b f'>2 } >>
| [ << Simultaneous notes ] | [Top][Contents] | [ Staff notation >> ] |
| [ < 音符の水平位置を強制的に調整する ] | [ Up: Simultaneous notes ] | [ 多声の音楽で付点付きの音符を移動する > ] |
Making an object invisible using the ‘transparent’ property
Setting the transparent property will cause an object to be
printed in “invisible ink”: the object is not printed, but all its
other behavior is retained. The object still takes up space, it takes
part in collisions, and slurs, ties and beams can be attached to it.
This snippet demonstrates how to connect different voices using ties. Normally, ties only connect two notes in the same voice. By introducing a tie in a different voice, and blanking the first up-stem in that voice, the tie appears to cross voices.
\relative { \time 2/4 << { \once \hide Stem \once \override Stem.length = #8 b'8 ~ 8\noBeam \once \hide Stem \once \override Stem.length = #8 g8 ~ 8\noBeam } \\ { b8 g g e } >> } \paper { line-width = 40\mm ragged-right = ##f }
| [ << Simultaneous notes ] | [Top][Contents] | [ Staff notation >> ] |
| [ < Making an object invisible using the ‘transparent’ property ] | [ Up: Simultaneous notes ] | [ 音符の衝突に関する警告を抑制する > ] |
多声の音楽で付点付きの音符を移動する
上のボイスにある付点付きの音符が、下の音符との衝突を避けるために移動する場合、デフォルトでは右側に移動します。この挙動は、NoteCollision の
prefer-dotted-right プロパティをオーバライドすることで変更できます。
\new Staff \relative c' << { f2. f4 \override Staff.NoteCollision.prefer-dotted-right = ##f f2. f4 \override Staff.NoteCollision.prefer-dotted-right = ##t f2. f4 } \\ { e4 e e e e e e e e e e e } >>
| [ << Simultaneous notes ] | [Top][Contents] | [ Staff notation >> ] |
| [ < 多声の音楽で付点付きの音符を移動する ] | [ Up: Simultaneous notes ] | [ 1 つの譜で 2 つの \partCombine を使用する > ] |
音符の衝突に関する警告を抑制する
異なるボイスにあり、符幹が同じ向きの音符が同じ位置に配置されており、両方のボイスにシフトが指定されていないか同じシフトが指定されている場合、LilyPond ファイルのコンパイル時にエラー メッセージ ‘warning: ignoring too many clashing note columns’
が表示されます。このメッセージは、NoteColumn オブジェクトの
ignore-collision プロパティを #t にすることで抑制できます。これは警告を抑制するだけでなく、LilyPond による衝突の回避を完全に無効にします。そのため、注意して使用しないと予期しない結果をもたらすことがあります。
ignore = \override NoteColumn.ignore-collision = ##t \relative c' { \new Staff << \new Voice { \ignore \stemDown f2 g } \new Voice { c2 \stemDown c, } >> }
| [ << Simultaneous notes ] | [Top][Contents] | [ Staff notation >> ] |
| [ < 音符の衝突に関する警告を抑制する ] | [ Up: Simultaneous notes ] | [ Staff notation > ] |
1 つの譜で 2 つの \partCombine を使用する
\partCombine 関数は 2 パートの音楽表記を取り、パートがどのように結合されるかに応じて、“two”, “one”,
“solo”, “chords” の 4 つの Voice に配置します。\partCombine によって出力されたボイスは、それぞれがレイアウト
プロパティを持ち、通常の方法で調整することができます。ここでは、\partCombine を拡張し、4 つのボイスを 1 つの譜を結合する作業を簡単にしています。
soprano = { d’4 | cis’ b e’ d’8 cis’ | cis’2 b } alto = { fis4 | e8 fis gis ais b4 b | b ais fis2 } tenor = { a8 b | cis’ dis’ e’4 b8 cis’ d’4 | gis cis’ dis’2 } bass = { fis8 gis | a4 gis g fis | eis fis b,2 }
\new Staff << \key b\minor \clef alto \partial 4 \transpose b b’ \partCombineUp \soprano \alto \partCombineDown \tenor \bass >>
customPartCombineUp = #(define-music-function (part1 part2) (ly:music? ly:music?) "Make an up-stem `VoiceBox` context that combines PART1 and PART2. The context is called 'Up'; internally, the function calls `\\partCombineUp`." #{ \new VoiceBox = "Up" << \context Voice = "one" { \voiceOne } \context Voice = "two" { \voiceThree } \context Voice = "shared" { \voiceOne } \context Voice = "solo" { \voiceOne } \context NullVoice = "null" {} \partCombine #part1 #part2 >> #}) customPartCombineDown = #(define-music-function (part3 part4) (ly:music? ly:music?) "Make a down-stem `VoiceBox` context that combines PART3 and PART4. The context is called 'Down'; internally, the function calls `\\partCombineDown`." #{ \new VoiceBox = "Down" << \set VoiceBox.soloText = #"Solo III" \set VoiceBox.soloIIText = #"Solo IV" \context Voice ="one" { \voiceFour } \context Voice ="two" { \voiceTwo } \context Voice ="shared" { \voiceFour } \context Voice ="solo" { \voiceFour } \context NullVoice = "null" {} \partCombine #part3 #part4 >> #}) soprano = { d'4 | cis' b e' d'8 cis' | cis'2 b } alto = { fis4 | e8 fis gis ais b4 b | b ais fis2 } tenor = { a8 b | cis' dis' e'4 b8 cis' d'4 | gis cis' dis'2 } bass = { fis8 gis | a4 gis g fis | eis fis b,2 } \new Staff << \key b\minor \clef alto \partial 4 \transpose b b' \customPartCombineUp \soprano \alto \customPartCombineDown \tenor \bass >> \layout { \context { \Staff \accepts "VoiceBox" } \context { \name "VoiceBox" \type "Engraver_group" \defaultchild "Voice" \accepts "Voice" \accepts "NullVoice" } }
| [ << Simultaneous notes ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < 1 つの譜で 2 つの \partCombine を使用する ] | [ Up: Top ] | [ 音域をボイスごとに追加する > ] |
6 Staff notation
See also Staff notation.
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < Staff notation ] | [ Up: Staff notation ] | [ 譜を追加する > ] |
音域をボイスごとに追加する
音域をボイスごとに追加することができます。この場合、衝突を避けるために
Ambitus を手動で移動する必要があります。
\new Staff << \new Voice \with { \consists "Ambitus_engraver" } \relative c'' { \override Ambitus.X-offset = 2.0 \voiceOne c4 a d e f1 } \new Voice \with { \consists "Ambitus_engraver" } \relative c' { \voiceTwo es4 f g as b1 } >>
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < 音域をボイスごとに追加する ] | [ Up: Staff notation ] | [ 改行時に譜を追加する > ] |
譜を追加する
曲の開始時以外にも (一時的に) 譜を追加することができます。
\score { << \new Staff \relative c'' { c1 | c | c | c | c } \new StaffGroup \relative c'' { \new Staff { c1 | c << { c1 | d } \new Staff { \once \omit Staff.TimeSignature c1 | b } >> c1 } } >> }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < 譜を追加する ] | [ Up: Staff notation ] | [ 改行後に分かれる譜について、指示を表示する > ] |
改行時に譜を追加する
改行時に譜を追加する場合、改行前の行末に不要な空間が追加されてしまいます
(これは調号の変化に対応するためのものですが、どちらにしろ表示されません)。これを解決するには、Staff.explicitKeySignatureVisibility を例のように設定します。
\score { \new StaffGroup \relative c'' { \new Staff \key f \major c1 c^"Unwanted extra space" \break << { c1 | c } \new Staff { \key f \major \once \omit Staff.TimeSignature c1 | c } >> c1 | c^"Fixed here" \break << { c1 | c } \new Staff { \once \set Staff.explicitKeySignatureVisibility = #end-of-line-invisible \key f \major \once \omit Staff.TimeSignature c1 | c } >> } }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < 改行時に譜を追加する ] | [ Up: Staff notation ] | [ ボーカル譜にオーケストラの合図音符を追加する > ] |
改行後に分かれる譜について、指示を表示する
このスニペットは \splitStaffBarLine, \convUpStaffBarLine,
\convDownStaffBarLine コマンドを追加します。これらは小節線に矢印を追加し、譜を共有するボイスが次のシステムで譜を分ける場合、あるいは再度合流する場合の指示を表示します。
#(define-markup-command (arrow-at-angle layout props angle-deg length fill) (number? number? boolean?) (let* ((PI-OVER-180 (/ (atan 1 1) 34)) (degrees->radians (lambda (degrees) (* degrees PI-OVER-180))) (angle-rad (degrees->radians angle-deg)) (target-x (* length (cos angle-rad))) (target-y (* length (sin angle-rad)))) (interpret-markup layout props (markup #:translate (cons (/ target-x 2) (/ target-y 2)) #:rotate angle-deg #:translate (cons (/ length -2) 0) #:concat (#:draw-line (cons length 0) #:arrow-head X RIGHT fill))))) splitStaffBarLineMarkup = \markup \with-dimensions #'(0 . 0) #'(0 . 0) { \combine \arrow-at-angle #45 #(sqrt 8) ##t \arrow-at-angle #-45 #(sqrt 8) ##t } splitStaffBarLine = { \once \override Staff.BarLine.stencil = #(lambda (grob) (ly:stencil-combine-at-edge (ly:bar-line::print grob) X RIGHT (grob-interpret-markup grob splitStaffBarLineMarkup) 0)) \break } convDownStaffBarLine = { \once \override Staff.BarLine.stencil = #(lambda (grob) (ly:stencil-combine-at-edge (ly:bar-line::print grob) X RIGHT (grob-interpret-markup grob #{ \markup\with-dimensions #'(0 . 0) #'(0 . 0) { \translate #'(0 . -.13)\arrow-at-angle #-45 #(sqrt 8) ##t }#}) 0)) \break } convUpStaffBarLine = { \once \override Staff.BarLine.stencil = #(lambda (grob) (ly:stencil-combine-at-edge (ly:bar-line::print grob) X RIGHT (grob-interpret-markup grob #{ \markup\with-dimensions #'(0 . 0) #'(0 . 0) { \translate #'(0 . .14)\arrow-at-angle #45 #(sqrt 8) ##t }#}) 0)) \break } \paper { indent = 10\mm short-indent = 10\mm line-width = 8\cm } separateSopranos = { \set Staff.instrumentName = "AI AII" \set Staff.shortInstrumentName = "AI AII" \splitStaffBarLine \change Staff = "up" } convSopranos = { \convDownStaffBarLine \change Staff = "shared" \set Staff.instrumentName = "S A" \set Staff.shortInstrumentName = "S A" } sI = { \voiceOne \repeat unfold 4 f''2 \separateSopranos \repeat unfold 4 g''2 \convSopranos \repeat unfold 4 c''2 } sII = { s1*2 \voiceTwo \change Staff = "up" \repeat unfold 4 d''2 } aI = { \voiceTwo \repeat unfold 4 a'2 \voiceOne \repeat unfold 4 b'2 \convUpStaffBarLine \voiceTwo \repeat unfold 4 g'2 } aII = { s1*2 \voiceTwo \repeat unfold 4 g'2 } ten = { \voiceOne \repeat unfold 4 c'2 \repeat unfold 4 d'2 \repeat unfold 4 c'2 } bas = { \voiceTwo \repeat unfold 4 f2 \repeat unfold 4 g2 \repeat unfold 4 c2 } \markup \pad-x #3 % avoid cropping \score { << \new ChoirStaff << \new Staff = up \with { instrumentName = "SI SII" shortInstrumentName = "SI SII" } { s1*4 } \new Staff = shared \with { instrumentName = "S A" shortInstrumentName = "S A" } << \new Voice = sopI \sI \new Voice = sopII \sII \new Voice = altI \aI \new Voice = altII \aII >> \new Lyrics \with { alignBelowContext = up } \lyricsto sopII { e f g h } \new Lyrics \lyricsto altI { a b c d e f g h i j k l } \new Staff = men \with { instrumentName = "T B" shortInstrumentName = "T B" } << \clef F \new Voice = ten \ten \new Voice = bas \bas >> \new Lyrics \lyricsto bas { a b c d e f g h i j k l } >> >> \layout { \context { \Staff \RemoveEmptyStaves \override VerticalAxisGroup.remove-first = ##t } } }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < 改行後に分かれる譜について、指示を表示する ] | [ Up: Staff notation ] | [ 小節番号を変更する > ] |
ボーカル譜にオーケストラの合図音符を追加する
これは、ボーカル譜に添えられるピアノ リダクションに多くのオーケストラの合図音符を追加しやすくするためのスニペットです。音楽関数 \cueWhile は 4 つの引数を取ります:
1 つ目は、\addQuote と同様の、合図音符の引用元となる音楽です。2 つ目は、合図音符の前に表示される名前です。3 つ目は、音符を \voiceOne で表示して名前を譜の上に表示するか、
音符を \voiceTwo で表示して名前を譜の下に表示するかを決定する
#UP または #DOWN です。4 つ目は、合図音符が出現する部分のピアノの音楽です。合図音符の前に表示される名前は、音符の左端に揃えられます。様々な楽節を合図音符として表示することができますが、一度に複数個重ねることはできません。
cueWhile = #(define-music-function (instrument name dir music) (string? string? ly:dir? ly:music?) #{ \cueDuring $instrument #dir { \once \override TextScript.self-alignment-X = #RIGHT \once \override TextScript.direction = $dir <>-\markup { \tiny #name } $music } #}) flute = \relative c'' { \transposition c' s4 s4 e g } \addQuote "flute" { \flute } clarinet = \relative c' { \transposition bes fis4 d d c } \addQuote "clarinet" { \clarinet } singer = \relative c'' { c4. g8 g4 bes4 } words = \lyricmode { here's the lyr -- ics } pianoRH = \relative c'' { \transposition c' \cueWhile "clarinet" "Clar." #DOWN { c4. g8 } \cueWhile "flute" "Flute" #UP { g4 bes4 } } pianoLH = \relative c { c4 <c' e> e, <g c> } \score { << \new Staff { \new Voice = "singer" { \singer } } \new Lyrics { \lyricsto "singer" \words } \new PianoStaff << \new Staff { \new Voice { \pianoRH } } \new Staff { \clef "bass" \pianoLH } >> >> }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < ボーカル譜にオーケストラの合図音符を追加する ] | [ Up: Staff notation ] | [ Ambitus after key signature > ] |
小節番号を変更する
小節番号を付番する異なる方法が 2 つあり、繰り返しのある音楽に対して有用です。
music = \relative c' { \repeat volta 3 { c4 d e f | \alternative { \volta 1 { c4 d e f | c2 d \break } \volta 2 { f4 g a b | f4 g a b | f2 a | \break } \volta 3 { c4 d e f | c2 d } } } c1 \bar "|." } \markup "default" { \music } \markup \typewriter "numbers" { \set Score.alternativeNumberingStyle = #'numbers \music } \markup \typewriter "numbers-with-letters" { \set Score.alternativeNumberingStyle = #'numbers-with-letters \music }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < 小節番号を変更する ] | [ Up: Staff notation ] | [ デフォルトの小節線を変更する > ] |
Ambitus after key signature
By default, ambitus are positioned at the left of the clef. The
\ambitusAfter function allows for changing this placement.
Syntax is \ambitusAfter grob-interface; see
Graphical
Object Interfaces for a list of possible values for
grob-interface.
A common use case is printing the ambitus between key signature and time signature.
\new Staff \with { \consists Ambitus_engraver } \relative { \ambitusAfter key-signature \key d \major es'8 g bes cis d2 }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < Ambitus after key signature ] | [ Up: Staff notation ] | [ 譜線の数を変更する > ] |
デフォルトの小節線を変更する
デフォルトの小節線は、Score コンテキストで再定義することで変更することができます。
\layout { \context { \Score % Changing the defaults from engraver-init.ly measureBarType = "!" startRepeatBarType = "[|:" endRepeatBarType = ":|]" doubleRepeatBarType = ":|][|:" } } { c'1 \repeat volta 2 { c' c' } \repeat volta 2 { c' c' \alternative { \volta 1 { c' } \volta 2 { c' } } } \bar "|." }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < デフォルトの小節線を変更する ] | [ Up: Staff notation ] | [ 譜のサイズを変更する > ] |
譜線の数を変更する
譜線の数は StaffSymbol の line-count プロパティをオーバライドすることで変更できます。
upper = \relative c'' { c4 d e f } lower = \relative c { \clef bass c4 b a g } \score { \context PianoStaff << \new Staff { \upper } \new Staff { \override Staff.StaffSymbol.line-count = #4 \lower } >> }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < 譜線の数を変更する ] | [ Up: Staff notation ] | [ 空の譜を作成する > ] |
譜のサイズを変更する
譜のサイズを変更する一番シンプルな方法は
#(set-global-staff-size xx) を使用することですが、譜ごとにサイズを変更するには staff-space や fontSize
プロパティを使用します。
<< \new Staff { \relative c'' { \dynamicDown c8\ff c c c c c c c } } \new Staff \with { fontSize = #-3 \override StaffSymbol.staff-space = #(magstep -3) } { \clef bass c8 c c c c\f c c c } >>
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < 譜のサイズを変更する ] | [ Up: Staff notation ] | [ カスタマイズされた調号を作成する > ] |
空の譜を作成する
空の譜を作成するには、空の小節を作って Score コンテキストから
Bar_number_engraver を削除します。また Staff コンテキストから
Time_signature_engraver, Clef_engraver, Bar_engraver
を削除します。
#(set-global-staff-size 10) % for the documentation % #(set-global-staff-size 20) % for letter and A4 \book { \score { { \repeat unfold 12 { s1 \break } } \layout { indent = 0 \context { \Staff \remove "Time_signature_engraver" \remove "Clef_engraver" \remove "Bar_engraver" } \context { \Score \remove "Bar_number_engraver" } } } % for the documentation \paper { #(set-paper-size "a6") ragged-last-bottom = ##f line-width = 90\mm left-margin = 7.5\mm bottom-margin = 5\mm top-margin = 5\mm tagline = ##f } % uncomment these lines for "letter" size %{ \paper { #(set-paper-size "letter") ragged-last-bottom = ##f line-width = 7.5\in left-margin = 0.5\in bottom-margin = 0.25\in top-margin = 0.25\in tagline = ##f } %} % uncomment these lines for "A4" size %{ \paper { #(set-paper-size "a4") ragged-last-bottom = ##f line-width = 180\mm left-margin = 15\mm bottom-margin = 10\mm top-margin = 10\mm tagline = ##f } %} }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < 空の譜を作成する ] | [ Up: Staff notation ] | [ 譜をまたがる符幹 > ] |
カスタマイズされた調号を作成する
LilyPond はカスタマイズされた調号をサポートしています。この例では、フラットを広範囲に表示する D マイナーを作成しています。
\new Staff \with { \override StaffSymbol.line-count = #8 \override KeySignature.flat-positions = #'((-7 . 6)) \override KeyCancellation.flat-positions = #'((-7 . 6)) \override KeySignature.sharp-positions = #'((-6 . 7)) \override KeyCancellation.sharp-positions = #'((-6 . 7)) \override Clef.stencil = #(lambda (grob) (grob-interpret-markup grob #{ \markup\combine \musicglyph "clefs.C" \translate #'(-3 . -2) \musicglyph "clefs.F" #})) clefPosition = #3 middleCPosition = #3 middleCClefPosition = #3 } { \key d\minor f bes, f bes, | \key d\major fis b, fis b, | }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < カスタマイズされた調号を作成する ] | [ Up: Staff notation ] | [ システムに譜が 1 つしか存在しない場合にも括弧を表示する > ] |
譜をまたがる符幹
このスニペットは、Span_stem_engraver と \crossStaff を用いて、自動的に譜をまたがる符幹を作成しています。
符幹の長さは自動的に計算されるため指定する必要はありません。
\layout { \context { \PianoStaff \consists "Span_stem_engraver" } } \new PianoStaff << \new Staff { <b d'>4 r d'16\> e'8. g8 r\! | e'8 f' g'4 \voiceTwo % Down to lower staff \crossStaff { e'8 e'8 } e'4 | } \new Staff { \clef bass \voiceOne % Up to upper staff \crossStaff { <e g>4 e, g16 a8. c8 } d | g8 f g4 \voiceTwo g8 g g4 | } >>
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < 譜をまたがる符幹 ] | [ Up: Staff notation ] | [ グループ内に演奏する譜がある場合に GrandStaff 全体を表示したままにする > ] |
システムに譜が 1 つしか存在しない場合にも括弧を表示する
ChoirStaff や StaffGroup に譜が 1 つだけ存在する場合、デフォルトでは括弧や行頭の小節線は表示されません。これは collapse-height
をオーバライドし、値を譜線の数より小さくセットすることで変更することができます。
括弧が波の形をしている
PianoStaff や GrandStaff のようなコンテキストでは、別のプロパティをセットする必要があります。例の 2 つ目のシステムを参照してください。
\score { \new StaffGroup << % Must be lower than the actual number of staff lines \override StaffGroup.SystemStartBracket.collapse-height = 4 \override Score.SystemStartBar.collapse-height = 4 \new Staff { c'1 } >> } \score { \new PianoStaff << \override PianoStaff.SystemStartBrace.collapse-height = 4 \override Score.SystemStartBar.collapse-height = 4 \new Staff { c'1 } >> }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < システムに譜が 1 つしか存在しない場合にも括弧を表示する ] | [ Up: Staff notation ] | [ Extending a trill spanner > ] |
グループ内に演奏する譜がある場合に GrandStaff 全体を表示したままにする
オーケストラ譜では、いくつかの楽器 (あるいはグループ) が全く演奏されない時間があり、その時の譜は (\removeEmptyStaves で)
削除することができます。
楽器が後で再度演奏される場合には、グループで譜を残しておきたい場合があります。これはグループ化しているコンテキスト (GrandStaff や StaffGroup) に
Keep_alive_together_engraver を追加することで実現できます。
例では、セカンド バイオリンは 2 番目と 3 番目のシステムで演奏されていません。ファースト バイオリンは 2 番目のシステムでは演奏されず、3 番目のシステムでは最後の小節に演奏部分があります。Keep_alive_together_engraver
により、3 番目のシステムではセカンド バイオリンも表示されています。
\score { << \new Staff = "Staff_flute" \with { instrumentName = "Flute" shortInstrumentName = "Fl" } \relative c' { \repeat unfold 3 { c'4 c c c | c c c c | c c c c | \break } } \new StaffGroup = "StaffGroup_Strings" << \new GrandStaff = "GrandStaff_violins" << \new Staff = "StaffViolinI" \with { instrumentName = "Violin I" shortInstrumentName = "Vi I" } \relative c'' { a1 | R1*7 | \repeat unfold 12 a16 a4 | } \new Staff = "StaffViolinII" \with { instrumentName = "Violin II" shortInstrumentName = "Vi II" } \relative c' { e1 | R1*8 | } >> \new Staff = "Staff_cello" \with { instrumentName = "Cello" shortInstrumentName = "Ce" } \relative c { \clef bass \repeat unfold 9 { c1 } | } >> >> } \layout { indent = 3.0\cm short-indent = 1.5\cm \context { \GrandStaff \consists Keep_alive_together_engraver } \context { \Staff \RemoveEmptyStaves } }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < グループ内に演奏する譜がある場合に GrandStaff 全体を表示したままにする ] | [ Up: Staff notation ] | [ 繰り返しにまたがるグリッサンド > ] |
Extending a trill spanner
For TrillSpanner grobs, the minimum-length property
becomes effective only if the set-spacing-rods procedure is
called explicitly.
To do this, the springs-and-rods property should be set to
ly:spanner::set-spacing-rods.
\relative c' { \key c\minor \time 2/4 c16( as') c,-. des-. \once\override TrillSpanner.minimum-length = #15 \once\override TrillSpanner.springs-and-rods = #ly:spanner::set-spacing-rods \afterGrace es4\startTrillSpan { d16[(\stopTrillSpan es)] } c( c' g es c g' es d c8) }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < Extending a trill spanner ] | [ Up: Staff notation ] | [ 平坦なタイ > ] |
繰り返しにまたがるグリッサンド
複数の \alternative ブロックにまたがるグリッサンドは、\alternative ブロックの始まりに見えない装飾音符を配置し、グリッサンドを付加することで模倣することができます。装飾音符のピッチはグリッサンドの始端と同じであるべきです。ここでは、装飾音符のピッチを引数に取る音楽関数を定義しています。
多声の音楽では、他のボイスの装飾音符と位置を合わせる必要があります。
repeatGliss = #(define-music-function (grace) (ly:pitch?) #{ % the next two lines ensure the glissando is long enough % to be visible \once \override Glissando.springs-and-rods = #ly:spanner::set-spacing-rods \once \override Glissando.minimum-length = 3.5 \once \hideNotes \grace $grace \glissando #}) \score { \relative c'' { \repeat volta 3 { c4 d e f\glissando } \alternative { { g2 d } { \repeatGliss f g2 e } { \repeatGliss f e2 d } } } } music = \relative c' { \voiceOne \repeat volta 2 { g a b c\glissando } \alternative { { d1 } { \repeatGliss c \once \omit StringNumber e1\2 } } } \score { \new StaffGroup << \new Staff << \new Voice { \clef "G_8" \music } >> \new TabStaff << \new TabVoice { \clef "moderntab" \music } >> >> }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < 繰り返しにまたがるグリッサンド ] | [ Up: Staff notation ] | [ Forcing measure width to adapt to a metronome mark’s width > ] |
平坦なタイ
この関数は Tie.stencil をデフォルトの引数に取り、このデフォルトのステンシルの寸法を基にサイズが計算されます。更なる調整は
Tie.details.height-limit や \shape で行うことができます。また、カスタム定義をその場で変更することもできます。
#(define ((flared-tie coords) grob) (define (pair-to-list pair) (list (car pair) (cdr pair))) (define (normalize-coords goods x y dir) (map (lambda (coord) (cons (* x (car coord)) (* y dir (cdr coord)))) goods)) (define (my-c-p-s points thick) (make-connected-path-stencil points thick 1.0 1.0 #f #f)) ;; Calling `ly:tie::print` and assigning its return value to a ;; variable in this outer `let` triggers LilyPond to position the ;; tie, allowing us to extract its extents. We only proceed, ;; however, if the tie doesn't get discarded (for whatever reason). (let ((sten (ly:tie::print grob))) (if (grob::is-live? grob) (let* ((layout (ly:grob-layout grob)) (line-thickness (ly:output-def-lookup layout 'line-thickness)) (thickness (ly:grob-property grob 'thickness 0.1)) (used-thick (* line-thickness thickness)) (dir (ly:grob-property grob 'direction)) (xex (ly:stencil-extent sten X)) (yex (ly:stencil-extent sten Y)) (lenx (interval-length xex)) (leny (interval-length yex)) (xtrans (car xex)) (ytrans (if (> dir 0)(car yex) (cdr yex))) ;; Add last point. (coord-list (append coords '((1.0 . 0.0)))) (uplist (map pair-to-list (normalize-coords coord-list lenx (* leny 2) dir)))) (ly:stencil-translate (my-c-p-s uplist used-thick) (cons xtrans ytrans))) '()))) % Define a default tie shape consisting of three straight lines. #(define flare-tie (flared-tie '((0.1 . 0.3) (0.9 . 0.3)))) \relative c' { a4~ a \once \override Tie.stencil = #flare-tie a4~ a \break <a c e a c e a c e>~ q \once \override Tie.stencil = #flare-tie q~ q\break <>^\markup \small \typewriter "height-limit = 14" \override Tie.details.height-limit = 14 a'4~ a \once \override Tie.stencil = #flare-tie a4~ a \break <>^\markup \small \typewriter "height-limit = 0.5" \override Tie.details.height-limit = 0.5 a4~ a \once \override Tie.stencil = #flare-tie a4~ a \break \revert Tie.details.height-limit <>^\markup \small \typewriter "\shape #'((0 . 0) (0 . -1) (0 . -1) (0 . 0))" \shape #'((0 . 0) (0 . -1) (0 . -1) (0 . 0)) Tie a4~ a \once \override Tie.stencil = #flare-tie \shape #'((0 . 0) (0 . -1) (0 . -1) (0 . 0)) Tie a4~ a \break <>^\markup \small \typewriter "#(flared-tie '((0.2 . 2) (0.5 . -3) (0.8 . 1))" \once \override Tie.stencil = #(flared-tie '((0.2 . 2) (0.5 . -3) (0.8 . 1))) a4~ a <>_\markup \small \typewriter "#(flared-tie '((0.5 . 2)))" \once \override Tie.stencil = #(flared-tie '((0.5 . 2))) a'4~ a }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < 平坦なタイ ] | [ Up: Staff notation ] | [ Grob をスキップするグリッサンド > ] |
Forcing measure width to adapt to a metronome mark’s width
By default, metronome marks do not influence horizontal spacing. This can be solved through a simple override, as shown in the second half of the example.
example = { R1 \tempo "Allegro molto" R1*6 \tempo "poco rit." R1*2 \tempo "a tempo" R1*8 \break } { \compressMMRests { \example \override Score.MetronomeMark.extra-spacing-width = #'(-3 . 0) \example } } \layout { ragged-right = ##t }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < Forcing measure width to adapt to a metronome mark’s width ] | [ Up: Staff notation ] | [ インキピット > ] |
Grob をスキップするグリッサンド
NoteColumn Grob をグリッサンドが飛び越すように設定することができます。
\relative c' { a2 \glissando \once \override NoteColumn.glissando-skip = ##t f''4 d, }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < Grob をスキップするグリッサンド ] | [ Up: Staff notation ] | [ 譜の上にマークアップとして楽譜片を挿入する > ] |
インキピット
計量音楽を転写する際、曲の最初に表示されるインキピットは、原曲の調やテンポを記述するのに有用です。現代の音楽家は小節線に慣れていますが、計量音楽の時代には知られていないものでした。そのため妥協策として、小節線が譜と譜の間に表示されることがあります。これは計量音楽風の (mensurstriche) レイアウトと呼ばれています。
% A short excerpt from the Jubilate Deo by Orlande de Lassus global = { \set Score.skipBars = ##t \key g \major \time 4/4 % the actual music \skip 1*8 % let finis bar go through all staves \override Staff.BarLine.transparent = ##f % finis bar \bar "|." } discantusIncipit = \new PetrucciStaff { \clef "petrucci-c1" \key f \major \time 2/2 c''1. } discantusNotes = { \transpose c' c'' { \clef "treble" d'2. d'4 | b e' d'2 | c'4 e'4.( d'8 c' b | a4) b a2 | b4.( c'8 d'4) c'4 | \once \hide NoteHead c'1 | b\breve | } } discantusLyrics = \lyricmode { Ju -- bi -- la -- te De -- o, om -- nis ter -- ra, __ om- "..." -us. } altusIncipit = \new PetrucciStaff { \clef "petrucci-c3" \key f \major \time 2/2 e'1\rest f'1. } altusNotes = { \transpose c' c'' { \clef "treble" r2 g2. e4 fis g | a2 g4 e | fis g4.( fis16 e fis4) | g1 | \once \hide NoteHead g1 | g\breve | } } altusLyrics = \lyricmode { Ju -- bi -- la -- te De -- o, om -- nis ter -- ra, "..." -us. } tenorIncipit = \new PetrucciStaff { \clef "petrucci-c4" \key f \major \time 2/2 r\longa r\breve r1 c'1. } tenorNotes = { \transpose c' c' { \clef "treble_8" R1 | R1 | R1 | % two measures r2 d'2. d'4 b e' | \once \hide NoteHead e'1 | d'\breve | } } tenorLyrics = \lyricmode { Ju -- bi -- la -- te "..." -us. } bassusIncipit = \new PetrucciStaff { % The original print shows the b flat % for the f major key signature twice. \override Staff.KeySignature.flat-positions = #'((-7 . 6)) \clef "mensural-f" \key f\major \time 2/2 \tweak Y-offset #1 r\longa \tweak Y-offset #1 r\longa f1. } bassusNotes = { \transpose c' c' { \clef "bass" R1 | R1 | R1 | R1 | g2. e4 | \once \hide NoteHead e1 | g\breve | } } bassusLyrics = \lyricmode { Ju -- bi- "..." -us. } \score { << \new StaffGroup = choirStaff << \new Voice = "discantusNotes" << \set Staff.instrumentName = "Discantus" \incipit #1 \discantusIncipit \global \discantusNotes >> \new Lyrics \lyricsto discantusNotes { \discantusLyrics } \new Voice = "altusNotes" << \set Staff.instrumentName = "Altus" \global \incipit #1 \altusIncipit \altusNotes >> \new Lyrics \lyricsto altusNotes { \altusLyrics } \new Voice = "tenorNotes" << \set Staff.instrumentName = "Tenor" \global \incipit #1 \tenorIncipit \tenorNotes >> \new Lyrics \lyricsto tenorNotes { \tenorLyrics } \new Voice = "bassusNotes" << \set Staff.instrumentName = "Bassus" \global \incipit #1 \bassusIncipit \bassusNotes >> \new Lyrics \lyricsto bassusNotes { \bassusLyrics } >> >> \layout { \context { \Score %% no bar lines in staves or lyrics \hide BarLine } %% the next two instructions keep the lyrics between the bar lines \context { \Lyrics \consists "Bar_engraver" \consists "Separating_line_group_engraver" } \context { \Voice %% no slurs \hide Slur %% Comment in the below "\remove" command to allow line %% breaking also at those bar lines where a note overlaps %% into the next measure. The command is commented out in this %% short example score, but especially for large scores, you %% will typically yield better line breaking and thus improve %% overall spacing if you comment in the following command. %%\remove "Forbid_line_break_engraver" } indent = 5\cm incipit-width = 2.5\cm } }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < インキピット ] | [ Up: Staff notation ] | [ TabStaff で最高弦を下に表示する > ] |
譜の上にマークアップとして楽譜片を挿入する
\markup コマンドは非常に多くのことができます。このスニペットでは、テキストや記号ではなく、\score ブロックを含んだ \markup を作成しています。
tuning = \markup \score { \new Staff \with { \remove "Time_signature_engraver" } { \clef bass <c, g, d g>1 } \layout { indent = 0\cm } } \header { title = "Solo Cello Suites" subtitle = "Suite IV" subsubtitle = \markup { Originalstimmung: \raise #0.5 \tuning } tagline = ##f } \layout { ragged-right = ##f } \relative c'' { \time 4/8 \tuplet 3/2 { c8 d e } \tuplet 3/2 { c d e } \tuplet 3/2 { c8 d e } \tuplet 3/2 { c d e } g8 a g a g8 a g a }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < 譜の上にマークアップとして楽譜片を挿入する ] | [ Up: Staff notation ] | [ 文字でタブ譜をフォーマットする > ] |
TabStaff で最高弦を下に表示する
タブ譜では通常、第 1 弦が上に表示されます。下に表示したい場合には、stringOneTopmost コンテキスト プロパティを変更します。コンテキスト全体に設定するには、layout ブロックに設定することができます。
%\layout { % \context { % \Score % stringOneTopmost = ##f % } % \context { % \TabStaff % tablatureFormat = #fret-letter-tablature-format % } %} m = { \cadenzaOn e, b, e gis! b e' \bar "||" } << \new Staff { \clef "G_8" <>_"default" \m <>_"italian (historic)"\m } \new TabStaff { \m \set Score.stringOneTopmost = ##f \set TabStaff.tablatureFormat = #fret-letter-tablature-format \m } >>
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < TabStaff で最高弦を下に表示する ] | [ Up: Staff notation ] | [ グリッサンドを改行できるようにする > ] |
文字でタブ譜をフォーマットする
タブ譜では数字の代わりに文字を用いることができます。
music = \relative c { c4 d e f g4 a b c d4 e f g } << \new Staff { \clef "G_8" \music } \new TabStaff \with { tablatureFormat = #fret-letter-tablature-format } { \music } >>
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < 文字でタブ譜をフォーマットする ] | [ Up: Staff notation ] | [ いくつかの譜線を他より太くする > ] |
グリッサンドを改行できるようにする
after-line-breaking と共に breakable プロパティを #t
にすることで、グリッサンドの途中で改行することができます。
glissandoSkipOn = { \override NoteColumn.glissando-skip = ##t \hide NoteHead \override NoteHead.no-ledgers = ##t } music = { \repeat unfold 16 f8 | f1\glissando | a4 r2. | \repeat unfold 16 f8 | f1\glissando \once\glissandoSkipOn | a2 a4 r4 | \repeat unfold 16 f8 } \relative c'' { <>^\markup { \typewriter Glissando.breakable set to \typewriter "#t" } \override Glissando.breakable = ##t \override Glissando.after-line-breaking = ##t \music } \relative c'' { <>^\markup { \typewriter Glissando.breakable not set } \music } \paper { line-width = 100\mm }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < グリッサンドを改行できるようにする ] | [ Up: Staff notation ] | [ Measure counters > ] |
いくつかの譜線を他より太くする
教育上の目的で、譜線を太くすることができます (目的の例としては、中央の線の強調や、ト音記号の線を強調することなど)。これは強調したい線のすぐ近くに新たな譜線を追加することで実現できます。譜線の追加には StaffSymbol
オブジェクトの line-positions プロパティを使用します。
{ \override Staff.StaffSymbol.line-positions = #'(-4 -2 -0.2 0 0.2 2 4) d'4 e' f' g' }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < いくつかの譜線を他より太くする ] | [ Up: Staff notation ] | [ Mensurstriche レイアウト (譜の間に小節線を表示する) > ] |
Measure counters
This snippet demonstrates the use of the
Measure_counter_engraver to number groups of successive
measures. Any stretch of measures may be numbered, whether consisting
of repetitions or not.
The engraver must be added to the appropriate context. Here, a
Staff context is used; another possibility is a Dynamics
context.
The counter is begun with \startMeasureCount and ended with
\stopMeasureCount. Numbering will start by default with 1,
but this behavior may be modified by overriding the count-from
property.
When a measure extends across a line break, the number will appear twice, the second time in parentheses.
\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 }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < Measure counters ] | [ Up: Staff notation ] | [ オッターヴァのスパナの傾きを変更する > ] |
Mensurstriche レイアウト (譜の間に小節線を表示する)
Mensurstriche (計量音楽風の) レイアウトでは、小節線を譜の中には表示せず、譜と譜の間に表示します。これは、ChoirStaff の代わりに StaffGroup
を用いることで実現できます。譜の中にある小節線は \hide で非表示にします。
\layout { \context { \Staff measureBarType = "-span|" } } music = \fixed c'' { c1 d2 \section e2 f1 \fine } \new StaffGroup << \new Staff \music \new Staff \music >>
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < Mensurstriche レイアウト (譜の間に小節線を表示する) ] | [ Up: Staff notation ] | [ 譜をネストする > ] |
オッターヴァのスパナの傾きを変更する
オッターヴァのスパナの傾きを変更することができます。
\relative c'' { \override Staff.OttavaBracket.stencil = #ly:line-spanner::print \override Staff.OttavaBracket.bound-details = #`((left . ((Y . 0) (attach-dir . ,LEFT) (padding . 0) (stencil-align-dir-y . ,CENTER))) (right . ((Y . 5.0) ; Change the number here (padding . 0) (attach-dir . ,RIGHT) (text . ,(make-draw-dashed-line-markup (cons 0 -1.2)))))) \override Staff.OttavaBracket.left-bound-info = #ly:horizontal-line-spanner::calc-left-bound-info-and-text \override Staff.OttavaBracket.right-bound-info = #ly:horizontal-line-spanner::calc-right-bound-info \ottava 1 c1 c'''1 }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < オッターヴァのスパナの傾きを変更する ] | [ Up: Staff notation ] | [ 非伝統的な調号 > ] |
譜をネストする
systemStartDelimiterHierarchy は、より複雑な譜のグループ化を行うために用いることができます。\set StaffGroup.systemStartDelimiterHierarchy コマンドの引数として基となるのは、譜の数だけあるアルファベットのリストです。それぞれの譜の前に SystemStartDelimiter を追加することで、グループ化の始まりを示します。その際、グループとなる譜の範囲を括弧で囲む必要があります。リスト中の要素は省略することができますが、最上位のグループは必ず全ての譜を含みます。SystemStartDelimiter は SystemStartBar,
SystemStartBracket, SystemStartBrace,
SystemStartSquare のいずれかです。
\new StaffGroup \relative c'' << \override StaffGroup.SystemStartSquare.collapse-height = 4 \set StaffGroup.systemStartDelimiterHierarchy = #'(SystemStartSquare (SystemStartBrace (SystemStartBracket a (SystemStartSquare b)) c) d) \new Staff { c1 } \new Staff { c1 } \new Staff { c1 } \new Staff { c1 } \new Staff { c1 } >>
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < 譜をネストする ] | [ Up: Staff notation ] | [ オーケストラ、コーラス、ピアノのテンプレート > ] |
非伝統的な調号
広く使われている \key コマンドは、Staff コンテキストの
keyAlterations をセットしています。非標準な調号を作成するには、このプロパティを直接セットします。
コマンドの形式は以下のようなリストです:
\set Staff.keyAlterations = #`(((octave . step) . alter) ((octave
. step) . alter) ...)
が構文です。リストの各要素について、octave がオクターブを指定し
(0 がミドル C からその上の B まで)、step はオクターブ内の音階 (0 が C, 6 が B)、alter が ,SHARP ,FLAT ,DOUBLE-SHARP
などです。
または、各要素についてより簡潔な形式があり、(step . alter) は全てのオクターブに対して変化記号が適用されます。“シャープ” が 100 セントではない微分音のスケールでは、alter
を 200 セントの全音を 1 とした数値で指定できます。
\include "arabic.ly" \relative do' { \set Staff.keyAlterations = #`((0 . ,SEMI-FLAT) (1 . ,SEMI-FLAT) (2 . ,FLAT) (5 . ,FLAT) (6 . ,SEMI-FLAT)) % \set Staff.extraNatural = ##f re reb \dwn reb resd dod dob dosd \dwn dob | dobsb dodsd do do | }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < 非伝統的な調号 ] | [ Up: Staff notation ] | [ Print chord names with same root and different bass as slash and bass note > ] |
オーケストラ、コーラス、ピアノのテンプレート
このテンプレートは StaffGroup と GrandStaff コンテキストをネストさせて用いることで、楽器のサブ グループを表示しています。また、\transpose を使用して、移調楽器の音符をコンサート ピッチの状態で変数に格納しています。
#(set-global-staff-size 17) \paper { indent = 3.0\cm % add space for instrumentName short-indent = 1.5\cm % add less space for shortInstrumentName } fluteMusic = \relative c' { \key g \major g'1 b } % Pitches as written on a manuscript for Clarinet in A % are transposed to concert pitch. clarinetMusic = \transpose c' a \relative c'' { \key bes \major bes1 d } trumpetMusic = \relative c { \key g \major g''1 b } % Key signature is often omitted for horns hornMusic = \transpose c' f \relative c { d'1 fis } percussionMusic = \relative c { \key g \major g1 b } sopranoMusic = \relative c'' { \key g \major g'1 b } sopranoLyrics = \lyricmode { Lyr -- ics } altoIMusic = \relative c' { \key g \major g'1 b } altoILyrics = \sopranoLyrics altoIIMusic = \relative c' { \key g \major g'1 b } altoIILyrics = \lyricmode { Ah -- ah } tenorMusic = \relative c' { \clef "treble_8" \key g \major g1 b } tenorLyrics = \sopranoLyrics pianoRHMusic = \relative c { \key g \major g''1 b } pianoLHMusic = \relative c { \clef bass \key g \major g1 b } violinIMusic = \relative c' { \key g \major g'1 b } violinIIMusic = \relative c' { \key g \major g'1 b } violaMusic = \relative c { \clef alto \key g \major g'1 b } celloMusic = \relative c { \clef bass \key g \major g1 b } bassMusic = \relative c { \clef "bass_8" \key g \major g,1 b } \book { \score { << \new StaffGroup = "StaffGroup_woodwinds" << \new Staff = "Staff_flute" \with { instrumentName = "Flute" } \fluteMusic \new Staff = "Staff_clarinet" \with { instrumentName = \markup { \concat { "Clarinet in B" \flat } } } % Declare that written Middle C in the music % to follow sounds a concert B flat, for % output using sounded pitches such as MIDI. %\transposition bes % Print music for a B-flat clarinet \transpose bes c' \clarinetMusic >> \new StaffGroup = "StaffGroup_brass" << \new Staff = "Staff_hornI" \with { instrumentName = "Horn in F" } % \transposition f \transpose f c' \hornMusic \new Staff = "Staff_trumpet" \with { instrumentName = "Trumpet in C" } \trumpetMusic >> \new RhythmicStaff = "RhythmicStaff_percussion" \with { instrumentName = "Percussion" } \percussionMusic \new PianoStaff \with { instrumentName = "Piano" } << \new Staff { \pianoRHMusic } \new Staff { \pianoLHMusic } >> \new ChoirStaff = "ChoirStaff_choir" << \new Staff = "Staff_soprano" \with { instrumentName = "Soprano" } \new Voice = "soprano" \sopranoMusic \new Lyrics \lyricsto "soprano" { \sopranoLyrics } \new GrandStaff = "GrandStaff_altos" \with { \accepts Lyrics } << \new Staff = "Staff_altoI" \with { instrumentName = "Alto I" } \new Voice = "altoI" \altoIMusic \new Lyrics \lyricsto "altoI" { \altoILyrics } \new Staff = "Staff_altoII" \with { instrumentName = "Alto II" } \new Voice = "altoII" \altoIIMusic \new Lyrics \lyricsto "altoII" { \altoIILyrics } >> \new Staff = "Staff_tenor" \with { instrumentName = "Tenor" } \new Voice = "tenor" \tenorMusic \new Lyrics \lyricsto "tenor" { \tenorLyrics } >> \new StaffGroup = "StaffGroup_strings" << \new GrandStaff = "GrandStaff_violins" << \new Staff = "Staff_violinI" \with { instrumentName = "Violin I" } \violinIMusic \new Staff = "Staff_violinII" \with { instrumentName = "Violin II" } \violinIIMusic >> \new Staff = "Staff_viola" \with { instrumentName = "Viola" } \violaMusic \new Staff = "Staff_cello" \with { instrumentName = "Cello" } \celloMusic \new Staff = "Staff_bass" \with { instrumentName = "Double Bass" } \bassMusic >> >> } }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < オーケストラ、コーラス、ピアノのテンプレート ] | [ Up: Staff notation ] | [ 歌詞を譜の内部に表示する > ] |
Print chord names with same root and different bass as slash and bass note
To print subsequent ChordNames only differing in its bass note
as slash and bass note, use the Scheme engraver defined in this
snippet. The behaviour may be controlled in detail by the
chordChanges context property.
#(define Bass_changes_equal_root_engraver (lambda (ctx) "For sequential `ChordNames` with the same root but a different bass, the root markup is dropped: D D/C D/B -> D /C /B. The behaviour may be controlled by setting the `chordChanges` context property." (let ((chord-pitches '()) (last-chord-pitches '()) (bass-pitch #f)) (make-engraver ((initialize this-engraver) (let ((chord-note-namer (ly:context-property ctx 'chordNoteNamer))) ;; Set 'chordNoteNamer, respect user setting if already done (ly:context-set-property! ctx 'chordNoteNamer (if (procedure? chord-note-namer) chord-note-namer note-name->markup)))) (listeners ((note-event this-engraver event) (let* ((pitch (ly:event-property event 'pitch)) (pitch-name (ly:pitch-notename pitch)) (pitch-alt (ly:pitch-alteration pitch)) (bass (ly:event-property event 'bass #f)) (inversion (ly:event-property event 'inversion #f))) ;; Collect notes of the chord ;; - to compare inversed chords we need to collect the ;; bass note as usual member of the chord, whereas an ;; added bass must be treated separate from the usual ;; chord-notes ;; - notes are stored as pairs containing their ;; pitch-name (an integer), i.e. disregarding their ;; octave and their alteration (cond (bass (set! bass-pitch pitch)) (inversion (set! bass-pitch pitch) (set! chord-pitches (cons (cons pitch-name pitch-alt) chord-pitches))) (else (set! chord-pitches (cons (cons pitch-name pitch-alt) chord-pitches))))))) (acknowledgers ((chord-name-interface this-engraver grob source-engraver) (let ((chord-changes (ly:context-property ctx 'chordChanges #f))) ;; If subsequent chords are equal apart from their bass, ;; reset the 'text-property. ;; Equality is done by comparing the sorted lists of this ;; chord's elements and the previous chord. Sorting is ;; needed because inverted chords may have a different ;; order of pitches. `chord-changes` needs to be true. (if (and bass-pitch chord-changes (equal? (sort chord-pitches car<) (sort last-chord-pitches car<))) (ly:grob-set-property! grob 'text (make-line-markup (list (ly:context-property ctx 'slashChordSeparator) ((ly:context-property ctx 'chordNoteNamer) bass-pitch (ly:context-property ctx 'chordNameLowercaseMinor)))))) (set! last-chord-pitches chord-pitches) (set! chord-pitches '()) (set! bass-pitch #f)))) ((finalize this-engraver) (set! last-chord-pitches '())))))) myChords = \chordmode { % \germanChords \set chordChanges = ##t d2:m d:m/cis d:m/c \set chordChanges = ##f d:m/b e1:7 \set chordChanges = ##t e \break \once \set chordChanges = ##f e1/f e2/gis e/+gis e e:m/f d:m d:m/cis d:m/c \set chordChanges = ##f d:m/b } << \new ChordNames \with { \consists #Bass_changes_equal_root_engraver } \myChords \new Staff \myChords >>
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < Print chord names with same root and different bass as slash and bass note ] | [ Up: Staff notation ] | [ 他のボイスを引用する > ] |
歌詞を譜の内部に表示する
歌詞の垂直方向の位置を移動し、譜の内部に表示させることができます。歌詞は
\override LyricText.extra-offset = #'(0 . dy) で移動し、延長線やハイフンを移動する同様のコマンドも必要です。必要な移動量は試行錯誤によって決定します。
<< \new Staff << \new Voice = "voc" \relative c' { \stemDown a bes c8 b c4 } >> \new Lyrics \with { \override LyricText.extra-offset = #'(0 . 8.6) \override LyricExtender.extra-offset = #'(0 . 8.6) \override LyricHyphen.extra-offset = #'(0 . 8.6) } \lyricsto "voc" { La la -- la __ _ la } >>
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < 歌詞を譜の内部に表示する ] | [ Up: Staff notation ] | [ 移調を含む他のボイスの引用 > ] |
他のボイスを引用する
quotedEventTypes プロパティは、引用される音楽イベントのタイプを指定します。デフォルト値は (note-event rest-event tie-event beam-event
tuplet-span-event) であり、これは音符、休符、タイ、連桁、連符のみが
\quoteDuring によって引用されることを示しています。次の例では、rest-event がリストに含まれていないため、16 分休符が引用されていません。
イベントのタイプのリストは、内部リファレンスの “Music classes” を参照してください。
quoteMe = \relative c' { fis4 r16 a8.-> b4\ff c } \addQuote quoteMe \quoteMe original = \relative c'' { c8 d s2 \once \override NoteColumn.ignore-collision = ##t es8 gis8 } << \new Staff \with { instrumentName = "quoteMe" } \quoteMe \new Staff \with { instrumentName = "orig" } \original \new Staff \with { instrumentName = "orig+quote" quotedEventTypes = #'(note-event articulation-event) } \relative c'' << \original \new Voice { s4 \set fontSize = #-4 \override Stem.length-fraction = #(magstep -4) \quoteDuring "quoteMe" { \skip 2. } } >> >>
移調を含む他のボイスの引用
音楽の引用では、ソースとターゲットの両方で移調が考慮されます。この例では、全ての楽器が絶対ピッチとしてミドル C を演奏します。ターゲットは
F 管の楽器です。ターゲットとなるパート内で \transpose を用いて移調することができ、この場合は全てのピッチが移調されます
(訳注: 以前は引用を含めたピッチが移調されていましたが、2.18 時点で挙動が変更されており、引用のピッチが変更されないようになっています)。
\addQuote clarinet { \transposition bes \repeat unfold 8 { d'16 d' d'8 } } \addQuote sax { \transposition es' \repeat unfold 16 { a8 } } quoteTest = { % french horn \transposition f g'4 << \quoteDuring "clarinet" { \skip 4 } s4^"clar." >> << \quoteDuring "sax" { \skip 4 } s4^"sax." >> g'4 } { \new Staff \with { instrumentName = \markup { \column { Horn "in F" } } } \quoteTest \transpose c' d' << \quoteTest s4_"up a tone" >> }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < 移調を含む他のボイスの引用 ] | [ Up: Staff notation ] | [ ピアノ曲の先頭にあるブレースを削除する > ] |
Reconciliating bar lines thickness when staves are of different sizes (TODO duplicates snippet in Documentation/en/notation/spacing.itely)
A regularly occurring problem in ensemble or chamber music scores, particularly with piano, is that when some of the staves are printed in a smaller size, their bar lines do not not match those of larger staves. This may become particularly egregious for closing double bar lines, as demonstrated here.
There are different solutions, which all involve correcting some of the
properties overridden by the \magnifyStaff command: namely,
kern thick-thickness and hair-thickness (the
latter of which also governs ordinary bar lines). These are properties
of the BarLine graphical object (“grob”), which resides
in the Staff context.
This can be done by using either the \revert command, or more
advanced commands such as revert-props. Alternatively, some
effects of \magnifyStaff may be replicated on other staves
through the scale-props command, which may be used to harmonize
all bar lines either to their appearance on the smallest staves, or to
some intermediate value.
%% This snippet relies on some internal commands that are not part of the %% most common and stable syntax generally recommended to regular users. \markup \fontsize #-3 { \center-column { \vspace #0.3 Default: \vspace #1.7 \score { \new StaffGroup << \new Staff \with { \magnifyStaff #1/2 } { b1 b \bar "|."} \new Staff { b b } >> } } \hspace #2 \center-column { "Reverting only the" "final bar line:" \vspace #1.2 \score { \new StaffGroup << \new Staff \with { \magnifyStaff #1/2 } { b1 b \revert Staff.BarLine.thick-thickness \revert Staff.BarLine.hair-thickness \revert Staff.BarLine.kern \bar "|." } \new Staff { b b } >> } } \hspace #2 \center-column { \line {Cancelling \typewriter "\magnifyStaff"} "only for bar lines:" \vspace #1.1 \score { \new StaffGroup << \new Staff \with { \magnifyStaff #1/2 #(revert-props 'magnifyStaff 0 '((BarLine thick-thickness) (BarLine hair-thickness) (BarLine kern))) } { b1 b \bar "|."} \new Staff { b b } >> } } \hspace #2 \center-column { \line {Mimicking \typewriter "\magnifyStaff"} "on the other staves:" \vspace #1.3 \score { \new StaffGroup << \new Staff \with { \magnifyStaff #1/2 } { b1 b \bar "|." } \new Staff \with { #(scale-props 'magnifyStaff 1/2 #t '((BarLine thick-thickness) (BarLine hair-thickness) (BarLine kern))) } { b b } >> } } \hspace #2 \center-column { "Applying an intermediate" "value to all staves:" \vspace #1.3 \score { \new StaffGroup << \new Staff \with { \magnifyStaff #1/2 #(scale-props 'magnifyStaff 3/2 #t '((BarLine thick-thickness) (BarLine hair-thickness) (BarLine kern))) } { b1 b \bar "|." } \new Staff \with { #(scale-props 'magnifyStaff 3/4 #t '((BarLine thick-thickness) (BarLine hair-thickness) (BarLine kern))) } { b b } >> } } } \layout { indent = 0 }
ピアノ曲の先頭にあるブレースを削除する
このスニペットは、PianoStaff や GrandStaff から先頭にあるブレース (波括弧) を削除しています。これは譜刻された既存の音楽の一部を切り取って見せる場合に有用です。
これは \alterBroken を使用しています。
someMusic = { \once \omit Staff.Clef \once \omit Staff.TimeSignature \repeat unfold 3 c1 \break \repeat unfold 5 c1 \break \repeat unfold 5 c1 } \score { \new PianoStaff << \new Staff = "right" \relative c'' \someMusic \new Staff = "left" \relative c' { \clef F \someMusic } >> \layout { indent=75\mm \context { \PianoStaff \alterBroken transparent #'(#t) SystemStartBrace } } }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < ピアノ曲の先頭にあるブレースを削除する ] | [ Up: Staff notation ] | [ 先頭の空行を削除する > ] |
StaffGroup, PianoStaff, GrandStaff の譜を繋ぐ小節線を削除する
デフォルトでは、StaffGroup, PianoStaff, GrandStaff 内の譜の小節線は繋がります。この挙動は譜ごとにオーバライドできます。
\relative c' { \new StaffGroup << \new Staff { e1 | e \once \override Staff.BarLine.allow-span-bar = ##f e1 | e | e } \new Staff { c1 | c | c \once \override Staff.BarLine.allow-span-bar = ##f c1 | c } \new Staff { a1 | a | a | a | a } >> }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < StaffGroup, PianoStaff, GrandStaff の譜を繋ぐ小節線を削除する ] | [ Up: Staff notation ] | [ システム セパレータを設定する > ] |
先頭の空行を削除する
VerticalAxisGroup の remove-first プロパティをセットすることで、楽譜の先頭にある空の譜を削除することができます。これはグローバルの
\layout ブロックでも行うことができますし、特定の譜を削除したい場合には譜の内部で使用することもできます。後者の場合には、プロパティ名の前にコンテキストを指定する必要があります
(Staff は現在の譜にしか影響しません)。
2 つ目のグループの下側の譜は削除されていません。設定が記述されている譜にのみ適用されるからです。
\layout { \context { \Staff \RemoveEmptyStaves % To use the setting globally, uncomment the following line: % \override VerticalAxisGroup.remove-first = ##t } } \new StaffGroup << \new Staff \relative c' { e4 f g a \break c1 } \new Staff { % To use the setting globally, comment this line, % uncomment the line in the \layout block above \override Staff.VerticalAxisGroup.remove-first = ##t R1 \break R } >> \new StaffGroup << \new Staff \relative c' { e4 f g a \break c1 } \new Staff { R1 \break R } >>
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < 先頭の空行を削除する ] | [ Up: Staff notation ] | [ Shape individual ties in chords > ] |
システム セパレータを設定する
システムとシステムの間にシステム セパレータを挿入することができます。任意のマークアップが使用できますが、デフォルト値は \slashSeparator
となっています。
#(set-default-paper-size "a5") \paper { system-separator-markup = \slashSeparator tagline = ##f } notes = \relative c' { c1 | c \break c1 | c \break c1 | c } \book { \score { \new GrandStaff << \new Staff \notes \new Staff \notes >> } }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < システム セパレータを設定する ] | [ Up: Staff notation ] | [ ティック小節線 > ] |
Shape individual ties in chords
To shape individual ties in chords use the method demonstrated below.
{ \textMark "Chords can be tied note by note." <c'~ e'~ g'~ c''~>2 q } { \textMark \markup \override #'(baseline-skip . 3) \wordwrap { Modifying those ties with \typewriter "\\shape" does not succeed, because \typewriter TieColumn positions them on its own behalf, ignoring \typewriter "\\shape" input more or less. You may circumvent this by setting \typewriter positioning-done to \typewriter "#t" – alas, \typewriter positioning-done is an internal property, and setting it to \typewriter "#t" means: all positioning is done, don’t do anything further. The next example demonstrates a case where the positioning is not finished: all tie directions are down, and the thickness is not accurate. } <c'~ e'~ g'~ c''~>2 \once \override TieColumn.positioning-done = ##t q } { \textMark "To fix that, enter ties with explicit direction modifiers." <c'_~ e'_~ g'_~ c''^~>2 \once \override TieColumn.positioning-done = ##t q } { \textMark \markup { Now you can use \typewriter "\\shape" for each tie as usual. } <c'-\shape #'((0 . 0) (0 . -10) (0 . -10) (0 . 0)) _~ e'-\shape #'((0 . 0) (0 . -5) (0 . -5) (0 . 0)) _~ g'-\shape #'((0 . 0) (0 . -2) (0 . -2) (0 . 0)) _~ c''-\shape #'((0 . 0) (0 . 5) (0 . 5) (0 . 0)) ^~ >2 \once \override TieColumn.positioning-done = ##t q } { \textMark "This also works at line breaks." <c'-\shape #'(((0 . 0) (0 . -10) (0 . -10) (0 . 0)) ((0 . 0) (0 . -10) (0 . -10) (0 . 0))) _~ e'-\shape #'(((0 . 0) (0 . -5) (0 . -5) (0 . 0)) ((0 . 0) (0 . -5) (0 . -5) (0 . 0))) _~ g'-\shape #'(((0 . 0) (0 . -2) (0 . -2) (0 . 0)) ((0 . 0) (0 . -2) (0 . -2) (0 . 0))) _~ c''-\shape #'(((0 . 0) (0 . 5) (0 . 5) (0 . 0)) ((0 . 0) (0 . 5) (0 . 5) (0 . 0))) ^~ >2 \break \once \override TieColumn.positioning-done = ##t q } { \textMark \markup { It also works with the \typewriter tieWaitForNote property. } \set tieWaitForNote = ##t c'4-\shape #'((0 . 0) (0 . -10) (0 . -10) (0 . 0)) _~ e'-\shape #'((0 . 0) (0 . -5) (0 . -5) (0 . 0)) _~ g'-\shape #'((0 . 0) (0 . -2) (0 . -2) (0 . 0)) _~ c''-\shape #'((0 . 0) (0 . 5) (0 . 5) (0 . 0)) ^~ \once \override TieColumn.positioning-done = ##t <c' e' g' c''>1 } \layout { indent = 0 \context { \Score \override TextMark.padding = #4 \override TextMark.break-align-symbols = #'(left-edge) } } \paper { score-system-spacing.padding = 3 }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < Shape individual ties in chords ] | [ Up: Staff notation ] | [ Time signature in brackets > ] |
ティック小節線
’ティック’ 小節線は、譜どうしの共通タイミングのみを示し、小節線にリズム的強勢を与えたくない場合によく使用されます。
\relative c' { \set Score.measureBarType = #"'" c4 d e f g4 f e d c4 d e f g4 f e d \bar "|." }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < ティック小節線 ] | [ Up: Staff notation ] | [ 括弧に囲まれた拍子記号 > ] |
Time signature in brackets
The time signature can be enclosed within brackets.
\relative c'' { \override Staff.TimeSignature.stencil = #(lambda (grob) (bracketify-stencil (ly:time-signature::print grob) Y 0.1 0.2 0.1)) \time 2/4 a4 b8 c }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < Time signature in brackets ] | [ Up: Staff notation ] | [ 音部記号のプロパティを調整する > ] |
括弧に囲まれた拍子記号
拍子記号は括弧で囲むことができます。
\relative c'' { \override Staff.TimeSignature.stencil = #(lambda (grob) (parenthesize-stencil (ly:time-signature::print grob) 0.1 0.4 0.4 0.1)) \time 2/4 a4 b8 c }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < 括弧に囲まれた拍子記号 ] | [ Up: Staff notation ] | [ 1 つの譜で 2 つの \partCombine を使用する > ] |
音部記号のプロパティを調整する
音部記号のグリフ、位置、オクターブ記号を変更するだけでは、変更後の音符の位置は変更されません。調号を正しい位置に表示するためには、middleCClefPosition
も設定する必要があります。これは、“ミドル C” の位置を、中央の譜線を 0、上方向を正、下方向を負として設定します。
例えば、\clef "treble_8" は、clefGlyph, clefPosition,
(音部記号自体の縦位置) middleCPosition, clefTransposition
を設定するのと同等です。これらのプロパティの (middleCPosition を除く)
どれかが変更された場合、新たに音部記号が表示されます。
次の例は、これらのプロパティを手動でセットする方法を示しています。最初の行では音部記号と音符の位置関係は通常通りですが、次の行ではそうではありません。
{ % The default treble clef. \key f \major c'1 % The standard bass clef \set Staff.clefGlyph = "clefs.F" \set Staff.clefPosition = 2 \set Staff.middleCPosition = 6 \set Staff.middleCClefPosition = 6 \key g \major c'1 % The baritone clef. \set Staff.clefGlyph = "clefs.C" \set Staff.clefPosition = 4 \set Staff.middleCPosition = 4 \set Staff.middleCClefPosition = 4 \key f \major c'1 % The standard choral tenor clef. \set Staff.clefGlyph = "clefs.G" \set Staff.clefPosition = -2 \set Staff.clefTransposition = -7 \set Staff.middleCPosition = 1 \set Staff.middleCClefPosition = 1 \key f \major c'1 % A non-standard clef. \set Staff.clefPosition = 0 \set Staff.clefTransposition = 0 \set Staff.middleCPosition = -4 \set Staff.middleCClefPosition = -4 \key g \major c'1 \break % The following clef changes do not preserve % the normal relationship between notes, key signatures % and clefs. \set Staff.clefGlyph = "clefs.F" \set Staff.clefPosition = 2 c'1 \set Staff.clefGlyph = "clefs.G" c'1 \set Staff.clefGlyph = "clefs.C" c'1 \set Staff.clefTransposition = 7 c'1 \set Staff.clefTransposition = 0 \set Staff.clefPosition = 0 c'1 % Return to the normal clef. \set Staff.middleCPosition = 0 c'1 }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < 音部記号のプロパティを調整する ] | [ Up: Staff notation ] | [ 譜グループの先頭に角括弧を使用する > ] |
1 つの譜で 2 つの \partCombine を使用する
\partCombine 関数は 2 パートの音楽表記を取り、パートがどのように結合されるかに応じて、“two”, “one”,
“solo”, “chords” の 4 つの Voice に配置します。\partCombine によって出力されたボイスは、それぞれがレイアウト
プロパティを持ち、通常の方法で調整することができます。ここでは、\partCombine を拡張し、4 つのボイスを 1 つの譜を結合する作業を簡単にしています。
soprano = { d’4 | cis’ b e’ d’8 cis’ | cis’2 b } alto = { fis4 | e8 fis gis ais b4 b | b ais fis2 } tenor = { a8 b | cis’ dis’ e’4 b8 cis’ d’4 | gis cis’ dis’2 } bass = { fis8 gis | a4 gis g fis | eis fis b,2 }
\new Staff << \key b\minor \clef alto \partial 4 \transpose b b’ \partCombineUp \soprano \alto \partCombineDown \tenor \bass >>
customPartCombineUp = #(define-music-function (part1 part2) (ly:music? ly:music?) "Make an up-stem `VoiceBox` context that combines PART1 and PART2. The context is called 'Up'; internally, the function calls `\\partCombineUp`." #{ \new VoiceBox = "Up" << \context Voice = "one" { \voiceOne } \context Voice = "two" { \voiceThree } \context Voice = "shared" { \voiceOne } \context Voice = "solo" { \voiceOne } \context NullVoice = "null" {} \partCombine #part1 #part2 >> #}) customPartCombineDown = #(define-music-function (part3 part4) (ly:music? ly:music?) "Make a down-stem `VoiceBox` context that combines PART3 and PART4. The context is called 'Down'; internally, the function calls `\\partCombineDown`." #{ \new VoiceBox = "Down" << \set VoiceBox.soloText = #"Solo III" \set VoiceBox.soloIIText = #"Solo IV" \context Voice ="one" { \voiceFour } \context Voice ="two" { \voiceTwo } \context Voice ="shared" { \voiceFour } \context Voice ="solo" { \voiceFour } \context NullVoice = "null" {} \partCombine #part3 #part4 >> #}) soprano = { d'4 | cis' b e' d'8 cis' | cis'2 b } alto = { fis4 | e8 fis gis ais b4 b | b ais fis2 } tenor = { a8 b | cis' dis' e'4 b8 cis' d'4 | gis cis' dis'2 } bass = { fis8 gis | a4 gis g fis | eis fis b,2 } \new Staff << \key b\minor \clef alto \partial 4 \transpose b b' \customPartCombineUp \soprano \alto \customPartCombineDown \tenor \bass >> \layout { \context { \Staff \accepts "VoiceBox" } \context { \name "VoiceBox" \type "Engraver_group" \defaultchild "Voice" \accepts "Voice" \accepts "NullVoice" } }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < 1 つの譜で 2 つの \partCombine を使用する ] | [ Up: Staff notation ] | [ Using \autoChange with more than one voice > ] |
譜グループの先頭に角括弧を使用する
システム開始の境界線 SystemStartSquare は StaffGroup
または ChoirStaff で明示的にセットすることで使用することができます。
\score { \new StaffGroup { << \set StaffGroup.systemStartDelimiter = #'SystemStartSquare \new Staff { c'4 d' e' f' } \new Staff { c'4 d' e' f' } >> } }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < 譜グループの先頭に角括弧を使用する ] | [ Up: Staff notation ] | [ Using mark lines in a Frenched score > ] |
Using \autoChange with more than one voice
Here is a demonstration of how to use \autoChange with more
than one voice.
\score { \new PianoStaff << \new Staff = "up" { << \set Timing.beamExceptions = #'() \set Timing.beatStructure = #'(4) \new Voice { \voiceOne \autoChange \relative c' { g8 a b c d e f g g,8 a b c d e f g } } \new Voice { \voiceTwo \autoChange \relative c' { g8 a b c d e f g g,,8 a b c d e f g } } >> } \new Staff = "down" { \clef bass } >> }
Using mark lines in a Frenched score
Using MarkLine contexts (such as in “Placing rehearsal marks
other than above the top staff”) in a Frenched score can be problematic
if all the staves between two MarkLines are removed in one
system. The Keep_alive_together_engraver can be used within each
StaffGroup to keep the MarkLine alive only as long as the
other staves in the group stay alive.
bars = { \tempo "Allegro" 4=120 s1*2 \repeat unfold 5 { \mark \default s1*2 } \bar "||" \tempo "Adagio" 4=40 s1*2 \repeat unfold 8 { \mark \default s1*2 } \bar "|." } winds = \repeat unfold 120 { c''4 } trumpet = { \repeat unfold 8 g'2 R1*16 \repeat unfold 4 g'2 R1*8 } trombone = { \repeat unfold 4 c'1 R1*8 d'1 R1*17 } strings = \repeat unfold 240 { c''8 } #(set-global-staff-size 16) \paper { systems-per-page = 5 ragged-last-bottom = ##f tagline = ##f } \layout { indent = 16\mm short-indent = 5\mm \context { \name MarkLine \type Engraver_group \consists Output_property_engraver \consists Axis_group_engraver \consists Mark_engraver \consists Metronome_mark_engraver \consists Staff_collecting_engraver \override VerticalAxisGroup.remove-empty = ##t \override VerticalAxisGroup.remove-layer = #'any \override VerticalAxisGroup.staff-affinity = #DOWN \override VerticalAxisGroup.nonstaff-relatedstaff-spacing.padding = 1 keepAliveInterfaces = #'() } \context { \Staff \override VerticalAxisGroup.remove-empty = ##t \override VerticalAxisGroup.remove-layer = ##f } \context { \StaffGroup \accepts MarkLine \consists Keep_alive_together_engraver } \context { \Score \remove Mark_engraver \remove Metronome_mark_engraver \remove Staff_collecting_engraver \override BarNumber.Y-offset = #3 } } \score { << \new StaffGroup = "winds" \with { instrumentName = "Winds" shortInstrumentName = "W." } << \new MarkLine \bars \new Staff \winds >> \new StaffGroup = "brass" << \new MarkLine \bars \new Staff = "trumpet" \with { instrumentName = "Trumpet" shortInstrumentName = "Tp." } \trumpet \new Staff = "trombone" \with { instrumentName = "Trombone" shortInstrumentName = "Tb." } \trombone >> \new StaffGroup = "strings" \with { instrumentName = "Strings" shortInstrumentName = "Str." } << \new MarkLine \bars \new Staff = "strings" { \strings } >> >> }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < Using mark lines in a Frenched score ] | [ Up: Staff notation ] | [ 繰り返し括弧をコード ネームの下に表示する > ] |
Vertically aligned StaffGroups without connecting SystemStartBar
This snippet shows how to achieve vertically aligned StaffGroups
with a SystemStartBar for each StaffGroup, but without
connecting them.
Note that this only works properly for music that can be printed as a single system.
#(set-global-staff-size 15) \paper { ragged-right = ##f print-all-headers = ##t tagline = ##f } \layout { indent = 0 \context { \StaffGroup \consists Text_mark_engraver \consists Staff_collecting_engraver systemStartDelimiterHierarchy = #'(SystemStartBrace (SystemStartBracket a b)) } \context { \Score \remove Text_mark_engraver \remove Staff_collecting_engraver \override SystemStartBrace.style = #'bar-line \omit SystemStartBar \override SystemStartBrace.padding = #-0.1 \override SystemStartBrace.thickness = #1.6 \override StaffGrouper.staffgroup-staff-spacing.basic-distance = #15 } } %%%% EXAMPLE txt = \lyricmode { Wer4 nur den lie -- ben Gott läßt wal2 -- ten4 und4 hof -- fet auf ihn al -- le Zeit2. } % First StaffGroup "exercise" eI = \relative c' { \textMark \markup { \bold Teacher: This is a simple setting of the choral. Please improve it. } \key a \minor \time 4/4 \voiceOne \partial 4 e4 a b c b a b gis2 e4\fermata g! g f e a a gis a2.\fermata \bar ":|." } eII = \relative c' { \key a \minor \time 4/4 \voiceTwo \partial 4 c4 e e e gis a f e2 b4 b d d c c d d c2. \bar ":|." } eIII = \relative c' { \key a \minor \time 4/4 \clef bass \voiceOne \partial 4 a4 c b a b c d b2 gis4 g g b c a f e e2. } eIV = \relative c' { \key a \minor \time 4/4 \clef bass \voiceTwo \partial 4 a,4 a' gis a e a, d e2 e,4\fermata e' b g c f d e a,2.\fermata \bar ":|." } exercise = \new StaffGroup = "exercise" << \new Staff << \new Voice \eI \new Voice \eII >> \new Lyrics \txt \new Staff << \new Voice \eIII \new Voice \eIV >> >> % Second StaffGroup "simple Bach" sbI = \relative c' { \textMark \markup { \bold" Pupil:" Here's my version! } \key a \minor \time 4/4 \voiceOne \partial 4 e4 a b c b a b gis2 e4\fermata g! g f e a a gis a2.\fermata \bar ":|." } sbII = \relative c' { \key a \minor \time 4/4 \voiceTwo \partial 4 c8 d e4 e e8 f g4 f f e2 b4 b8 c d4 d e8 d c4 b8 c d4 c2. \bar ":|." } sbIII = \relative c' { \key a \minor \time 4/4 \clef bass \voiceOne \partial 4 a8 b c4 b a b8 c d4 d8 c b2 gis4 g g8 a b4 b a8 g f4 e e2. } sbIV = \relative c' { \key a \minor \time 4/4 \clef bass \voiceTwo \partial 4 a,4 a' gis a e f8 e d4 e2 e,4\fermata e' b a8 g c4 f8 e d4 e a,2.\fermata \bar ":|." } simpleBach = \new StaffGroup = "simple Bach" << \new Staff << \new Voice \sbI \new Voice \sbII >> \new Lyrics \txt \new Staff << \new Voice \sbIII \new Voice \sbIV >> >> % Third StaffGroup "chromatic Bach" cbI = \relative c' { \textMark \markup { \bold "Teacher:" \column { "Well, you simply copied and transposed a version of J.S.Bach." "Do you know this one?" } } \key a \minor \time 4/4 \voiceOne \partial 4 e4 a b c b a b gis4. fis8 e4\fermata g! g f e a a8 b gis4 a2.\fermata \bar ":|." } cbII = \relative c' { \key a \minor \time 4/4 \voiceTwo \partial 4 c8 d e4 e e8 fis gis4 a8 g! f!4 e2 b4 e e d d8[ cis] d dis e fis e4 e2. \bar ":|." } cbIII = \relative c' { \key a \minor \time 4/4 \clef bass \voiceOne \partial 4 a8 b c[ b] a gis8 a4 d, e8[ e'] d c b4. a8 gis4 b c d8 c b[ a] a b c b b c16 d c2. } cbIV = \relative c' { \key a \minor \time 4/4 \clef bass \voiceTwo \partial 4 a4 c, e a, b c d e2 e4\fermata e a b8 c gis[ g] fis f e dis e4 a,2.\fermata \bar ":|." } chromaticBach = \new StaffGroup = "chromatic Bach" << \new Staff << \new Voice \cbI \new Voice \cbII >> \new Lyrics \txt \new Staff << \new Voice \cbIII \new Voice \cbIV >> >> % Score \score { << \exercise \simpleBach \chromaticBach >> \header { title = \markup \column { \combine \null \vspace #1 "Exercise: Improve the given choral" " " } } \layout { \context { \Lyrics \override LyricText.X-offset = #-1 } } }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < Vertically aligned StaffGroups without connecting SystemStartBar ] | [ Up: Staff notation ] | [ Volta brackets in multiple staves > ] |
繰り返し括弧をコード ネームの下に表示する
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" } } }
| [ << Staff notation ] | [Top][Contents] | [ Editorial annotations >> ] |
| [ < 繰り返し括弧をコード ネームの下に表示する ] | [ Up: Staff notation ] | [ Editorial annotations > ] |
Volta brackets in multiple staves
By adding the Volta_engraver to the relevant staff, volte can be
put over staves other than the topmost one in a score.
\repeat and related commands should be present in all staves.
voltaMusic = \relative c'' { \repeat volta 2 { c1 \alternative { \volta 1 { d1 } \volta 2 { e1 } } } } << \new StaffGroup << \new Staff \voltaMusic \new Staff \voltaMusic >> \new StaffGroup << \new Staff \with { \consists "Volta_engraver" } \voltaMusic \new Staff \voltaMusic >> >>
| [ << Staff notation ] | [Top][Contents] | [ Text >> ] |
| [ < Volta brackets in multiple staves ] | [ Up: Top ] | [ 楽譜に運指記号を追加する > ] |
7 Editorial annotations
See also Editorial annotations.
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < Editorial annotations ] | [ Up: Editorial annotations ] | [ オブジェクトにリンクを追加する > ] |
楽譜に運指記号を追加する
単純な構文で運指記号を追加することができます。
\relative c'' { c4-1 d-2 f-4 e-3 }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < 楽譜に運指記号を追加する ] | [ Up: Editorial annotations ] | [ タブ譜にマークアップを追加する > ] |
オブジェクトにリンクを追加する
grob-stencil にリンクを追加する場合、ここに定義されている add-link を使用することができます。\override や \tweak と動作します。ただし、リンクが設定された Grob は point-and-click が無効になります。
制限: PDF でのみ動作します。
リンクされたオブジェクトに色が付いているのは、別のコマンドによるものです。
#(define (add-link url-strg) (lambda (grob) (let* ((stil (ly:grob-property grob 'stencil))) (if (ly:stencil? stil) (let* ((x-ext (ly:stencil-extent stil X)) (y-ext (ly:stencil-extent stil Y)) (url-expr `(url-link ,url-strg ,x-ext ,y-ext)) (new-stil (ly:stencil-add (ly:make-stencil url-expr x-ext y-ext) stil))) (ly:grob-set-property! grob 'stencil new-stil)))))) %%%% test %% For easier maintenance of this snippet the URL is formatted to use the %% actually used LilyPond version. %% Of course a literal URL would work as well. #(define major.minor-version (string-join (take (string-split (lilypond-version) #\.) 2) ".")) urlI = #(format #f "http://lilypond.org/doc/v~a/Documentation/notation/writing-pitches" major.minor-version) urlII = #(format #f "http://lilypond.org/doc/v~a/Documentation/notation/rhythms" major.minor-version) urlIII = #(format #f "http://lilypond.org/doc/v~a/Documentation/notation/note-heads" major.minor-version) urlIV = #(format #f "http://lilypond.org/doc/v~a/Documentation/notation/beams" major.minor-version) urlV = #(format #f "http://lilypond.org/doc/v~a/Documentation/notation/note-head-styles" major.minor-version) urlVI = #(format #f "http://lilypond.org/doc/v~a/Documentation/notation/writing-pitches" major.minor-version) \relative c' { \key cis \minor \once \override Staff.Clef.color = #green \once \override Staff.Clef.after-line-breaking = #(add-link urlI) \once \override Staff.TimeSignature.color = #green \once \override Staff.TimeSignature.after-line-breaking = #(add-link urlII) \once \override NoteHead.color = #green \once \override NoteHead.after-line-breaking = #(add-link urlIII) cis'1 \once \override Beam.color = #green \once \override Beam.after-line-breaking = #(add-link urlIV) cis8 dis e fis gis2 <gis, \tweak Accidental.color #green \tweak Accidental.after-line-breaking #(add-link urlVI) \tweak color #green \tweak after-line-breaking #(add-link urlV) \tweak style #'harmonic bis dis fis >1 <cis, cis' e> }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < オブジェクトにリンクを追加する ] | [ Up: Editorial annotations ] | [ 運指記号を譜の内側に表示する > ] |
タブ譜にマークアップを追加する
デフォルトでは、タブ譜にマークアップは表示されません。表示させるには、\revert TabStaff.TextScript.stencil を使用します。
high = { r4 r8 <g c'> q r8 r4 } low = { c4 r4 c8 r8 g,8 b, } pulse = { s8^"1" s^"&" s^"2" s^"&" s^"3" s^"&" s^"4" s^"&" } \score { \new TabStaff { \repeat unfold 2 << \high \\ \low \\ \pulse >> } \layout { \context { \TabStaff \clef moderntab \revert TextScript.stencil \override TextScript.font-series = #'bold \override TextScript.font-size = #-2 \override TextScript.color = #red } \context { \Score proportionalNotationDuration = #1/8 } } }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < タブ譜にマークアップを追加する ] | [ Up: Editorial annotations ] | [ 小節番号を変更する > ] |
運指記号を譜の内側に表示する
デフォルトでは、縦方向の運指記号は譜の外側に配置されます。この挙動を取り消すことができます。注意: この場合、和音でない場合にも <> を用いる必要があります。
\relative c' { <c-1 e-2 g-3 b-5>2 \override Fingering.staff-padding = #'() <c-1 e-2 g-3 b-5>4 g'-0 a8[-1 b]-2 g-0 r \override Fingering.add-stem-support = ##f a[-1 b]-2 g-0 r \override Fingering.add-stem-support = ##t a[-1 b]-2 g-0 r \override Fingering.add-stem-support = #only-if-beamed a[-1 b]-2 g-0 r }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < 運指記号を譜の内側に表示する ] | [ Up: Editorial annotations ] | [ 分析用のブラケットを譜の上に表示する > ] |
小節番号を変更する
小節番号を付番する異なる方法が 2 つあり、繰り返しのある音楽に対して有用です。
music = \relative c' { \repeat volta 3 { c4 d e f | \alternative { \volta 1 { c4 d e f | c2 d \break } \volta 2 { f4 g a b | f4 g a b | f2 a | \break } \volta 3 { c4 d e f | c2 d } } } c1 \bar "|." } \markup "default" { \music } \markup \typewriter "numbers" { \set Score.alternativeNumberingStyle = #'numbers \music } \markup \typewriter "numbers-with-letters" { \set Score.alternativeNumberingStyle = #'numbers-with-letters \music }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < 小節番号を変更する ] | [ Up: Editorial annotations ] | [ ラベル付きの分析用ブラケット > ] |
分析用のブラケットを譜の上に表示する
分析用のブラケットは、デフォルトでは譜の下に表示されます。次の例は譜の上に表示する方法を示しています。
\layout { \context { \Voice \consists "Horizontal_bracket_engraver" } } \relative c'' { \once \override HorizontalBracket.direction = #UP c2\startGroup d2\stopGroup }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < 分析用のブラケットを譜の上に表示する ] | [ Up: Editorial annotations ] | [ 音階に応じて異なる符頭のスタイルを適用する > ] |
ラベル付きの分析用ブラケット
Grob HorizontalBracketText の text プロパティを設定することで、分析用のブラケットにテキストを追加することができます。同時に開始するブラケットに異なるテキストを追加する場合には、\tweak
コマンドを使用してください。改行後のテキストは括弧付きで表示されます。
\layout { \context { \Voice \consists "Horizontal_bracket_engraver" \override HorizontalBracket.direction = #UP } } { \once\override HorizontalBracketText.text = "a" c''\startGroup d''\stopGroup \once\override HorizontalBracketText.text = "a'" e''\startGroup d''\stopGroup | c''-\tweak HorizontalBracketText.text \markup \bold \huge "b" \startGroup -\tweak HorizontalBracketText.text "a" \startGroup d''\stopGroup e''-\tweak HorizontalBracketText.text "a'" \startGroup d''\stopGroup\stopGroup | c''-\tweak HorizontalBracketText.text foo \startGroup d'' e'' f'' | \break g'' a'' b'' c'''\stopGroup }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < ラベル付きの分析用ブラケット ] | [ Up: Editorial annotations ] | [ \whiteout コマンドで譜線を隠す > ] |
音階に応じて異なる符頭のスタイルを適用する
shapeNoteStyles プロパティは、音階
(調号と、tonic プロパティによる) に応じて符頭の形を変化させるために用いることができます。このプロパティは形のセットを与える必要がありますが、(triangle, cross, xcircle などの図形表現を用いて) 自由に定義できるほか、階名を使用して、アメリカの古い伝統の形を基に定義することができます (いくつかのラテン語の階名も使用することができます)。
古いアメリカの歌集を模倣するには、\aikenHeads や
\sacredHarpHeads といった定義済みのコマンドを符頭のスタイルとして用いることができます。
この例では、シェイプ ノートの符頭を得るいくつかの方法を示しています。また、和声機能と符頭の対応を維持しながらメロディを移調する機能も示しています。
fragment = { \key c \major c2 d e2 f g2 a b2 c } \new Staff { \transpose c d \relative c' { \set shapeNoteStyles = ##(do re mi fa #f la ti) \fragment } \break \relative c' { \set shapeNoteStyles = ##(cross triangle fa #f mensural xcircle diamond) \fragment } }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < 音階に応じて異なる符頭のスタイルを適用する ] | [ Up: Editorial annotations ] | [ Changing a single note’s size in a chord > ] |
\whiteout コマンドで譜線を隠す
\whiteout コマンドは、マークアップの背景を白色の長方形で囲みます。譜線はほとんどの Grob より下のレイヤにあるため、この白色の長方形は他の Grob と重ならなくなります。
\layout { ragged-right = ##f } \relative c' { \override TextScript.extra-offset = #'(2 . 4) c2-\markup { \whiteout \pad-markup #0.5 "middle C" } c }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < \whiteout コマンドで譜線を隠す ] | [ Up: Editorial annotations ] | [ スラーを実線から点線や破線に変更する > ] |
Changing a single note’s size in a chord
Individual note heads in a chord can be modified with the
\tweak command inside a chord, by altering the font-size
property.
Inside the chord (within the brackets < >), before the note to
be altered, place the \tweak command, followed by
font-size and define the proper size like #-2 (a tiny
note head).
\relative c' { <\tweak font-size #+2 c e g c \tweak font-size #-2 e>1 ^\markup { A tiny e }_\markup { A big c } }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < Changing a single note’s size in a chord ] | [ Up: Editorial annotations ] | [ ピッチに応じて符頭の色を変更する > ] |
スラーを実線から点線や破線に変更する
スラーの見た目を実線から点線や破線に変更することができます。
\relative c' { c4( d e c) \slurDotted c4( d e c) \slurSolid c4( d e c) \slurDashed c4( d e c) \slurSolid c4( d e c) }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < スラーを実線から点線や破線に変更する ] | [ Up: Editorial annotations ] | [ 和音内の運指記号の位置をコントロールする > ] |
ピッチに応じて符頭の色を変更する
符頭の色を、ピッチや名前に応じて変更することができます: この例で使われている関数では、異名同音を区別しています。
% Association list of pitches to colors. #(define color-mapping (list (cons (ly:make-pitch 0 0 NATURAL) (x11-color 'red)) (cons (ly:make-pitch 0 0 SHARP) (x11-color 'green)) (cons (ly:make-pitch 0 1 FLAT) (x11-color 'green)) (cons (ly:make-pitch 0 2 NATURAL) (x11-color 'red)) (cons (ly:make-pitch 0 2 SHARP) (x11-color 'green)) (cons (ly:make-pitch 0 3 FLAT) (x11-color 'red)) (cons (ly:make-pitch 0 3 NATURAL) (x11-color 'green)) (cons (ly:make-pitch 0 4 SHARP) (x11-color 'red)) (cons (ly:make-pitch 0 5 NATURAL) (x11-color 'green)) (cons (ly:make-pitch 0 5 FLAT) (x11-color 'red)) (cons (ly:make-pitch 0 6 SHARP) (x11-color 'red)) (cons (ly:make-pitch 0 1 NATURAL) (x11-color 'blue)) (cons (ly:make-pitch 0 3 SHARP) (x11-color 'blue)) (cons (ly:make-pitch 0 4 FLAT) (x11-color 'blue)) (cons (ly:make-pitch 0 5 SHARP) (x11-color 'blue)) (cons (ly:make-pitch 0 6 FLAT) (x11-color 'blue)))) % Compare pitch and alteration (not octave). #(define (pitch-equals? p1 p2) (and (= (ly:pitch-alteration p1) (ly:pitch-alteration p2)) (= (ly:pitch-notename p1) (ly:pitch-notename p2)))) #(define (pitch-to-color pitch) (let ((color (assoc pitch color-mapping pitch-equals?))) (if color (cdr color)))) #(define (color-notehead grob) (pitch-to-color (ly:event-property (event-cause grob) 'pitch))) \score { \new Staff \relative c' { \override NoteHead.color = #color-notehead c8 b d dis ees f g aes } }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < ピッチに応じて符頭の色を変更する ] | [ Up: Editorial annotations ] | [ 遅れターンを作成する > ] |
和音内の運指記号の位置をコントロールする
運指番号の位置を精密にコントロールすることができます。位置の設定が適用されるためには、単一の音符であっても和音構造 <> を用いる必要があります。
\relative c' { \set fingeringOrientations = #'(left) <c-1 e-3 a-5>4 \set fingeringOrientations = #'(down) <c-1 e-3 a-5>4 \set fingeringOrientations = #'(down right up) <c-1 e-3 a-5>4 \set fingeringOrientations = #'(up) <c-1 e-3 a-5>4 \set fingeringOrientations = #'(left) <c-1>2 \set fingeringOrientations = #'(down) <e-3>2 \set stringNumberOrientations = #'(up left down) <f\3 a\2 c\1>1 \set strokeFingerOrientations = #'(down right up) <c\rightHandFinger 1 e\rightHandFinger 2 c'\rightHandFinger 4 > }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < 和音内の運指記号の位置をコントロールする ] | [ Up: Editorial annotations ] | [ 空の譜を作成する > ] |
遅れターンを作成する
下の音符が臨時記号を持つような遅れターンを作るには、いくつかのオーバライドが必要です。outside-staff-priority プロパティを #f にセットしなければ、avoid-slur プロパティよりも優先されてしまい、スラーの内側に記号が入りません。分数 2/3 と 1/3 は、水平位置を調整しています。
\relative c'' { \after 2*2/3 \turn c2( d4) r | \after 4 \turn c4.( d8) \after 4 { \once \set suggestAccidentals = ##t \once \override AccidentalSuggestion.outside-staff-priority = ##f \once \override AccidentalSuggestion.avoid-slur = #'inside \once \override AccidentalSuggestion.font-size = -3 \once \override AccidentalSuggestion.script-priority = -1 \once \hideNotes cis8\turn \noBeam } d4.( e8) }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < 遅れターンを作成する ] | [ Up: Editorial annotations ] | [ 2 桁の運指記号を作成する > ] |
空の譜を作成する
空の譜を作成するには、空の小節を作って Score コンテキストから
Bar_number_engraver を削除します。また Staff コンテキストから
Time_signature_engraver, Clef_engraver, Bar_engraver
を削除します。
#(set-global-staff-size 10) % for the documentation % #(set-global-staff-size 20) % for letter and A4 \book { \score { { \repeat unfold 12 { s1 \break } } \layout { indent = 0 \context { \Staff \remove "Time_signature_engraver" \remove "Clef_engraver" \remove "Bar_engraver" } \context { \Score \remove "Bar_number_engraver" } } } % for the documentation \paper { #(set-paper-size "a6") ragged-last-bottom = ##f line-width = 90\mm left-margin = 7.5\mm bottom-margin = 5\mm top-margin = 5\mm tagline = ##f } % uncomment these lines for "letter" size %{ \paper { #(set-paper-size "letter") ragged-last-bottom = ##f line-width = 7.5\in left-margin = 0.5\in bottom-margin = 0.25\in top-margin = 0.25\in tagline = ##f } %} % uncomment these lines for "A4" size %{ \paper { #(set-paper-size "a4") ragged-last-bottom = ##f line-width = 180\mm left-margin = 15\mm bottom-margin = 10\mm top-margin = 10\mm tagline = ##f } %} }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < 空の譜を作成する ] | [ Up: Editorial annotations ] | [ 譜の中央にある音符の符幹のデフォルトの向き > ] |
2 桁の運指記号を作成する
5 よりも大きな運指記号を作成することができます。
\relative c' { c1-10 c1-50 c1-36 c1-29 }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < 2 桁の運指記号を作成する ] | [ Up: Editorial annotations ] | [ Different font size settings for instrumentName and shortInstrumentName > ] |
譜の中央にある音符の符幹のデフォルトの向き
譜の中央にある音符の符幹の向きは、Stem の neutral-direction
プロパティにセットされています。
\relative c'' { a4 b c b \override Stem.neutral-direction = #up a4 b c b \override Stem.neutral-direction = #down a4 b c b }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < 譜の中央にある音符の符幹のデフォルトの向き ] | [ Up: Editorial annotations ] | [ Grob の周りにボックスを表示する > ] |
Different font size settings for instrumentName and shortInstrumentName
Choose different font sizes for instrumentName and
shortInstrumentName as a context override.
InstrumentNameFontSize = #(define-music-function (font-size-pair) (pair?) "Set the font size of `InstrumentName` grobs. The first value of FONT-SIZE-PAIR sets the font size of the initial `instrumentName` property, the second value sets the font size of `shortInstrumentName`." ;; This code could be changed or extended to set different values ;; for each occurrence of `shortInstrumentName'. #{ \override InstrumentName.after-line-breaking = #(lambda (grob) (let* ((orig (ly:grob-original grob)) (siblings (if (ly:grob? orig) (ly:spanner-broken-into orig) '()))) (when (pair? siblings) (ly:grob-set-property! (car siblings) 'font-size (car font-size-pair)) (for-each (lambda (g) (ly:grob-set-property! g 'font-size (cdr font-size-pair))) (cdr siblings))))) #}) \layout { indent = 3\cm short-indent = 0.8\cm \context { \Staff \InstrumentNameFontSize #'(6 . -3) } } \new StaffGroup << \new Staff \with { instrumentName = "Flute" shortInstrumentName = "Fl." } { c''1 \break c'' \break c'' } \new Staff \with { instrumentName = "Violin" shortInstrumentName = "Vl." } { c''1 \break c'' \break c'' } >>
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < Different font size settings for instrumentName and shortInstrumentName ] | [ Up: Editorial annotations ] | [ 符頭の周りを円で囲む > ] |
Grob の周りにボックスを表示する
任意の Grob の周りにボックスを表示するために、print-function をオーバライドすることができます。
\relative c'' { \once \override TextScript.stencil = #(make-stencil-boxer 0.1 0.3 ly:text-interface::print) c'4^"foo" \tweak Stem.stencil #(make-stencil-boxer 0.05 0.25 ly:stem::print) b8 c4.^"bar" c4 \override Score.RehearsalMark.stencil = #(make-stencil-boxer 0.15 0.3 ly:text-interface::print) \mark \default c1 }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < Grob の周りにボックスを表示する ] | [ Up: Editorial annotations ] | [ 様々なオブジェクトの周りを円で囲む > ] |
符頭の周りを円で囲む
符頭を円で囲む方法です。
circle = \tweak NoteHead.stencil #(lambda (grob) (let* ((note (ly:note-head::print grob)) (combo-stencil (ly:stencil-add note (circle-stencil note 0.1 0.8)))) (ly:make-stencil (ly:stencil-expr combo-stencil) (ly:stencil-extent note X) (ly:stencil-extent note Y)))) \etc { \circle c'' }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < 符頭の周りを円で囲む ] | [ Up: Editorial annotations ] | [ \markup ブロックにネイティブ PostScript を埋め込む > ] |
様々なオブジェクトの周りを円で囲む
\circle マークアップ コマンドは、様々なオブジェクトの周りに円を描画します (例えば運指記号)。他のオブジェクトに対しては、調整が必要な場合があります: この例は、リハーサル記号と小節番号に対して円を描画する 2 つの方法を示しています。
\relative c' { c1 \set Score.rehearsalMarkFormatter = #(lambda (mark context) (make-circle-markup (format-mark-numbers mark context))) \mark \default c2 d^\markup { \override #'(thickness . 3) { \circle foo } } \override Score.BarNumber.break-visibility = #all-visible \override Score.BarNumber.stencil = #(make-stencil-circler 0.1 0.25 ly:text-interface::print) }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < 様々なオブジェクトの周りを円で囲む ] | [ Up: Editorial annotations ] | [ Generate special note head shapes > ] |
\markup ブロックにネイティブ PostScript を埋め込む
\markup ブロックに直接 PostScript コードを挿入することができます。
\relative c'' { a2-\markup \postscript "0 3 moveto 5 2 rlineto stroke" -\markup \postscript "[1 1] 0 setdash 0 0 moveto 5 2 rlineto stroke" b2-\markup \postscript "1 1 moveto 0 0 1 2 8 4 10 2 rcurveto stroke" a'1 }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < \markup ブロックにネイティブ PostScript を埋め込む ] | [ Up: Editorial annotations ] | [ グリッド線: 見た目を変更する > ] |
Generate special note head shapes
When a note head with a special shape cannot easily be generated with
graphic markup, a drawing specification for ly:make-stencil can
be used to generate the shape. This example gives an example for a
parallelogram-shaped note head.
Unfortunately, the available commands in a drawing specification are
currently not
documented; in any case, the used path sub-command has the
following signature, quite similar to the make-path-stencil
Scheme function.
(path thickness command-list line-cap-style line-join-style fill)
The commands in command-list resemble PostScript drawing commands but with arguments after the command name.
parallelogram = #(ly:make-stencil '(path 0.1 (rmoveto 0 0.25 lineto 1.2 0.75 lineto 1.2 -0.25 lineto 0 -0.75 lineto 0 0.25) round round #t) (cons -0.05 1.25) (cons -.75 .75)) myNoteHeads = \override NoteHead.stencil = \parallelogram normalNoteHeads = \revert NoteHead.stencil \relative c'' { \myNoteHeads g4 d' \normalNoteHeads <f, \tweak stencil \parallelogram b e>4 d }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < Generate special note head shapes ] | [ Up: Editorial annotations ] | [ グリッド線: リズムの強調と音符の同期 > ] |
グリッド線: 見た目を変更する
グリッド線の見た目は、プロパティをオーバライドすることで変更することができます。
\new ChoirStaff << \new Staff { \relative c'' { \stemUp c'4. d8 e8 f g4 } } \new Staff { \relative c { % this moves them up one staff space from the default position \override Score.GridLine.extra-offset = #'(0.0 . 1.0) \stemDown \clef bass \once \override Score.GridLine.thickness = 5.0 c4 \once \override Score.GridLine.thickness = 1.0 g'4 \once \override Score.GridLine.thickness = 3.0 f4 \once \override Score.GridLine.thickness = 5.0 e4 } } >> \layout { \context { \Staff % set up grids \consists "Grid_point_engraver" % set the grid interval to one quarter note gridInterval = #1/4 } \context { \Score \consists "Grid_line_span_engraver" % this moves them to the right half a staff space \override NoteColumn.X-offset = -0.5 } }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < グリッド線: 見た目を変更する ] | [ Up: Editorial annotations ] | [ ハンマリング オンとプリング オフ > ] |
グリッド線: リズムの強調と音符の同期
一定の拍毎に、譜どうしの音符の同期を示す縦線を描画することができます。しかし、モノフォニックな音楽では、このスニペットのように 2 つ目の譜を不可視にして、縦線をより短くすると良い場合があります。
\new ChoirStaff { \relative c'' << \new Staff { \time 12/8 \stemUp c4. d8 e8 f g4 f8 e8. d16 c8 } \new Staff { % hides staff and notes so that only the grid lines are visible \hideNotes \hide Staff.BarLine \override Staff.StaffSymbol.line-count = #0 \hide Staff.TimeSignature \hide Staff.Clef % dummy notes to force regular note spacing \once \override Score.GridLine.thickness = #4.0 c8 c c \once \override Score.GridLine.thickness = #3.0 c8 c c \once \override Score.GridLine.thickness = #4.0 c8 c c \once \override Score.GridLine.thickness = #3.0 c8 c c } >> } \layout { \context { \Score \consists "Grid_line_span_engraver" % center grid lines horizontally below note heads \override NoteColumn.X-offset = #-0.5 } \context { \Staff \consists "Grid_point_engraver" gridInterval = #1/8 % set line length and positioning: % two staff spaces above center line on hidden staff % to four spaces below center line on visible staff \override GridPoint.Y-extent = #'(2 . -4) } }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < グリッド線: リズムの強調と音符の同期 ] | [ Up: Editorial annotations ] | [ 和音に対してハンマリング オンやプリング オフを使用する > ] |
ハンマリング オンとプリング オフ
ハンマリング オンやプリング オフはスラーで得ることができます。
\new TabStaff { \relative c' { d4( e\2) a( g) } }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < ハンマリング オンとプリング オフ ] | [ Up: Editorial annotations ] | [ ボイスに対してハンマリング オンやプリング オフを使用する > ] |
和音に対してハンマリング オンやプリング オフを使用する
和音に対してハンマリング オンやプリング オフを用いる際、弧は 1 つしか描かれません。“二重の弧” は、doubleSlurs プロパティを #t にセットすることで描くことができます。
\new TabStaff { \relative c' { % chord hammer-on and pull-off \set doubleSlurs = ##t <g' b>8( <a c> <g b>) } }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < 和音に対してハンマリング オンやプリング オフを使用する ] | [ Up: Editorial annotations ] | [ いくつかの譜線を他より太くする > ] |
ボイスに対してハンマリング オンやプリング オフを使用する
ハンマリング オンやプリング オフの弧は、ボイス 1, 3 に対しては上向き、ボイス 2, 4 に対しては下向きになります。
\new TabStaff { \relative c' { << { \voiceOne g2( a) } \\ { \voiceTwo a,( b) } >> \oneVoice } }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < ボイスに対してハンマリング オンやプリング オフを使用する ] | [ Up: Editorial annotations ] | [ Marking notes of spoken parts with a cross on the stem (Sprechstimme) > ] |
いくつかの譜線を他より太くする
教育上の目的で、譜線を太くすることができます (目的の例としては、中央の線の強調や、ト音記号の線を強調することなど)。これは強調したい線のすぐ近くに新たな譜線を追加することで実現できます。譜線の追加には StaffSymbol
オブジェクトの line-positions プロパティを使用します。
{ \override Staff.StaffSymbol.line-positions = #'(-4 -2 -0.2 0 0.2 2 4) d'4 e' f' g' }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < いくつかの譜線を他より太くする ] | [ Up: Editorial annotations ] | [ Measure counters > ] |
Marking notes of spoken parts with a cross on the stem (Sprechstimme)
This example shows how to put crosses on stems. Mark the beginning of a
spoken section with the command \speakOn and end it with
\speakOff.
speakOn = \override Stem.stencil = #(lambda (grob) (let* ((x-parent (ly:grob-parent grob X)) (is-rest? (ly:grob? (ly:grob-object x-parent 'rest)))) (if is-rest? empty-stencil (ly:stencil-combine-at-edge (ly:stem::print grob) Y (- (ly:grob-property grob 'direction)) (grob-interpret-markup grob (markup #:center-align #:fontsize -4 #:musicglyph "noteheads.s2cross")) -1.7)))) speakOff = \revert Stem.stencil \new Staff { \relative c'' { a4 b a c \speakOn g4 f r g8 a b4 r r8 d e4 \speakOff c4 a g f } }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < Marking notes of spoken parts with a cross on the stem (Sprechstimme) ] | [ Up: Editorial annotations ] | [ Measure spanner > ] |
Measure counters
This snippet demonstrates the use of the
Measure_counter_engraver to number groups of successive
measures. Any stretch of measures may be numbered, whether consisting
of repetitions or not.
The engraver must be added to the appropriate context. Here, a
Staff context is used; another possibility is a Dynamics
context.
The counter is begun with \startMeasureCount and ended with
\stopMeasureCount. Numbering will start by default with 1,
but this behavior may be modified by overriding the count-from
property.
When a measure extends across a line break, the number will appear twice, the second time in parentheses.
\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 }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < Measure counters ] | [ Up: Editorial annotations ] | [ 運指記号の位置を正確にコントロールする > ] |
Measure spanner
Measure spanners are an alternate way to print annotated brackets. As opposed to horizontal brackets, they extend between two bar lines rather than two notes. The text is displayed in the center of the bracket.
\layout { \context { \Staff \consists Measure_spanner_engraver } } << \new Staff \relative c'' { \key d \minor R1*2 \tweak text "Answer" \startMeasureSpanner \tuplet 3/2 8 { a16[ b c] d[ c b] c[ d e] f[ e d] } e8 a gis g fis f e d~ d c b e \stopMeasureSpanner } \new Staff \relative c' { \key d \minor \tweak text "Subject" \tweak direction #DOWN \startMeasureSpanner \tuplet 3/2 8 { d16[ e f] g[ f e] f[ g a] bes[ a g] } a8 d cis c b bes a g~ g f e a \stopMeasureSpanner \tweak text "Counter-subject" \tweak direction #DOWN \startMeasureSpanner f8 e a r r16 b, c d e fis g e a gis a b c fis, b a gis e a4 g8 \stopMeasureSpanner } >>
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < Measure spanner ] | [ Up: Editorial annotations ] | [ テキスト マークアップをスラーの内側に配置する > ] |
運指記号の位置を正確にコントロールする
和音内の運指の配置に関するオプションは、デフォルトで良く動作しますが、ある記号の位置を正確にコントロールしたい場合には、以下の調整を用いることができます。これは 2 度音程の和音がある場合の配置に対しては特に有用です。
\markup \with-true-dimensions % work around a cropping issue \score { \relative c' { \set fingeringOrientations = #'(left) <c-1 d-2 a'-5>4 <c-1 d-\tweak extra-offset #'(0 . 0.2)-2 a'-5> \set fingeringOrientations = #'(down) <c-1 d-2 a'-5> <c-\tweak extra-offset #'(0 . -1.1)-1 d-\tweak extra-offset #'(-1.2 . -1.8)-2 a'-5> | \set fingeringOrientations = #'(down right up) <c-1 d-\tweak extra-offset #'(-0.3 . 0)-2 a'-5>4 <c-1 d-\tweak extra-offset #'(-1 . 1.2)-2 a'-5> \set fingeringOrientations = #'(up) <c-1 d-\tweak extra-offset #'(0 . 1.1)-2 a'-\tweak extra-offset #'(0 . 1)-5> <c-1 d-\tweak extra-offset #'(-1.2 . 1.5)-2 a'-\tweak extra-offset #'(0 . 1.4)-5> | } }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < 運指記号の位置を正確にコントロールする ] | [ Up: Editorial annotations ] | [ テキストを右から左へ表示する > ] |
テキスト マークアップをスラーの内側に配置する
テキスト マークアップをスラーの内側に配置するには、outside-staff-priority
プロパティを #f に設定する必要があります。
\relative c'' { \override TextScript.avoid-slur = #'inside \override TextScript.outside-staff-priority = ##f c2(^\markup { \halign #-10 \natural } d4.) c8 }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < テキスト マークアップをスラーの内側に配置する ] | [ Up: Editorial annotations ] | [ 弦番号の延長線 > ] |
テキストを右から左へ表示する
以下に示すように、マークアップ オブジェクト内でテキストを右から左へ表示することができます。
{ b1^\markup { \line { i n g i r u m i m u s n o c t e } } f'_\markup { \override #'(text-direction . -1) \line { i n g i r u m i m u s n o c t e } } }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < テキストを右から左へ表示する ] | [ Up: Editorial annotations ] | [ whiteout プロパティを使用する > ] |
弦番号の延長線
弦番号の延長線を追加し、続く音符が全て同じ弦で演奏されることを示します。
stringNumberSpanner = #(define-music-function (StringNumber) (string?) #{ \override TextSpanner.style = #'solid \override TextSpanner.font-size = #-5 \override TextSpanner.bound-details.left.stencil-align-dir-y = #CENTER \override TextSpanner.bound-details.left.text = \markup { \circle \number $StringNumber } #}) \relative c { \clef "treble_8" \textSpannerDown \stringNumberSpanner "5" a8\startTextSpan b c d e f\stopTextSpan \stringNumberSpanner "4" g\startTextSpan a | bes4 a g2\stopTextSpan }
| [ << Editorial annotations ] | [Top][Contents] | [ Text >> ] |
| [ < 弦番号の延長線 ] | [ Up: Editorial annotations ] | [ Text > ] |
whiteout プロパティを使用する
下にあるオブジェクトの一部分をマスクするために、任意のグラフィカル
オブジェクトを白い背景の上に表示することができます。これは、衝突を解決するためにオブジェクトを移動するのが困難であるような複雑な状況において、見た目を改善するのに有効です。layer プロパティを明示的に設定して、どのオブジェクトが白でマスクされるかを指定しなければなりません。
この例では、タイと拍子記号が重なる部分について、タイの方をマスクしています。そのためには TimeSignature の whiteout プロパティを設定し、TimeSignature を Tie の上のレイヤに移動する必要があります。Tie のデフォルトのレイヤは 1 であるため、TimeSignature
のレイヤ値をそれより大きくします。また、StaffSymbol がマスクされないように、更に上位のレイヤに配置する必要があります。
{ \override Score.StaffSymbol.layer = 4 \override Staff.TimeSignature.layer = 3 b'2 b'~ \once \override Staff.TimeSignature.whiteout = ##t \time 3/4 b' r4 }
| [ << Editorial annotations ] | [Top][Contents] | [ Vocal music >> ] |
| [ < whiteout プロパティを使用する ] | [ Up: Top ] | [ タブ譜にマークアップを追加する > ] |
8 Text
See also Text.
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < Text ] | [ Up: Text ] | [ 楽譜に現在日時を追加する > ] |
タブ譜にマークアップを追加する
デフォルトでは、タブ譜にマークアップは表示されません。表示させるには、\revert TabStaff.TextScript.stencil を使用します。
high = { r4 r8 <g c'> q r8 r4 } low = { c4 r4 c8 r8 g,8 b, } pulse = { s8^"1" s^"&" s^"2" s^"&" s^"3" s^"&" s^"4" s^"&" } \score { \new TabStaff { \repeat unfold 2 << \high \\ \low \\ \pulse >> } \layout { \context { \TabStaff \clef moderntab \revert TextScript.stencil \override TextScript.font-series = #'bold \override TextScript.font-size = #-2 \override TextScript.color = #red } \context { \Score proportionalNotationDuration = #1/8 } } }
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < タブ譜にマークアップを追加する ] | [ Up: Text ] | [ Adjusting vertical spacing of lyrics > ] |
楽譜に現在日時を追加する
少しの Scheme コードで、楽譜に現在日時を追加することができます。
\paper { tagline = ##f } % first, define a variable to hold the formatted date: date = #(strftime "%d-%m-%Y" (localtime (current-time))) % use it in the title block: \header { title = "Including the date!" subtitle = \date } \score { \relative c'' { c4 c c c } } % and use it in a \markup block: \markup { \date }
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < 楽譜に現在日時を追加する ] | [ Up: Text ] | [ 楽器名を揃える > ] |
Adjusting vertical spacing of lyrics
This snippet shows how to bring the lyrics line closer to the staff.
% Default layout: << \new Staff \new Voice = melody \relative c' { c4 d e f | g4 f e d | c1 } \new Lyrics \lyricsto melody { aa aa aa aa aa aa aa aa aa } \new Staff \new Voice = melody \relative c' { c4 d e f | g4 f e d | c1 } % Reducing the minimum space below the staff and above the lyrics: \new Lyrics \with { \override VerticalAxisGroup.nonstaff-relatedstaff-spacing = #'((basic-distance . 1)) } \lyricsto melody { aa aa aa aa aa aa aa aa aa } >>
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < Adjusting vertical spacing of lyrics ] | [ Up: Text ] | [ 歌詞音節をメリスマに揃える > ] |
楽器名を揃える
楽器名の水平方向の位置は Staff.InstrumentName.self-alignment-X
プロパティを変更することで調整することができます。\layout 変数は indent と short-indent を定義しており、それぞれ最初のシステムとその後のシステムで、楽器名に割くスペースの量を変更することができます。
\paper { left-margin = 3\cm } \new StaffGroup << \new Staff \with { \override InstrumentName.self-alignment-X = #LEFT instrumentName = \markup \left-column { "Left aligned" "instrument name" } shortInstrumentName = "Left" } { c''1 \break c''1 } \new Staff \with { \override InstrumentName.self-alignment-X = #CENTER instrumentName = \markup \center-column { Centered "instrument name" } shortInstrumentName = "Centered" } { g'1 g'1 } \new Staff \with { \override InstrumentName.self-alignment-X = #RIGHT instrumentName = \markup \right-column { "Right aligned" "instrument name" } shortInstrumentName = "Right" } { e'1 e'1 } >> \layout { indent = 4\cm short-indent = 2\cm line-width = 6.5\cm }
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < 楽器名を揃える ] | [ Up: Text ] | [ Aligning text marks to notes > ] |
歌詞音節をメリスマに揃える
デフォルトでは、メリスマの頭の歌詞音節は音符に左揃えされます。これは lyricMelismaAlignment プロパティで変更することができます。
<< \new Staff { \new Voice = "vocal" \relative c'' { \override TextScript.staff-padding = #2 c d~^\markup default d e c d~^\markup "right aligned" d e c d~^\markup "center aligned" d e c d~^\markup "reset to default" d e } } \new Lyrics \lyricsto "vocal" { word word word \set lyricMelismaAlignment = #RIGHT word word word \set lyricMelismaAlignment = #CENTER word word word \unset lyricMelismaAlignment word word word } >> \layout { ragged-right = ##f }
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < 歌詞音節をメリスマに揃える ] | [ Up: Text ] | [ \whiteout コマンドで譜線を隠す > ] |
Aligning text marks to notes
By default, TextMark objects are aligned to so-called
NonMusicalPaperColumn grobs, like the left edge of the staff or
a bar line. They can be aligned to a note instead by setting the
non-musical property to #f.
\layout { line-length = 80\mm } { \textMark "mark a" c'1 | \textMark "mark b" c'1 | \break \override Score.TextMark.non-musical = ##f \textMark "mark c" c'1 | \textMark "mark d" c'1 | }
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < Aligning text marks to notes ] | [ Up: Text ] | [ ヘアピンの下にテキストを中央揃えする > ] |
\whiteout コマンドで譜線を隠す
\whiteout コマンドは、マークアップの背景を白色の長方形で囲みます。譜線はほとんどの Grob より下のレイヤにあるため、この白色の長方形は他の Grob と重ならなくなります。
\layout { ragged-right = ##f } \relative c' { \override TextScript.extra-offset = #'(2 . 4) c2-\markup { \whiteout \pad-markup #0.5 "middle C" } c }
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < \whiteout コマンドで譜線を隠す ] | [ Up: Text ] | [ オッターバ囲みのテキストを変更する > ] |
ヘアピンの下にテキストを中央揃えする
この例はヘアピンの (デ) クレッシェンドの下に “molto” や “poco” のようなテキストを追加する機能を提供しています。テキストの向きは、ヘアピンの向きに応じて変更されます。ヘアピンは DynamicText に揃えられます。
この例は Scheme コードを用いて、オブジェクトが通常どのように表示されるかを変更する方法も示しています。
hairpinWithCenteredText = #(define-music-function (text) (markup?) #{ \once \override Voice.Hairpin.after-line-breaking = #(lambda (grob) (let* ((stencil (ly:hairpin::print grob)) (par-y (ly:grob-parent grob Y)) (dir (ly:grob-property par-y 'direction)) (staff-line-thickness (ly:output-def-lookup (ly:grob-layout grob) 'line-thickness)) (new-stencil (ly:stencil-aligned-to (ly:stencil-combine-at-edge (ly:stencil-aligned-to stencil X CENTER) Y dir (ly:stencil-aligned-to (grob-interpret-markup grob (make-fontsize-markup (magnification->font-size (+ (ly:staff-symbol-staff-space grob) (/ staff-line-thickness 2))) text)) X CENTER)) X LEFT)) (staff-space (ly:output-def-lookup (ly:grob-layout grob) 'staff-space)) (par-x (ly:grob-parent grob X)) (dyn-text (grob::has-interface par-x 'dynamic-text-interface)) (dyn-text-stencil-x-length (if dyn-text (interval-length (ly:stencil-extent (ly:grob-property par-x 'stencil) X)) 0)) (x-shift (if dyn-text (- (+ staff-space dyn-text-stencil-x-length) (* 0.5 staff-line-thickness)) 0))) (ly:grob-set-property! grob 'Y-offset 0) (ly:grob-set-property! grob 'stencil (ly:stencil-translate-axis new-stencil x-shift X)))) #}) hairpinMolto = \hairpinWithCenteredText \markup { \italic molto } hairpinMore = \hairpinWithCenteredText \markup { \larger moltissimo } \relative c' { \hairpinMolto c2\< c\f \hairpinMore c2\ppppp\< c\f \break \hairpinMolto c2^\< c\f \hairpinMore c2\ppppp\< c\f }
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < ヘアピンの下にテキストを中央揃えする ] | [ Up: Text ] | [ デフォルトのテキスト フォント ファミリを変更する > ] |
オッターバ囲みのテキストを変更する
内部的には、\ottava は ottavation プロパティを
(例えば、8va や 8vb に) セットし、middleCPosition プロパティを変更します。オッターバ囲みのテキストを変更するには、\ottava の後に
ottavation をセットするようにしてください。
オッターバ囲みが短い場合には、テキストを短くすると良いでしょう。
{ c'2 \ottava 1 \set Staff.ottavation = "8" c''2 \ottava 0 c'1 \ottava 1 \set Staff.ottavation = "Text" c''1 }
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < オッターバ囲みのテキストを変更する ] | [ Up: Text ] | [ 強弱記号をマークアップ テキストと結合する > ] |
デフォルトのテキスト フォント ファミリを変更する
デフォルトでテキストに使われるフォント ファミリは make-pango-font-tree
をオーバライドすることで変更することができます。
%{ You may have to install additional fonts. Red Hat Fedora dejavu-fonts-all Debian GNU/Linux, Ubuntu fonts-dejavu-core fonts-dejavu-extra %} \paper { %{ run lilypond -dshow-available-fonts to show all fonts available in the process log. %} property-defaults.fonts.serif = "DejaVu Serif" property-defaults.fonts.sans = "DejaVu Sans" property-defaults.fonts.typewriter = "DejaVu Sans Mono" } { g'''4^\markup { DejaVu Serif: \bold bold \italic italic \italic \bold { bold italic } } g4_\markup { \override #'(font-family . sans) { DejaVu Sans: \bold bold \italic italic \italic \bold { bold italic } } } g''2^\markup { \override #'(font-family . typewriter) { DejaVu Sans Mono: \bold bold \italic italic \italic \bold { bold italic } } } }
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < デフォルトのテキスト フォント ファミリを変更する ] | [ Up: Text ] | [ Combining dynamics with markup texts (2) > ] |
強弱記号をマークアップ テキストと結合する
強弱記号の中には、テキスト表示を含むものがあります (“più forte” や
“piano subito” など)。これらは \markup コマンドで作り出すことができます。
piuF = \markup { \italic più \dynamic f } \markup \with-true-dimensions % work around a cropping issue \score { \relative c'' { c2\f c-\piuF } }
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < 強弱記号をマークアップ テキストと結合する ] | [ Up: Text ] | [ 2 つのパートを 1 つの譜にまとめる > ] |
Combining dynamics with markup texts (2)
Some dynamics may involve text indications (such as “più f” or
“p subito”). These can be produced using the
make-dynamic-script Scheme function; the resulting object
behaves like a DynamicText grob.
See also “Combining dynamics with markup texts”.
piuF = #(make-dynamic-script #{ \markup { \normal-text \italic più \dynamic f } #}) \score { \relative c'' { c2\f c\piuF } }
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < Combining dynamics with markup texts (2) ] | [ Up: Text ] | [ Creating “real” parenthesized dynamics > ] |
2 つのパートを 1 つの譜にまとめる
自動パート結合ツール (\partCombine コマンド) は、いくつかの異なるパートを同じ譜にまとめるものです。“solo” や “a2” といったテキスト指示は、デフォルトで追加されます。これらを削除するには、printPartCombineTexts プロパティを f
にセットします。賛美歌のような歌曲では、“solo/a2” のテキストを追加する必要は無いため、これらを削除すると良いでしょう。しかしながら、これらを削除した場合、ソロの指示も表示されなくなるため問題があるかもしれません。このような場合は、通常の多声構文を用いると良いでしょう。
このスニペットは、2 つのパートを 1 つの譜に表示する 3 つの方法を示しています:
通常の多声、テキストを削除した \partCombine、テキストのある
\partCombine の順です。
musicUp = \relative c'' { \time 4/4 a4 c4.( g8) a4 | g4 e' g,( a8 b) | c b a2. } musicDown = \relative c'' { g4 e4.( d8) c4 | r2 g'4( f8 e) | d2 \stemDown a } \score { << \new Staff \with { instrumentName = "standard polyphony" } << \musicUp \\ \musicDown >> \new Staff \with { instrumentName = \markup { \typewriter "\\partCombine" without text} printPartCombineTexts = ##f } \partCombine \musicUp \musicDown \new Staff \with { instrumentName = \markup { \typewriter "\\partCombine" with text} } \partCombine \musicUp \musicDown >> \layout { indent = 6.0\cm \context { \Score % Setting this to a large value avoids a bar line at the % beginning that would connect the three staves otherwise. \override SystemStartBar.collapse-height = 30 } } }
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < 2 つのパートを 1 つの譜にまとめる ] | [ Up: Text ] | [ テキスト スパナを作成する > ] |
Creating “real” parenthesized dynamics
Although the easiest way to add parentheses to a dynamic mark is to use
a \markup block, this method has a downside: the created
objects behave like text markups and not like dynamics.
However, it is possible to create a similar object using the equivalent
Scheme code (as described in the Notation Reference), combined with the
make-dynamic-script function. This way, the markup is regarded
as a dynamic and therefore remains compatible with commands such as
\dynamicUp or \dynamicDown.
paren = #(define-event-function (dyn) (ly:event?) (make-dynamic-script #{ \markup \concat { \normal-text \italic \fontsize #2 ( \pad-x #0.2 #(ly:music-property dyn 'text) \normal-text \italic \fontsize #2 ) } #})) \relative c'' { c4\paren\f c c \dynamicUp c\paren\p }
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < Creating “real” parenthesized dynamics ] | [ Up: Text ] | [ Demonstrating all \header fields > ] |
テキスト スパナを作成する
\startTextSpan と \stopTextSpan コマンドは、ペダル記号やオッターバのようにテキスト スパナを容易に作成できます。TextSpanner オブジェクトのプロパティをオーバライドすることで、出力を変更することができます。
\paper { ragged-right = ##f } \relative c'' { \override TextSpanner.bound-details.left.text = #"bla" \override TextSpanner.bound-details.right.text = #"blu" a4 \startTextSpan b4 c a4 \stopTextSpan \override TextSpanner.style = #'line \once \override TextSpanner.bound-details.left.stencil-align-dir-y = #CENTER a4 \startTextSpan b4 c a4 \stopTextSpan \override TextSpanner.style = #'dashed-line \override TextSpanner.bound-details.left.text = \markup { \draw-line #'(0 . 1) } \override TextSpanner.bound-details.right.text = \markup { \draw-line #'(0 . -2) } \once \override TextSpanner.bound-details.right.padding = #-2 a4 \startTextSpan b4 c a4 \stopTextSpan \override TextSpanner.dash-period = #10 \override TextSpanner.dash-fraction = #0.5 \override TextSpanner.thickness = #10 a4 \startTextSpan b4 c a4 \stopTextSpan }
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < テキスト スパナを作成する ] | [ Up: Text ] | [ \markup ブロックにネイティブ PostScript を埋め込む > ] |
Demonstrating all \header fields
A demonstration of all header fields that LilyPond defines by default.
Thanks to setting print-all-headers to #t, much more
fields as usual are displayed, indicating the hiearchy of
\header blocks.
\paper { #(set-paper-size "a6" 'landscape) print-all-headers = ##t } \book { \header { title = "title" subtitle = "subtitle" composer = "composer" arranger = "arranger" instrument = "instrument" meter = "meter" opus = "opus" piece = "piece" poet = "poet" copyright = "copyright" tagline = "tagline" } \bookpart { \score { \relative c'' { c1 | c | c | c } \header { title = "localtitle" subtitle = "localsubtitle" composer = "localcomposer" arranger = "localarranger" instrument = "localinstrument" meter = "localmeter" opus = "localopus" piece = "localpiece" poet = "localpoet" copyright = "localcopyright" tagline = "localtagline" } } } }
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < Demonstrating all \header fields ] | [ Up: Text ] | [ 歌詞音節をフォーマットする > ] |
\markup ブロックにネイティブ PostScript を埋め込む
\markup ブロックに直接 PostScript コードを挿入することができます。
\relative c'' { a2-\markup \postscript "0 3 moveto 5 2 rlineto stroke" -\markup \postscript "[1 1] 0 setdash 0 0 moveto 5 2 rlineto stroke" b2-\markup \postscript "1 1 moveto 0 0 1 2 8 4 10 2 rcurveto stroke" a'1 }
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < \markup ブロックにネイティブ PostScript を埋め込む ] | [ Up: Text ] | [ 歌詞音節の間にタイを入力する > ] |
歌詞音節をフォーマットする
単一の歌詞音節にマークアップ モードを使用することができます。
mel = \relative c'' { c4 c c c c1 } lyr = \lyricmode { Your lyrics \markup { \italic can } \markup { \with-color #red contain } \markup { \fontsize #8 \bold Markup! } } << \new Voice = "melody" \mel \new Lyrics \lyricsto "melody" \lyr >>
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < 歌詞音節をフォーマットする ] | [ Up: Text ] | [ 歌詞の揃え位置 > ] |
歌詞音節の間にタイを入力する
これは、音節をチルダで分割することで得ることができます。
\lyrics { wa~o~a }
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < 歌詞音節の間にタイを入力する ] | [ Up: Text ] | [ Markup list > ] |
歌詞の揃え位置
歌詞の水平方向の揃え位置は、LyricText オブジェクトの
self-alignment-X プロパティをオーバライドすることで設定できます。-1 が左、0 が中央、1 が右になります。#LEFT, #CENTER, #RIGHT を用いることもできます。
\layout { ragged-right = ##f } \relative c'' { c1 c c c } \addlyrics { \once \override LyricText.self-alignment-X = #LEFT "left-aligned" \once \override LyricText.self-alignment-X = #CENTER "centered" \once \override LyricText.self-alignment-X = 1 "right-aligned" \once \override LyricText.self-alignment-X = #-1.5 "very right" }
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < 歌詞の揃え位置 ] | [ Up: Text ] | [ 複数小節にまたがる休符にマークアップを付加する > ] |
Markup list
Text that can spread over pages is entered with the \markuplist
command. The \paragraph markup command defined in the snippet
indents its argument before calling \justified-lines.
#(set-default-paper-size "a6" 'landscape) \paper { line-width = 11\cm tagline = ##f } #(define-markup-list-command (paragraph layout props args) (markup-list?) (interpret-markup-list layout props (make-justified-lines-markup-list (cons (make-hspace-markup 2) args)))) \book { % for correct rendering in the PDF documentation % Candide, Voltaire \markuplist { \override-lines #'(baseline-skip . 2.5) { \paragraph { Il y avait en Westphalie, dans le château de M. le baron de Thunder-ten-tronckh, un jeune garçon à qui la nature avait donné les mœurs les plus douces. Sa physionomie annonçait son âme. Il avait le jugement assez droit, avec l'esprit le plus \concat { simple \hspace #.3 ; } c'est, je crois, pour cette raison qu'on le nommait Candide. Les anciens domestiques de la maison soupçonnaient qu'il était fils de la sœur de monsieur le baron et d'un bon et honnête gentilhomme du voisinage, que cette demoiselle ne voulut jamais épouser parce qu'il n'avait pu prouver que soixante et onze quartiers, et que le reste de son arbre généalogique avait été perdu par l'injure du temps. } \vspace #.3 \paragraph { Monsieur le baron était un des plus puissants seigneurs de la Westphalie, car son château avait une porte et des fenêtres. Sa grande salle même était ornée d'une tapisserie. Tous les chiens de ses basses-cours composaient une meute dans le \concat { besoin \hspace #.3 ; } ses palefreniers étaient ses \concat { piqueurs \hspace #.3 ; } le vicaire du village était son grand-aumônier. Ils l'appelaient tous monseigneur, et ils riaient quand il faisait des contes. } } } }
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < Markup list ] | [ Up: Text ] | [ Of the ubiquity of markup objects > ] |
複数小節にまたがる休符にマークアップを付加する
複数小節にまたがる休符に付加されるマークアップは、休符の上または下に中央揃えされます。マークアップが長い場合であっても、休符が広げられることはありません。休符をマークアップに合わせて広げる場合は、休符の前に空の和音を追加して、それにマークアップを付加してください。
このような方法で付加されたテキストは、空の和音が本来表示されるべき場所に合わせて左揃えされます。しかし、小節の長さをテキストに合わせるようにすれば、テキストが中央揃えされたように見えます。
\relative c' { \compressMMRests { \textLengthOn <>^\markup { [MAJOR GENERAL] } R1*19 <>_\markup { \italic { Cue: ... it is yours } } <>^\markup { A } R1*30^\markup { [MABEL] } \textLengthOff c4^\markup { CHORUS } d f c } }
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < 複数小節にまたがる休符にマークアップを付加する ] | [ Up: Text ] | [ バージョン番号を出力する > ] |
Of the ubiquity of markup objects
Text objects are entered either as simple strings between double quotes
or as \markup blocks that can accept a variety of advanced text
formatting and graphical enhancements.
As such, markup blocks may be used:
- in any
TextScriptobject (attached to notes with-,^or_), - any
TextMarkintroduced with the\textMarkkeyword, or\textEndMarkcommand, or other similar objects such as MetronomeMark introduced with\tempo, - as standalone markup blocks, entered at the top level outside of any
\scoreblock, - in any definition inside the
\headerblock (e.g. title, subtitle, composer) or in some variables defined inside the\paperblock such asevenHeaderMarkupfor page numbers.
\markup may additionally be used for lyrics, in chord names,
and as dynamics. In fact, it is possible to use \markup to
customize the appearance of virtually any object, as demonstrated in
this example using various methods.
%% Thanks to Aaron Hill https://lists.gnu.org/archive/html/lilypond-user/2019-01/msg00437.html \paper { paper-width = 8\cm paper-height = 8\cm } \header { title = \markup "Header" tagline = \markup "(tagline)" } \markup "Top-level markup" dyn = #(make-dynamic-script #{ \markup \serif "DynamicText" #}) \score { << \new ChordNames \with { majorSevenSymbol = \markup "majorSevenSymbol" } \chordmode { c1:maj7 } \new Staff { \tempo \markup "MetronomeMark" \textMark "TextMark" \once \override TupletNumber.text = \markup "TupletNumber" \tuplet 3/2 { \once \override NoteHead.stencil = #ly:text-interface::print \once \override NoteHead.text = \markup \lower #0.5 "NoteHead" c''8^\markup "TextScript" \once \override Rest.stencil = #(lambda (grob) (grob-interpret-markup grob #{ \markup "Rest" #})) r4 } } \new Lyrics \lyricmode { \markup "LyricText" 1 } \new Dynamics { s1\dyn } >> }
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < Of the ubiquity of markup objects ] | [ Up: Text ] | [ 中央に歌詞を配置したピアノ テンプレート > ] |
バージョン番号を出力する
lilypond-version の出力を歌詞に配置することで、楽譜内に、あるいはlilypond-book で生成されたドキュメント内に LilyPond のバージョン番号を表示することができます。あるいは、以下のようにしてバージョン番号を他の文字列と結合することができます。
\markup { Processed with LilyPond version #(lilypond-version) }
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < バージョン番号を出力する ] | [ Up: Text ] | [ リハーサル記号を全ての譜の上に表示する > ] |
中央に歌詞を配置したピアノ テンプレート
旋律と歌詞のための総譜ではなく、歌詞をピアノ譜の 2 つの譜の間に配置することができます。
upper = \relative c'' { \clef treble \key c \major \time 4/4 a4 b c d } lower = \relative c { \clef bass \key c \major \time 4/4 a2 c } text = \lyricmode { Aaa Bee Cee Dee } \score { \new PianoStaff << \new Staff = upper { \new Voice = "singer" \upper } \new Lyrics \lyricsto "singer" \text \new Staff = lower { \lower } >> \layout { } \midi { } }
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < 中央に歌詞を配置したピアノ テンプレート ] | [ Up: Text ] | [ テキストを右から左へ表示する > ] |
リハーサル記号を全ての譜の上に表示する
リハーサル記号は通常、一番上にある譜の上に表示されますが、全ての譜の上に表示することもできます。
\score { << \new Staff { \mark \default c''1 \textMark "molto" c'' } \new Staff { \mark \default c'1 \textMark "molto" c' } >> \layout { \context { \Score \remove Mark_engraver \remove Text_mark_engraver \remove Staff_collecting_engraver } \context { \Staff \consists Mark_engraver \consists Text_mark_engraver \consists Staff_collecting_engraver } } }
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < リハーサル記号を全ての譜の上に表示する ] | [ Up: Text ] | [ 歌詞を譜の内部に表示する > ] |
テキストを右から左へ表示する
以下に示すように、マークアップ オブジェクト内でテキストを右から左へ表示することができます。
{ b1^\markup { \line { i n g i r u m i m u s n o c t e } } f'_\markup { \override #'(text-direction . -1) \line { i n g i r u m i m u s n o c t e } } }
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < テキストを右から左へ表示する ] | [ Up: Text ] | [ 独立したテキストの 2 段組み > ] |
歌詞を譜の内部に表示する
歌詞の垂直方向の位置を移動し、譜の内部に表示させることができます。歌詞は
\override LyricText.extra-offset = #'(0 . dy) で移動し、延長線やハイフンを移動する同様のコマンドも必要です。必要な移動量は試行錯誤によって決定します。
<< \new Staff << \new Voice = "voc" \relative c' { \stemDown a bes c8 b c4 } >> \new Lyrics \with { \override LyricText.extra-offset = #'(0 . 8.6) \override LyricExtender.extra-offset = #'(0 . 8.6) \override LyricHyphen.extra-offset = #'(0 . 8.6) } \lyricsto "voc" { La la -- la __ _ la } >>
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < 歌詞を譜の内部に表示する ] | [ Up: Text ] | [ 弦番号の延長線 > ] |
独立したテキストの 2 段組み
\markup コマンドを用いて、独立したテキストを複数段組みにすることができます:
\markup { \fill-line { \hspace #1 \column { \line { O sacrum convivium } \line { in quo Christus sumitur, } \line { recolitur memoria passionis ejus, } \line { mens impletur gratia, } \line { futurae gloriae nobis pignus datur. } \line { Amen. } } \hspace #2 \column \italic { \line { O sacred feast } \line { in which Christ is received, } \line { the memory of His Passion is renewed, } \line { the mind is filled with grace, } \line { and a pledge of future glory is given to us. } \line { Amen. } } \hspace #1 } }
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < 独立したテキストの 2 段組み ] | [ Up: Text ] | [ 3 方向ボックス > ] |
弦番号の延長線
弦番号の延長線を追加し、続く音符が全て同じ弦で演奏されることを示します。
stringNumberSpanner = #(define-music-function (StringNumber) (string?) #{ \override TextSpanner.style = #'solid \override TextSpanner.font-size = #-5 \override TextSpanner.bound-details.left.stencil-align-dir-y = #CENTER \override TextSpanner.bound-details.left.text = \markup { \circle \number $StringNumber } #}) \relative c { \clef "treble_8" \textSpannerDown \stringNumberSpanner "5" a8\startTextSpan b c d e f\stopTextSpan \stringNumberSpanner "4" g\startTextSpan a | bes4 a g2\stopTextSpan }
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < 弦番号の延長線 ] | [ Up: Text ] | [ UTF-8 > ] |
3 方向ボックス
この例は、テキスト (や他のマークアップ) の周りの 3 方向のみを囲うボックスを作成するマークアップ コマンドを追加する方法を示しています。
% New command to add a three-sided box, with sides north, west, and south. % Based on the `box-stencil` command defined in `scm/stencil.scm`. % Note that ";;" is used to comment a line in Scheme. #(define-public (NWS-box-stencil stencil thickness padding) "Add a box around STENCIL, producing a new stencil." (let* ((x-ext (interval-widen (ly:stencil-extent stencil X) padding)) (y-ext (interval-widen (ly:stencil-extent stencil Y) padding)) (y-rule (make-filled-box-stencil (cons 0 thickness) y-ext)) (x-rule (make-filled-box-stencil (interval-widen x-ext thickness) (cons 0 thickness)))) ;; (set! stencil (ly:stencil-combine-at-edge stencil X 1 y-rule padding)) (set! stencil (ly:stencil-combine-at-edge stencil X LEFT y-rule padding)) (set! stencil (ly:stencil-combine-at-edge stencil Y UP x-rule 0.0)) (set! stencil (ly:stencil-combine-at-edge stencil Y DOWN x-rule 0.0)) stencil)) % The corresponding markup command, based on the `\box` command defined % in `scm/define-markup-commands.scm`. #(define-markup-command (NWS-box layout props arg) (markup?) #:properties ((thickness 0.1) (font-size 0) (box-padding 0.2)) "Draw a box round ARG. Look at THICKNESS, BOX-PADDING, and FONT-SIZE properties to determine line thickness and padding around the markup." (let ((pad (* (magstep font-size) box-padding)) (m (interpret-markup layout props arg))) (NWS-box-stencil m thickness pad))) \relative c' { c1^\markup { \NWS-box ABCD } c1^\markup { \NWS-box \note {4} #1.0 } }
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < 3 方向ボックス ] | [ Up: Text ] | [ 上下に歌詞を配置した合唱譜テンプレート > ] |
UTF-8
タイトルや歌詞における特殊文字は、UTF-8 エンコーディングで入力し、Pango ベースのバックエンドを用いることで使用できます。インストールされているフォントが対応しているかによりますが、このスニペットはブルガリア語 (キリル文字), ヘブライ語, 日本語, ポルトガル語を表示します。
%{ You may have to install additional fonts. Red Hat Fedora linux-libertine-fonts (Latin, Cyrillic, Hebrew) google-noto-serif-jp-fonts (Japanese) Debian GNU/Linux, Ubuntu fonts-linuxlibertine (Latin, Cyrillic, Hebrew) fonts-noto-cjk (Japanese) %} % 'Linux Libertine' fonts also contain Cyrillic and Hebrew glyphs. \paper { property-defaults.fonts.serif = "Linux Libertine O, Noto Serif CJK JP, Noto Serif JP" } bulgarian = \lyricmode { Жълтата дюля беше щастлива, че пухът, който цъфна, замръзна като гьон. } hebrew = \lyricmode { זה כיף סתם לשמוע איך תנצח קרפד עץ טוב בגן. } japanese = \lyricmode { いろはにほへど ちりぬるを わがよたれぞ つねならむ うゐのおくや まけふこえて あさきゆめみじ ゑひもせず } % "a nice song for you" portuguese = \lyricmode { à vo -- cê uma can -- ção le -- gal } \relative c' { c2 d e2 f g2 f e2 d } \addlyrics { \bulgarian } \addlyrics { \hebrew } \addlyrics { \japanese } \addlyrics { \portuguese }
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < UTF-8 ] | [ Up: Text ] | [ repeatCommands を用いて入れ替え部分のテキストにマークアップを使用する > ] |
上下に歌詞を配置した合唱譜テンプレート
このテンプレートは基本的に単純な “合唱” テンプレートと同じですが、歌詞が
alignAboveContext と alignBelowContext を用いて配置されています。
global = { \key c \major \time 4/4 } sopMusic = \relative c'' { c4 c c8[( b)] c4 } sopWords = \lyricmode { hi hi hi hi } altoMusic = \relative c' { e4 f d e } altoWords = \lyricmode { ha ha ha ha } tenorMusic = \relative c' { g4 a f g } tenorWords = \lyricmode { hu hu hu hu } bassMusic = \relative c { c4 c g c } bassWords = \lyricmode { ho ho ho ho } \score { \new ChoirStaff << \new Staff = "women" << \new Voice = "sopranos" { \voiceOne << \global \sopMusic >> } \new Voice = "altos" { \voiceTwo << \global \altoMusic >> } >> \new Lyrics \with { alignAboveContext = "women" } \lyricsto "sopranos" \sopWords \new Lyrics \with { alignBelowContext = "women" } \lyricsto "altos" \altoWords % we could remove the line about this with the line below, since % we want the alto lyrics to be below the alto Voice anyway. % \new Lyrics \lyricsto "altos" \altoWords \new Staff = "men" << \clef bass \new Voice = "tenors" { \voiceOne << \global \tenorMusic >> } \new Voice = "basses" { \voiceTwo << \global \bassMusic >> } >> \new Lyrics \with { alignAboveContext = "men" } \lyricsto "tenors" \tenorWords \new Lyrics \with { alignBelowContext = "men" } \lyricsto "basses" \bassWords % again, we could replace the line above this with the line below. % \new Lyrics \lyricsto "basses" \bassWords >> }
| [ << Text ] | [Top][Contents] | [ Vocal music >> ] |
| [ < 上下に歌詞を配置した合唱譜テンプレート ] | [ Up: Text ] | [ Vocal music > ] |
repeatCommands を用いて入れ替え部分のテキストにマークアップを使用する
入れ替え部分のある繰り返しは \repeat volta を用いて指定するのが最善ですが、入れ替え部分のテキストを \markup によってフォーマットする必要がある場合は、repeatCommands コンテキスト
プロパティを用いる必要があります。
repeatCommands はリストを取るため、マークアップを含める簡単な方法は、マークアップを変数として定義し、Scheme 構文を用いてリストに埋め込むことです
(#(list (list 'volta textIdentifier)), textIdentifier
は変数名)。繰り返し小節線の指定を、リストの別の要素から行うことができます。
voltaAdLib = \markup { \volta-number { 1. 2. 3... } \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)) }
| [ << Text ] | [Top][Contents] | [ Chord notation >> ] |
| [ < repeatCommands を用いて入れ替え部分のテキストにマークアップを使用する ] | [ Up: Top ] | [ 音域をボイスごとに追加する > ] |
9 Vocal music
See also Vocal music.
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < Vocal music ] | [ Up: Vocal music ] | [ 改行後に分かれる譜について、指示を表示する > ] |
音域をボイスごとに追加する
音域をボイスごとに追加することができます。この場合、衝突を避けるために
Ambitus を手動で移動する必要があります。
\new Staff << \new Voice \with { \consists "Ambitus_engraver" } \relative c'' { \override Ambitus.X-offset = 2.0 \voiceOne c4 a d e f1 } \new Voice \with { \consists "Ambitus_engraver" } \relative c' { \voiceTwo es4 f g as b1 } >>
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < 音域をボイスごとに追加する ] | [ Up: Vocal music ] | [ ボーカル譜にオーケストラの合図音符を追加する > ] |
改行後に分かれる譜について、指示を表示する
このスニペットは \splitStaffBarLine, \convUpStaffBarLine,
\convDownStaffBarLine コマンドを追加します。これらは小節線に矢印を追加し、譜を共有するボイスが次のシステムで譜を分ける場合、あるいは再度合流する場合の指示を表示します。
#(define-markup-command (arrow-at-angle layout props angle-deg length fill) (number? number? boolean?) (let* ((PI-OVER-180 (/ (atan 1 1) 34)) (degrees->radians (lambda (degrees) (* degrees PI-OVER-180))) (angle-rad (degrees->radians angle-deg)) (target-x (* length (cos angle-rad))) (target-y (* length (sin angle-rad)))) (interpret-markup layout props (markup #:translate (cons (/ target-x 2) (/ target-y 2)) #:rotate angle-deg #:translate (cons (/ length -2) 0) #:concat (#:draw-line (cons length 0) #:arrow-head X RIGHT fill))))) splitStaffBarLineMarkup = \markup \with-dimensions #'(0 . 0) #'(0 . 0) { \combine \arrow-at-angle #45 #(sqrt 8) ##t \arrow-at-angle #-45 #(sqrt 8) ##t } splitStaffBarLine = { \once \override Staff.BarLine.stencil = #(lambda (grob) (ly:stencil-combine-at-edge (ly:bar-line::print grob) X RIGHT (grob-interpret-markup grob splitStaffBarLineMarkup) 0)) \break } convDownStaffBarLine = { \once \override Staff.BarLine.stencil = #(lambda (grob) (ly:stencil-combine-at-edge (ly:bar-line::print grob) X RIGHT (grob-interpret-markup grob #{ \markup\with-dimensions #'(0 . 0) #'(0 . 0) { \translate #'(0 . -.13)\arrow-at-angle #-45 #(sqrt 8) ##t }#}) 0)) \break } convUpStaffBarLine = { \once \override Staff.BarLine.stencil = #(lambda (grob) (ly:stencil-combine-at-edge (ly:bar-line::print grob) X RIGHT (grob-interpret-markup grob #{ \markup\with-dimensions #'(0 . 0) #'(0 . 0) { \translate #'(0 . .14)\arrow-at-angle #45 #(sqrt 8) ##t }#}) 0)) \break } \paper { indent = 10\mm short-indent = 10\mm line-width = 8\cm } separateSopranos = { \set Staff.instrumentName = "AI AII" \set Staff.shortInstrumentName = "AI AII" \splitStaffBarLine \change Staff = "up" } convSopranos = { \convDownStaffBarLine \change Staff = "shared" \set Staff.instrumentName = "S A" \set Staff.shortInstrumentName = "S A" } sI = { \voiceOne \repeat unfold 4 f''2 \separateSopranos \repeat unfold 4 g''2 \convSopranos \repeat unfold 4 c''2 } sII = { s1*2 \voiceTwo \change Staff = "up" \repeat unfold 4 d''2 } aI = { \voiceTwo \repeat unfold 4 a'2 \voiceOne \repeat unfold 4 b'2 \convUpStaffBarLine \voiceTwo \repeat unfold 4 g'2 } aII = { s1*2 \voiceTwo \repeat unfold 4 g'2 } ten = { \voiceOne \repeat unfold 4 c'2 \repeat unfold 4 d'2 \repeat unfold 4 c'2 } bas = { \voiceTwo \repeat unfold 4 f2 \repeat unfold 4 g2 \repeat unfold 4 c2 } \markup \pad-x #3 % avoid cropping \score { << \new ChoirStaff << \new Staff = up \with { instrumentName = "SI SII" shortInstrumentName = "SI SII" } { s1*4 } \new Staff = shared \with { instrumentName = "S A" shortInstrumentName = "S A" } << \new Voice = sopI \sI \new Voice = sopII \sII \new Voice = altI \aI \new Voice = altII \aII >> \new Lyrics \with { alignBelowContext = up } \lyricsto sopII { e f g h } \new Lyrics \lyricsto altI { a b c d e f g h i j k l } \new Staff = men \with { instrumentName = "T B" shortInstrumentName = "T B" } << \clef F \new Voice = ten \ten \new Voice = bas \bas >> \new Lyrics \lyricsto bas { a b c d e f g h i j k l } >> >> \layout { \context { \Staff \RemoveEmptyStaves \override VerticalAxisGroup.remove-first = ##t } } }
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < 改行後に分かれる譜について、指示を表示する ] | [ Up: Vocal music ] | [ Adjusting vertical spacing of lyrics > ] |
ボーカル譜にオーケストラの合図音符を追加する
これは、ボーカル譜に添えられるピアノ リダクションに多くのオーケストラの合図音符を追加しやすくするためのスニペットです。音楽関数 \cueWhile は 4 つの引数を取ります:
1 つ目は、\addQuote と同様の、合図音符の引用元となる音楽です。2 つ目は、合図音符の前に表示される名前です。3 つ目は、音符を \voiceOne で表示して名前を譜の上に表示するか、
音符を \voiceTwo で表示して名前を譜の下に表示するかを決定する
#UP または #DOWN です。4 つ目は、合図音符が出現する部分のピアノの音楽です。合図音符の前に表示される名前は、音符の左端に揃えられます。様々な楽節を合図音符として表示することができますが、一度に複数個重ねることはできません。
cueWhile = #(define-music-function (instrument name dir music) (string? string? ly:dir? ly:music?) #{ \cueDuring $instrument #dir { \once \override TextScript.self-alignment-X = #RIGHT \once \override TextScript.direction = $dir <>-\markup { \tiny #name } $music } #}) flute = \relative c'' { \transposition c' s4 s4 e g } \addQuote "flute" { \flute } clarinet = \relative c' { \transposition bes fis4 d d c } \addQuote "clarinet" { \clarinet } singer = \relative c'' { c4. g8 g4 bes4 } words = \lyricmode { here's the lyr -- ics } pianoRH = \relative c'' { \transposition c' \cueWhile "clarinet" "Clar." #DOWN { c4. g8 } \cueWhile "flute" "Flute" #UP { g4 bes4 } } pianoLH = \relative c { c4 <c' e> e, <g c> } \score { << \new Staff { \new Voice = "singer" { \singer } } \new Lyrics { \lyricsto "singer" \words } \new PianoStaff << \new Staff { \new Voice { \pianoRH } } \new Staff { \clef "bass" \pianoLH } >> >> }
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < ボーカル譜にオーケストラの合図音符を追加する ] | [ Up: Vocal music ] | [ 歌詞音節をメリスマに揃える > ] |
Adjusting vertical spacing of lyrics
This snippet shows how to bring the lyrics line closer to the staff.
% Default layout: << \new Staff \new Voice = melody \relative c' { c4 d e f | g4 f e d | c1 } \new Lyrics \lyricsto melody { aa aa aa aa aa aa aa aa aa } \new Staff \new Voice = melody \relative c' { c4 d e f | g4 f e d | c1 } % Reducing the minimum space below the staff and above the lyrics: \new Lyrics \with { \override VerticalAxisGroup.nonstaff-relatedstaff-spacing = #'((basic-distance . 1)) } \lyricsto melody { aa aa aa aa aa aa aa aa aa } >>
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < Adjusting vertical spacing of lyrics ] | [ Up: Vocal music ] | [ 音域 > ] |
歌詞音節をメリスマに揃える
デフォルトでは、メリスマの頭の歌詞音節は音符に左揃えされます。これは lyricMelismaAlignment プロパティで変更することができます。
<< \new Staff { \new Voice = "vocal" \relative c'' { \override TextScript.staff-padding = #2 c d~^\markup default d e c d~^\markup "right aligned" d e c d~^\markup "center aligned" d e c d~^\markup "reset to default" d e } } \new Lyrics \lyricsto "vocal" { word word word \set lyricMelismaAlignment = #RIGHT word word word \set lyricMelismaAlignment = #CENTER word word word \unset lyricMelismaAlignment word word word } >> \layout { ragged-right = ##f }
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < 歌詞音節をメリスマに揃える ] | [ Up: Vocal music ] | [ Ambitus after key signature > ] |
音域
音域を表示します。
最高音や最低音が調号に含まれない場合には臨時記号が表示されます。Grob AmbitusNoteHead には加線を含みます。
\layout { \context { \Voice \consists "Ambitus_engraver" } } << \new Staff { \relative c' { \time 2/4 c4 f' } } \new Staff { \relative c' { \time 2/4 \key d \major cis4 as' } } >>
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < 音域 ] | [ Up: Vocal music ] | [ 複数のボイスを持つ譜での音域 > ] |
Ambitus after key signature
By default, ambitus are positioned at the left of the clef. The
\ambitusAfter function allows for changing this placement.
Syntax is \ambitusAfter grob-interface; see
Graphical
Object Interfaces for a list of possible values for
grob-interface.
A common use case is printing the ambitus between key signature and time signature.
\new Staff \with { \consists Ambitus_engraver } \relative { \ambitusAfter key-signature \key d \major es'8 g bes cis d2 }
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < Ambitus after key signature ] | [ Up: Vocal music ] | [ Ancient notation template – modern transcription of Gregorian music > ] |
複数のボイスを持つ譜での音域
Staff コンテキストに Ambitus_engraver を追加すると、譜にボイスが複数ある場合でも、譜ごとに音域を表示します。
\new Staff \with { \consists "Ambitus_engraver" } << \new Voice \relative c'' { \voiceOne c4 a d e f1 } \new Voice \relative c' { \voiceTwo es4 f g as b1 } >>
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < 複数のボイスを持つ譜での音域 ] | [ Up: Vocal music ] | [ アングリカン チャントのテンプレート > ] |
Ancient notation template – modern transcription of Gregorian music
This example demonstrates how to do modern transcription of Gregorian music. Gregorian music has no measure, no stems; it uses only half and quarter note heads, and special marks, indicating rests of different length.
chant = \relative c' { \set Score.timing = ##f f4 a2 \divisioMinima g4 b a2 f2 \divisioMaior g4( f) f( g f) a2 \finalis \break f4 a2 \divisioMinima g4 b a2 f2 \divisioMaior g4( f) f( g a) g2( f) \finalis } verba = \lyricmode { Lo -- rem ip -- sum do -- lor sit a -- met, lo -- rem ip -- sum do -- lor sit a -- met. } \score { \new GregorianTranscriptionStaff << \new GregorianTranscriptionVoice = "melody" \chant \new GregorianTranscriptionLyrics = "one" \lyricsto melody \verba >> }
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < Ancient notation template – modern transcription of Gregorian music ] | [ Up: Vocal music ] | [ 異なる歌詞を同じ行に表示する > ] |
アングリカン チャントのテンプレート
このテンプレートは、詩篇のアングリカン チャントを譜刻する 1 つの方法を示しています。また、詞を音楽の下に独立して追加する方法も示しています。2 つの詞はそれぞれ別の方法で作られています。
SopranoMusic = \relative g' { g1 | c2 b | a1 | \bar "||" a1 | d2 c | c b | c1 | \bar "||" } AltoMusic = \relative c' { e1 | g2 g | f1 | f1 | f2 e | d d | e1 | } TenorMusic = \relative a { c1 | c2 c | c1 | d1 | g,2 g | g g | g1 | } BassMusic = \relative c { c1 | e2 e | f1 | d1 | b2 c | g' g | c,1 | } global = { \time 2/2 } dot = \markup { \raise #0.7 \musicglyph "dots.dot" } tick = \markup { \raise #1 \fontsize #-5 \musicglyph "scripts.rvarcomma" } % Use markup to center the chant on the page \markup \fill-line { \score { % centered \new ChoirStaff << \new Staff << \global \clef "treble" \new Voice = "Soprano" << \voiceOne \SopranoMusic >> \new Voice = "Alto" << \voiceTwo \AltoMusic >> >> \new Staff << \clef "bass" \global \new Voice = "Tenor" << \voiceOne \TenorMusic >> \new Voice = "Bass" << \voiceTwo \BassMusic >> >> >> \layout { \context { \Score \override SpacingSpanner.base-shortest-duration = \musicLength 2 } \context { \Staff \remove "Time_signature_engraver" } } } % End score } % End markup \markup \fill-line { \left-column { \null \null \null \line { \fontsize #5 O \fontsize #3 come let us \bold sing | unto \dot the | Lord : let } \line { us heartily \concat { re \bold joice } in the | strength of | our } \line { sal | vation. } \null \line { \hspace #2.5 8. Today if ye will hear his voice * } \line { \concat { \bold hard en } \tick not your \tick hearts : as in the pro- } \line { vocation * and as in the \bold day of tempt- \tick } \line { -ation \tick in the \tick wilderness. } } }
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < アングリカン チャントのテンプレート ] | [ Up: Vocal music ] | [ 歌詞の節のフォントを変更する > ] |
異なる歌詞を同じ行に表示する
例えば演者が頻繁に入れ替わるような歌曲の場合などに、異なる演者の歌詞を 1 行で表示したい場合があります。このスニペットは
\override
VerticalAxisGroup.nonstaff-nonstaff-spacing.minimum-distance = ##f
を用いて、それを実現する方法を示しています。
\layout { \context { \Lyrics \override VerticalAxisGroup .nonstaff-nonstaff-spacing .minimum-distance = ##f } } aliceSings = \markup { \smallCaps "Alice" } eveSings = \markup { \smallCaps "Eve" } << \new Staff << \new Voice = "alice" { f'4^\aliceSings g' r2 | s1 | f'4^\aliceSings g' r2 | s1 | \break % ... \voiceOne s2 a'8^\aliceSings a' b'4 | \oneVoice g'1 } \new Voice = "eve" { s1 | a'2^\eveSings g' | s1 | a'2^\eveSings g' % ... \voiceTwo f'4^\eveSings a'8 g' f'4 e' | \oneVoice s1 } >> \new Lyrics \lyricsto "alice" { may -- be sec -- ond % ... Shut up, you fool! } \new Lyrics \lyricsto "eve" { that the words are % ... …and then I was like– } >>
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < 異なる歌詞を同じ行に表示する ] | [ Up: Vocal music ] | [ Chant or psalm notation > ] |
歌詞の節のフォントを変更する
歌詞の節ごとにフォントを変更することができます。歌詞番号のフォントも同様です。
%{ You may have to install additional fonts. Red Hat Fedora dejavu-fonts-all Debian GNU/Linux, Ubuntu fonts-dejavu-core fonts-dejavu-extra %} \relative c'' { \time 3/4 g2 e4 a2 f4 g2. } \addlyrics { \set stanza = #"1. " Hi, my name is Bert. } \addlyrics { \override StanzaNumber.fonts.serif = "DejaVu Sans" \set stanza = #"2. " \override LyricText.font-family = #'typewriter Oh, ché -- ri, je t'aime }
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < 歌詞の節のフォントを変更する ] | [ Up: Vocal music ] | [ ハイフンを強制的に表示する > ] |
Chant or psalm notation
This form of notation is used for psalm chant, where verses aren’t always of the same length.
stemOff = \hide Staff.Stem stemOn = \undo \stemOff \score { \new Staff \with { \remove "Time_signature_engraver" } { \key g \minor \cadenzaOn \stemOff a'\breve bes'4 g'4 \stemOn a'2 \section \stemOff a'\breve g'4 a'4 \stemOn f'2 \section \stemOff a'\breve^\markup { \italic flexe } \stemOn g'2 \fine } }
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < Chant or psalm notation ] | [ Up: Vocal music ] | [ 歌詞音節をフォーマットする > ] |
ハイフンを強制的に表示する
ハイフンを挿入するスペースが無いと LilyPond が判断した場合にはデフォルトで省略されますが、この挙動は LyricHyphen の
minimum-distance プロパティでオーバライドすることができます。
\relative c'' { c32 c c c c32 c c c c32 c c c c32 c c c } \addlyrics { syl -- lab word word \override LyricHyphen.minimum-distance = #1.0 syl -- lab word word \override LyricHyphen.minimum-distance = #2.0 syl -- lab word word \revert LyricHyphen.minimum-distance syl -- lab word word }
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < ハイフンを強制的に表示する ] | [ Up: Vocal music ] | [ 歌詞音節の間にタイを入力する > ] |
歌詞音節をフォーマットする
単一の歌詞音節にマークアップ モードを使用することができます。
mel = \relative c'' { c4 c c c c1 } lyr = \lyricmode { Your lyrics \markup { \italic can } \markup { \with-color #red contain } \markup { \fontsize #8 \bold Markup! } } << \new Voice = "melody" \mel \new Lyrics \lyricsto "melody" \lyr >>
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < 歌詞音節をフォーマットする ] | [ Up: Vocal music ] | [ 賛美歌のテンプレート > ] |
歌詞音節の間にタイを入力する
これは、音節をチルダで分割することで得ることができます。
\lyrics { wa~o~a }
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < 歌詞音節の間にタイを入力する ] | [ Up: Vocal music ] | [ 歌詞の揃え位置 > ] |
賛美歌のテンプレート
このテンプレートは、それぞれの行が部分小節で開始し終了する賛美歌を作成する方法を示しています。また、詞を音楽の下に単独で表示する方法も示しています。
Timeline = { \time 4/4 \tempo 4=96 \partial 2 s2 | s1 | s2 \breathe s2 | s1 | s2 \caesura \break s2 | s1 | s2 \breathe s2 | s1 | s2 \fine } SopranoMusic = \relative g' { g4 g | g g g g | g g g g | g g g g | g2 g4 g | g g g g | g g g g | g g g g | g2 } AltoMusic = \relative c' { d4 d | d d d d | d d d d | d d d d | d2 d4 d | d d d d | d d d d | d d d d | d2 } TenorMusic = \relative a { b4 b | b b b b | b b b b | b b b b | b2 b4 b | b b b b | b b b b | b b b b | b2 } BassMusic = \relative g { g4 g | g g g g | g g g g | g g g g | g2 g4 g | g g g g | g g g g | g g g g | g2 } global = { \key g \major } \score { % Start score \new PianoStaff << % Start pianostaff \new Staff << % Start Staff = RH \global \clef "treble" \new Voice = "Soprano" << % Start Voice = "Soprano" \Timeline \voiceOne \SopranoMusic >> % End Voice = "Soprano" \new Voice = "Alto" << % Start Voice = "Alto" \Timeline \voiceTwo \AltoMusic >> % End Voice = "Alto" >> % End Staff = RH \new Staff << % Start Staff = LH \global \clef "bass" \new Voice = "Tenor" << % Start Voice = "Tenor" \Timeline \voiceOne \TenorMusic >> % End Voice = "Tenor" \new Voice = "Bass" << % Start Voice = "Bass" \Timeline \voiceTwo \BassMusic >> % End Voice = "Bass" >> % End Staff = LH >> % End pianostaff } % End score \markup \fill-line { \left-column { "This is line one of the first verse" "This is line two of the same" \null "And here's line one of the second verse" "And the next line of the same" } } \layout { \context { \Score caesuraType = #'((bar-line . "||")) fineBarType = "||" } } \paper { % Start paper block indent = 0 % don't indent first system line-width = 130 % shorten line length to suit music tagline = ##f % Don't print tag line, can be removed } % End paper block
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < 賛美歌のテンプレート ] | [ Up: Vocal music ] | [ Marking notes of spoken parts with a cross on the stem (Sprechstimme) > ] |
歌詞の揃え位置
歌詞の水平方向の揃え位置は、LyricText オブジェクトの
self-alignment-X プロパティをオーバライドすることで設定できます。-1 が左、0 が中央、1 が右になります。#LEFT, #CENTER, #RIGHT を用いることもできます。
\layout { ragged-right = ##f } \relative c'' { c1 c c c } \addlyrics { \once \override LyricText.self-alignment-X = #LEFT "left-aligned" \once \override LyricText.self-alignment-X = #CENTER "centered" \once \override LyricText.self-alignment-X = 1 "right-aligned" \once \override LyricText.self-alignment-X = #-1.5 "very right" }
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < 歌詞の揃え位置 ] | [ Up: Vocal music ] | [ オーケストラ、コーラス、ピアノのテンプレート > ] |
Marking notes of spoken parts with a cross on the stem (Sprechstimme)
This example shows how to put crosses on stems. Mark the beginning of a
spoken section with the command \speakOn and end it with
\speakOff.
speakOn = \override Stem.stencil = #(lambda (grob) (let* ((x-parent (ly:grob-parent grob X)) (is-rest? (ly:grob? (ly:grob-object x-parent 'rest)))) (if is-rest? empty-stencil (ly:stencil-combine-at-edge (ly:stem::print grob) Y (- (ly:grob-property grob 'direction)) (grob-interpret-markup grob (markup #:center-align #:fontsize -4 #:musicglyph "noteheads.s2cross")) -1.7)))) speakOff = \revert Stem.stencil \new Staff { \relative c'' { a4 b a c \speakOn g4 f r g8 a b4 r r8 d e4 \speakOff c4 a g f } }
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < Marking notes of spoken parts with a cross on the stem (Sprechstimme) ] | [ Up: Vocal music ] | [ 旋律と歌詞を持つピアノ テンプレート > ] |
オーケストラ、コーラス、ピアノのテンプレート
このテンプレートは StaffGroup と GrandStaff コンテキストをネストさせて用いることで、楽器のサブ グループを表示しています。また、\transpose を使用して、移調楽器の音符をコンサート ピッチの状態で変数に格納しています。
#(set-global-staff-size 17) \paper { indent = 3.0\cm % add space for instrumentName short-indent = 1.5\cm % add less space for shortInstrumentName } fluteMusic = \relative c' { \key g \major g'1 b } % Pitches as written on a manuscript for Clarinet in A % are transposed to concert pitch. clarinetMusic = \transpose c' a \relative c'' { \key bes \major bes1 d } trumpetMusic = \relative c { \key g \major g''1 b } % Key signature is often omitted for horns hornMusic = \transpose c' f \relative c { d'1 fis } percussionMusic = \relative c { \key g \major g1 b } sopranoMusic = \relative c'' { \key g \major g'1 b } sopranoLyrics = \lyricmode { Lyr -- ics } altoIMusic = \relative c' { \key g \major g'1 b } altoILyrics = \sopranoLyrics altoIIMusic = \relative c' { \key g \major g'1 b } altoIILyrics = \lyricmode { Ah -- ah } tenorMusic = \relative c' { \clef "treble_8" \key g \major g1 b } tenorLyrics = \sopranoLyrics pianoRHMusic = \relative c { \key g \major g''1 b } pianoLHMusic = \relative c { \clef bass \key g \major g1 b } violinIMusic = \relative c' { \key g \major g'1 b } violinIIMusic = \relative c' { \key g \major g'1 b } violaMusic = \relative c { \clef alto \key g \major g'1 b } celloMusic = \relative c { \clef bass \key g \major g1 b } bassMusic = \relative c { \clef "bass_8" \key g \major g,1 b } \book { \score { << \new StaffGroup = "StaffGroup_woodwinds" << \new Staff = "Staff_flute" \with { instrumentName = "Flute" } \fluteMusic \new Staff = "Staff_clarinet" \with { instrumentName = \markup { \concat { "Clarinet in B" \flat } } } % Declare that written Middle C in the music % to follow sounds a concert B flat, for % output using sounded pitches such as MIDI. %\transposition bes % Print music for a B-flat clarinet \transpose bes c' \clarinetMusic >> \new StaffGroup = "StaffGroup_brass" << \new Staff = "Staff_hornI" \with { instrumentName = "Horn in F" } % \transposition f \transpose f c' \hornMusic \new Staff = "Staff_trumpet" \with { instrumentName = "Trumpet in C" } \trumpetMusic >> \new RhythmicStaff = "RhythmicStaff_percussion" \with { instrumentName = "Percussion" } \percussionMusic \new PianoStaff \with { instrumentName = "Piano" } << \new Staff { \pianoRHMusic } \new Staff { \pianoLHMusic } >> \new ChoirStaff = "ChoirStaff_choir" << \new Staff = "Staff_soprano" \with { instrumentName = "Soprano" } \new Voice = "soprano" \sopranoMusic \new Lyrics \lyricsto "soprano" { \sopranoLyrics } \new GrandStaff = "GrandStaff_altos" \with { \accepts Lyrics } << \new Staff = "Staff_altoI" \with { instrumentName = "Alto I" } \new Voice = "altoI" \altoIMusic \new Lyrics \lyricsto "altoI" { \altoILyrics } \new Staff = "Staff_altoII" \with { instrumentName = "Alto II" } \new Voice = "altoII" \altoIIMusic \new Lyrics \lyricsto "altoII" { \altoIILyrics } >> \new Staff = "Staff_tenor" \with { instrumentName = "Tenor" } \new Voice = "tenor" \tenorMusic \new Lyrics \lyricsto "tenor" { \tenorLyrics } >> \new StaffGroup = "StaffGroup_strings" << \new GrandStaff = "GrandStaff_violins" << \new Staff = "Staff_violinI" \with { instrumentName = "Violin I" } \violinIMusic \new Staff = "Staff_violinII" \with { instrumentName = "Violin II" } \violinIIMusic >> \new Staff = "Staff_viola" \with { instrumentName = "Viola" } \violaMusic \new Staff = "Staff_cello" \with { instrumentName = "Cello" } \celloMusic \new Staff = "Staff_bass" \with { instrumentName = "Double Bass" } \bassMusic >> >> } }
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < オーケストラ、コーラス、ピアノのテンプレート ] | [ Up: Vocal music ] | [ 歌詞を譜の内部に表示する > ] |
旋律と歌詞を持つピアノ テンプレート
これは一般的な歌曲のフォーマットです: 旋律と歌詞を持つ譜と、その下にピアノ伴奏譜があります。
melody = \relative c'' { \clef treble \key c \major \time 4/4 a b c d } text = \lyricmode { Aaa Bee Cee Dee } upper = \relative c'' { \clef treble \key c \major \time 4/4 a4 b c d } lower = \relative c { \clef bass \key c \major \time 4/4 a2 c } \score { << \new Voice = "mel" { \autoBeamOff \melody } \new Lyrics \lyricsto mel \text \new PianoStaff << \new Staff = "upper" \upper \new Staff = "lower" \lower >> >> \layout { \context { \Staff \RemoveEmptyStaves } } \midi { } }
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < 旋律と歌詞を持つピアノ テンプレート ] | [ Up: Vocal music ] | [ SATB 合唱譜テンプレート - 4 譜 > ] |
歌詞を譜の内部に表示する
歌詞の垂直方向の位置を移動し、譜の内部に表示させることができます。歌詞は
\override LyricText.extra-offset = #'(0 . dy) で移動し、延長線やハイフンを移動する同様のコマンドも必要です。必要な移動量は試行錯誤によって決定します。
<< \new Staff << \new Voice = "voc" \relative c' { \stemDown a bes c8 b c4 } >> \new Lyrics \with { \override LyricText.extra-offset = #'(0 . 8.6) \override LyricExtender.extra-offset = #'(0 . 8.6) \override LyricHyphen.extra-offset = #'(0 . 8.6) } \lyricsto "voc" { La la -- la __ _ la } >>
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < 歌詞を譜の内部に表示する ] | [ Up: Vocal music ] | [ 音符、歌詞、コードを持つ単一譜のテンプレート > ] |
SATB 合唱譜テンプレート - 4 譜
SATB 合唱譜テンプレート (4 譜)
global = { \key c \major \time 4/4 \dynamicUp } sopranonotes = \relative c'' { c2 \p \< d c d \f } sopranowords = \lyricmode { do do do do } altonotes = \relative c'' { c2\p d c d } altowords = \lyricmode { re re re re } tenornotes = { \clef "G_8" c2\mp d c d } tenorwords = \lyricmode { mi mi mi mi } bassnotes = { \clef bass c2\mf d c d } basswords = \lyricmode { mi mi mi mi } \score { \new ChoirStaff << \new Staff << \new Voice = "soprano" << \global \sopranonotes >> \new Lyrics \lyricsto "soprano" \sopranowords >> \new Staff << \new Voice = "alto" << \global \altonotes >> \new Lyrics \lyricsto "alto" \altowords >> \new Staff << \new Voice = "tenor" << \global \tenornotes >> \new Lyrics \lyricsto "tenor" \tenorwords >> \new Staff << \new Voice = "bass" << \global \bassnotes >> \new Lyrics \lyricsto "bass" \basswords >> >> }
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < SATB 合唱譜テンプレート - 4 譜 ] | [ Up: Vocal music ] | [ Single-staff template with notes, lyrics, chords, and frets > ] |
音符、歌詞、コードを持つ単一譜のテンプレート
これは旋律、歌詞、コードを持つ歌曲の楽譜のためのテンプレートです。
melody = \relative c' { \clef treble \key c \major \time 4/4 a4 b c d } text = \lyricmode { Aaa Bee Cee Dee } harmonies = \chordmode { a2 c } \score { << \new ChordNames { \set chordChanges = ##t \harmonies } \new Voice = "one" { \autoBeamOff \melody } \new Lyrics \lyricsto "one" \text >> \layout { } \midi { } }
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < 音符、歌詞、コードを持つ単一譜のテンプレート ] | [ Up: Vocal music ] | [ 音符と歌詞を持つ単一譜のテンプレート > ] |
Single-staff template with notes, lyrics, chords, and frets
Here is a simple lead sheet template with melody, lyrics, chords, and fret diagrams.
verseI = \lyricmode { \set stanza = #"1." This is the first verse } verseII = \lyricmode { \set stanza = #"2." This is the second verse. } theChords = \chordmode { % insert chords for chordnames and fretboards here c2 g4 c } staffMelody = \relative c' { \key c \major \clef treble % Type notes for melody here c4 d8 e f4 g \bar "|." } \score { << \context ChordNames { \theChords } \context FretBoards { \theChords } \new Staff { \context Voice = "voiceMelody" { \staffMelody } } \new Lyrics = "lyricsI" { \lyricsto "voiceMelody" \verseI } \new Lyrics = "lyricsII" { \lyricsto "voiceMelody" \verseII } >> \layout { } \midi { } }
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < Single-staff template with notes, lyrics, chords, and frets ] | [ Up: Vocal music ] | [ 歌詞モードでのスキップ > ] |
音符と歌詞を持つ単一譜のテンプレート
この小さなテンプレートは歌詞を持つ簡単な旋律を表しています。カット&ペーストして、音符を付け加えて、それから歌詞の単語を付け加えてください。この例は自動ビームを off にしています。これはボーカル パートでは一般的なことです。自動ビームを使用するには、対応する行を変更するか、コメント アウトしてください。
melody = \relative c' { \clef treble \key c \major \time 4/4 a4 b c d } text = \lyricmode { Aaa Bee Cee Dee } \score{ << \new Voice = "one" { \autoBeamOff \melody } \new Lyrics \lyricsto "one" \text >> \layout { } \midi { } }
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < 音符と歌詞を持つ単一譜のテンプレート ] | [ Up: Vocal music ] | [ 歌詞モードでのスキップ (2) > ] |
歌詞モードでのスキップ
s によるスキップは音符モードや和音モードのみで有効です。歌詞モードなどの他の場合では、\skip コマンドを使用することが推奨されます。
<< \relative c'' { a1 | a } \new Lyrics \lyricmode { \skip1 bla1 } >>
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < 歌詞モードでのスキップ ] | [ Up: Vocal music ] | [ Using \arpeggioBracket to make divisi more visible > ] |
歌詞モードでのスキップ (2)
s は \lyricmode では使用できません
(“s” という歌詞が入力されるだけです) が、ダブルクォート ("")
やアンダースコア (_) を使用することができます。例:
<< \relative c'' { a4 b c d } \new Lyrics \lyricmode { a4 "" _ gap } >>
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < 歌詞モードでのスキップ (2) ] | [ Up: Vocal music ] | [ タグを使用して同じソースから計量音楽譜と現代譜を生成する > ] |
Using \arpeggioBracket to make divisi more visible
The \arpeggioBracket command can be used to indicate the
division of voices where there are no stems to provide the information.
This is often seen in choral music.
\include "english.ly" \score { \relative c'' { \key a \major \time 2/2 << \new Voice = "upper" << { \voiceOne \arpeggioBracket a2( b2 <b d>1\arpeggio) <cs e>\arpeggio ~ <cs e>4 } \addlyrics { \lyricmode { A -- men. } } >> \new Voice = "lower" { \voiceTwo a1 ~ a a ~ a4 \bar "|." } >> } }
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < Using \arpeggioBracket to make divisi more visible ] | [ Up: Vocal music ] | [ オッシアと歌詞の縦方向の揃え位置 > ] |
タグを使用して同じソースから計量音楽譜と現代譜を生成する
タグを使用して、同じ音楽に対して計量音楽譜と現代譜の両方を生成することができます。このスニペットでは、menrest 関数が定義されており、計量音楽における休符の位置は維持しながら、現代譜における休符は通常の位置に配置しています。タグは曲の終わりにある小節線を 2 つの楽譜で異なるものにするために使用していますが、区別が必要な他の場面でも用いることができます:
例えば、現代譜では “全休符” (R1, R\breve など) を使用したいが、計量音楽譜では通常の休符 (r1, r\breve など) を使用したい場合です。計量音楽を現代音楽に変換する作業は通常 “転写 (transcription)” と呼ばれます。
\layout { line-width = 150\mm } menrest = #(define-music-function (note) (ly:music?) #{ \tag #'mens $(make-music 'RestEvent note) \tag #'mod $(make-music 'RestEvent note 'pitch '()) #}) Be = \tag #'mod #(begin (ly:expect-warning (G_ "stem does not fit in beam")) (ly:expect-warning (G_ "beam was started here")) (make-span-event 'BeamEvent START)) Am = \tag #'mod ] MenStyle = { \override Score.BarNumber.transparent = ##t \override Stem.neutral-direction = #up \omit Slur \omit Beam } finalis = \section Music = \relative c'' { \key f \major g1 d'2 \menrest bes4 bes a2 \menrest r4 g4 fis4. fis8 fis4 fis g e f4.([ g8] a4[ g8 f] g2.\Be fis8 e\Am fis2) g\breve \finalis } MenLyr = \lyricmode { So farre, deere life, deare life, from thy bright beames ab- ſen- ted, } ModLyr = \lyricmode { So far, dear life, dear life, from your bright beams ab -- sen -- ted, __ } \markup \with-true-dimensions % work around a cropping issue \score { \keepWithTag #'mens { << \new PetrucciStaff { \new PetrucciVoice = "Cantus" { \clef "petrucci-c1" \time 4/4 \MenStyle \Music } } \new Lyrics \lyricsto "Cantus" \MenLyr >> } \layout { \context { \PetrucciVoice % No longer necessary starting with version 2.25.23. \override Flag.style = #'mensural } } } \markup\vspace #1 \score { \keepWithTag #'mod { \new ChoirStaff << \new Staff { \new Voice = "Sop" \with { \remove "Note_heads_engraver" \consists "Completion_heads_engraver" \remove "Rest_engraver" \consists "Completion_rest_engraver" } \shiftDurations 1 0 { \time 2/4 \autoBeamOff \Music } } \new Lyrics \lyricsto "Sop" \ModLyr >> } }
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < タグを使用して同じソースから計量音楽譜と現代譜を生成する ] | [ Up: Vocal music ] | [ Vertically aligning stanza numbers of different staves > ] |
オッシアと歌詞の縦方向の揃え位置
このスニペットは、歌詞とオッシアの位置を調整するために
alignBelowContext と alignAboveContext コンテキスト
プロパティを使用する方法を示しています。
\relative c' << \new Staff = "1" { c4 c c c } \new Staff = "2" { d4 d d d } \new Staff = "3" { e4 e e e } { \skip 2 << \lyrics { \set alignBelowContext = "1" lyrics4 below } \new Staff \with { alignAboveContext = "3" fontSize = -2 \override StaffSymbol.staff-space = #(magstep -2) \remove "Time_signature_engraver" \override VerticalAxisGroup.staff-staff-spacing = #'((minimum-distance . 0) (basic-distance . 0) (padding . 1)) } { \tuplet 6/4 { \override TextScript.padding = 2 c8[^"ossia above" d e d e f] } } >> } >>
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < オッシアと歌詞の縦方向の揃え位置 ] | [ Up: Vocal music ] | [ 共通な歌詞を縦方向に中央揃えする > ] |
Vertically aligning stanza numbers of different staves
It can happen that stanza numbers don’t align vertically if the verses
are attached to different staves. To fix that, override the
self-alignment-X property of the LyricText grob.
\markup { default behavior } << \new Staff { b b b b } \lyrics { \set stanza = "3." a a a a } \new Staff { b b b b } \lyrics { \set stanza = "1." aaaaaaaaaa a a a } \lyrics { \set stanza = "2." a a a a } >> \markup \vspace #1 \markup { using \typewriter "self-alignment-X = #LEFT" } << \new Staff { b b b b } \new Lyrics \lyricmode { \set stanza = "3." a a a a } \new Staff { b b b b } \new Lyrics \lyricmode { \set stanza = "1." \once \override LyricText.self-alignment-X = #LEFT aaaaaaaaaa a a a } \new Lyrics \lyricmode { \set stanza = "2." a a a a } >>
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < Vertically aligning stanza numbers of different staves ] | [ Up: Vocal music ] | [ 合唱テンプレート > ] |
共通な歌詞を縦方向に中央揃えする
歌曲では、複数行 (2 行, 4 行あるいはそれ以上) の歌詞があり、全てのボイスに共通な歌詞はどこかにまとめられます。共通な歌詞は次の例のように、縦方向に中央揃えされるように配置されます:
dropLyrics = { \override LyricText.extra-offset = #'(0 . -4.5) \override LyricHyphen.extra-offset = #'(0 . -4.5) \override LyricExtender.extra-offset = #'(0 . -4.5) \override StanzaNumber.extra-offset = #'(0 . -4.5) } raiseLyrics = { \revert LyricText.extra-offset \revert LyricHyphen.extra-offset \revert LyricExtender.extra-offset \revert StanzaNumber.extra-offset } skipFour = \repeat unfold 4 { \skip 8 } lyricsA = \lyricmode { The first verse has \dropLyrics \set stanza = #" All:" the com -- mon __ words \raiseLyrics used in all four. } lyricsB = \lyricmode { In stan -- za two, \skipFour al -- so ap -- pear. } lyricsC = \lyricmode { By the third verse, \skipFour are get -- ting dull. } lyricsD = \lyricmode { Last stan -- za, and \skipFour get used once more. } melody = \relative c' { c4 d e f | g f e8( e f) d | c4 e d c | } \score { << \new Voice = m \melody \new Lyrics \lyricsto m \lyricsA \new Lyrics \lyricsto m \lyricsB \new Lyrics \lyricsto m \lyricsC \new Lyrics \lyricsto m \lyricsD >> }
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < 共通な歌詞を縦方向に中央揃えする ] | [ Up: Vocal music ] | [ 自動ピアノ伴奏譜を持つ合唱譜 > ] |
合唱テンプレート
これは標準の 4 パート SATB (ソプラノ、アルト、テナー、バス) ボーカル譜です。もっと大きな合唱では、すべてのパートで使用されるセクションをインクルードすると便利です。例えば、拍子記号と調号はほとんど常にすべてのパートで同じです。“賛美歌” テンプレートのように、4 つのボイスは 2 つの譜にグループ分けされています。
\paper { top-system-spacing.basic-distance = 10 score-system-spacing.basic-distance = 20 system-system-spacing.basic-distance = 20 last-bottom-spacing.basic-distance = 10 } global = { \key c \major \time 4/4 } sopMusic = \relative { c''4 c c8[( b)] c4 } sopWords = \lyricmode { hi hi hi hi } altoMusic = \relative { e'4 f d e } altoWords = \lyricmode { ha ha ha ha } tenorMusic = \relative { g4 a f g } tenorWords = \lyricmode { hu hu hu hu } bassMusic = \relative { c4 c g c } bassWords = \lyricmode { ho ho ho ho } \score { \new ChoirStaff << \new Lyrics = "sopranos" \with { % this is needed for lyrics above a staff \override VerticalAxisGroup.staff-affinity = #DOWN } \new Staff = "women" << \new Voice = "sopranos" { \voiceOne << \global \sopMusic >> } \new Voice = "altos" { \voiceTwo << \global \altoMusic >> } >> \new Lyrics = "altos" \new Lyrics = "tenors" \with { % this is needed for lyrics above a staff \override VerticalAxisGroup.staff-affinity = #DOWN } \new Staff = "men" << \clef bass \new Voice = "tenors" { \voiceOne << \global \tenorMusic >> } \new Voice = "basses" { \voiceTwo << \global \bassMusic >> } >> \new Lyrics = "basses" \context Lyrics = "sopranos" \lyricsto "sopranos" \sopWords \context Lyrics = "altos" \lyricsto "altos" \altoWords \context Lyrics = "tenors" \lyricsto "tenors" \tenorWords \context Lyrics = "basses" \lyricsto "basses" \bassWords >> }
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < 合唱テンプレート ] | [ Up: Vocal music ] | [ 上下に歌詞を配置した合唱譜テンプレート > ] |
自動ピアノ伴奏譜を持つ合唱譜
このテンプレートは、“合唱テンプレート” で示した標準の SATB ボーカル譜に自動ピアノ譜を付け加えています。これは LilyPond の強みの 1 つを示しています - 音楽定義を何回も使用することができます。ボーカルの音符 (例えば、tenorMusic
の音符) に変更が加えられた場合、その変更はピアノ譜にも適用されます。
\paper { top-system-spacing.basic-distance = 10 score-system-spacing.basic-distance = 20 system-system-spacing.basic-distance = 20 last-bottom-spacing.basic-distance = 10 } global = { \key c \major \time 4/4 } sopMusic = \relative { c''4 c c8[( b)] c4 } sopWords = \lyricmode { hi hi hi hi } altoMusic = \relative { e'4 f d e } altoWords =\lyricmode { ha ha ha ha } tenorMusic = \relative { g4 a f g } tenorWords = \lyricmode { hu hu hu hu } bassMusic = \relative { c4 c g c } bassWords = \lyricmode { ho ho ho ho } \score { << \new ChoirStaff << \new Lyrics = "sopranos" \with { % This is needed for lyrics above a staff \override VerticalAxisGroup.staff-affinity = #DOWN } \new Staff = "women" << \new Voice = "sopranos" { \voiceOne << \global \sopMusic >> } \new Voice = "altos" { \voiceTwo << \global \altoMusic >> } >> \new Lyrics = "altos" \new Lyrics = "tenors" \with { % This is needed for lyrics above a staff \override VerticalAxisGroup.staff-affinity = #DOWN } \new Staff = "men" << \clef bass \new Voice = "tenors" { \voiceOne << \global \tenorMusic >> } \new Voice = "basses" { \voiceTwo << \global \bassMusic >> } >> \new Lyrics = "basses" \context Lyrics = "sopranos" \lyricsto "sopranos" \sopWords \context Lyrics = "altos" \lyricsto "altos" \altoWords \context Lyrics = "tenors" \lyricsto "tenors" \tenorWords \context Lyrics = "basses" \lyricsto "basses" \bassWords >> \new PianoStaff << \new Staff << \set Staff.printPartCombineTexts = ##f \partCombine << \global \sopMusic >> << \global \altoMusic >> >> \new Staff << \clef bass \set Staff.printPartCombineTexts = ##f \partCombine << \global \tenorMusic >> << \global \bassMusic >> >> >> >> }
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < 自動ピアノ伴奏譜を持つ合唱譜 ] | [ Up: Vocal music ] | [ 詩句とリフレインからなる合唱譜 > ] |
上下に歌詞を配置した合唱譜テンプレート
このテンプレートは基本的に単純な “合唱” テンプレートと同じですが、歌詞が
alignAboveContext と alignBelowContext を用いて配置されています。
global = { \key c \major \time 4/4 } sopMusic = \relative c'' { c4 c c8[( b)] c4 } sopWords = \lyricmode { hi hi hi hi } altoMusic = \relative c' { e4 f d e } altoWords = \lyricmode { ha ha ha ha } tenorMusic = \relative c' { g4 a f g } tenorWords = \lyricmode { hu hu hu hu } bassMusic = \relative c { c4 c g c } bassWords = \lyricmode { ho ho ho ho } \score { \new ChoirStaff << \new Staff = "women" << \new Voice = "sopranos" { \voiceOne << \global \sopMusic >> } \new Voice = "altos" { \voiceTwo << \global \altoMusic >> } >> \new Lyrics \with { alignAboveContext = "women" } \lyricsto "sopranos" \sopWords \new Lyrics \with { alignBelowContext = "women" } \lyricsto "altos" \altoWords % we could remove the line about this with the line below, since % we want the alto lyrics to be below the alto Voice anyway. % \new Lyrics \lyricsto "altos" \altoWords \new Staff = "men" << \clef bass \new Voice = "tenors" { \voiceOne << \global \tenorMusic >> } \new Voice = "basses" { \voiceTwo << \global \bassMusic >> } >> \new Lyrics \with { alignAboveContext = "men" } \lyricsto "tenors" \tenorWords \new Lyrics \with { alignBelowContext = "men" } \lyricsto "basses" \bassWords % again, we could replace the line above this with the line below. % \new Lyrics \lyricsto "basses" \bassWords >> }
| [ << Vocal music ] | [Top][Contents] | [ Chord notation >> ] |
| [ < 上下に歌詞を配置した合唱譜テンプレート ] | [ Up: Vocal music ] | [ Chord notation > ] |
詩句とリフレインからなる合唱譜
このテンプレートでは、ソロの詩句から始まり、2 つのボイスからなるリフレインが続く楽譜を作成できます。また、\global 変数を用いて、拍子記号の変更 (や、その他の全パートに共通な部分) を楽譜全体に反映させる例も示しています。タイミングを合わせるために空白休符を用いています。
global = { \key g \major % verse \time 3/4 s2.*2 \break % refrain \time 2/4 s2*2 \bar "|." } SoloNotes = \relative g' { \clef "treble" % verse g4 g g | b4 b b | % refrain R2*2 | } SoloLyrics = \lyricmode { One two three | four five six | } SopranoNotes = \relative c'' { \clef "treble" % verse R2.*2 | % refrain c4 c | g4 g | } SopranoLyrics = \lyricmode { la la | la la | } BassNotes = \relative c { \clef "bass" % verse R2.*2 | % refrain c4 e | d4 d | } BassLyrics = \lyricmode { dum dum | dum dum | } \score { << \new Voice = "SoloVoice" << \global \SoloNotes >> \new Lyrics \lyricsto "SoloVoice" \SoloLyrics \new ChoirStaff << \new Voice = "SopranoVoice" << \global \SopranoNotes >> \new Lyrics \lyricsto "SopranoVoice" \SopranoLyrics \new Voice = "BassVoice" << \global \BassNotes >> \new Lyrics \lyricsto "BassVoice" \BassLyrics >> >> \layout { ragged-right = ##t \context { \Staff % these lines prevent empty staves from being printed \RemoveEmptyStaves \override VerticalAxisGroup.remove-first = ##t } } }
| [ << Vocal music ] | [Top][Contents] | [ Keyboard and other multi-staff instruments >> ] |
| [ < 詩句とリフレインからなる合唱譜 ] | [ Up: Top ] | [ 通奏低音を音符の上か下に追加する > ] |
10 Chord notation
See also Chord notation.
| [ << Chord notation ] | [Top][Contents] | [ Keyboard and other multi-staff instruments >> ] |
| [ < Chord notation ] | [ Up: Chord notation ] | [ ChordNames コンテキストに小節線を追加する > ] |
通奏低音を音符の上か下に追加する
通奏低音を記述する際、BassFigureAlignmentPositioning.direction
プロパティを定義することで (Staff コンテキストである必要があります)、数字を音符の上または下に配置することができます。セットできる選択肢は
#UP (または #1), #CENTER (または #0),
#DOWN (または #-1) です。
このプロパティはいつでも変更することができます。楽譜全体に変更を適用したくない場合は、\once \override を使用してください。
bass = { \clef bass g4 b, c d | e d8 c d2 } continuo = \figuremode { <_>4 <6>4 <5/>4 \bassFigureStaffAlignmentUp <_+>4 <6> | \set Staff.useBassFigureExtenders = ##t \bassFigureStaffAlignmentDown <4>4. <4>8 <_+>4 } \score { << \new Staff = bassStaff \bass \context Staff = bassStaff \continuo >> }
| [ << Chord notation ] | [Top][Contents] | [ Keyboard and other multi-staff instruments >> ] |
| [ < 通奏低音を音符の上か下に追加する ] | [ Up: Chord notation ] | [ Adjusting figured bass alteration glyphs > ] |
ChordNames コンテキストに小節線を追加する
ChordNames コンテキストに小節線を追加するには、Bar_engraver を追加します。
\new ChordNames \with { \override BarLine.bar-extent = #'(-1 . 3) \consists "Bar_engraver" } \chordmode { f1:maj7 f:7 bes:7 }
| [ << Chord notation ] | [Top][Contents] | [ Keyboard and other multi-staff instruments >> ] |
| [ < ChordNames コンテキストに小節線を追加する ] | [ Up: Chord notation ] | [ Changing a single note’s size in a chord > ] |
Adjusting figured bass alteration glyphs
In figured bass, specially designed glyphs for 6\\,
7\\, and 9\\ are used by default. Similarly,
specially designed glyphs for symbols 2\+, 4\+, and
5\+ are used by default if plus signs appear after the number.
To change that, pass an alist to figuredBassPlusStrokedAlist and
set the glyph in question to #f (or omit it).
#(set-global-staff-size 26) \figures { \set figuredBassPlusDirection = #RIGHT <6\\> <7\\> <9\\> r <2\+> <4\+> <5\+> r \set figuredBassPlusStrokedAlist = #'((2 . "figbass.twoplus") ;; (4 . "figbass.fourplus") ;; (5 . "figbass.fiveplus") (6 . "figbass.sixstroked") ;; (7 . "figbass.sevenstroked") ;; (9 . "figbass.ninestroked") ) <6\\> <7\\> <9\\> r <2\+> <4\+> <5\+> r }
| [ << Chord notation ] | [Top][Contents] | [ Keyboard and other multi-staff instruments >> ] |
| [ < Adjusting figured bass alteration glyphs ] | [ Up: Chord notation ] | [ コード ネームの区切り記号を変更する > ] |
Changing a single note’s size in a chord
Individual note heads in a chord can be modified with the
\tweak command inside a chord, by altering the font-size
property.
Inside the chord (within the brackets < >), before the note to
be altered, place the \tweak command, followed by
font-size and define the proper size like #-2 (a tiny
note head).
\relative c' { <\tweak font-size #+2 c e g c \tweak font-size #-2 e>1 ^\markup { A tiny e }_\markup { A big c } }
| [ << Chord notation ] | [Top][Contents] | [ Keyboard and other multi-staff instruments >> ] |
| [ < Changing a single note’s size in a chord ] | [ Up: Chord notation ] | [ 通奏低音の変化記号の位置を変更する > ] |
コード ネームの区切り記号を変更する
コード ネームの異なる部分を区切る記号は、任意のマークアップに設定することができます。
\chords { c:7sus4 \set chordNameSeparator = \markup { \typewriter | } c:7sus4 }
| [ << Chord notation ] | [Top][Contents] | [ Keyboard and other multi-staff instruments >> ] |
| [ < コード ネームの区切り記号を変更する ] | [ Up: Chord notation ] | [ コード ネームの例外 > ] |
通奏低音の変化記号の位置を変更する
数字付き低音の前後に表示される臨時記号やプラス記号は、その位置を
figuredBassAlterationDirection や
figuredBassPlusDirection プロパティによって変更することができます。
#(set-global-staff-size 26) \figures { <5\+> <5+ 4\+> <6 4- 2\+> r \set figuredBassAlterationDirection = #RIGHT <5\+> <5+ 4\+> <6 4- 2\+> r \set figuredBassPlusDirection = #RIGHT <5\+> <5+ 4\+> <6 4- 2\+> r \set figuredBassAlterationDirection = #LEFT <5\+> <5+ 4\+> <6 4- 2\+> r }
| [ << Chord notation ] | [Top][Contents] | [ Keyboard and other multi-staff instruments >> ] |
| [ < 通奏低音の変化記号の位置を変更する ] | [ Up: Chord notation ] | [ メジャー セブンスのコード ネーム > ] |
コード ネームの例外
特殊なコードに対して専用の表記をするためのリストを保持するのが
chordNameExceptions プロパティです。
% Step 1: Define music with chords and markup for maj9 and 6(add9). chExceptionMusic = { <c e g b d'>-\markup { \super "maj9" } <c e g a d'>-\markup { \super "6(add9)" } } % Step 2: Create extended exception list. chExceptions = #(append (sequential-music-to-chord-exceptions chExceptionMusic #t) ignatzekExceptions) theMusic = \chordmode { g1:maj9 g1:6.9 % Step 3: Register extended exception list. \set chordNameExceptions = #chExceptions g1:maj9 g1:6.9 } \layout { ragged-right = ##t } << \new ChordNames \theMusic \new Voice \theMusic >>
| [ << Chord notation ] | [Top][Contents] | [ Keyboard and other multi-staff instruments >> ] |
| [ < コード ネームの例外 ] | [ Up: Chord notation ] | [ Chord names alternative > ] |
メジャー セブンスのコード ネーム
メジャー セブンスのレイアウトは majorSevenSymbol で調整することができます。
\chords { c:7+ \set majorSevenSymbol = \markup { j7 } c:7+ }
| [ << Chord notation ] | [Top][Contents] | [ Keyboard and other multi-staff instruments >> ] |
| [ < メジャー セブンスのコード ネーム ] | [ Up: Chord notation ] | [ Chords with stretched fingering for FretBoards and TabVoice > ] |
Chord names alternative
Chord names are generated from a list of pitches. The functions which construct these names can be customised.
Here are shown chords following Ignatzek (pp. 17-18, 1995), used by default since LilyPond 1.7.20, compared with an alternative Jazz chord notation and Harald Banter’s (1987) notation. A smaller font is used in the latter case, as these tend to be overly verbose.
This mirrors the mechanism originally used in early LilyPond versions (pre-1.7); not having been properly maintained, however, some features have been lost (mainly chord exception lists) and bugs have been introduced.
%%%% Legacy chord naming functions (formerly in scm/chord-generic-names.scm) %%%% Copyright (C) 2003--2023 Jan Nieuwenhuizen <janneke@gnu.org> #(set-global-staff-size 19.7) #(define-public (banter-chordnames pitches bass inversion context) (old_chord->markup 'banter pitches bass inversion context)) #(define-public (jazz-chordnames pitches bass inversion context) (old_chord->markup 'jazz pitches bass inversion context)) #(define (define-translator-property symbol type? description) (if (not (and (symbol? symbol) (procedure? type?) (string? description))) (ly:error "error in call of define-translator-property")) (if (not (equal? (object-property symbol 'translation-doc) #f)) (ly:error (G_ "symbol ~S redefined") symbol)) (set-object-property! symbol 'translation-type? type?) (set-object-property! symbol 'translation-doc description) symbol) #(for-each (lambda (x) (apply define-translator-property x)) `((chordNameExceptionsFull ,list? "An alist of full chord exceptions. Contains @code{(@var{chord} . @var{markup})} entries.") (chordNameExceptionsPartial ,list? "An alist of partial chord exceptions. Contains @code{(@var{chord} . (@var{prefix-markup} @var{suffix-markup}))} entries."))) #(define-public (old_chord->markup style pitches bass inversion context) "Entry point for @code{Chord_name_engraver}. @var{pitches}, @var{bass}, and @var{inversion} are lily pitches." (define (default-note-namer pitch) (note-name->markup pitch #f)) (define (markup-or-empty-markup markup) "Return MARKUP if markup, else empty-markup" (if (markup? markup) markup empty-markup)) (define (accidental->markup alteration) "Return accidental markup for ALTERATION." (if (= alteration 0) (make-line-markup (list empty-markup)) (conditional-kern-before (alteration->text-accidental-markup alteration) (= alteration FLAT) 0.094725))) (define (list-minus a b) "Return list of elements in A that are not in B." (lset-difference eq? a b)) (define (markup-join markups sep) "Return line-markup of MARKUPS, joining them with markup SEP" (if (pair? markups) (make-line-markup (list-insert-separator markups sep)) empty-markup)) (define (conditional-kern-before markup bool amount) "Add AMOUNT of space before MARKUP if BOOL is true." (if bool (make-line-markup (list (make-hspace-markup amount) markup)) markup)) (define (step-nr pitch) (let* ((pitch-nr (+ (* 7 (ly:pitch-octave pitch)) (ly:pitch-notename pitch))) (root-nr (+ (* 7 (ly:pitch-octave (car pitches))) (ly:pitch-notename (car pitches))))) (+ 1 (- pitch-nr root-nr)))) (define (next-third pitch) (+ pitch (ly:make-pitch 0 2 (if (or (= (step-nr pitch) 3) (= (step-nr pitch) 5)) FLAT 0)))) (define (step-alteration pitch) (let* ((normalized-pitch (- pitch (car pitches))) (alteration (ly:pitch-alteration normalized-pitch))) (if (= (step-nr pitch) 7) (+ alteration SEMI-TONE) alteration))) (define (pitch-unalter pitch) (let ((alteration (step-alteration pitch))) (if (= alteration 0) pitch (ly:make-pitch (ly:pitch-octave pitch) (ly:pitch-notename pitch) (- (ly:pitch-alteration pitch) alteration))))) (define (step-even-or-altered? pitch) (let ((nr (step-nr pitch))) (if (!= (modulo nr 2) 0) (!= (step-alteration pitch) 0) #t))) (define (step->markup-plusminus pitch) (let ((alt (step-alteration pitch))) (make-line-markup (list (number->string (step-nr pitch)) (cond ((= alt DOUBLE-FLAT) "--") ((= alt FLAT) "-") ((= alt NATURAL) "") ((= alt SHARP) "+") ((= alt DOUBLE-SHARP) "++")))))) (define (step->markup-accidental pitch) (make-line-markup (list (accidental->markup (step-alteration pitch)) (make-simple-markup (number->string (step-nr pitch)))))) (define (step->markup-ignatzek pitch) (make-line-markup (if (and (= (step-nr pitch) 7) (= (step-alteration pitch) 1)) (list (ly:context-property context 'majorSevenSymbol)) (list (accidental->markup (step-alteration pitch)) (make-simple-markup (number->string (step-nr pitch))))))) ;; tja, kennok (define (make-sub->markup step->markup) (lambda (pitch) (make-line-markup (list (make-simple-markup "no") (step->markup pitch))))) (define (step-based-sub->markup step->markup pitch) (make-line-markup (list (make-simple-markup "no") (step->markup pitch)))) (define (get-full-list pitch) (if (<= (step-nr pitch) (step-nr (last pitches))) (cons pitch (get-full-list (next-third pitch))) '())) (define (get-consecutive nr pitches) (if (pair? pitches) (let* ((pitch-nr (step-nr (car pitches))) (next-nr (if (!= (modulo pitch-nr 2) 0) (+ pitch-nr 2) nr))) (if (<= pitch-nr nr) (cons (car pitches) (get-consecutive next-nr (cdr pitches))) '())) '())) ;;; FIXME -- exceptions no longer work. -vv (define (full-match exceptions) (if (pair? exceptions) (let* ((e (car exceptions)) (e-pitches (car e))) (if (equal? e-pitches pitches) e (full-match (cdr exceptions)))) #f)) (define (partial-match exceptions) (if (pair? exceptions) (let* ((e (car exceptions)) (e-pitches (car e))) (if (equal? e-pitches (take pitches (length e-pitches))) e (partial-match (cdr exceptions)))) #f)) ;; FIXME: exceptions don't work anyway. (if #f (begin (write-me "pitches: " pitches))) (let* ((full-exceptions (ly:context-property context 'chordNameExceptionsFull)) (full-exception (full-match full-exceptions)) (full-markup (if full-exception (cadr full-exception) '())) (partial-exceptions (ly:context-property context 'chordNameExceptionsPartial)) (partial-exception (partial-match partial-exceptions)) (partial-pitches (if partial-exception (car partial-exception) '())) (partial-markup-prefix (if partial-exception (markup-or-empty-markup (cadr partial-exception)) empty-markup)) (partial-markup-suffix (if (and partial-exception (pair? (cddr partial-exception))) (markup-or-empty-markup (caddr partial-exception)) empty-markup)) (root (car pitches)) (full (get-full-list root)) ;; kludge alert: replace partial matched lower part of all with ;; 'normal' pitches from full ;; (all pitches) (all (append (take full (length partial-pitches)) (drop pitches (length partial-pitches)))) (highest (last all)) (missing (list-minus full (map pitch-unalter all))) (consecutive (get-consecutive 1 all)) (rest (list-minus all consecutive)) (altered (filter step-even-or-altered? all)) (cons-alt (filter step-even-or-altered? consecutive)) (base (list-minus consecutive altered))) (if #f (begin (write-me "full:" full) ;; (write-me "partial-pitches:" partial-pitches) (write-me "full-markup:" full-markup) (write-me "partial-markup-perfix:" partial-markup-prefix) (write-me "partial-markup-suffix:" partial-markup-suffix) (write-me "all:" all) (write-me "altered:" altered) (write-me "missing:" missing) (write-me "consecutive:" consecutive) (write-me "rest:" rest) (write-me "base:" base))) (case style ((banter) ;; root ;; + steps:altered + (highest all -- if not altered) ;; + subs:missing (let* ((root->markup default-note-namer) (step->markup step->markup-plusminus) (sub->markup (lambda (x) (step-based-sub->markup step->markup x))) (sep (make-simple-markup "/"))) (if (pair? full-markup) (make-line-markup (list (root->markup root) full-markup)) (make-line-markup (list (root->markup root) partial-markup-prefix (make-super-markup (markup-join (append (map step->markup (append altered (if (and (> (step-nr highest) 5) (not (step-even-or-altered? highest))) (list highest) '()))) (list partial-markup-suffix) (map sub->markup missing)) sep))))))) ((jazz) ;; root ;; + steps:(highest base) + cons-alt ;; + 'add' ;; + steps:rest (let* ((root->markup default-note-namer) (step->markup step->markup-ignatzek) (sep (make-simple-markup " ")) (add-prefix (make-simple-markup " add"))) (if (pair? full-markup) (make-line-markup (list (root->markup root) full-markup)) (make-line-markup (list (root->markup root) partial-markup-prefix (make-super-markup (make-line-markup (list ;; kludge alert: omit <= 5 ;;(markup-join (map step->markup ;; (cons (last base) cons-alt)) sep) ;; This fixes: ;; c C5 -> C ;; c:2 C5 2 -> C2 ;; c:3- Cm5 -> Cm ;; c:6.9 C5 6add9 -> C6 add 9 (add?) ;; ch = \chords { c c:2 c:3- c:6.9^7 } (markup-join (map step->markup (let ((tb (last base))) (if (> (step-nr tb) 5) (cons tb cons-alt) cons-alt))) sep) (if (pair? rest) add-prefix empty-markup) (markup-join (map step->markup rest) sep) partial-markup-suffix)))))))) (else empty-markup)))) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%% %%%% Here begins the actual snippet: chs = \transpose c' c' { <c e g>1 <c es g> % m = minor triad <c e gis> <c es ges> \break <c e g bes> <c es g bes> <c e g b> % triangle = maj <c es ges beses> <c es ges b> \break <c e gis bes> <c es g b> <c e gis b> <c es ges bes> \break <c e g a> % 6 = major triad with added sixth <c es g a> % m6 = minor triad with added sixth <c e g bes d'> <c es g bes d'> \break <c es g bes d' f' a' > <c es g bes d' f' > <c es ges bes d' > <c e g bes des' > \break <c e g bes dis'> <c e g bes d' f'> <c e g bes d' fis'> <c e g bes d' f' a'> \break <c e g bes d' fis' as'> <c e gis bes dis'> <c e g bes dis' fis'> <c e g bes d' f' as'> \break <c e g bes des' f' as'> <c e g bes d' fis'> <c e g b d'> <c e g bes d' f' as'> \break <c e g bes des' f' as'> <c e g bes des' f' a'> <c e g b d'> <c e g b d' f' a'> \break <c e g b d' fis'> <c e g bes des' f ' a'> <c f g> <c f g bes> \break <c f g bes d'> <c e g d'> % add9 <c es g f'> <c e g b fis'> % Lydian <c e g bes des' ees' fis' aes'> % altered chord } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % alternate Jazz notation efullmusicJazzAlt = { <c e gis>1-\markup { "+" } <c e g b>-\markup { \normal-size-super % \override #'(font-family . math) "N" \override #'(font-family . math) "M" } %%c:3.5.7 = \markup { \override #'(font-family . math) "M" } %%c:3.5.7 = \markup { \normal-size-super "maj7" } <c es ges>-\markup { \super "o" } % should be $\circ$ ? <c es ges bes>-\markup { \super \combine "o" "/" } <c es ges beses>-\markup { \super "o7" } } efullJazzAlt = #(sequential-music-to-chord-exceptions efullmusicJazzAlt #f) epartialmusicJazzAlt = { <c d>1-\markup { \normal-size-super "2" } <c es>-\markup { "m" } <c f>-\markup { \normal-size-super "sus4" } <c g>-\markup { \normal-size-super "5" } %% TODO, partial exceptions <c es f>-\markup { "m" }-\markup { \normal-size-super "sus4" } <c d es>-\markup { "m" }-\markup { \normal-size-super "sus2" } } epartialJazzAlt = #(sequential-music-to-chord-exceptions epartialmusicJazzAlt #f) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \score { << \new ChordNames { %% Already set by default: %\set chordNameFunction = #ignatzek-chord-names \set instrumentName = "Ignatzek" \set shortInstrumentName = "Def" \chs } \new ChordNames { \set chordNameFunction = #jazz-chordnames \set majorSevenSymbol = \whiteTriangleMarkup \set chordNameSeparator = "/" \set chordNameExceptionsFull = \efullJazzAlt \set chordNameExceptionsPartial = \epartialJazzAlt \set instrumentName = "Alternative" \set shortInstrumentName = "Alt" \chs } %% This is the Banter (1987) style. It gives exceedingly %% verbose (wide) names, making the output file take up to 4 pages. \new ChordNames { \set chordNameFunction = #banter-chordnames \override ChordName.font-size = -3 \set instrumentName = "Banter" \set shortInstrumentName = "Ban" \chs } \new Staff \transpose c c' { \chs } >> \layout { #(layout-set-staff-size 16) system-system-spacing.basic-distance = 0 \context { \ChordNames \consists "Instrument_name_engraver" } \context { \Score \remove "Bar_number_engraver" } } }
| [ << Chord notation ] | [Top][Contents] | [ Keyboard and other multi-staff instruments >> ] |
| [ < Chord names alternative ] | [ Up: Chord notation ] | [ クラスタ > ] |
Chords with stretched fingering for FretBoards and TabVoice
Sometimes chords with a stretched fingering are required. If not
otherwise specified the context property maximumFretStretch is
set to value 4, though, resulting in a warning about “No string
for pitch ...”, and the note is omitted. You may set
maximumFretStretch to an approppriate value or explicitly assign
string numbers to all notes of a chord to fix that.
% The code below prints two warnings for the second chord, % which may be omitted by uncommenting the following line. % % #(for-each (lambda (x) (ly:expect-warning "No string for pitch")) (iota 2)) mus = { <c' bes'> <c'\2 bes'> \set maximumFretStretch = 5 <c' bes'> <c'\2 bes'\1> } << \new FretBoards \mus \new TabVoice \mus >>
| [ << Chord notation ] | [Top][Contents] | [ Keyboard and other multi-staff instruments >> ] |
| [ < Chords with stretched fingering for FretBoards and TabVoice ] | [ Up: Chord notation ] | [ 和音内の運指記号の位置をコントロールする > ] |
クラスタ
クラスタは、範囲内の音符が同時に演奏されることを示す手段です。
fragment = \relative c' { c4 f <e d'>4 <g a>8 <e a> a4 c2 <d b>4 e2 c } << \new Staff \fragment \new Staff \makeClusters \fragment >>
| [ << Chord notation ] | [Top][Contents] | [ Keyboard and other multi-staff instruments >> ] |
| [ < クラスタ ] | [ Up: Chord notation ] | [ 譜をまたがる和音 – 連桁との問題を解決する > ] |
和音内の運指記号の位置をコントロールする
運指番号の位置を精密にコントロールすることができます。位置の設定が適用されるためには、単一の音符であっても和音構造 <> を用いる必要があります。
\relative c' { \set fingeringOrientations = #'(left) <c-1 e-3 a-5>4 \set fingeringOrientations = #'(down) <c-1 e-3 a-5>4 \set fingeringOrientations = #'(down right up) <c-1 e-3 a-5>4 \set fingeringOrientations = #'(up) <c-1 e-3 a-5>4 \set fingeringOrientations = #'(left) <c-1>2 \set fingeringOrientations = #'(down) <e-3>2 \set stringNumberOrientations = #'(up left down) <f\3 a\2 c\1>1 \set strokeFingerOrientations = #'(down right up) <c\rightHandFinger 1 e\rightHandFinger 2 c'\rightHandFinger 4 > }
| [ << Chord notation ] | [Top][Contents] | [ Keyboard and other multi-staff instruments >> ] |
| [ < 和音内の運指記号の位置をコントロールする ] | [ Up: Chord notation ] | [ Customizing the chord grid style > ] |
譜をまたがる和音 – 連桁との問題を解決する
譜をまたがる和音を作成する際に、連桁の衝突に関する問題が起きないように上の譜の符幹を下向きに伸ばした方が良い場合があります。次の例で下の譜の符幹を伸ばそうとした場合、\override Staff.Beam.collision-voice-only = ##t
を用いて、譜を越えた衝突を検出しないように、連桁の自動衝突解決の設定を変更する必要があります。
\new PianoStaff << \new Staff = up \relative c' << { r4 \override Stem.cross-staff = ##t \override Stem.length = #19 % this is in half-spaces, % so it makes stems 9.5 staffspaces long \override Stem.Y-offset = #-6 % stems are normally lengthened % upwards, so here we must lower the stem by the amount % equal to the lengthening - in this case (19 - 7) / 2 % (7 is default stem length) e e e } { s4 \change Staff = "bottom" \override NoteColumn.ignore-collision = ##t c, c c } >> \new Staff = bottom \relative c' { \clef bass \voiceOne g8 a g a g a g a } >>
| [ << Chord notation ] | [Top][Contents] | [ Keyboard and other multi-staff instruments >> ] |
| [ < 譜をまたがる和音 – 連桁との問題を解決する ] | [ Up: Chord notation ] | [ Customizing the no-chord symbol > ] |
Customizing the chord grid style
Custom divisions of chord squares can be defined through the
measure-division-lines-alist and
measure-division-chord-placement-alist properties of
ChordSquare. These are both alists. Their keys are measure
divisions, namely lists which give the fraction of the measure that
each chord (or rest, or skip) represents. More precisely, a measure
division alist is made of positive, exact numbers adding up to 1,
for example: '(1/2 1/4 1/4). The exactness requirement means
that, e.g., 1/2 is valid but not 0.5.
The values in measure-division-lines-alist are lists of lines,
which are represented as
(x1 y1 x2 y2). The
line starts at the point (x1 . y1) and
ends at (x2 . y2). Coordinates are
expressed in the [-1, 1] scale relative to the extent of the
square.
The values in measure-division-chord-placement-alist are lists
of (x . y) pairs giving the placement
of the respective chords.
This example defines a peculiar chord grid style that has a rule for measures divided in three equal parts.
\paper { line-width = 10\cm ragged-right = ##f } \new ChordGrid \with { \override ChordSquare.measure-division-lines-alist = #'(((1) . ()) ((1/3 1/3 1/3) . ((-1 -0.4 0 1) (0 -1 1 0.4)))) \override ChordSquare.measure-division-chord-placement-alist = #'(((1) . ((0 . 0))) ((1/3 1/3 1/3) . ((-0.7 . 0.5) (0 . 0) (0.7 . -0.5)))) } \chordmode { \time 3/4 c2. c4 c4 c4 }
| [ << Chord notation ] | [Top][Contents] | [ Keyboard and other multi-staff instruments >> ] |
| [ < Customizing the chord grid style ] | [ Up: Chord notation ] | [ Display non-English chord names > ] |
Customizing the no-chord symbol
By default, rests in a ChordNames context cause the text “N.C.”
to be printed. This markup can be customized by setting the
noChordSymbol context property.
<< \chords { R1 \set noChordSymbol = "—" R1 \set noChordSymbol = \markup \italic "Ssh!" R1 } { R1*3 } >>
| [ << Chord notation ] | [Top][Contents] | [ Keyboard and other multi-staff instruments >> ] |
| [ < Customizing the no-chord symbol ] | [ Up: Chord notation ] | [ 複雑な和音を表示する > ] |
Display non-English chord names
The default English naming of chords can be changed to other languages, as demonstrated in this snippet.
scm = \chordmode { c1/c | cis/cis b1/b | bis/bis | bes/bes } \layout { indent = 3\cm ragged-right = ##f \context { \ChordNames \consists "Instrument_name_engraver" } \context { \Score \override InstrumentName.self-alignment-Y = -1.2 \override InstrumentName.self-alignment-X = #RIGHT } } << \new ChordNames { \set instrumentName = #"default" \scm } \new ChordNames { \set instrumentName = #"german" \germanChords \scm } \new ChordNames { \set instrumentName = #"semi-german" \semiGermanChords \scm } \new ChordNames { \set instrumentName = #"italian" \italianChords \scm } \new ChordNames { \set instrumentName = #"french" \frenchChords \scm } \context Voice { \scm } >>
| [ << Chord notation ] | [Top][Contents] | [ Keyboard and other multi-staff instruments >> ] |
| [ < Display non-English chord names ] | [ Up: Chord notation ] | [ 通奏低音の延長線を一部だけ途切れさせる > ] |
複雑な和音を表示する
同じ位置にあり臨時記号が異なる音符を含む和音を表示する方法です。
fixA = { \once \override Stem.length = #12 } fixB = { \once \override NoteHead.X-offset = #1.7 \once \override Stem.length = #7 \once \override Stem.rotation = #'(45 0 0) \once \override Stem.extra-offset = #'(-0.1 . -0.2) \once \override Flag.style = #'no-flag \once \override Accidental.extra-offset = #'(4 . -.1) } \relative c' { << { \fixA <b d!>8 } \\ { \voiceThree \fixB dis } >> s }
通奏低音の延長線を一部だけ途切れさせる
通奏低音では、音の持続を表すために延長線を用いることがあります。しかしながら、これを有効にすると、LilyPond では延長線が使用できる場合には必ず使用するようになります。延長線の区切れを明示するには、新たに始めたい数字の前にある数字に \! を付加します。
bassfigures = \figuremode { \set useBassFigureExtenders = ##t <6 4>4 <6 4\!> <6 4\!> <6 4\!> | <6\! 4\!> <6 4> <6 4\!> <6 4> } << \new Staff \relative c'' { c1 c1 } \new FiguredBass \bassfigures >>
| [ << Chord notation ] | [Top][Contents] | [ Keyboard and other multi-staff instruments >> ] |
| [ < 通奏低音の延長線を一部だけ途切れさせる ] | [ Up: Chord notation ] | [ コード ネームを変更時のみ表示する > ] |
Print chord names with same root and different bass as slash and bass note
To print subsequent ChordNames only differing in its bass note
as slash and bass note, use the Scheme engraver defined in this
snippet. The behaviour may be controlled in detail by the
chordChanges context property.
#(define Bass_changes_equal_root_engraver (lambda (ctx) "For sequential `ChordNames` with the same root but a different bass, the root markup is dropped: D D/C D/B -> D /C /B. The behaviour may be controlled by setting the `chordChanges` context property." (let ((chord-pitches '()) (last-chord-pitches '()) (bass-pitch #f)) (make-engraver ((initialize this-engraver) (let ((chord-note-namer (ly:context-property ctx 'chordNoteNamer))) ;; Set 'chordNoteNamer, respect user setting if already done (ly:context-set-property! ctx 'chordNoteNamer (if (procedure? chord-note-namer) chord-note-namer note-name->markup)))) (listeners ((note-event this-engraver event) (let* ((pitch (ly:event-property event 'pitch)) (pitch-name (ly:pitch-notename pitch)) (pitch-alt (ly:pitch-alteration pitch)) (bass (ly:event-property event 'bass #f)) (inversion (ly:event-property event 'inversion #f))) ;; Collect notes of the chord ;; - to compare inversed chords we need to collect the ;; bass note as usual member of the chord, whereas an ;; added bass must be treated separate from the usual ;; chord-notes ;; - notes are stored as pairs containing their ;; pitch-name (an integer), i.e. disregarding their ;; octave and their alteration (cond (bass (set! bass-pitch pitch)) (inversion (set! bass-pitch pitch) (set! chord-pitches (cons (cons pitch-name pitch-alt) chord-pitches))) (else (set! chord-pitches (cons (cons pitch-name pitch-alt) chord-pitches))))))) (acknowledgers ((chord-name-interface this-engraver grob source-engraver) (let ((chord-changes (ly:context-property ctx 'chordChanges #f))) ;; If subsequent chords are equal apart from their bass, ;; reset the 'text-property. ;; Equality is done by comparing the sorted lists of this ;; chord's elements and the previous chord. Sorting is ;; needed because inverted chords may have a different ;; order of pitches. `chord-changes` needs to be true. (if (and bass-pitch chord-changes (equal? (sort chord-pitches car<) (sort last-chord-pitches car<))) (ly:grob-set-property! grob 'text (make-line-markup (list (ly:context-property ctx 'slashChordSeparator) ((ly:context-property ctx 'chordNoteNamer) bass-pitch (ly:context-property ctx 'chordNameLowercaseMinor)))))) (set! last-chord-pitches chord-pitches) (set! chord-pitches '()) (set! bass-pitch #f)))) ((finalize this-engraver) (set! last-chord-pitches '())))))) myChords = \chordmode { % \germanChords \set chordChanges = ##t d2:m d:m/cis d:m/c \set chordChanges = ##f d:m/b e1:7 \set chordChanges = ##t e \break \once \set chordChanges = ##f e1/f e2/gis e/+gis e e:m/f d:m d:m/cis d:m/c \set chordChanges = ##f d:m/b } << \new ChordNames \with { \consists #Bass_changes_equal_root_engraver } \myChords \new Staff \myChords >>
コード ネームを変更時のみ表示する
デフォルトでは、入力されたすべてのコードが出力されます。この動作を変更して、コード ネームが行頭とコード変更時にのみ表示されるようにすることができます。
harmonies = \chordmode { c'1:m c:m \break c'1:m c:m d } << \new ChordNames { \set chordChanges = ##t \harmonies } \new Staff { \harmonies } >>
| [ << Chord notation ] | [Top][Contents] | [ Keyboard and other multi-staff instruments >> ] |
| [ < コード ネームを変更時のみ表示する ] | [ Up: Chord notation ] | [ 音符、歌詞、コードを持つ単一譜のテンプレート > ] |
シンプル リード シート
コード ネーム、メロディ、歌詞をまとめるとリード シートとなります:
<< \chords { c2 g:sus4 f e } \new Staff \relative c'' { a4 e c8 e r4 b2 c4( d) } \addlyrics { One day this shall be free __ } >>
| [ << Chord notation ] | [Top][Contents] | [ Keyboard and other multi-staff instruments >> ] |
| [ < シンプル リード シート ] | [ Up: Chord notation ] | [ Single-staff template with notes, lyrics, chords, and frets > ] |
音符、歌詞、コードを持つ単一譜のテンプレート
これは旋律、歌詞、コードを持つ歌曲の楽譜のためのテンプレートです。
melody = \relative c' { \clef treble \key c \major \time 4/4 a4 b c d } text = \lyricmode { Aaa Bee Cee Dee } harmonies = \chordmode { a2 c } \score { << \new ChordNames { \set chordChanges = ##t \harmonies } \new Voice = "one" { \autoBeamOff \melody } \new Lyrics \lyricsto "one" \text >> \layout { } \midi { } }
| [ << Chord notation ] | [Top][Contents] | [ Keyboard and other multi-staff instruments >> ] |
| [ < 音符、歌詞、コードを持つ単一譜のテンプレート ] | [ Up: Chord notation ] | [ 音符とコードを持つ単一譜のテンプレート > ] |
Single-staff template with notes, lyrics, chords, and frets
Here is a simple lead sheet template with melody, lyrics, chords, and fret diagrams.
verseI = \lyricmode { \set stanza = #"1." This is the first verse } verseII = \lyricmode { \set stanza = #"2." This is the second verse. } theChords = \chordmode { % insert chords for chordnames and fretboards here c2 g4 c } staffMelody = \relative c' { \key c \major \clef treble % Type notes for melody here c4 d8 e f4 g \bar "|." } \score { << \context ChordNames { \theChords } \context FretBoards { \theChords } \new Staff { \context Voice = "voiceMelody" { \staffMelody } } \new Lyrics = "lyricsI" { \lyricsto "voiceMelody" \verseI } \new Lyrics = "lyricsII" { \lyricsto "voiceMelody" \verseII } >> \layout { } \midi { } }
音符とコードを持つ単一譜のテンプレート
旋律とコードを持つリード譜を欲しくはありませんか?他を見る必要はありません!
melody = \relative c' { \clef treble \key c \major \time 4/4 f4 e8[ c] d4 g | a2 ~ a } harmonies = \chordmode { c4:m f:min7 g:maj c:aug | d2:dim b4:5 e:sus } \score { << \new ChordNames { \set chordChanges = ##t \harmonies } \new Staff \melody >> \layout{ } \midi { } }
| [ << Chord notation ] | [Top][Contents] | [ Keyboard and other multi-staff instruments >> ] |
| [ < 音符とコードを持つ単一譜のテンプレート ] | [ Up: Chord notation ] | [ 繰り返し括弧をコード ネームの下に表示する > ] |
共通な通奏低音の延長線を縦方向に中央揃えする
通奏低音の延長線は useBassFigureExtenders が #t にセットされている場合に使用されます。figuredBassCenterContinuations が
#t にセットされている場合、同一な延長線がまとめられ、縦方向に中央揃えされます。
<< \relative c' { \repeat unfold 3 { c8 c b b a a c16 c b b } } \figures { \set useBassFigureExtenders = ##t <6+ 4 3>4 <6 4 3>8 r <6+ 4 3>4 <6 4 3>8 <4 3+>16 r \set figuredBassCenterContinuations = ##t <6+ 4 3>4 <6 4 3>8 r <6+ 4 3>4 <6 4 3>8 <4 3+>16 r \set figuredBassCenterContinuations = ##f <6+ 4 3>4 <6 4 3>8 r <6+ 4 3>4 <6 4 3>8 <4 3+>16 r } >>
| [ << Chord notation ] | [Top][Contents] | [ Keyboard and other multi-staff instruments >> ] |
| [ < 共通な通奏低音の延長線を縦方向に中央揃えする ] | [ Up: Chord notation ] | [ Keyboard and other multi-staff instruments > ] |
繰り返し括弧をコード ネームの下に表示する
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" } } }
| [ << Chord notation ] | [Top][Contents] | [ Percussion >> ] |
| [ < 繰り返し括弧をコード ネームの下に表示する ] | [ Up: Top ] | [ アコーディオンの音色切り替え記号 > ] |
11 Keyboard and other multi-staff instruments
See also Keyboard and other multi-staff instruments.
アコーディオンの音色切り替え記号
アコーディオンの音色切り替え記号は、\markup としても、(音色の切り替えは音と音の間に行われるため) 単独の音楽イベントとしても用いることができます。バスの音色は過度には一般化されていません。使用できるコマンドは、記譜法リファレンスの ’キーボードと他の複数譜の楽器’ にある
’ディスカント記号’ を参照してください。
#(use-modules (lily accreg)) \new PianoStaff << \new Staff \relative { \clef treble \discant "10" r8 s32 f'[ bes f] s e[ a e] s d[ g d] s16 e32[ a] << { r16 <f bes> r <e a> r <d g> } \\ { d r a r bes r } >> | <cis e a>1 } \new Staff \relative { \clef treble \freeBass "1" r8 d'32 s16. c32 s16. bes32 s16. a32[ cis] s16 \clef bass \stdBass "Master" << { r16 <f, bes d>^"b" r <e a c>^"am" r <d g bes>^"gm" | <e a cis>1^"a" } \\ { d8_"D" c_"C" bes_"B" | a1_"A" } >> } >>
| [ << Keyboard and other multi-staff instruments ] | [Top][Contents] | [ Percussion >> ] |
| [ < アコーディオンの音色切り替え記号 ] | [ Up: Keyboard and other multi-staff instruments ] | [ クラスタ > ] |
サステイン ペダル記号のテキストを変更する
ペダル ダウンやペダル アップに使われるテキストは、Staff.pedalSustainStrings で変更できます。このスニペットに表示されているものがグリフの全てであり、これ以外の文字は使用することができません。
sustainNotes = { c4\sustainOn d e\sustainOff\sustainOn f\sustainOff } \relative c' { \sustainNotes \set Staff.pedalSustainStrings = #'("P" "P-" "-") \sustainNotes \set Staff.pedalSustainStrings = #'("d" "de" "e") \sustainNotes \set Staff.pedalSustainStrings = #'("M" "M-" "-") \sustainNotes \set Staff.pedalSustainStrings = #'("Ped" "*Ped" "*") \sustainNotes } \layout { ragged-right = ##f }
| [ << Keyboard and other multi-staff instruments ] | [Top][Contents] | [ Percussion >> ] |
| [ < サステイン ペダル記号のテキストを変更する ] | [ Up: Keyboard and other multi-staff instruments ] | [ 和音内の運指記号の位置をコントロールする > ] |
クラスタ
クラスタは、範囲内の音符が同時に演奏されることを示す手段です。
fragment = \relative c' { c4 f <e d'>4 <g a>8 <e a> a4 c2 <d b>4 e2 c } << \new Staff \fragment \new Staff \makeClusters \fragment >>
| [ << Keyboard and other multi-staff instruments ] | [Top][Contents] | [ Percussion >> ] |
| [ < クラスタ ] | [ Up: Keyboard and other multi-staff instruments ] | [ ボイスをまたがるスラーを作成する > ] |
和音内の運指記号の位置をコントロールする
運指番号の位置を精密にコントロールすることができます。位置の設定が適用されるためには、単一の音符であっても和音構造 <> を用いる必要があります。
\relative c' { \set fingeringOrientations = #'(left) <c-1 e-3 a-5>4 \set fingeringOrientations = #'(down) <c-1 e-3 a-5>4 \set fingeringOrientations = #'(down right up) <c-1 e-3 a-5>4 \set fingeringOrientations = #'(up) <c-1 e-3 a-5>4 \set fingeringOrientations = #'(left) <c-1>2 \set fingeringOrientations = #'(down) <e-3>2 \set stringNumberOrientations = #'(up left down) <f\3 a\2 c\1>1 \set strokeFingerOrientations = #'(down right up) <c\rightHandFinger 1 e\rightHandFinger 2 c'\rightHandFinger 4 > }
| [ << Keyboard and other multi-staff instruments ] | [Top][Contents] | [ Percussion >> ] |
| [ < 和音内の運指記号の位置をコントロールする ] | [ Up: Keyboard and other multi-staff instruments ] | [ 譜をまたがる和音 – 連桁との問題を解決する > ] |
ボイスをまたがるスラーを作成する
異なるボイスを繋ぐスラーを作成しなければならない場合があります。
解決法は、\hideNotes を用いて片方のボイスに不可視の音符を追加することです。
この例は、Bach の Partita for Violin No. 2 (BWV 1004) の 235 小節目です。
\relative c' { << { d16( a') s a s a[ s a] s a[ s a] } \\ { \slurUp bes,16[ s e]( \hideNotes a) \unHideNotes f[( \hideNotes a) \unHideNotes fis]( \hideNotes a) \unHideNotes g[( \hideNotes a) \unHideNotes gis]( \hideNotes a) } >> }
| [ << Keyboard and other multi-staff instruments ] | [Top][Contents] | [ Percussion >> ] |
| [ < ボイスをまたがるスラーを作成する ] | [ Up: Keyboard and other multi-staff instruments ] | [ 譜をまたがるトレモロ > ] |
譜をまたがる和音 – 連桁との問題を解決する
譜をまたがる和音を作成する際に、連桁の衝突に関する問題が起きないように上の譜の符幹を下向きに伸ばした方が良い場合があります。次の例で下の譜の符幹を伸ばそうとした場合、\override Staff.Beam.collision-voice-only = ##t
を用いて、譜を越えた衝突を検出しないように、連桁の自動衝突解決の設定を変更する必要があります。
\new PianoStaff << \new Staff = up \relative c' << { r4 \override Stem.cross-staff = ##t \override Stem.length = #19 % this is in half-spaces, % so it makes stems 9.5 staffspaces long \override Stem.Y-offset = #-6 % stems are normally lengthened % upwards, so here we must lower the stem by the amount % equal to the lengthening - in this case (19 - 7) / 2 % (7 is default stem length) e e e } { s4 \change Staff = "bottom" \override NoteColumn.ignore-collision = ##t c, c c } >> \new Staff = bottom \relative c' { \clef bass \voiceOne g8 a g a g a g a } >>
| [ << Keyboard and other multi-staff instruments ] | [Top][Contents] | [ Percussion >> ] |
| [ < 譜をまたがる和音 – 連桁との問題を解決する ] | [ Up: Keyboard and other multi-staff instruments ] | [ ペダル記号のブラケットを微調整する > ] |
譜をまたがるトレモロ
\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 } } } >>
| [ << Keyboard and other multi-staff instruments ] | [Top][Contents] | [ Percussion >> ] |
| [ < 譜をまたがるトレモロ ] | [ Up: Keyboard and other multi-staff instruments ] | [ ブラケット型のアルペジオで譜をまたぐ和音を表示する > ] |
ペダル記号のブラケットを微調整する
ペダル記号のブラケットの見た目は様々に調整することができます。
\paper { ragged-right = ##f } \relative c'' { c2\sostenutoOn c c2\sostenutoOff c c2\tweak shorten-pair #'(-7 . -2) \sostenutoOn c c2\sostenutoOff c c2\tweak edge-height #'(0 . 3) \sostenutoOn c c2\sostenutoOff c }
| [ << Keyboard and other multi-staff instruments ] | [Top][Contents] | [ Percussion >> ] |
| [ < ペダル記号のブラケットを微調整する ] | [ Up: Keyboard and other multi-staff instruments ] | [ ジャズ コンボのテンプレート > ] |
ブラケット型のアルペジオで譜をまたぐ和音を表示する
ブラケット型のアルペジオは、異なる譜にまたがる和音が同じ手で演奏されることを示します。これを表示するためには、PianoStaff が譜をまたぐアルペジオを使用できるように設定し、PianoStaff コンテキストでアルペジオの形をブラケットに設定します。
(Debussy, Les collines d’Anacapri, m. 65)
\new PianoStaff << \set PianoStaff.connectArpeggios = ##t \override PianoStaff.Arpeggio.stencil = #ly:arpeggio::brew-chord-bracket \new Staff \relative c' { \key b \major \time 6/8 b8-.(\arpeggio fis'-.\> cis-. e-. gis-. b-.)\!\fermata^\laissezVibrer \bar "||" } \new Staff \relative c' { \clef bass \key b \major << { <a e cis>2.\arpeggio } \\ { <a, e a,>2. } >> } >>
| [ << Keyboard and other multi-staff instruments ] | [Top][Contents] | [ Percussion >> ] |
| [ < ブラケット型のアルペジオで譜をまたぐ和音を表示する ] | [ Up: Keyboard and other multi-staff instruments ] | [ レセ ヴィブレのタイ > ] |
ジャズ コンボのテンプレート
これはジャズ アンサンブルのための非常に高度なテンプレートです。全ての楽器が \key c \major で記述されています。これはコンサート
ピッチでの調を示しており、\transpose セクション内では自動的に移調されます。
\header { title = "Song" subtitle = "(tune)" composer = "Me" meter = "moderato" piece = "Swing" tagline = \markup \column { "LilyPond example file by Amelie Zapf," "Berlin 07/07/2003" } } % To make the example display properly in the documentation. \paper { paper-width = 130\mm paper-height = 205\mm } % #(set-global-staff-size 16) \include "english.ly" %%%%%%%%%%%% Some macros %%%%%%%%%%%%%%%%%%% sl = { \override NoteHead.style = #'slash \hide Stem } nsl = { \revert NoteHead.style \undo \hide Stem } crOn = \override NoteHead.style = #'cross crOff = \revert NoteHead.style % Insert chord name style stuff here. jazzChords = { } %%%%%%%%%%%% Keys'n'thangs %%%%%%%%%%%%%%%%% global = { \time 4/4 } Key = { \key c \major } % ############ Horns ############ % ------ Trumpet ------ trpt = \transpose c d \relative c'' { \Key c1 | c | c | } trpHarmony = \transpose c' d { \jazzChords } trumpet = { \global \clef treble \trpt } % ------ Alto Saxophone ------ alto = \transpose c a \relative c' { \Key c1 | c | c | } altoHarmony = \transpose c' a { \jazzChords } altoSax = { \global \clef treble \alto } % ------ Baritone Saxophone ------ bari = \transpose c a' \relative c { \Key c1 | c1 | \sl d4^"Solo" d d d \nsl | } bariHarmony = \transpose c' a \chordmode { \jazzChords s1 | s | d2:maj e:m7 | } bariSax = { \global \clef treble \bari } % ------ Trombone ------ tbone = \relative c { \Key c1 | c | c | } tboneHarmony = \chordmode { \jazzChords } trombone = { \global \clef bass \tbone } % ############ Rhythm Section ############# % ------ Guitar ------ gtr = \relative c'' { \Key c1 | \sl b4 b b b \nsl | c1 | } gtrHarmony = \chordmode { \jazzChords s1 | c2:min7+ d2:maj9 | s1 | } guitar = { \global \clef treble \gtr } %% ------ Piano ------ rhUpper = \relative c'' { \voiceOne \Key c1 | c | c | } rhLower = \relative c' { \voiceTwo \Key e1 | e | e | } lhUpper = \relative c' { \voiceOne \Key g1 | g | g | } lhLower = \relative c { \voiceTwo \Key c1 | c | c | } PianoRH = { \clef treble \global << \new Voice = "one" \rhUpper \new Voice = "two" \rhLower >> } PianoLH = { \clef bass \global << \new Voice = "one" \lhUpper \new Voice = "two" \lhLower >> } piano = << \new Staff = "upper" \PianoRH \new Staff = "lower" \PianoLH >> % ------ Bass Guitar ------ Bass = \relative c { \Key c1 | c | c | } bass = { \global \clef bass \Bass } % ------ Drums ------ up = \drummode { \voiceOne hh4 <hh sn> hh <hh sn> | hh4 <hh sn> hh <hh sn> | hh4 <hh sn> hh <hh sn> | } down = \drummode { \voiceTwo bd4 s bd s | bd4 s bd s | bd4 s bd s | } drumContents = { \global << \new DrumVoice \up \new DrumVoice \down >> } %%%%%%%%% It All Goes Together Here %%%%%%%%%%%%%%%%%%%%%% \book { % For the LilyPond documentation. \score { << \new StaffGroup = "horns" << \new Staff = "trumpet" \with { instrumentName = "Trumpet" } \trumpet \new Staff = "altosax" \with { instrumentName = "Alto Sax" } \altoSax \new ChordNames = "barichords" \with { instrumentName = "Bari Sax" } \bariHarmony \new Staff = "barisax" \with { instrumentName = "Bari Sax" } \bariSax \new Staff = "trombone" \with { instrumentName = "Trombone" } \trombone >> \new StaffGroup = "rhythm" << \new ChordNames = "chords" \with { instrumentName = "Guitar" } \gtrHarmony \new Staff = "guitar" \with { instrumentName = "Guitar" } \guitar \new PianoStaff = "piano" \with { instrumentName = "Piano" midiInstrument = "acoustic grand" } \piano \new Staff = "bass" \with { instrumentName = "Bass" } \bass \new DrumStaff \with { instrumentName = "Drums" } \drumContents >> >> \layout { \context { \Staff \RemoveEmptyStaves } \context { \Score \override BarNumber.padding = 3 \override RehearsalMark.padding = 2 skipBars = ##t } } \midi { } } }
| [ << Keyboard and other multi-staff instruments ] | [Top][Contents] | [ Percussion >> ] |
| [ < ジャズ コンボのテンプレート ] | [ Up: Keyboard and other multi-staff instruments ] | [ ピアノ テンプレート (シンプル) > ] |
レセ ヴィブレのタイ
レセ ヴィブレのタイの大きさは固定されています。tie-configuration
によって配置を調整することができます。
\relative c' { <c e g>4\laissezVibrer r <c f g>\laissezVibrer r <c d f g>4\laissezVibrer r <c d f g>4.\laissezVibrer r8 <c d e f>4\laissezVibrer r \override LaissezVibrerTieColumn.tie-configuration = #`((-7 . ,DOWN) (-5 . ,DOWN) (-3 . ,UP) (-1 . ,UP)) <c d e f>4\laissezVibrer r }
| [ << Keyboard and other multi-staff instruments ] | [Top][Contents] | [ Percussion >> ] |
| [ < レセ ヴィブレのタイ ] | [ Up: Keyboard and other multi-staff instruments ] | [ 中央に歌詞を配置したピアノ テンプレート > ] |
ピアノ テンプレート (シンプル)
いくつかの音符を持つシンプルなピアノ譜を示します。
upper = \relative c'' { \clef treble \key c \major \time 4/4 a4 b c d } lower = \relative c { \clef bass \key c \major \time 4/4 a2 c } \score { \new PianoStaff \with { instrumentName = "Piano" } << \new Staff = "upper" \upper \new Staff = "lower" \lower >> \layout { } \midi { } }
| [ << Keyboard and other multi-staff instruments ] | [Top][Contents] | [ Percussion >> ] |
| [ < ピアノ テンプレート (シンプル) ] | [ Up: Keyboard and other multi-staff instruments ] | [ 旋律と歌詞を持つピアノ テンプレート > ] |
中央に歌詞を配置したピアノ テンプレート
旋律と歌詞のための総譜ではなく、歌詞をピアノ譜の 2 つの譜の間に配置することができます。
upper = \relative c'' { \clef treble \key c \major \time 4/4 a4 b c d } lower = \relative c { \clef bass \key c \major \time 4/4 a2 c } text = \lyricmode { Aaa Bee Cee Dee } \score { \new PianoStaff << \new Staff = upper { \new Voice = "singer" \upper } \new Lyrics \lyricsto "singer" \text \new Staff = lower { \lower } >> \layout { } \midi { } }
| [ << Keyboard and other multi-staff instruments ] | [Top][Contents] | [ Percussion >> ] |
| [ < 中央に歌詞を配置したピアノ テンプレート ] | [ Up: Keyboard and other multi-staff instruments ] | [ ピアノ曲の先頭にあるブレースを削除する > ] |
旋律と歌詞を持つピアノ テンプレート
これは一般的な歌曲のフォーマットです: 旋律と歌詞を持つ譜と、その下にピアノ伴奏譜があります。
melody = \relative c'' { \clef treble \key c \major \time 4/4 a b c d } text = \lyricmode { Aaa Bee Cee Dee } upper = \relative c'' { \clef treble \key c \major \time 4/4 a4 b c d } lower = \relative c { \clef bass \key c \major \time 4/4 a2 c } \score { << \new Voice = "mel" { \autoBeamOff \melody } \new Lyrics \lyricsto mel \text \new PianoStaff << \new Staff = "upper" \upper \new Staff = "lower" \lower >> >> \layout { \context { \Staff \RemoveEmptyStaves } } \midi { } }
ピアノ曲の先頭にあるブレースを削除する
このスニペットは、PianoStaff や GrandStaff から先頭にあるブレース (波括弧) を削除しています。これは譜刻された既存の音楽の一部を切り取って見せる場合に有用です。
これは \alterBroken を使用しています。
someMusic = { \once \omit Staff.Clef \once \omit Staff.TimeSignature \repeat unfold 3 c1 \break \repeat unfold 5 c1 \break \repeat unfold 5 c1 } \score { \new PianoStaff << \new Staff = "right" \relative c'' \someMusic \new Staff = "left" \relative c' { \clef F \someMusic } >> \layout { indent=75\mm \context { \PianoStaff \alterBroken transparent #'(#t) SystemStartBrace } } }
| [ << Keyboard and other multi-staff instruments ] | [Top][Contents] | [ Percussion >> ] |
| [ < ピアノ曲の先頭にあるブレースを削除する ] | [ Up: Keyboard and other multi-staff instruments ] | [ 自動ピアノ伴奏譜を持つ合唱譜 > ] |
Using \autoChange with more than one voice
Here is a demonstration of how to use \autoChange with more
than one voice.
\score { \new PianoStaff << \new Staff = "up" { << \set Timing.beamExceptions = #'() \set Timing.beatStructure = #'(4) \new Voice { \voiceOne \autoChange \relative c' { g8 a b c d e f g g,8 a b c d e f g } } \new Voice { \voiceTwo \autoChange \relative c' { g8 a b c d e f g g,,8 a b c d e f g } } >> } \new Staff = "down" { \clef bass } >> }
| [ << Keyboard and other multi-staff instruments ] | [Top][Contents] | [ Percussion >> ] |
| [ < Using \autoChange with more than one voice ] | [ Up: Keyboard and other multi-staff instruments ] | [ Percussion > ] |
自動ピアノ伴奏譜を持つ合唱譜
このテンプレートは、“合唱テンプレート” で示した標準の SATB ボーカル譜に自動ピアノ譜を付け加えています。これは LilyPond の強みの 1 つを示しています - 音楽定義を何回も使用することができます。ボーカルの音符 (例えば、tenorMusic
の音符) に変更が加えられた場合、その変更はピアノ譜にも適用されます。
\paper { top-system-spacing.basic-distance = 10 score-system-spacing.basic-distance = 20 system-system-spacing.basic-distance = 20 last-bottom-spacing.basic-distance = 10 } global = { \key c \major \time 4/4 } sopMusic = \relative { c''4 c c8[( b)] c4 } sopWords = \lyricmode { hi hi hi hi } altoMusic = \relative { e'4 f d e } altoWords =\lyricmode { ha ha ha ha } tenorMusic = \relative { g4 a f g } tenorWords = \lyricmode { hu hu hu hu } bassMusic = \relative { c4 c g c } bassWords = \lyricmode { ho ho ho ho } \score { << \new ChoirStaff << \new Lyrics = "sopranos" \with { % This is needed for lyrics above a staff \override VerticalAxisGroup.staff-affinity = #DOWN } \new Staff = "women" << \new Voice = "sopranos" { \voiceOne << \global \sopMusic >> } \new Voice = "altos" { \voiceTwo << \global \altoMusic >> } >> \new Lyrics = "altos" \new Lyrics = "tenors" \with { % This is needed for lyrics above a staff \override VerticalAxisGroup.staff-affinity = #DOWN } \new Staff = "men" << \clef bass \new Voice = "tenors" { \voiceOne << \global \tenorMusic >> } \new Voice = "basses" { \voiceTwo << \global \bassMusic >> } >> \new Lyrics = "basses" \context Lyrics = "sopranos" \lyricsto "sopranos" \sopWords \context Lyrics = "altos" \lyricsto "altos" \altoWords \context Lyrics = "tenors" \lyricsto "tenors" \tenorWords \context Lyrics = "basses" \lyricsto "basses" \bassWords >> \new PianoStaff << \new Staff << \set Staff.printPartCombineTexts = ##f \partCombine << \global \sopMusic >> << \global \altoMusic >> >> \new Staff << \clef bass \set Staff.printPartCombineTexts = ##f \partCombine << \global \tenorMusic >> << \global \bassMusic >> >> >> >> }
| [ << Keyboard and other multi-staff instruments ] | [Top][Contents] | [ Fretted string instruments >> ] |
| [ < 自動ピアノ伴奏譜を持つ合唱譜 ] | [ Up: Top ] | [ ドラム パートを追加する > ] |
12 Percussion
See also Percussion.
| ドラム パートを追加する | ||
| Cow and ride bell example | ||
| 多拍子記号を大きくカスタマイズする | ||
| High and low woodblock example | ||
| ジャズ コンボのテンプレート | ||
| パーカッションのマレットを表示する | ||
| Percussion example | ||
| 音楽を異なる拍子記号で表示する | ||
| Tam-tam example | ||
| Tambourine example |
| [ << Percussion ] | [Top][Contents] | [ Fretted string instruments >> ] |
| [ < Percussion ] | [ Up: Percussion ] | [ Cow and ride bell example > ] |
ドラム パートを追加する
\drummode のような、予め設定された強力なツールと
DrumStaff コンテキストを用いることで、ドラム パートを入力することは非常に簡単になります: ドラム パートは (特殊な音部記号を持つ) 独自の譜として配置され、ドラムに対応した符頭を持ちます。ドラムに記号を追加したり、線の数を制限することも可能です。
drh = \drummode { cymc4.^"crash" hhc16^"h.h." hh hhc8 hho hhc8 hh16 hh hhc4 r4 r2 } drl = \drummode { bd4 sn8 bd bd4 << bd ss >> bd8 tommh tommh bd toml toml bd tomfh16 tomfh } timb = \drummode { timh4 ssh timl8 ssh r timh r4 ssh8 timl r4 cb8 cb } \score { << \new DrumStaff \with { instrumentName = "timbales" drumStyleTable = #timbales-style \override StaffSymbol.line-count = #2 \override BarLine.bar-extent = #'(-1 . 1) } << \timb >> \new DrumStaff \with { instrumentName = "drums" } << \new DrumVoice { \stemUp \drh } \new DrumVoice { \stemDown \drl } >> >> \layout { } \midi { \tempo 4 = 120 } }
| [ << Percussion ] | [Top][Contents] | [ Fretted string instruments >> ] |
| [ < ドラム パートを追加する ] | [ Up: Percussion ] | [ 多拍子記号を大きくカスタマイズする > ] |
Cow and ride bell example
Two different bells, entered with ‘cb’ (cow bell) and ‘rb’ (ride bell).
#(define mydrums '((ridebell default #f 3) (cowbell default #f -2))) \new DrumStaff \with { instrumentName = #"Different Bells" } \drummode { \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums) \set DrumStaff.clefPosition = 0.5 \override DrumStaff.StaffSymbol.line-positions = #'(-2 3) \override Staff.BarLine.bar-extent = #'(-1.0 . 1.5) \time 2/4 rb8 8 cb8 16 rb16-> ~ | 16 8 16 cb8 8 | }
| [ << Percussion ] | [Top][Contents] | [ Fretted string instruments >> ] |
| [ < Cow and ride bell example ] | [ Up: Percussion ] | [ High and low woodblock example > ] |
多拍子記号を大きくカスタマイズする
多拍子を示す記号は必ずしも必要というわけではありませんが、この楽譜では拍を示すために使用しています (これは実際のバルカン音楽のテンプレートになっています!)
melody = \relative c'' { \key g \major \compoundMeter #'((3 8) (2 8) (2 8) (3 8) (2 8) (2 8) (2 8) (2 8) (3 8) (2 8) (2 8)) \set Timing.beamExceptions = #'() \set Timing.beatStructure = 3,2,2,3,2,2,2,2,3,2,2 c8 c c d4 c8 c b c b a4 g fis8 e d c b' c d e4-^ fis8 g \break c,4. d4 c4 d4. c4 d c2 d4. e4-^ d4 c4. d4 c4 d4. c4 d c2 d4. e4-^ d4 \break } drum = \new DrumStaff \drummode { \repeat volta 2 { bd4.^\markup { Drums } sn4 bd \bar ";" sn4. bd4 sn \bar ";" bd sn bd4. sn4 bd } } \new Staff { \melody \drum }
| [ << Percussion ] | [Top][Contents] | [ Fretted string instruments >> ] |
| [ < 多拍子記号を大きくカスタマイズする ] | [ Up: Percussion ] | [ ジャズ コンボのテンプレート > ] |
High and low woodblock example
Two Woodblocks, entered with ‘wbh’ (high woodblock) and ‘wbl’ (low
woodblock). The length of the bar line has been altered with an
\override command, otherwise it would be too short. The
positions of the two staff lines also have to be explicitly defined.
% These lines define the position of the woodblocks in the stave; % if you like, you can change it or you can use special note heads % for the woodblocks. #(define mydrums '((hiwoodblock default #f 3) (lowoodblock default #f -2))) woodstaff = { % This defines a staff with only two lines. % It also defines the positions of the two lines. \override Staff.StaffSymbol.line-positions = #'(-2 3) % This is necessary; if not entered, % the barline would be too short! \override Staff.BarLine.bar-extent = #'(-1.0 . 1.5) % small correction for the clef: \set DrumStaff.clefPosition = 0.5 } \new DrumStaff { % with this you load your new drum style table \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums) \woodstaff \drummode { \time 2/4 wbh8 16 16 8-> 8 | wbl8 16 16-> ~ 16 16 r8 | } }
| [ << Percussion ] | [Top][Contents] | [ Fretted string instruments >> ] |
| [ < High and low woodblock example ] | [ Up: Percussion ] | [ パーカッションのマレットを表示する > ] |
ジャズ コンボのテンプレート
これはジャズ アンサンブルのための非常に高度なテンプレートです。全ての楽器が \key c \major で記述されています。これはコンサート
ピッチでの調を示しており、\transpose セクション内では自動的に移調されます。
\header { title = "Song" subtitle = "(tune)" composer = "Me" meter = "moderato" piece = "Swing" tagline = \markup \column { "LilyPond example file by Amelie Zapf," "Berlin 07/07/2003" } } % To make the example display properly in the documentation. \paper { paper-width = 130\mm paper-height = 205\mm } % #(set-global-staff-size 16) \include "english.ly" %%%%%%%%%%%% Some macros %%%%%%%%%%%%%%%%%%% sl = { \override NoteHead.style = #'slash \hide Stem } nsl = { \revert NoteHead.style \undo \hide Stem } crOn = \override NoteHead.style = #'cross crOff = \revert NoteHead.style % Insert chord name style stuff here. jazzChords = { } %%%%%%%%%%%% Keys'n'thangs %%%%%%%%%%%%%%%%% global = { \time 4/4 } Key = { \key c \major } % ############ Horns ############ % ------ Trumpet ------ trpt = \transpose c d \relative c'' { \Key c1 | c | c | } trpHarmony = \transpose c' d { \jazzChords } trumpet = { \global \clef treble \trpt } % ------ Alto Saxophone ------ alto = \transpose c a \relative c' { \Key c1 | c | c | } altoHarmony = \transpose c' a { \jazzChords } altoSax = { \global \clef treble \alto } % ------ Baritone Saxophone ------ bari = \transpose c a' \relative c { \Key c1 | c1 | \sl d4^"Solo" d d d \nsl | } bariHarmony = \transpose c' a \chordmode { \jazzChords s1 | s | d2:maj e:m7 | } bariSax = { \global \clef treble \bari } % ------ Trombone ------ tbone = \relative c { \Key c1 | c | c | } tboneHarmony = \chordmode { \jazzChords } trombone = { \global \clef bass \tbone } % ############ Rhythm Section ############# % ------ Guitar ------ gtr = \relative c'' { \Key c1 | \sl b4 b b b \nsl | c1 | } gtrHarmony = \chordmode { \jazzChords s1 | c2:min7+ d2:maj9 | s1 | } guitar = { \global \clef treble \gtr } %% ------ Piano ------ rhUpper = \relative c'' { \voiceOne \Key c1 | c | c | } rhLower = \relative c' { \voiceTwo \Key e1 | e | e | } lhUpper = \relative c' { \voiceOne \Key g1 | g | g | } lhLower = \relative c { \voiceTwo \Key c1 | c | c | } PianoRH = { \clef treble \global << \new Voice = "one" \rhUpper \new Voice = "two" \rhLower >> } PianoLH = { \clef bass \global << \new Voice = "one" \lhUpper \new Voice = "two" \lhLower >> } piano = << \new Staff = "upper" \PianoRH \new Staff = "lower" \PianoLH >> % ------ Bass Guitar ------ Bass = \relative c { \Key c1 | c | c | } bass = { \global \clef bass \Bass } % ------ Drums ------ up = \drummode { \voiceOne hh4 <hh sn> hh <hh sn> | hh4 <hh sn> hh <hh sn> | hh4 <hh sn> hh <hh sn> | } down = \drummode { \voiceTwo bd4 s bd s | bd4 s bd s | bd4 s bd s | } drumContents = { \global << \new DrumVoice \up \new DrumVoice \down >> } %%%%%%%%% It All Goes Together Here %%%%%%%%%%%%%%%%%%%%%% \book { % For the LilyPond documentation. \score { << \new StaffGroup = "horns" << \new Staff = "trumpet" \with { instrumentName = "Trumpet" } \trumpet \new Staff = "altosax" \with { instrumentName = "Alto Sax" } \altoSax \new ChordNames = "barichords" \with { instrumentName = "Bari Sax" } \bariHarmony \new Staff = "barisax" \with { instrumentName = "Bari Sax" } \bariSax \new Staff = "trombone" \with { instrumentName = "Trombone" } \trombone >> \new StaffGroup = "rhythm" << \new ChordNames = "chords" \with { instrumentName = "Guitar" } \gtrHarmony \new Staff = "guitar" \with { instrumentName = "Guitar" } \guitar \new PianoStaff = "piano" \with { instrumentName = "Piano" midiInstrument = "acoustic grand" } \piano \new Staff = "bass" \with { instrumentName = "Bass" } \bass \new DrumStaff \with { instrumentName = "Drums" } \drumContents >> >> \layout { \context { \Staff \RemoveEmptyStaves } \context { \Score \override BarNumber.padding = 3 \override RehearsalMark.padding = 2 skipBars = ##t } } \midi { } } }
| [ << Percussion ] | [Top][Contents] | [ Fretted string instruments >> ] |
| [ < ジャズ コンボのテンプレート ] | [ Up: Percussion ] | [ Percussion example > ] |
パーカッションのマレットを表示する
パーカッションの楽器に対する画像は LilyPond に含まれていません。しかしながら、そのような画像を外部の EPS ファイルから取り込んで表示したり、この例のようにマークアップの内部に PostScript コードを埋め込むことで表示することができます。
stick = \markup \with-dimensions #'(0.80 . 5.2) #'(0.85 . 5.2) { \postscript " 0 6 translate 0.8 -0.8 scale 0 0 0 setrgbcolor [] 0 setdash 1 setlinewidth 0 setlinejoin 0 setlinecap gsave [1 0 0 1 0 0] concat gsave [1 0 0 1 -3.5406095 -199.29342] concat gsave 0 0 0 setrgbcolor newpath 7.1434065 200.94354 moveto 7.2109628 200.90454 7.2785188 200.86554 7.3460747 200.82654 curveto 8.2056347 202.31535 9.0651946 203.80414 9.9247546 205.29295 curveto 9.8571989 205.33195 9.7896429 205.37095 9.7220864 205.40996 curveto 8.8625264 203.92115 8.0029664 202.43233 7.1434065 200.94354 curveto closepath eofill grestore gsave 0 0 0 setrgbcolor newpath 4.9646672 203.10444 moveto 5.0036707 203.03688 5.0426744 202.96933 5.0816777 202.90176 curveto 6.5704792 203.76133 8.0592809 204.6209 9.5480824 205.48045 curveto 9.5090791 205.54801 9.4700754 205.61556 9.4310717 205.68311 curveto 7.94227 204.82356 6.4534687 203.96399 4.9646672 203.10444 curveto closepath eofill grestore gsave << /ShadingType 3 /ColorSpace /DeviceRGB /Coords [113.13708 207.87465 0 113.13708 207.87465 16.162441] /Extend [true true] /Domain [0 1] /Function << /FunctionType 3 /Functions [ << /FunctionType 2 /Domain [0 1] /C0 [1 1 1] /C1 [0.72941178 0.72941178 0.72941178] /N 1 >> ] /Domain [0 1] /Bounds [ ] /Encode [ 0 1 ] >> >> newpath 7.6422017 200.76488 moveto 7.6505696 201.02554 7.3905363 201.24867 7.1341335 201.20075 curveto 6.8759501 201.16916 6.6949602 200.87978 6.7801462 200.63381 curveto 6.8480773 200.39155 7.1438307 200.25377 7.3728389 200.35861 curveto 7.5332399 200.42458 7.6444521 200.59122 7.6422017 200.76488 curveto closepath clip gsave [ 0.052859054 0.063089841 -0.020912282 0.017521108 5.7334261 189.76443 ] concat shfill grestore grestore 0 0 0 setrgbcolor [] 0 setdash 0.027282091 setlinewidth 0 setlinejoin 0 setlinecap newpath 7.6422017 200.76488 moveto 7.6505696 201.02554 7.3905363 201.24867 7.1341335 201.20075 curveto 6.8759501 201.16916 6.6949602 200.87978 6.7801462 200.63381 curveto 6.8480773 200.39155 7.1438307 200.25377 7.3728389 200.35861 curveto 7.5332399 200.42458 7.6444521 200.59122 7.6422017 200.76488 curveto closepath stroke gsave << /ShadingType 3 /ColorSpace /DeviceRGB /Coords [113.13708 207.87465 0 113.13708 207.87465 16.162441] /Extend [true true] /Domain [0 1] /Function << /FunctionType 3 /Functions [ << /FunctionType 2 /Domain [0 1] /C0 [1 1 1] /C1 [0.72941178 0.72941178 0.72941178] /N 1 >> ] /Domain [0 1] /Bounds [ ] /Encode [ 0 1 ] >> >> newpath 5.2721217 202.83181 moveto 5.2804896 203.09247 5.0204563 203.3156 4.7640539 203.26768 curveto 4.5058701 203.23609 4.3248803 202.94671 4.4100662 202.70074 curveto 4.4779975 202.45848 4.7737511 202.3207 5.0027593 202.42554 curveto 5.1631598 202.49149 5.2743721 202.65813 5.2721217 202.83181 curveto closepath clip gsave [ 0.052859054 0.063089841 -0.020912282 0.017521108 3.363346 191.83136 ] concat shfill grestore grestore 0 0 0 setrgbcolor [] 0 setdash 0.027282091 setlinewidth 0 setlinejoin 0 setlinecap newpath 5.2721217 202.83181 moveto 5.2804896 203.09247 5.0204563 203.3156 4.7640539 203.26768 curveto 4.5058701 203.23609 4.3248803 202.94671 4.4100662 202.70074 curveto 4.4779975 202.45848 4.7737511 202.3207 5.0027593 202.42554 curveto 5.1631598 202.49149 5.2743721 202.65813 5.2721217 202.83181 curveto closepath stroke grestore grestore " } \score { b1^\stick }
| [ << Percussion ] | [Top][Contents] | [ Fretted string instruments >> ] |
| [ < パーカッションのマレットを表示する ] | [ Up: Percussion ] | [ 音楽を異なる拍子記号で表示する > ] |
Percussion example
A short example taken from Stravinsky’s L’histoire du Soldat.
#(define mydrums '((bassdrum default #f 4) (snare default #f -4) (tambourine default #f 0))) U = \stemUp D = \stemDown global = { \time 3/8 s4. \time 2/4 s2*2 \time 3/8 s4. \time 2/4 s2 } drumsA = { \context DrumVoice << \global \drummode { \autoBeamOff \D sn8 \U tamb s | sn4 \D sn4 | \U tamb8 \D sn \U sn16 \D sn \U sn8 | \D sn8 \U tamb s | \U sn4 s8 \U tamb } >> } drumsB = \drummode { s4 bd8 s2*2 s4 bd8 s4 bd8 s } \layout { indent = 40\mm \context { \DrumStaff drumStyleTable = #(alist->hash-table mydrums) } } \score { \new StaffGroup << \new DrumStaff \with { instrumentName = \markup \center-column { "Tambourine" "et" "caisse claire s. timbre" } } \drumsA \new DrumStaff \with { instrumentName = "Grosse Caisse" }\drumsB >> }
| [ << Percussion ] | [Top][Contents] | [ Fretted string instruments >> ] |
| [ < Percussion example ] | [ Up: Percussion ] | [ Tam-tam example > ] |
音楽を異なる拍子記号で表示する
次のスニペットでは、2 つのパートが完全に異なる拍子記号を持っていますが、タイミングは揃っています。小節線はパート毎に独立して表示するため
Score のレベルでは表示されず、Timing_translator が
Score コンテキストから Staff コンテキストに移動しています。
小節番号が必要な場合、Bar_number_engraver も移動する必要があります。このエングラーバは Timing_translator によってセットされるプロパティに依存するためです。小節番号を表示したい譜に \with
を用いることができます。
global = { \time 3/4 s2.*3 \break s2.*3 } \layout { \context { \Score \remove "Timing_translator" \remove "Bar_number_engraver" \override SpacingSpanner.uniform-stretching = ##t \override SpacingSpanner.strict-note-spacing = ##t proportionalNotationDuration = #1/64 } \context { \Staff \consists "Timing_translator" } \context { \Voice \remove "Forbid_line_break_engraver" tupletFullLength = ##t } } Bassklarinette = \new Staff \with { \consists "Bar_number_engraver" barNumberVisibility = #(every-nth-bar-number-visible 2) \override BarNumber.break-visibility = #end-of-line-invisible } << \global { \clef treble \time 3/8 d''4. | \time 3/4 r8 des''2( c''8) | \time 7/8 r4. ees''2 ~ | \time 2/4 \tupletUp \tuplet 3/2 { ees''4 r4 d''4 ~ } | \time 3/8 \tupletUp \tuplet 4/3 { d''4 r4 } | \time 2/4 e''2 | \time 3/8 es''4. | \time 3/4 r8 d''2 r8 | } >> Perkussion = \new StaffGroup << \new Staff << \global { \clef percussion \time 3/4 r4 c'2 ~ | c'2. | R2. | r2 g'4 ~ | g'2. ~ | g'2. | } >> \new Staff << \global { \clef percussion \time 3/4 R2. | g'2. ~ | g'2. | r4 g'2 ~ | g'2 r4 | g'2. | } >> >> \score { << \Bassklarinette \Perkussion >> }
| [ << Percussion ] | [Top][Contents] | [ Fretted string instruments >> ] |
| [ < 音楽を異なる拍子記号で表示する ] | [ Up: Percussion ] | [ Tambourine example > ] |
Tam-tam example
A tam-tam example, entered with ‘tt’.
#(define mydrums '((tamtam default #f 0))) \new DrumStaff \with { instrumentName = #"Tamtam" } \drummode { \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums) \override Staff.StaffSymbol.line-positions = #'( 0 ) \override Staff.BarLine.bar-extent = #'(-1.5 . 1.5) tt 1 \pp \laissezVibrer }
| [ << Percussion ] | [Top][Contents] | [ Fretted string instruments >> ] |
| [ < Tam-tam example ] | [ Up: Percussion ] | [ Fretted string instruments > ] |
Tambourine example
A tambourine example, entered with ‘tamb’.
#(define mydrums '((tambourine default #f 0))) \new DrumStaff \with { instrumentName = #"Tambourine" } \drummode { \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums) \override Staff.StaffSymbol.line-positions = #'( 0 ) \override Staff.BarLine.bar-extent = #'(-1.5 . 1.5) \time 6/8 tamb8. 16 8 8 8 8 | tamb4. 8 8 8 | % The trick with the scaled duration and the shorter rest % is neccessary for the correct ending of the trill-span! tamb2.*5/6 \startTrillSpan s8 \stopTrillSpan | }
| [ << Percussion ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < Tambourine example ] | [ Up: Top ] | [ 楽譜に運指記号を追加する > ] |
13 Fretted string instruments
See also Fretted string instruments.
| [ << Fretted string instruments ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < Fretted string instruments ] | [ Up: Fretted string instruments ] | [ タブ譜に運指記号を追加する > ] |
楽譜に運指記号を追加する
単純な構文で運指記号を追加することができます。
\relative c'' { c4-1 d-2 f-4 e-3 }
| [ << Fretted string instruments ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < 楽譜に運指記号を追加する ] | [ Up: Fretted string instruments ] | [ タブ譜にマークアップを追加する > ] |
タブ譜に運指記号を追加する
タブ譜に運指記号を追加するには、\markup と \finger を使用します。
one = \markup { \finger 1 } two = \markup { \finger 2 } threeTwo = \markup { \override #'(baseline-skip . 2) \column { \finger 3 \finger 2 } } \score { \new TabStaff { \tabFullNotation \stemUp e8\4^\one b\2 <g\3 e'\1>^>[ b\2 e\4] <a\3 fis'\1>^>^\threeTwo[ b\2 e\4] } }
| [ << Fretted string instruments ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < タブ譜に運指記号を追加する ] | [ Up: Fretted string instruments ] | [ 運指記号を譜の内側に表示する > ] |
タブ譜にマークアップを追加する
デフォルトでは、タブ譜にマークアップは表示されません。表示させるには、\revert TabStaff.TextScript.stencil を使用します。
high = { r4 r8 <g c'> q r8 r4 } low = { c4 r4 c8 r8 g,8 b, } pulse = { s8^"1" s^"&" s^"2" s^"&" s^"3" s^"&" s^"4" s^"&" } \score { \new TabStaff { \repeat unfold 2 << \high \\ \low \\ \pulse >> } \layout { \context { \TabStaff \clef moderntab \revert TextScript.stencil \override TextScript.font-series = #'bold \override TextScript.font-size = #-2 \override TextScript.color = #red } \context { \Score proportionalNotationDuration = #1/8 } } }
| [ << Fretted string instruments ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < タブ譜にマークアップを追加する ] | [ Up: Fretted string instruments ] | [ Automatic fretboards barré > ] |
運指記号を譜の内側に表示する
デフォルトでは、縦方向の運指記号は譜の外側に配置されます。この挙動を取り消すことができます。注意: この場合、和音でない場合にも <> を用いる必要があります。
\relative c' { <c-1 e-2 g-3 b-5>2 \override Fingering.staff-padding = #'() <c-1 e-2 g-3 b-5>4 g'-0 a8[-1 b]-2 g-0 r \override Fingering.add-stem-support = ##f a[-1 b]-2 g-0 r \override Fingering.add-stem-support = ##t a[-1 b]-2 g-0 r \override Fingering.add-stem-support = #only-if-beamed a[-1 b]-2 g-0 r }
| [ << Fretted string instruments ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < 運指記号を譜の内側に表示する ] | [ Up: Fretted string instruments ] | [ フレット図の向きを変更する > ] |
Automatic fretboards barré
When automatic fretboards are used, barré indicators are drawn whenever one finger is responsible for multiple strings.
If no finger indications are given in the chord from which the automatic fretboard is created, no barré indicators are included, because there is no way to identify where barrés should be placed.
\new FretBoards { <f,-1 c-3 f-4 a-2 c'-1 f'-1>1 <f, c f a c' f'>1 }
| [ << Fretted string instruments ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < Automatic fretboards barré ] | [ Up: Fretted string instruments ] | [ Chord changes for fretboards > ] |
フレット図の向きを変更する
フレット図は 3 種類の向きを指定できます。デフォルトの揃え位置は、一番上にある弦またはフレットです。
\include "predefined-guitar-fretboards.ly" << \chords { c1 c1 c1 } \new FretBoards \chordmode { c1 \override FretBoard.fret-diagram-details.orientation = #'landscape c1 \override FretBoard.fret-diagram-details.orientation = #'opposing-landscape c1 } \new Voice { c'1 c'1 c' } >>
| [ << Fretted string instruments ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < フレット図の向きを変更する ] | [ Up: Fretted string instruments ] | [ タブ譜での和音のグリッサンド > ] |
Chord changes for fretboards
Fretboards can be set to display only when the chord changes, or at the beginning of a new line.
\include "predefined-guitar-fretboards.ly" myChords = \chordmode { c1 c1 \break \set chordChanges = ##t c1 c1 \break c1 c1 } << \new ChordNames { \myChords } \new FretBoards { \myChords } \new Staff { \myChords } >>
タブ譜での和音のグリッサンド
和音のスライドはデフォルトで Staff と TabStaff の両方に表示されます。TabStaff では、弦番号の自動計算の方法が和音と単一音で異なるため、弦番号が必要です。
myMusic = \relative c' { <c e g>1 \glissando <f a c> <cis, eis gis>1 \glissando <f a c> <cis eis gis>1 \glissando <f a c\3> } \score { << \new Staff { \clef "treble_8" \omit StringNumber \myMusic } \new TabStaff \myMusic >> } \score { << \new Staff { \clef "treble_8" \omit StringNumber \myMusic } \new TabStaff \with { \override Glissando.style = #'none } { \myMusic } >> }
| [ << Fretted string instruments ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < タブ譜での和音のグリッサンド ] | [ Up: Fretted string instruments ] | [ 和音内の運指記号の位置をコントロールする > ] |
Chords with stretched fingering for FretBoards and TabVoice
Sometimes chords with a stretched fingering are required. If not
otherwise specified the context property maximumFretStretch is
set to value 4, though, resulting in a warning about “No string
for pitch ...”, and the note is omitted. You may set
maximumFretStretch to an approppriate value or explicitly assign
string numbers to all notes of a chord to fix that.
% The code below prints two warnings for the second chord, % which may be omitted by uncommenting the following line. % % #(for-each (lambda (x) (ly:expect-warning "No string for pitch")) (iota 2)) mus = { <c' bes'> <c'\2 bes'> \set maximumFretStretch = 5 <c' bes'> <c'\2 bes'\1> } << \new FretBoards \mus \new TabVoice \mus >>
和音内の運指記号の位置をコントロールする
運指番号の位置を精密にコントロールすることができます。位置の設定が適用されるためには、単一の音符であっても和音構造 <> を用いる必要があります。
\relative c' { \set fingeringOrientations = #'(left) <c-1 e-3 a-5>4 \set fingeringOrientations = #'(down) <c-1 e-3 a-5>4 \set fingeringOrientations = #'(down right up) <c-1 e-3 a-5>4 \set fingeringOrientations = #'(up) <c-1 e-3 a-5>4 \set fingeringOrientations = #'(left) <c-1>2 \set fingeringOrientations = #'(down) <e-3>2 \set stringNumberOrientations = #'(up left down) <f\3 a\2 c\1>1 \set strokeFingerOrientations = #'(down right up) <c\rightHandFinger 1 e\rightHandFinger 2 c'\rightHandFinger 4 > }
| [ << Fretted string instruments ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < 和音内の運指記号の位置をコントロールする ] | [ Up: Fretted string instruments ] | [ マークアップのフレット図をカスタマイズする > ] |
フレットボードのフレット図をカスタマイズする
フレット図のプロパティは fret-diagram-details からセットできます。FretBoardのフレット図では、オーバライドは FretBoards.FretBoard
オブジェクトに適用されます。FretBoards は Voice のように最下位のコンテキストであるため、プロパティのオーバライドでは省略することができます。
% begin verbatim \include "predefined-guitar-fretboards.ly" \storePredefinedDiagram #default-fret-table \chordmode { c' } #guitar-tuning "x;1-1-(;3-2;3-3;3-4;1-1-);" % shorthand oo = #(define-music-function (grob-path value) (list? scheme?) #{ \once \override $grob-path = #value #}) << \new ChordNames { \chordmode { c1 | c | c | d | bes } } \new FretBoards { % Set global properties of fret diagram \override FretBoards.FretBoard.size = 1.2 \override FretBoard.fret-diagram-details.finger-code = #'in-dot \override FretBoard.fret-diagram-details.dot-color = #'white \chordmode { c \oo FretBoard.size #1.0 \oo FretBoard.fret-diagram-details.barre-type #'straight \oo FretBoard.fret-diagram-details.dot-color #'black \oo FretBoard.fret-diagram-details.finger-code #'below-string c' \oo FretBoard.fret-diagram-details.barre-type #'none \oo FretBoard.fret-diagram-details.number-type #'arabic \oo FretBoard.fret-diagram-details.orientation #'landscape \oo FretBoard.fret-diagram-details.mute-string "M" \oo FretBoard.fret-diagram-details.label-dir #LEFT \oo FretBoard.fret-diagram-details.dot-color #'black c' \oo FretBoard.fret-diagram-details.finger-code #'below-string \oo FretBoard.fret-diagram-details.dot-radius #0.35 \oo FretBoard.fret-diagram-details.dot-position #0.5 \oo FretBoard.fret-diagram-details.fret-count #3 d \oo FretBoard.fret-diagram-details.barre-type #'straight \oo FretBoard.fret-diagram-details.finger-code #'none \oo FretBoard.fret-diagram-details.dot-radius #0.25 \oo FretBoard.fret-diagram-details.dot-color #'black \oo FretBoard.fret-diagram-details.string-overhang #0. \oo FretBoard.fret-diagram-details.barre-thickness #2. bes } } \new Voice { c'1 | c' | c' | d' | bes } >>
| [ << Fretted string instruments ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < フレットボードのフレット図をカスタマイズする ] | [ Up: Fretted string instruments ] | [ 弦番号と右手の運指 > ] |
マークアップのフレット図をカスタマイズする
フレット図のプロパティは fret-diagram-details からセットできます。マークアップのフレット図では、オーバライドは Voice.TextScript
オブジェクトや、マークアップに直接適用されます。
<< \chords { c1 | c | c | d } \new Voice = "mel" { \textLengthOn % Set global properties of fret diagram \override TextScript.size = 1.2 \override TextScript.fret-diagram-details.finger-code = #'in-dot \override TextScript.fret-diagram-details.dot-color = #'white %% C major for guitar, no barre, using defaults % terse style c'1^\markup { \fret-diagram-terse "x;3-3;2-2;o;1-1;o;" } %% C major for guitar, barred on third fret % verbose style % size 1.0 % roman fret label, finger labels below string, straight barre c'1^\markup { % standard size \override #'(size . 1.0) { \override #'(fret-diagram-details . ( (number-type . roman-lower) (finger-code . in-dot) (barre-type . straight))) { \fret-diagram-verbose #'((mute 6) (place-fret 5 3 1) (place-fret 4 5 2) (place-fret 3 5 3) (place-fret 2 5 4) (place-fret 1 3 1) (barre 5 1 3)) } } } %% C major for guitar, barred on third fret % verbose style % landscape orientation, arabic numbers, M for mute string % no barre, fret label down or left, small mute label font c'1^\markup { \override #'(fret-diagram-details . ( (finger-code . below-string) (number-type . arabic) (label-dir . -1) (mute-string . "M") (orientation . landscape) (barre-type . none) (xo-font-magnification . 0.4) (xo-padding . 0.3))) { \fret-diagram-verbose #'((mute 6) (place-fret 5 3 1) (place-fret 4 5 2) (place-fret 3 5 3) (place-fret 2 5 4) (place-fret 1 3 1) (barre 5 1 3)) } } %% simple D chord % terse style % larger dots, centered dots, fewer frets % label below string d'1^\markup { \override #'(fret-diagram-details . ( (finger-code . below-string) (dot-radius . 0.35) (dot-position . 0.5) (fret-count . 3))) { \fret-diagram-terse "x;x;o;2-1;3-2;2-3;" } } } >>
| [ << Fretted string instruments ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < マークアップのフレット図をカスタマイズする ] | [ Up: Fretted string instruments ] | [ フラメンコの記譜法 > ] |
弦番号と右手の運指
この例は左手の運指記号、弦番号、右手の運指記号を組み合わせています。
#(define RH rightHandFinger) \relative c { \clef "treble_8" <c-3\5\RH 1 >4 <e-2\4\RH 2 >4 <g-0\3\RH 3 >4 <c-1\2\RH 4 >4 }
| [ << Fretted string instruments ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < 弦番号と右手の運指 ] | [ Up: Fretted string instruments ] | [ フレット図とその調整 > ] |
フラメンコの記譜法
フラメンコのギターでは、特殊な記譜法が用いられます:
* ゴルペ奏法の記号: 薬指の爪でギターの表面板を叩く奏法 * ストローク (の方向) を示す矢印 * 異なる運指の文字 (“p”: 親指, “i”: 人差し指, “m”: 中指, “a”: 薬指, “x”: 小指) * 3 指あるいは 4 指のラスゲアード: すべての指で上向きにストロークし、最後は人差し指で上下にストロークします。 * アバニコ: (下向きに) 親指で、(上向きに) 小指と人差し指で (組となって) ストロークします。小指の代わりに中指と薬指を使うアバニコ 2 もあります。 * アルサプーア: 親指で高速で演奏します。
運指記号の多くは矢印を伴います。アバニコやラスゲアードでは、最初の和音のみに符頭が表示されます。
このスニペットは ‘flamenco.ly’ にヘッダとして切り出して使うことができるコードを含んでおり、切り出したものがソース ファイルにあります。
%%%%%%% Cut here ----- Start of `flamenco.ly`. % Text indicators. abanico = ^\markup \small { \italic Abanico } rasgueado = ^\markup \small { \italic Ras. } alzapua = ^\markup \small { \italic Alzapua } % Finger stroke symbols. strokeUp = \markup { \combine \override #'(thickness . 1.3) \draw-line #'(0 . 2) \raise #2 \arrow-head #Y #UP ##f } strokeDown = \markup { \combine \arrow-head #Y #DOWN ##f \override #'(thickness . 1.3) \draw-line #'(0 . 2) } % Golpe symbol. golpe = \markup { \filled-box #'(0 . 1) #'(0 . 1) #0 \hspace #-1.6 \with-color #white \filled-box #'(0.15 . 0.85) #'(0.15 . 0.85) #0 } % Strokes, fingers, and golpe command. RHp = \rightHandFinger #1 RHi = \rightHandFinger #2 RHm = \rightHandFinger #3 RHa = \rightHandFinger #4 RHx = \rightHandFinger #5 RHu = \rightHandFinger \strokeUp RHd = \rightHandFinger \strokeDown RHg = \rightHandFinger \golpe % Various shorthands. tupletOff = { \once \omit TupletNumber \once \omit TupletBracket } tupletsOff = { \omit TupletNumber \override TupletBracket.bracket-visibility = #'if-no-beam } tupletsOn = { \override TupletBracket.bracket-visibility = #'default \undo \omit TupletNumber } headsOff = { \hide TabNoteHead \hide NoteHead \override NoteHead.no-ledgers = ##t } headsOn = { \override TabNoteHead.transparent = ##f \override NoteHead.transparent = ##f \override NoteHead.no-ledgers = ##f } %%%%%%% Cut here ----- End of `flamenco.ly`. part = \relative c' { \set strokeFingerOrientations = #'(up) \key a\major <a, e' a cis e\RHu\RHi>8 <a e' a cis e\RHd\RHi>8 r4 r2^\markup\golpe | <a e' a cis e\RHu\RHi>8 <a e' a cis e\RHd\RHi>8 <a e' a cis e\RHu\RHi\RHg>8 <a e' a cis e\RHd\RHi>8 r2 | <a e' a cis e\RHu\RHa>16\rasgueado \headsOff <a e' a cis e\RHu\RHm> <a e' a cis e\RHu\RHi> <a e' a cis e\RHd\RHi>~ \headsOn <a e' a cis e>2 r4 | \tupletOff \tuplet 5/4 { <a e' a cis e\RHu\RHx>16\rasgueado \headsOff <a e' a cis e\RHu\RHa> <a e' a cis e\RHu\RHm> <a e' a cis e\RHu\RHi> <a e' a cis e\RHd\RHi>~ \headsOn } <a e' a cis e>2 r4 | <>\abanico \tupletsOff \repeat unfold 4 { \tuplet 3/2 { <a e' a cis e\RHd\RHp>8 \headsOff <a e' a cis e\RHu\RHx> <a e' a cis e\RHu\RHi> \headsOn } } \tupletsOff | <>\alzapua \override Beam.positions = #'(2 . 2) \repeat unfold 4 { \tuplet 3/2 { a8\RHp <e' a\RHu\RHg> <e a\RHd> } } \tupletsOn | <a, e' a\RHu\RHm>1 \bar "|." } \score { \new StaffGroup << \context Staff = "part" { \clef "G_8" \part } \context TabStaff { \part } >> \layout { ragged-right = ##t } }
| [ << Fretted string instruments ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < フラメンコの記譜法 ] | [ Up: Fretted string instruments ] | [ 代替フレット テーブル > ] |
フレット図とその調整
このスニペットは、フレット図を表示し、見た目を様々に調整する方法を示しています。
<< \chords { a1 a \bar "||" \break \repeat unfold 3 { c c c d d \bar "||" \break } } \new Voice { % Set global properties of fret diagram \override TextScript.size = 1.2 \override TextScript.fret-diagram-details .finger-code = #'below-string \override TextScript.fret-diagram-details .dot-color = #'black % 1 % % A chord for ukulele. a'1^\markup \override #'(fret-diagram-details . ((string-count . 4) (dot-color . white) (finger-code . in-dot))) \fret-diagram "4-2-2;3-1-1;2-o;1-o;" % 2 % % A chord for ukulele, with formatting defined in definition % string: 1.2 * size, 4 strings, 4 frets, fingerings below, % string dot radius .35 of fret spacing, dot position 0.55 of % fret spacing. a'1^\markup \override #'(fret-diagram-details . ((dot-color . white) (open-string . "o"))) \fret-diagram "s:1.2;w:4;h:3;f:2;d:0.35;p:0.55;4-2-2;3-1-1;2-o;1-o;" %% %% These chords will be in normal orientation %% % 3 % % C major for guitar, barred on third fret: verbose style, % roman fret label, finger labels below string, straight barre. c'1^\markup % 110% of default size \override #'(size . 1.1) \override #'(fret-diagram-details . ((number-type . roman-lower) (finger-code . below-string) (barre-type . straight))) \fret-diagram-verbose #'((mute 6) (place-fret 5 3 1) (place-fret 4 5 2) (place-fret 3 5 3) (place-fret 2 5 4) (place-fret 1 3 1) (barre 5 1 3)) % 4 % % C major for guitar, barred on third fret: double barre used % to test barre function, verbose style. c'1^\markup % 110% of default size \override #'(size . 1.1) \override #'(fret-diagram-details . ((number-type . arabic) (dot-label-font-mag . 0.9) (finger-code . in-dot) (fret-label-font-mag . 0.6) (fret-label-vertical-offset . 0) (label-dir . -1) (mute-string . "M") (xo-font-magnification . 0.4) (xo-padding . 0.3))) \fret-diagram-verbose #'((mute 6) (place-fret 5 3 1) (place-fret 4 5 2) (place-fret 3 5 3) (place-fret 2 5 4) (place-fret 1 3 1) (barre 4 2 5) (barre 5 1 3)) % 5 % % C major for guitar, with capo on third fret: verbose style. c'1^\markup % 110% of default size \override #'(size . 1.1) \override #'(fret-diagram-details . ((number-type . roman-upper) (dot-label-font-mag . 0.9) (finger-code . none) (fret-label-vertical-offset . 0.5) (xo-font-magnification . 0.4) (xo-padding . 0.3))) \fret-diagram-verbose #'((mute 6) (capo 3) (open 5) (place-fret 4 5 1) (place-fret 3 5 2) (place-fret 2 5 3) (open 1)) % 6 % % Simple D chord. d'1^\markup \override #'(fret-diagram-details . ((finger-code . below-string) (dot-radius . 0.35) (string-thickness-factor . 0.3) (dot-position . 0.5) (fret-count . 3))) \fret-diagram-terse "x;x;o;2-1;3-2;2-3;" % 7 % % Simple D chord, large top fret thickness. d'1^\markup \override #'(fret-diagram-details . ((finger-code . below-string) (dot-radius . 0.35) (dot-position . 0.5) (top-fret-thickness . 7) (fret-count . 3))) \fret-diagram-terse "x;x;o;2-1;3-2;2-3;" %% %% These chords will be in landscape orientation %% \override TextScript.fret-diagram-details .orientation = #'landscape % 8 % % C major for guitar, barred on third fret: verbose style, % roman fret label, finger labels below string, straight % barre. c'1^\markup % 110% of default size \override #'(size . 1.1) \override #'(fret-diagram-details . ((number-type . roman-lower) (finger-code . below-string) (barre-type . straight))) \fret-diagram-verbose #'((mute 6) (place-fret 5 3 1) (place-fret 4 5 2) (place-fret 3 5 3) (place-fret 2 5 4) (place-fret 1 3 1) (barre 5 1 3)) % 9 % % C major for guitar, barred on third fret: Double barre % used to test barre function, verbose style. c'1^\markup % 110% of default size \override #'(size . 1.1) \override #'(fret-diagram-details . ((number-type . arabic) (dot-label-font-mag . 0.9) (finger-code . in-dot) (fret-label-font-mag . 0.6) (fret-label-vertical-offset . 0) (label-dir . -1) (mute-string . "M") (xo-font-magnification . 0.4) (xo-padding . 0.3))) \fret-diagram-verbose #'((mute 6) (place-fret 5 3 1) (place-fret 4 5 2) (place-fret 3 5 3) (place-fret 2 5 4) (place-fret 1 3 1) (barre 4 2 5) (barre 5 1 3)) % 10 % % C major for guitar, with capo on third fret: verbose style. c'1^\markup % 110% of default size \override #'(size . 1.1) \override #'(fret-diagram-details . ((number-type . roman-upper) (dot-label-font-mag . 0.9) (finger-code . none) (fret-label-vertical-offset . 0.5) (xo-font-magnification . 0.4) (xo-padding . 0.3))) \fret-diagram-verbose #'((mute 6) (capo 3) (open 5) (place-fret 4 5 1) (place-fret 3 5 2) (place-fret 2 5 3) (open 1)) % 11 % % Simple D chord. d'1^\markup \override #'(fret-diagram-details . ((finger-code . below-string) (dot-radius . 0.35) (dot-position . 0.5) (fret-count . 3))) \fret-diagram-terse "x;x;o;2-1;3-2;2-3;" % 12 % % Simple D chord, large top fret thickness. d'1^\markup \override #'(fret-diagram-details . ((finger-code . below-string) (dot-radius . 0.35) (dot-position . 0.5) (top-fret-thickness . 7) (fret-count . 3))) \fret-diagram-terse "x;x;o;2-1;3-2;2-3;" %% %% These chords will be in opposing-landscape orientation. %% \override TextScript.fret-diagram-details .orientation = #'opposing-landscape % 13 % % C major for guitar, barred on third fret: verbose style, % roman fret label, finger labels below string, straight % barre. c'1^\markup % 110% of default size \override #'(size . 1.1) \override #'(fret-diagram-details . ((number-type . roman-lower) (finger-code . below-string) (barre-type . straight))) \fret-diagram-verbose #'((mute 6) (place-fret 5 3 1) (place-fret 4 5 2) (place-fret 3 5 3) (place-fret 2 5 4) (place-fret 1 3 1) (barre 5 1 3)) % 14 % % C major for guitar, barred on third fret: double barre % used to test barre function, verbose style. c'1^\markup % 110% of default size \override #'(size . 1.1) \override #'(fret-diagram-details . ((number-type . arabic) (dot-label-font-mag . 0.9) (finger-code . in-dot) (fret-label-font-mag . 0.6) (fret-label-vertical-offset . 0) (label-dir . -1) (mute-string . "M") (xo-font-magnification . 0.4) (xo-padding . 0.3))) \fret-diagram-verbose #'((mute 6) (place-fret 5 3 1) (place-fret 4 5 2) (place-fret 3 5 3) (place-fret 2 5 4) (place-fret 1 3 1) (barre 4 2 5) (barre 5 1 3)) % 15 % % C major for guitar, with capo on third fret: verbose style. c'1^\markup % 110% of default size \override #'(size . 1.1) \override #'(fret-diagram-details . ((number-type . roman-upper) (dot-label-font-mag . 0.9) (finger-code . none) (fret-label-vertical-offset . 0.5) (xo-font-magnification . 0.4) (xo-padding . 0.3))) \fret-diagram-verbose #'((mute 6) (capo 3) (open 5) (place-fret 4 5 1) (place-fret 3 5 2) (place-fret 2 5 3) (open 1)) % 16 % % Simple D chord. d'1^\markup \override #'(fret-diagram-details . ((finger-code . below-string) (dot-radius . 0.35) (dot-position . 0.5) (fret-count . 3))) \fret-diagram-terse "x;x;o;2-1;3-2;2-3;" % 17 % % Simple D chord, large top fret thickness. d'1^\markup \override #'(fret-diagram-details . ((finger-code . below-string) (dot-radius . 0.35) (dot-position . 0.5) (top-fret-thickness . 7) (fret-count . 3))) \fret-diagram-terse "x;x;o;2-1;3-2;2-3;" } >> \paper { ragged-right = ##t system-system-spacing.basic-distance = 20 } \layout { \context { \Score \override SpacingSpanner.spacing-increment = 3 } }
| [ << Fretted string instruments ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < フレット図とその調整 ] | [ Up: Fretted string instruments ] | [ フレットのある楽器のハーモニクスをタブ譜で表示する > ] |
代替フレット テーブル
代替フレット テーブルを作ることができます。これらはコードの代替形を表示するために使用されます。
代替フレット テーブルを使用するには、最初にテーブルを作成する必要があります。その後、テーブルにフレット図が追加されます。
作成されたフレット テーブルは空のままでも構いませんし、既存のテーブルからコピーしてくることもできます。
予め定義されたフレット図のテーブルは \predefinedDiagramTable で選択することができます。
\include "predefined-guitar-fretboards.ly" % Make a blank new fretboard table. #(define custom-fretboard-table-one (make-fretboard-table)) % Make a new fretboard table as a copy of `default-fret-table`. #(define custom-fretboard-table-two (make-fretboard-table default-fret-table)) % Add a chord to `custom-fretboard-table-one`. \storePredefinedDiagram #custom-fretboard-table-one \chordmode {c} #guitar-tuning "3-(;3;5;5;5;3-);" % Add a chord to `custom-fretboard-table-two`. \storePredefinedDiagram #custom-fretboard-table-two \chordmode {c} #guitar-tuning "x;3;5;5;5;o;" << \chords { c1 | d1 | c1 | d1 | c1 | d1 | } \new FretBoards { \chordmode { \set predefinedDiagramTable = #default-fret-table c1 | d1 | \set predefinedDiagramTable = #custom-fretboard-table-one c1 | d1 | \set predefinedDiagramTable = #custom-fretboard-table-two c1 | d1 | } } \new Staff { \clef "treble_8" << \chordmode { c1 | d1 | c1 | d1 | c1 | d1 | } { s1_\markup "Default table" | s1 | s1_\markup \column { "New table" "from empty" } | s1 | s1_\markup \column { "New table" "from default" } | s1 | } >> } >>
| [ << Fretted string instruments ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < 代替フレット テーブル ] | [ Up: Fretted string instruments ] | [ ギターのスライド > ] |
フレットのある楽器のハーモニクスをタブ譜で表示する
フレットのある楽器のハーモニクスをタブ譜で表示する方法です。
pinchedHarmonics = { \textSpannerDown \override TextSpanner.bound-details.left.text = \markup {\halign #-0.5 \teeny "PH" } \override TextSpanner.style = #'dashed-line \override TextSpanner.dash-period = 0.6 \override TextSpanner.bound-details.right.attach-dir = 1 \override TextSpanner.bound-details.right.text = \markup { \draw-line #'(0 . 1) } \override TextSpanner.bound-details.right.padding = -0.5 } harmonics = { % artificial harmonics (AH) \textLengthOn <\parenthesize b b'\harmonic>4_\markup { \teeny "AH 16" } <\parenthesize g g'\harmonic>4_\markup { \teeny "AH 17" } <\parenthesize d' d''\harmonic>2_\markup { \teeny "AH 19" } % pinched harmonics (PH) \pinchedHarmonics <a'\harmonic>2\startTextSpan <d''\harmonic>4 <e'\harmonic>4\stopTextSpan % tapped harmonics (TH) <\parenthesize g\4 g'\harmonic>4_\markup { \teeny "TH 17" } <\parenthesize a\4 a'\harmonic>4_\markup { \teeny "TH 19" } <\parenthesize c'\3 c''\harmonic>2_\markup { \teeny "TH 17" } % touch harmonics (TCH) a4( <e''\harmonic>2. )_\markup { \teeny "TCH" } } frettedStrings = { % artificial harmonics (AH) \harmonicByFret 4 g4\3 \harmonicByFret 5 d4\4 \harmonicByFret 7 g2\3 % pinched harmonics (PH) \harmonicByFret 7 d2\4 \harmonicByFret 5 d4\4 \harmonicByFret 7 a4\5 % tapped harmonics (TH) \harmonicByFret 5 d4\4 \harmonicByFret 7 d4\4 \harmonicByFret 5 g2\3 % touch harmonics (TCH) a4 \harmonicByFret 9 g2.\3 } \score { << \new Staff \with { \omit StringNumber } { \new Voice { \clef "treble_8" \harmonics } } \new TabStaff { \new TabVoice { \frettedStrings } } >> }
| [ << Fretted string instruments ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < フレットのある楽器のハーモニクスをタブ譜で表示する ] | [ Up: Fretted string instruments ] | [ ギター ストロークのリズム > ] |
ギターのスライド
グリッサンドと異なり、スライドは不正確な点から開始し、指定のフレットまで移動します。これを実現する良い方法は、次の例で示すように、実際に演奏される音符の前に不可視の装飾音符を追加することです。
% Hide fret number: useful to draw slide into/from a casual point of % the fretboard. hideFretNumber = { \once \hide TabNoteHead \once \hide NoteHead \once \omit Stem \once \omit Flag \once \override NoteHead.no-ledgers = ##t \once \override Glissando.bound-details.left.padding = #0.3 } music= \relative c' { \grace { \hideFretNumber d8\2 \glissando s2 } g2\2 \grace { \hideFretNumber g8\2 \glissando s2 } d2 | \grace { \hideFretNumber c,8 \glissando s } f4\5^\markup \tiny { Slide into } \grace { \hideFretNumber f8 \glissando s } a4\4 \grace { \hideFretNumber e'8\3 \glissando s } b4\3^\markup \tiny { Slide from } \grace { \hideFretNumber b'8 \glissando s2 } g4 | } \score { << \new Staff { \clef "G_8" \music } \new TabStaff { \music } >> }
| [ << Fretted string instruments ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < ギターのスライド ] | [ Up: Fretted string instruments ] | [ ハンマリング オンとプリング オフ > ] |
ギター ストロークのリズム
ギター音楽では、メロディの音符、コードネーム、フレット図と共に、ストロークのリズムを表示することができます。
\include "predefined-guitar-fretboards.ly" << \new ChordNames \chordmode { c1 | f | g | c } \new FretBoards \chordmode { c1 | f | g | c } \new Voice \with { \consists "Pitch_squash_engraver" } \relative c'' { \improvisationOn c4 c8 c c4 c8 c f4 f8 f f4 f8 f g4 g8 g g4 g8 g c4 c8 c c4 c8 c } \new Voice = "melody" \relative c'' { c2 e4 e4 f2. r4 g2. a4 e4 c2. } \new Lyrics \lyricsto "melody" { This is my song. I like to sing. } >>
| [ << Fretted string instruments ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < ギター ストロークのリズム ] | [ Up: Fretted string instruments ] | [ 和音に対してハンマリング オンやプリング オフを使用する > ] |
ハンマリング オンとプリング オフ
ハンマリング オンやプリング オフはスラーで得ることができます。
\new TabStaff { \relative c' { d4( e\2) a( g) } }
| [ << Fretted string instruments ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < ハンマリング オンとプリング オフ ] | [ Up: Fretted string instruments ] | [ ボイスに対してハンマリング オンやプリング オフを使用する > ] |
和音に対してハンマリング オンやプリング オフを使用する
和音に対してハンマリング オンやプリング オフを用いる際、弧は 1 つしか描かれません。“二重の弧” は、doubleSlurs プロパティを #t にセットすることで描くことができます。
\new TabStaff { \relative c' { % chord hammer-on and pull-off \set doubleSlurs = ##t <g' b>8( <a c> <g b>) } }
| [ << Fretted string instruments ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < 和音に対してハンマリング オンやプリング オフを使用する ] | [ Up: Fretted string instruments ] | [ フレット図の位置を変更する方法 > ] |
ボイスに対してハンマリング オンやプリング オフを使用する
ハンマリング オンやプリング オフの弧は、ボイス 1, 3 に対しては上向き、ボイス 2, 4 に対しては下向きになります。
\new TabStaff { \relative c' { << { \voiceOne g2( a) } \\ { \voiceTwo a,( b) } >> \oneVoice } }
| [ << Fretted string instruments ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < ボイスに対してハンマリング オンやプリング オフを使用する ] | [ Up: Fretted string instruments ] | [ ジャズ コンボのテンプレート > ] |
フレット図の位置を変更する方法
衝突を避けたり、2 つの音符の間に配置したいなどの目的で、フレット図の位置を移動したい場合は、いくつかの方法があります:
1) padding または extra-offset の値を変更する (最初のスニペットに表示)。
2) 不可視のボイスを追加し、その音符にフレット図を付加する (2 つ目の例)。
フレット図をある拍の位置に (例では、小節内 3 拍目) 移動したい場合には、音符が拍に揃えられる 2 つ目の方法がより適しています。
harmonies = \chordmode { a8:13 \once \override ChordNames.ChordName.extra-offset = #'(10 . 0) b8:13 s4. | s2 b2:13 } \score { << \new ChordNames \harmonies \new Staff { % Method 1. a8^\markup \fret-diagram "6-x;5-0;4-2;3-0;2-0;1-2;" \once \override TextScript.extra-offset = #'(10 . 0) b4.~^\markup \fret-diagram "6-x;5-2;4-4;3-2;2-2;1-4;" b4. a8 | \break % Method 2. << { a8 b4.~ b4. a8 } { s2 s2^\markup \fret-diagram "6-x;5-2;4-4;3-2;2-2;1-4;" } >> | } >> }
| [ << Fretted string instruments ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < フレット図の位置を変更する方法 ] | [ Up: Fretted string instruments ] | [ レセ ヴィブレのタイ > ] |
ジャズ コンボのテンプレート
これはジャズ アンサンブルのための非常に高度なテンプレートです。全ての楽器が \key c \major で記述されています。これはコンサート
ピッチでの調を示しており、\transpose セクション内では自動的に移調されます。
\header { title = "Song" subtitle = "(tune)" composer = "Me" meter = "moderato" piece = "Swing" tagline = \markup \column { "LilyPond example file by Amelie Zapf," "Berlin 07/07/2003" } } % To make the example display properly in the documentation. \paper { paper-width = 130\mm paper-height = 205\mm } % #(set-global-staff-size 16) \include "english.ly" %%%%%%%%%%%% Some macros %%%%%%%%%%%%%%%%%%% sl = { \override NoteHead.style = #'slash \hide Stem } nsl = { \revert NoteHead.style \undo \hide Stem } crOn = \override NoteHead.style = #'cross crOff = \revert NoteHead.style % Insert chord name style stuff here. jazzChords = { } %%%%%%%%%%%% Keys'n'thangs %%%%%%%%%%%%%%%%% global = { \time 4/4 } Key = { \key c \major } % ############ Horns ############ % ------ Trumpet ------ trpt = \transpose c d \relative c'' { \Key c1 | c | c | } trpHarmony = \transpose c' d { \jazzChords } trumpet = { \global \clef treble \trpt } % ------ Alto Saxophone ------ alto = \transpose c a \relative c' { \Key c1 | c | c | } altoHarmony = \transpose c' a { \jazzChords } altoSax = { \global \clef treble \alto } % ------ Baritone Saxophone ------ bari = \transpose c a' \relative c { \Key c1 | c1 | \sl d4^"Solo" d d d \nsl | } bariHarmony = \transpose c' a \chordmode { \jazzChords s1 | s | d2:maj e:m7 | } bariSax = { \global \clef treble \bari } % ------ Trombone ------ tbone = \relative c { \Key c1 | c | c | } tboneHarmony = \chordmode { \jazzChords } trombone = { \global \clef bass \tbone } % ############ Rhythm Section ############# % ------ Guitar ------ gtr = \relative c'' { \Key c1 | \sl b4 b b b \nsl | c1 | } gtrHarmony = \chordmode { \jazzChords s1 | c2:min7+ d2:maj9 | s1 | } guitar = { \global \clef treble \gtr } %% ------ Piano ------ rhUpper = \relative c'' { \voiceOne \Key c1 | c | c | } rhLower = \relative c' { \voiceTwo \Key e1 | e | e | } lhUpper = \relative c' { \voiceOne \Key g1 | g | g | } lhLower = \relative c { \voiceTwo \Key c1 | c | c | } PianoRH = { \clef treble \global << \new Voice = "one" \rhUpper \new Voice = "two" \rhLower >> } PianoLH = { \clef bass \global << \new Voice = "one" \lhUpper \new Voice = "two" \lhLower >> } piano = << \new Staff = "upper" \PianoRH \new Staff = "lower" \PianoLH >> % ------ Bass Guitar ------ Bass = \relative c { \Key c1 | c | c | } bass = { \global \clef bass \Bass } % ------ Drums ------ up = \drummode { \voiceOne hh4 <hh sn> hh <hh sn> | hh4 <hh sn> hh <hh sn> | hh4 <hh sn> hh <hh sn> | } down = \drummode { \voiceTwo bd4 s bd s | bd4 s bd s | bd4 s bd s | } drumContents = { \global << \new DrumVoice \up \new DrumVoice \down >> } %%%%%%%%% It All Goes Together Here %%%%%%%%%%%%%%%%%%%%%% \book { % For the LilyPond documentation. \score { << \new StaffGroup = "horns" << \new Staff = "trumpet" \with { instrumentName = "Trumpet" } \trumpet \new Staff = "altosax" \with { instrumentName = "Alto Sax" } \altoSax \new ChordNames = "barichords" \with { instrumentName = "Bari Sax" } \bariHarmony \new Staff = "barisax" \with { instrumentName = "Bari Sax" } \bariSax \new Staff = "trombone" \with { instrumentName = "Trombone" } \trombone >> \new StaffGroup = "rhythm" << \new ChordNames = "chords" \with { instrumentName = "Guitar" } \gtrHarmony \new Staff = "guitar" \with { instrumentName = "Guitar" } \guitar \new PianoStaff = "piano" \with { instrumentName = "Piano" midiInstrument = "acoustic grand" } \piano \new Staff = "bass" \with { instrumentName = "Bass" } \bass \new DrumStaff \with { instrumentName = "Drums" } \drumContents >> >> \layout { \context { \Staff \RemoveEmptyStaves } \context { \Score \override BarNumber.padding = 3 \override RehearsalMark.padding = 2 skipBars = ##t } } \midi { } } }
| [ << Fretted string instruments ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < ジャズ コンボのテンプレート ] | [ Up: Fretted string instruments ] | [ TabStaff で最高弦を下に表示する > ] |
レセ ヴィブレのタイ
レセ ヴィブレのタイの大きさは固定されています。tie-configuration
によって配置を調整することができます。
\relative c' { <c e g>4\laissezVibrer r <c f g>\laissezVibrer r <c d f g>4\laissezVibrer r <c d f g>4.\laissezVibrer r8 <c d e f>4\laissezVibrer r \override LaissezVibrerTieColumn.tie-configuration = #`((-7 . ,DOWN) (-5 . ,DOWN) (-3 . ,UP) (-1 . ,UP)) <c d e f>4\laissezVibrer r }
| [ << Fretted string instruments ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < レセ ヴィブレのタイ ] | [ Up: Fretted string instruments ] | [ 文字でタブ譜をフォーマットする > ] |
TabStaff で最高弦を下に表示する
タブ譜では通常、第 1 弦が上に表示されます。下に表示したい場合には、stringOneTopmost コンテキスト プロパティを変更します。コンテキスト全体に設定するには、layout ブロックに設定することができます。
%\layout { % \context { % \Score % stringOneTopmost = ##f % } % \context { % \TabStaff % tablatureFormat = #fret-letter-tablature-format % } %} m = { \cadenzaOn e, b, e gis! b e' \bar "||" } << \new Staff { \clef "G_8" <>_"default" \m <>_"italian (historic)"\m } \new TabStaff { \m \set Score.stringOneTopmost = ##f \set TabStaff.tablatureFormat = #fret-letter-tablature-format \m } >>
| [ << Fretted string instruments ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < TabStaff で最高弦を下に表示する ] | [ Up: Fretted string instruments ] | [ タブ譜で開放弦のハーモニクスを表示する > ] |
文字でタブ譜をフォーマットする
タブ譜では数字の代わりに文字を用いることができます。
music = \relative c { c4 d e f g4 a b c d4 e f g } << \new Staff { \clef "G_8" \music } \new TabStaff \with { tablatureFormat = #fret-letter-tablature-format } { \music } >>
| [ << Fretted string instruments ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < 文字でタブ譜をフォーマットする ] | [ Up: Fretted string instruments ] | [ 右手の運指記号の配置 > ] |
タブ譜で開放弦のハーモニクスを表示する
このスニペットは開放弦のハーモニクスを表示する方法を示しています。
openStringHarmonics = { \textSpannerDown \override TextSpanner.staff-padding = 3 \override TextSpanner.dash-fraction = 0.3 \override TextSpanner.dash-period = 1 % first harmonic \override TextSpanner.bound-details.left.text = \markup\small "1st harm. " \harmonicByFret 12 e,2\6\startTextSpan \harmonicByRatio #1/2 e,\6\stopTextSpan % second harmonic \override TextSpanner.bound-details.left.text = \markup\small "2nd harm. " \harmonicByFret 7 e,\6\startTextSpan \harmonicByRatio #1/3 e,\6 \harmonicByFret 19 e,\6 \harmonicByRatio #2/3 e,\6\stopTextSpan %\harmonicByFret 19 < e,\6 a,\5 d\4 > %\harmonicByRatio #2/3 < e,\6 a,\5 d\4 > % third harmonic \override TextSpanner.bound-details.left.text = \markup\small "3rd harm. " \harmonicByFret 5 e,\6\startTextSpan \harmonicByRatio #1/4 e,\6 \harmonicByFret 24 e,\6 \harmonicByRatio #3/4 e,\6\stopTextSpan \break % fourth harmonic \override TextSpanner.bound-details.left.text = \markup\small "4th harm. " \harmonicByFret 4 e,\6\startTextSpan \harmonicByRatio #1/5 e,\6 \harmonicByFret 9 e,\6 \harmonicByRatio #2/5 e,\6 \harmonicByFret 16 e,\6 \harmonicByRatio #3/5 e,\6\stopTextSpan % fifth harmonic \override TextSpanner.bound-details.left.text = \markup\small "5th harm. " \harmonicByFret 3 e,\6\startTextSpan \harmonicByRatio #1/6 e,\6\stopTextSpan \break % sixth harmonic \override TextSpanner.bound-details.left.text = \markup\small "6th harm. " \harmonicByFret 2.7 e,\6\startTextSpan \harmonicByRatio #1/7 e,\6\stopTextSpan % seventh harmonic \override TextSpanner.bound-details.left.text = \markup\small "7th harm. " \harmonicByFret 2.3 e,\6\startTextSpan \harmonicByRatio #1/8 e,\6\stopTextSpan % eighth harmonic \override TextSpanner.bound-details.left.text = \markup\small "8th harm. " \harmonicByFret 2 e,\6\startTextSpan \harmonicByRatio #1/9 e,\6\stopTextSpan } \score { << \new Staff \with { \omit StringNumber } { \new Voice { \clef "treble_8" \openStringHarmonics } } \new TabStaff { \new TabVoice { \openStringHarmonics } } >> }
| [ << Fretted string instruments ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < タブ譜で開放弦のハーモニクスを表示する ] | [ Up: Fretted string instruments ] | [ タブ譜における多声 > ] |
右手の運指記号の配置
次の例で示すように、あるプロパティをセットすることによって、右手の運指記号の配置を細かくコントロールすることができます。注意: 和音構造 <> を用いる必要があります。
#(define RH rightHandFinger) \relative c { \clef "treble_8" \set strokeFingerOrientations = #'(up down) <c\RH 1 e\RH 2 g\RH 3 c\RH 4 >4 \set strokeFingerOrientations = #'(up right down) <c\RH 1 e\RH 2 g\RH 3 c\RH 4 >4 \set strokeFingerOrientations = #'(left) <c\RH 1 e\RH 2 g\RH 3 c\RH 4 >2 \set strokeFingerOrientations = #'(right) c\RH 1 }
| [ << Fretted string instruments ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < 右手の運指記号の配置 ] | [ Up: Fretted string instruments ] | [ Setting up predefined fretboards for other instruments > ] |
タブ譜における多声
TabStaff における多声は、通常の譜と同じように作成することができます。
upper = \relative c' { \time 12/8 \key e \minor \voiceOne r4. r8 e, fis g16 b g e e' b c b a g fis e } lower = \relative c { \key e \minor \voiceTwo r16 e d c b a g4 fis8 e fis g a b c } \score { \new StaffGroup = "tab with traditional" << \new Staff = "guitar traditional" << \clef "treble_8" \new Voice = "upper" \upper \new Voice = "lower" \lower >> \new TabStaff = "guitar tab" << \new TabVoice = "upper" \upper \new TabVoice = "lower" \lower >> >> }
| [ << Fretted string instruments ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < タブ譜における多声 ] | [ Up: Fretted string instruments ] | [ タブ譜でのスライド > ] |
Setting up predefined fretboards for other instruments
Predefined fret diagrams can be added for new instruments in addition to the standard diagrams used for guitar. This file shows how this is done by defining a new string tuning and a few predefined fretboards for the Venezuelan cuatro.
This file also shows how fingerings can be included in the chords used
as reference points for the chord lookup, and displayed in the fret
diagram and the TabStaff, but not the music.
These fretboards are not transposable because they contain string information. This is planned to be corrected in the future.
% Add fretboards for the cuatro. % % Note: This section could be put into a separate file % `predefined-cuatro-fretboards.ly` % and be \included into each of your compositions. cuatroTuning = #`(,(ly:make-pitch 0 6 0) ,(ly:make-pitch 1 3 SHARP) ,(ly:make-pitch 1 1 0) ,(ly:make-pitch 0 5 0)) dSix = { <a\4 b\1 d\3 fis\2> } dMajor = { <a\4 d\1 d\3 fis \2> } aMajSeven = { <a\4 cis\1 e\3 g\2> } dMajSeven = { <a\4 c\1 d\3 fis\2> } gMajor = { <b\4 b\1 d\3 g\2> } \storePredefinedDiagram #default-fret-table \dSix #cuatroTuning "o;o;o;o;" \storePredefinedDiagram #default-fret-table \dMajor #cuatroTuning "o;o;o;3-3;" \storePredefinedDiagram #default-fret-table \aMajSeven #cuatroTuning "o;2-2;1-1;2-3;" \storePredefinedDiagram #default-fret-table \dMajSeven #cuatroTuning "o;o;o;1-1;" \storePredefinedDiagram #default-fret-table \gMajor #cuatroTuning "2-2;o;1-1;o;" % End of potential include file `predefined-cuatro-fretboards.ly`. #(set-global-staff-size 16) primerosNames = \chordmode { d:6 d a:maj7 d:maj7 g } primeros = { \dSix \dMajor \aMajSeven \dMajSeven \gMajor } \score { << \new ChordNames { \set chordChanges = ##t \primerosNames } \new Staff { \new Voice \with { \remove "New_fingering_engraver" } \relative c'' { \primeros } } \new FretBoards { \set Staff.stringTunings = #cuatroTuning % \override FretBoard % #'(fret-diagram-details string-count) = 4 \override FretBoard.fret-diagram-details.finger-code = #'in-dot \primeros } \new TabStaff \relative c'' { \set TabStaff.stringTunings = #cuatroTuning \primeros } >> \layout { \context { \Score \override SpacingSpanner.base-shortest-duration = \musicLength 16 } } \midi { } }
| [ << Fretted string instruments ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < Setting up predefined fretboards for other instruments ] | [ Up: Fretted string instruments ] | [ タブ譜での符幹と連桁の挙動 > ] |
タブ譜でのスライド
スライドは Staff と TabStaff コンテキストの両方に表示することができます。
slides = { c'8\3(\glissando d'8\3) c'8\3\glissando d'8\3 \hideNotes \grace { g16\glissando } \unHideNotes c'4\3 \afterGrace d'4\3\glissando { \stemDown \hideNotes g16 } \unHideNotes } \score { << \new Staff { \clef "treble_8" \slides } \new TabStaff { \slides } >> \layout { \context { \Score \override Glissando.minimum-length = 4 \override Glissando.springs-and-rods = #ly:spanner::set-spacing-rods \override Glissando.thickness = 2 \omit StringNumber % or: %\override StringNumber.stencil = ##f } } }
| [ << Fretted string instruments ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < タブ譜でのスライド ] | [ Up: Fretted string instruments ] | [ 弦番号の延長線 > ] |
タブ譜での符幹と連桁の挙動
タブ譜での符幹の向きは、伝統的な記譜法と同じように調整することができます。以下の例のように、連桁を水平にすることもできます。
\new TabStaff { \relative c { \tabFullNotation g16 b d g b d g b \stemDown \override Beam.concaveness = 10000 g,,16 b d g b d g b } }
| [ << Fretted string instruments ] | [Top][Contents] | [ Unfretted string instruments >> ] |
| [ < タブ譜での符幹と連桁の挙動 ] | [ Up: Fretted string instruments ] | [ Unfretted string instruments > ] |
弦番号の延長線
弦番号の延長線を追加し、続く音符が全て同じ弦で演奏されることを示します。
stringNumberSpanner = #(define-music-function (StringNumber) (string?) #{ \override TextSpanner.style = #'solid \override TextSpanner.font-size = #-5 \override TextSpanner.bound-details.left.stencil-align-dir-y = #CENTER \override TextSpanner.bound-details.left.text = \markup { \circle \number $StringNumber } #}) \relative c { \clef "treble_8" \textSpannerDown \stringNumberSpanner "5" a8\startTextSpan b c d e f\stopTextSpan \stringNumberSpanner "4" g\startTextSpan a | bes4 a g2\stopTextSpan }
| [ << Fretted string instruments ] | [Top][Contents] | [ Wind instruments >> ] |
| [ < 弦番号の延長線 ] | [ Up: Top ] | [ ボイスをまたがるスラーを作成する > ] |
14 Unfretted string instruments
See also Unfretted string instruments.
| ボイスをまたがるスラーを作成する | ||
| ハーモニクスの付点 | ||
| Snap pizzicato (“Bartok” pizzicato) | ||
| 弦楽四重奏テンプレート (シンプル) | ||
| パートを個々に持つ弦楽四重奏テンプレート |
| [ << Unfretted string instruments ] | [Top][Contents] | [ Wind instruments >> ] |
| [ < Unfretted string instruments ] | [ Up: Unfretted string instruments ] | [ ハーモニクスの付点 > ] |
ボイスをまたがるスラーを作成する
異なるボイスを繋ぐスラーを作成しなければならない場合があります。
解決法は、\hideNotes を用いて片方のボイスに不可視の音符を追加することです。
この例は、Bach の Partita for Violin No. 2 (BWV 1004) の 235 小節目です。
\relative c' { << { d16( a') s a s a[ s a] s a[ s a] } \\ { \slurUp bes,16[ s e]( \hideNotes a) \unHideNotes f[( \hideNotes a) \unHideNotes fis]( \hideNotes a) \unHideNotes g[( \hideNotes a) \unHideNotes gis]( \hideNotes a) } >> }
| [ << Unfretted string instruments ] | [Top][Contents] | [ Wind instruments >> ] |
| [ < ボイスをまたがるスラーを作成する ] | [ Up: Unfretted string instruments ] | [ Snap pizzicato (“Bartok” pizzicato) > ] |
ハーモニクスの付点
\harmonic を用いて恣意的に作り出すハーモニクスは付点を表示しません。この挙動をオーバライドするには、harmonicDots コンテキスト プロパティをセットします。
\relative c''' { \time 3/4 \key f \major \set harmonicDots = ##t <bes f'\harmonic>2. ~ <bes f'\harmonic>4. <a e'\harmonic>8( <gis dis'\harmonic> <g d'\harmonic>) <fis cis'\harmonic>2. <bes f'\harmonic>2. }
| [ << Unfretted string instruments ] | [Top][Contents] | [ Wind instruments >> ] |
| [ < ハーモニクスの付点 ] | [ Up: Unfretted string instruments ] | [ 弦楽四重奏テンプレート (シンプル) > ] |
Snap pizzicato (“Bartok” pizzicato)
A snap pizzicato (also known as “Bartok pizzicato”) is a “strong pizzicato where the string is plucked vertically by snapping and rebounds off the fingerboard of the instrument” (Wikipedia). It is denoted by a circle with a vertical line going from the center upwards outside the circle.
\relative c' { c4\snappizzicato <c' e g>4\snappizzicato <c' e g>4^\snappizzicato <c, e g>4_\snappizzicato }
| [ << Unfretted string instruments ] | [Top][Contents] | [ Wind instruments >> ] |
| [ < Snap pizzicato (“Bartok” pizzicato) ] | [ Up: Unfretted string instruments ] | [ パートを個々に持つ弦楽四重奏テンプレート > ] |
弦楽四重奏テンプレート (シンプル)
これは簡単な弦楽四重奏のためのテンプレートです。これは拍子記号と調号のために \global セクションを使っています。
global= { \time 4/4 \key c \major } violinOne = \new Voice \relative c'' { c2 d e1 \bar "|." } violinTwo = \new Voice \relative c'' { g2 f e1 \bar "|." } viola = \new Voice \relative c' { \clef alto e2 d c1 \bar "|." } cello = \new Voice \relative c' { \clef bass c2 b a1 \bar "|." } \score { \new StaffGroup << \new Staff \with { instrumentName = "Violin 1" } << \global \violinOne >> \new Staff \with { instrumentName = "Violin 2" } << \global \violinTwo >> \new Staff \with { instrumentName = "Viola" } << \global \viola >> \new Staff \with { instrumentName = "Cello" } << \global \cello >> >> \layout { } \midi { } }
| [ << Unfretted string instruments ] | [Top][Contents] | [ Wind instruments >> ] |
| [ < 弦楽四重奏テンプレート (シンプル) ] | [ Up: Unfretted string instruments ] | [ Wind instruments > ] |
パートを個々に持つ弦楽四重奏テンプレート
“弦楽四重奏テンプレート” は適切な弦楽四重奏の楽譜を作り出しますが、個々のパート譜を譜刻する必要がある場合はどうでしょうか?今度の新しいテンプレートは \tag 機能を用いて容易に楽曲を個々のパートに分ける方法を示しています。
このテンプレートは別々のファイルに分ける必要があります。ファイル名は各ファイルの開始部分のコメントの中に記述されています。piece.ly はすべての音楽定義を保持しています。他のファイル - score.ly,
vn1.ly, vn2.ly, vla.ly それに vlc.ly - は対応するパートを作り出します。
別々のファイルに分ける場合は、指定されたコメントを外すことを忘れないでください!
% piece.ly % (This is the global definitions file.) global= { \time 4/4 \key c \major } Violinone = \new Voice \relative c'' { c2 d e1 \bar "|." } Violintwo = \new Voice \relative c'' { g2 g e1 \bar "|." } Viola = \new Voice \relative c' { \clef alto e2 d c1 \bar "|." } Cello = \new Voice \relative c' { \clef bass c2 b a1 \bar "|." } music = << \tag #'score \tag #'vn1 \new Staff \with { instrumentName = "Violin 1" } << \global \Violinone >> \tag #'score \tag #'vn2 \new Staff \with { instrumentName = "Violin 2" } << \global \Violintwo >> \tag #'score \tag #'vla \new Staff \with { instrumentName = "Viola" } << \global \Viola >> \tag #'score \tag #'vlc \new Staff \with { instrumentName = "Cello" } << \global \Cello >> >> % These are the other files you need to save on your computer % score.ly % (This is the main file.) % Uncomment the line below when using a separate file. % \include "piece.ly" #(set-global-staff-size 14) \score { \new StaffGroup \keepWithTag #'score \music \layout { } \midi { } } %{ Uncomment this block when using separate files. % vn1.ly % (This is the Violin 1 part file.) \include "piece.ly" \score { \keepWithTag #'vn1 \music \layout { } } % vn2.ly % (This is the Violin 2 part file.) \include "piece.ly" \score { \keepWithTag #'vn2 \music \layout { } } % vla.ly % (This is the Viola part file.) \include "piece.ly" \score { \keepWithTag #'vla \music \layout { } } % vlc.ly % (This is the Cello part file.) \include "piece.ly" \score { \keepWithTag #'vlc \music \layout { } } %}
| [ << Unfretted string instruments ] | [Top][Contents] | [ Ancient notation >> ] |
| [ < パートを個々に持つ弦楽四重奏テンプレート ] | [ Up: Top ] | [ 木管楽器のダイアグラムのサイズを変更する > ] |
15 Wind instruments
See also Wind instruments.
| 木管楽器のダイアグラムのサイズを変更する | ||
| 管楽器の運指記号 | ||
| フルート スラップの記譜 | ||
| 木管楽器のダイアグラムを画像とテキストで表示する | ||
| リコーダーの運指表 | ||
| 木管楽器のダイアグラムの調リスト | ||
| 木管楽器のダイアグラムのリスト |
| [ << Wind instruments ] | [Top][Contents] | [ Ancient notation >> ] |
| [ < Wind instruments ] | [ Up: Wind instruments ] | [ 管楽器の運指記号 > ] |
木管楽器のダイアグラムのサイズを変更する
木管楽器のダイアグラムのサイズや太さを変更することができます。
\relative c'' { \textLengthOn c1^\markup \woodwind-diagram #'piccolo #'() c^\markup \override #'(size . 1.5) \woodwind-diagram #'piccolo #'() c^\markup \override #'(thickness . 0.15) \woodwind-diagram #'piccolo #'() }
| [ << Wind instruments ] | [Top][Contents] | [ Ancient notation >> ] |
| [ < 木管楽器のダイアグラムのサイズを変更する ] | [ Up: Wind instruments ] | [ フルート スラップの記譜 > ] |
管楽器の運指記号
既存のグリフを組み合わせて、特殊な記号を作ることができます。これは管楽器に特に有用です。
lineup = \tweak outside-staff-padding #0 \tweak staff-padding #0 \tweak padding #0.2 \tweak parent-alignment-X #CENTER \tweak self-alignment-X #CENTER \etc \relative c' { g\open g\lineup ^\markup \combine \musicglyph "scripts.open" \musicglyph "scripts.tenuto" g\lineup ^\markup \combine \musicglyph "scripts.open" \musicglyph "scripts.stopped" g\stopped }
| [ << Wind instruments ] | [Top][Contents] | [ Ancient notation >> ] |
| [ < 管楽器の運指記号 ] | [ Up: Wind instruments ] | [ 木管楽器のダイアグラムを画像とテキストで表示する > ] |
フルート スラップの記譜
“スラップ タンギング” のような、特別なアーティキュレーション テクニックを指示するために、符頭を別のグリフに置き換えることができます。
slap = #(define-music-function (music) (ly:music?) #{ \temporary \override NoteHead.stencil = #ly:text-interface::print \temporary \override NoteHead.text = \markup \translate #'(1 . 0) \override #'(thickness . 1.4) \overlay { \draw-line #'(-1.2 . 0.4) \draw-line #'(-1.2 . -0.4) } \temporary \override NoteHead.stem-attachment = #(lambda (grob) (let* ((stem (ly:grob-object grob 'stem)) (dir (ly:grob-property stem 'direction UP)) (is-up (eqv? dir UP))) (cons dir (if is-up 0 -0.8)))) #music \revert NoteHead.stencil \revert NoteHead.text \revert NoteHead.stem-attachment #}) \relative c' { c4 \slap c d r \slap { g4 a } b r }
| [ << Wind instruments ] | [Top][Contents] | [ Ancient notation >> ] |
| [ < フルート スラップの記譜 ] | [ Up: Wind instruments ] | [ リコーダーの運指表 > ] |
木管楽器のダイアグラムを画像とテキストで表示する
多くの場合で、画像によるダイアグラムの表示に加えて、端に調名をテキストで表示することができます。
\relative c'' { \textLengthOn c1^\markup \woodwind-diagram #'piccolo #'((cc . (one three)) (lh . (gis)) (rh . (ees))) c^\markup \override #'(graphical . #f) \woodwind-diagram #'piccolo #'((cc . (one three)) (lh . (gis)) (rh . (ees))) }
| [ << Wind instruments ] | [Top][Contents] | [ Ancient notation >> ] |
| [ < 木管楽器のダイアグラムを画像とテキストで表示する ] | [ Up: Wind instruments ] | [ 木管楽器のダイアグラムの調リスト > ] |
リコーダーの運指表
次の例では、管楽器の運指表を作成する方法を示しています。
% range chart for paetzold contrabass recorder centermarkup = { \once \override TextScript.self-alignment-X = #CENTER \once \override TextScript.X-offset = #(lambda (g) (+ (ly:self-alignment-interface::centered-on-x-parent g) (ly:self-alignment-interface::x-aligned-on-self g))) } \new Staff \with { \remove "Time_signature_engraver" \omit Stem \omit Flag \consists "Horizontal_bracket_engraver" } { \clef bass \set Score.timing = ##f f,1*1/4 \glissando \clef violin gis'1*1/4 a'4^\markup "1)" \centermarkup \once \override TextScript.padding = 2 bes'1*1/4_\markup \override #'(baseline-skip . 1.7) \column { \fontsize #-5 \slashed-digit #0 \finger 1 \finger 2 \finger 3 \finger 4 \finger 5 \finger 6 \finger 7 } b'1*1/4 c''4^\markup "1)" cis''1*1/4 deh''1*1/4 \centermarkup \once \override TextScript.padding = 2 \once \override Staff.HorizontalBracket.direction = #UP e''1*1/4_\markup \override #'(baseline-skip . 1.7) \column { \fontsize #-5 \slashed-digit #0 \finger 1 \finger 2 \finger 4 \finger 5 } \startGroup f''1*1/4^\markup "2)" \stopGroup }
| [ << Wind instruments ] | [Top][Contents] | [ Ancient notation >> ] |
| [ < リコーダーの運指表 ] | [ Up: Wind instruments ] | [ 木管楽器のダイアグラムのリスト > ] |
木管楽器のダイアグラムの調リスト
以下のスニペットは、scm/define-woodwind-diagrams.scm に定義された、木管楽器のダイアグラムにおける可能な調と、それに対応する移調設定のリストを出力します。リストはログファイルに出力され、音楽には影響しません。コンソールに出力したい場合は、コマンドから
(current-error-port) を削除してください。
#(print-keys-verbose 'piccolo (current-error-port)) #(print-keys-verbose 'flute (current-error-port)) #(print-keys-verbose 'flute-b-extension (current-error-port)) #(print-keys-verbose 'tin-whistle (current-error-port)) #(print-keys-verbose 'oboe (current-error-port)) #(print-keys-verbose 'clarinet (current-error-port)) #(print-keys-verbose 'bass-clarinet (current-error-port)) #(print-keys-verbose 'low-bass-clarinet (current-error-port)) #(print-keys-verbose 'saxophone (current-error-port)) #(print-keys-verbose 'soprano-saxophone (current-error-port)) #(print-keys-verbose 'alto-saxophone (current-error-port)) #(print-keys-verbose 'tenor-saxophone (current-error-port)) #(print-keys-verbose 'baritone-saxophone (current-error-port)) #(print-keys-verbose 'bassoon (current-error-port)) #(print-keys-verbose 'contrabassoon (current-error-port)) \score {c''1}
| [ << Wind instruments ] | [Top][Contents] | [ Ancient notation >> ] |
| [ < 木管楽器のダイアグラムの調リスト ] | [ Up: Wind instruments ] | [ Ancient notation > ] |
木管楽器のダイアグラムのリスト
以下は、LilyPond で現在定義されている全ての木管楽器のダイアグラムです。
\relative c' { \textLengthOn c1^\markup \center-column { "tin whistle" " " \woodwind-diagram #'tin-whistle #'() } c1^\markup \center-column { "piccolo" " " \woodwind-diagram #'piccolo #'() } c1^\markup \center-column { "flute" " " \woodwind-diagram #'flute #'() } c1^\markup \center-column { "oboe" " " \woodwind-diagram #'oboe #'() } c1^\markup \center-column { "clarinet" " " \woodwind-diagram #'clarinet #'() } \break c1^\markup \center-column { "bass clarinet" " " \woodwind-diagram #'bass-clarinet #'() } c1^\markup \center-column { "saxophone" " " \woodwind-diagram #'saxophone #'() } c1^\markup \center-column { "bassoon" " " \woodwind-diagram #'bassoon #'() } c1^\markup \center-column { "contrabassoon" " " \woodwind-diagram #'contrabassoon #'() } } \paper { system-system-spacing.padding = 5 }
| [ << Wind instruments ] | [Top][Contents] | [ World music >> ] |
| [ < 木管楽器のダイアグラムのリスト ] | [ Up: Top ] | [ 通奏低音を音符の上か下に追加する > ] |
16 Ancient notation
See also Ancient notation.
| [ << Ancient notation ] | [Top][Contents] | [ World music >> ] |
| [ < Ancient notation ] | [ Up: Ancient notation ] | [ 古代の記譜法のフォント > ] |
通奏低音を音符の上か下に追加する
通奏低音を記述する際、BassFigureAlignmentPositioning.direction
プロパティを定義することで (Staff コンテキストである必要があります)、数字を音符の上または下に配置することができます。セットできる選択肢は
#UP (または #1), #CENTER (または #0),
#DOWN (または #-1) です。
このプロパティはいつでも変更することができます。楽譜全体に変更を適用したくない場合は、\once \override を使用してください。
bass = { \clef bass g4 b, c d | e d8 c d2 } continuo = \figuremode { <_>4 <6>4 <5/>4 \bassFigureStaffAlignmentUp <_+>4 <6> | \set Staff.useBassFigureExtenders = ##t \bassFigureStaffAlignmentDown <4>4. <4>8 <_+>4 } \score { << \new Staff = bassStaff \bass \context Staff = bassStaff \continuo >> }
| [ << Ancient notation ] | [Top][Contents] | [ World music >> ] |
| [ < 通奏低音を音符の上か下に追加する ] | [ Up: Ancient notation ] | [ Ancient notation template – modern transcription of Gregorian music > ] |
古代の記譜法のフォント
以下に表示するのは、LilyPond の古代の記譜法に含まれる記号です。
m = { c1 e f ges cis' \bar "||" } \markup \with-true-dimensions % work around a cropping issue \score { \new VaticanaVoice { \clef "vaticana-fa2" \key es \major \textMark \markup \rounded-box "Vaticana clefs, custos and note heads" \override NoteHead.style = #'vaticana.punctum <>^"vaticana.punctum" \m \override NoteHead.style = #'vaticana.inclinatum <>^"vaticana.inclinatum" \m \override NoteHead.style = #'vaticana.quilisma <>^"vaticana.quilisma" \m \clef "vaticana-fa1" \override NoteHead.style = #'vaticana.plica <>^"vaticana.plica" \m \override NoteHead.style = #'vaticana.reverse.plica <>^"vaticana.reverse.plica" \m \override NoteHead.style = #'vaticana.punctum.cavum <>^"vaticana.punctum.cavum" \m \override NoteHead.style = #'vaticana.lpes <>^"vaticana.punctum.lpes" \m \override NoteHead.style = #'vaticana.upes <>^"vaticana.punctum.upes" \m \override NoteHead.style = #'vaticana.vupes <>^"vaticana.punctum.vupes" \m \override NoteHead.style = #'vaticana.linea.punctum <>^"vaticana.punctum.linea" \m \override NoteHead.style = #'vaticana.epiphonus <>^"vaticana.punctum.epiphonus" \m \override NoteHead.style = #'vaticana.cephalicus <>^"vaticana.punctum.cephalicus" \m \break \textMark \markup \rounded-box "Medicaea clefs, custos and note heads" \set VaticanaStaff.alterationGlyphs = #alteration-medicaea-glyph-name-alist \override VaticanaStaff.Custos.style = #'medicaea \clef "medicaea-fa2" \override NoteHead.style = #'medicaea.punctum <>^"medicaea.punctum" \m \clef "medicaea-do2" \override NoteHead.style = #'medicaea.inclinatum <>^"medicaea.inclinatum" \m \override NoteHead.style = #'medicaea.virga <>^"medicaea.virga" \m \clef "medicaea-fa1" \override NoteHead.style = #'medicaea.rvirga <>^"medicaea.rvirga" \m \break \textMark \markup \rounded-box "Hufnagel clefs, custos and note heads" \set Staff.alterationGlyphs = #alteration-hufnagel-glyph-name-alist \override VaticanaStaff.Custos.style = #'hufnagel \clef "hufnagel-fa2" \break \override NoteHead.style = #'hufnagel.punctum <>^"hufnagel.punctum" \m \clef "hufnagel-do2" \override NoteHead.style = #'hufnagel.lpes <>^"hufnagel.lpes" \m \clef "hufnagel-do-fa" \override NoteHead.style = #'hufnagel.virga <>^"hufnagel.virga" \m } \layout { \context { \Score \override TextScript.font-size = #-2 \override TextMark.break-align-symbols = #'(left-edge clef staff-bar) \override TextMark.padding = 4 \omit BarNumber } \context { \VaticanaStaff alterationGlyphs = #alteration-vaticana-glyph-name-alist } } }
| [ << Ancient notation ] | [Top][Contents] | [ World music >> ] |
| [ < 古代の記譜法のフォント ] | [ Up: Ancient notation ] | [ 古代の拍子記号 > ] |
Ancient notation template – modern transcription of Gregorian music
This example demonstrates how to do modern transcription of Gregorian music. Gregorian music has no measure, no stems; it uses only half and quarter note heads, and special marks, indicating rests of different length.
chant = \relative c' { \set Score.timing = ##f f4 a2 \divisioMinima g4 b a2 f2 \divisioMaior g4( f) f( g f) a2 \finalis \break f4 a2 \divisioMinima g4 b a2 f2 \divisioMaior g4( f) f( g a) g2( f) \finalis } verba = \lyricmode { Lo -- rem ip -- sum do -- lor sit a -- met, lo -- rem ip -- sum do -- lor sit a -- met. } \score { \new GregorianTranscriptionStaff << \new GregorianTranscriptionVoice = "melody" \chant \new GregorianTranscriptionLyrics = "one" \lyricsto melody \verba >> }
| [ << Ancient notation ] | [Top][Contents] | [ World music >> ] |
| [ < Ancient notation template – modern transcription of Gregorian music ] | [ Up: Ancient notation ] | [ Chant or psalm notation > ] |
古代の拍子記号
拍子記号も古代のスタイルで表示することができます。
{ \override Staff.TimeSignature.style = #'neomensural s1 }
| [ << Ancient notation ] | [Top][Contents] | [ World music >> ] |
| [ < 古代の拍子記号 ] | [ Up: Ancient notation ] | [ クストス > ] |
Chant or psalm notation
This form of notation is used for psalm chant, where verses aren’t always of the same length.
stemOff = \hide Staff.Stem stemOn = \undo \stemOff \score { \new Staff \with { \remove "Time_signature_engraver" } { \key g \minor \cadenzaOn \stemOff a'\breve bes'4 g'4 \stemOn a'2 \section \stemOff a'\breve g'4 a'4 \stemOn f'2 \section \stemOff a'\breve^\markup { \italic flexe } \stemOn g'2 \fine } }
| [ << Ancient notation ] | [Top][Contents] | [ World music >> ] |
| [ < Chant or psalm notation ] | [ Up: Ancient notation ] | [ インキピット > ] |
クストス
クストスは様々なスタイルで譜刻することができます。
\layout { ragged-right = ##t } \markup \with-true-dimensions % work around a cropping issue \score { \new Staff \with { \consists "Custos_engraver" } \relative c' { \override Staff.Custos.neutral-position = #4 \override Staff.Custos.style = #'hufnagel c1^"hufnagel" \break <d a' f'>1 \override Staff.Custos.style = #'medicaea c1^"medicaea" \break <d a' f'>1 \override Staff.Custos.style = #'vaticana c1^"vaticana" \break <d a' f'>1 \override Staff.Custos.style = #'mensural c1^"mensural" \break <d a' f'>1 } }
| [ << Ancient notation ] | [Top][Contents] | [ World music >> ] |
| [ < クストス ] | [ Up: Ancient notation ] | [ Mensurstriche レイアウト (譜の間に小節線を表示する) > ] |
インキピット
計量音楽を転写する際、曲の最初に表示されるインキピットは、原曲の調やテンポを記述するのに有用です。現代の音楽家は小節線に慣れていますが、計量音楽の時代には知られていないものでした。そのため妥協策として、小節線が譜と譜の間に表示されることがあります。これは計量音楽風の (mensurstriche) レイアウトと呼ばれています。
% A short excerpt from the Jubilate Deo by Orlande de Lassus global = { \set Score.skipBars = ##t \key g \major \time 4/4 % the actual music \skip 1*8 % let finis bar go through all staves \override Staff.BarLine.transparent = ##f % finis bar \bar "|." } discantusIncipit = \new PetrucciStaff { \clef "petrucci-c1" \key f \major \time 2/2 c''1. } discantusNotes = { \transpose c' c'' { \clef "treble" d'2. d'4 | b e' d'2 | c'4 e'4.( d'8 c' b | a4) b a2 | b4.( c'8 d'4) c'4 | \once \hide NoteHead c'1 | b\breve | } } discantusLyrics = \lyricmode { Ju -- bi -- la -- te De -- o, om -- nis ter -- ra, __ om- "..." -us. } altusIncipit = \new PetrucciStaff { \clef "petrucci-c3" \key f \major \time 2/2 e'1\rest f'1. } altusNotes = { \transpose c' c'' { \clef "treble" r2 g2. e4 fis g | a2 g4 e | fis g4.( fis16 e fis4) | g1 | \once \hide NoteHead g1 | g\breve | } } altusLyrics = \lyricmode { Ju -- bi -- la -- te De -- o, om -- nis ter -- ra, "..." -us. } tenorIncipit = \new PetrucciStaff { \clef "petrucci-c4" \key f \major \time 2/2 r\longa r\breve r1 c'1. } tenorNotes = { \transpose c' c' { \clef "treble_8" R1 | R1 | R1 | % two measures r2 d'2. d'4 b e' | \once \hide NoteHead e'1 | d'\breve | } } tenorLyrics = \lyricmode { Ju -- bi -- la -- te "..." -us. } bassusIncipit = \new PetrucciStaff { % The original print shows the b flat % for the f major key signature twice. \override Staff.KeySignature.flat-positions = #'((-7 . 6)) \clef "mensural-f" \key f\major \time 2/2 \tweak Y-offset #1 r\longa \tweak Y-offset #1 r\longa f1. } bassusNotes = { \transpose c' c' { \clef "bass" R1 | R1 | R1 | R1 | g2. e4 | \once \hide NoteHead e1 | g\breve | } } bassusLyrics = \lyricmode { Ju -- bi- "..." -us. } \score { << \new StaffGroup = choirStaff << \new Voice = "discantusNotes" << \set Staff.instrumentName = "Discantus" \incipit #1 \discantusIncipit \global \discantusNotes >> \new Lyrics \lyricsto discantusNotes { \discantusLyrics } \new Voice = "altusNotes" << \set Staff.instrumentName = "Altus" \global \incipit #1 \altusIncipit \altusNotes >> \new Lyrics \lyricsto altusNotes { \altusLyrics } \new Voice = "tenorNotes" << \set Staff.instrumentName = "Tenor" \global \incipit #1 \tenorIncipit \tenorNotes >> \new Lyrics \lyricsto tenorNotes { \tenorLyrics } \new Voice = "bassusNotes" << \set Staff.instrumentName = "Bassus" \global \incipit #1 \bassusIncipit \bassusNotes >> \new Lyrics \lyricsto bassusNotes { \bassusLyrics } >> >> \layout { \context { \Score %% no bar lines in staves or lyrics \hide BarLine } %% the next two instructions keep the lyrics between the bar lines \context { \Lyrics \consists "Bar_engraver" \consists "Separating_line_group_engraver" } \context { \Voice %% no slurs \hide Slur %% Comment in the below "\remove" command to allow line %% breaking also at those bar lines where a note overlaps %% into the next measure. The command is commented out in this %% short example score, but especially for large scores, you %% will typically yield better line breaking and thus improve %% overall spacing if you comment in the following command. %%\remove "Forbid_line_break_engraver" } indent = 5\cm incipit-width = 2.5\cm } }
| [ << Ancient notation ] | [Top][Contents] | [ World music >> ] |
| [ < インキピット ] | [ Up: Ancient notation ] | [ 休符のスタイル > ] |
Mensurstriche レイアウト (譜の間に小節線を表示する)
Mensurstriche (計量音楽風の) レイアウトでは、小節線を譜の中には表示せず、譜と譜の間に表示します。これは、ChoirStaff の代わりに StaffGroup
を用いることで実現できます。譜の中にある小節線は \hide で非表示にします。
\layout { \context { \Staff measureBarType = "-span|" } } music = \fixed c'' { c1 d2 \section e2 f1 \fine } \new StaffGroup << \new Staff \music \new Staff \music >>
| [ << Ancient notation ] | [Top][Contents] | [ World music >> ] |
| [ < Mensurstriche レイアウト (譜の間に小節線を表示する) ] | [ Up: Ancient notation ] | [ タグを使用して同じソースから計量音楽譜と現代譜を生成する > ] |
休符のスタイル
休符には様々なスタイルが使用できます。
restsA = { r\maxima r\longa r\breve r1 r2 r4 r8 r16 s32 s64 s128 s256 s512 s1024 s1024 } restsB = { r\maxima r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r256 r512 r1024 s1024 } \new Staff \relative c { \omit Score.TimeSignature \cadenzaOn \override Staff.Rest.style = #'mensural <>^\markup \typewriter { mensural } \restsA \bar "" \break \override Staff.Rest.style = #'neomensural <>^\markup \typewriter { neomensural } \restsA \bar "" \break \override Staff.Rest.style = #'classical <>^\markup \typewriter { classical } \restsB \bar "" \break \override Staff.Rest.style = #'z <>^\markup \typewriter { z-style } \restsB \bar "" \break \override Staff.Rest.style = #'default <>^\markup \typewriter { default } \restsB \bar "" \break }
| [ << Ancient notation ] | [Top][Contents] | [ World music >> ] |
| [ < 休符のスタイル ] | [ Up: Ancient notation ] | [ バロック音楽の縦線アーティキュレーション マーク > ] |
タグを使用して同じソースから計量音楽譜と現代譜を生成する
タグを使用して、同じ音楽に対して計量音楽譜と現代譜の両方を生成することができます。このスニペットでは、menrest 関数が定義されており、計量音楽における休符の位置は維持しながら、現代譜における休符は通常の位置に配置しています。タグは曲の終わりにある小節線を 2 つの楽譜で異なるものにするために使用していますが、区別が必要な他の場面でも用いることができます:
例えば、現代譜では “全休符” (R1, R\breve など) を使用したいが、計量音楽譜では通常の休符 (r1, r\breve など) を使用したい場合です。計量音楽を現代音楽に変換する作業は通常 “転写 (transcription)” と呼ばれます。
\layout { line-width = 150\mm } menrest = #(define-music-function (note) (ly:music?) #{ \tag #'mens $(make-music 'RestEvent note) \tag #'mod $(make-music 'RestEvent note 'pitch '()) #}) Be = \tag #'mod #(begin (ly:expect-warning (G_ "stem does not fit in beam")) (ly:expect-warning (G_ "beam was started here")) (make-span-event 'BeamEvent START)) Am = \tag #'mod ] MenStyle = { \override Score.BarNumber.transparent = ##t \override Stem.neutral-direction = #up \omit Slur \omit Beam } finalis = \section Music = \relative c'' { \key f \major g1 d'2 \menrest bes4 bes a2 \menrest r4 g4 fis4. fis8 fis4 fis g e f4.([ g8] a4[ g8 f] g2.\Be fis8 e\Am fis2) g\breve \finalis } MenLyr = \lyricmode { So farre, deere life, deare life, from thy bright beames ab- ſen- ted, } ModLyr = \lyricmode { So far, dear life, dear life, from your bright beams ab -- sen -- ted, __ } \markup \with-true-dimensions % work around a cropping issue \score { \keepWithTag #'mens { << \new PetrucciStaff { \new PetrucciVoice = "Cantus" { \clef "petrucci-c1" \time 4/4 \MenStyle \Music } } \new Lyrics \lyricsto "Cantus" \MenLyr >> } \layout { \context { \PetrucciVoice % No longer necessary starting with version 2.25.23. \override Flag.style = #'mensural } } } \markup\vspace #1 \score { \keepWithTag #'mod { \new ChoirStaff << \new Staff { \new Voice = "Sop" \with { \remove "Note_heads_engraver" \consists "Completion_heads_engraver" \remove "Rest_engraver" \consists "Completion_rest_engraver" } \shiftDurations 1 0 { \time 2/4 \autoBeamOff \Music } } \new Lyrics \lyricsto "Sop" \ModLyr >> } }
| [ << Ancient notation ] | [Top][Contents] | [ World music >> ] |
| [ < タグを使用して同じソースから計量音楽譜と現代譜を生成する ] | [ Up: Ancient notation ] | [ World music > ] |
バロック音楽の縦線アーティキュレーション マーク
音符の上にある短い線は、バロック音楽で広く用いられるものです。意味は様々ですが、通常は音符をより“重く”演奏することを指示しています。次の例は、この記譜をどのように実現するかを示しています。
upline = \tweak stencil #(lambda (grob) (grob-interpret-markup grob #{ \markup \draw-line #'(0 . 1) #})) \stopped \relative c' { a'4^\upline a( c d')_\upline }
| [ << Ancient notation ] | [Top][Contents] | [ Contexts and engravers >> ] |
| [ < バロック音楽の縦線アーティキュレーション マーク ] | [ Up: Top ] | [ アラブ音楽の即興 > ] |
17 World music
See also World music.
| アラブ音楽の即興 | ||
| マカームの例 | ||
| テキストを右から左へ表示する | ||
| Turkish Makam example |
| [ << World music ] | [Top][Contents] | [ Contexts and engravers >> ] |
| [ < World music ] | [ Up: World music ] | [ マカームの例 > ] |
アラブ音楽の即興
一時的なタクシームや即興部分のために、拍子記号の省略や、\cadenzaOn の使用が可能です。小節線が省かれることで臨時記号が一度しか表示されなくなるるため、臨時記号の付加スタイルを調整する必要があるかもしれません。以下は、ヒジャーズの即興に使用される例を示しています。
\include "arabic.ly" \relative sol' { \key re \kurd \accidentalStyle forget \cadenzaOn sol4 sol sol sol fad mib sol1 fad8 mib re4. r8 mib1 fad sol }
| [ << World music ] | [Top][Contents] | [ Contexts and engravers >> ] |
| [ < アラブ音楽の即興 ] | [ Up: World music ] | [ テキストを右から左へ表示する > ] |
マカームの例
マカームはトルコ発祥の旋法で、1/9 音の微分音を使用します。ピッチの名前や調号についての詳細は、初期化ファイル ‘ly/makam.ly’ を参照してください。
\include "makam.ly" \relative c' { \set Staff.keyAlterations = #`((6 . ,(- KOMA)) (3 . ,BAKIYE)) c4 cc db fk gbm4 gfc gfb efk fk4 db cc c }
| [ << World music ] | [Top][Contents] | [ Contexts and engravers >> ] |
| [ < マカームの例 ] | [ Up: World music ] | [ Turkish Makam example > ] |
テキストを右から左へ表示する
以下に示すように、マークアップ オブジェクト内でテキストを右から左へ表示することができます。
{ b1^\markup { \line { i n g i r u m i m u s n o c t e } } f'_\markup { \override #'(text-direction . -1) \line { i n g i r u m i m u s n o c t e } } }
| [ << World music ] | [Top][Contents] | [ Contexts and engravers >> ] |
| [ < テキストを右から左へ表示する ] | [ Up: World music ] | [ Contexts and engravers > ] |
Turkish Makam example
This template uses the start of a well-known Turkish Saz Semai that is familiar in the repertoire in order to illustrate some of the elements of Turkish music notation.
#(set-default-paper-size "a6" 'landscape) \include "turkish-makam.ly" \header { title = "Hüseyni Saz Semaisi" composer = "Lavtacı Andon" tagline = ##f } \relative { \set Staff.extraNatural = ##f \set Staff.autoBeaming = ##f \key a \huseyni \time 10/8 a'4 g'16[ fb] e8.[ d16] d[ c d e] c[ d c8] bfc | a16[ bfc a8] bfc c16[ d c8] d16[ e d8] e4 fb8 | d4 a'8 a16[ g fb e] fb8[ g] a8.[ b16] a16[ g] | g4 g16[ fb] fb8.[ e16] e[ g fb e] e4 r8 | } \layout { indent = 0 }
| [ << World music ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < Turkish Makam example ] | [ Up: Top ] | [ 音域をボイスごとに追加する > ] |
18 Contexts and engravers
See also Changing defaults and Contexts and engravers.
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < Contexts and engravers ] | [ Up: Contexts and engravers ] | [ 譜を追加する > ] |
音域をボイスごとに追加する
音域をボイスごとに追加することができます。この場合、衝突を避けるために
Ambitus を手動で移動する必要があります。
\new Staff << \new Voice \with { \consists "Ambitus_engraver" } \relative c'' { \override Ambitus.X-offset = 2.0 \voiceOne c4 a d e f1 } \new Voice \with { \consists "Ambitus_engraver" } \relative c' { \voiceTwo es4 f g as b1 } >>
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < 音域をボイスごとに追加する ] | [ Up: Contexts and engravers ] | [ 改行時に譜を追加する > ] |
譜を追加する
曲の開始時以外にも (一時的に) 譜を追加することができます。
\score { << \new Staff \relative c'' { c1 | c | c | c | c } \new StaffGroup \relative c'' { \new Staff { c1 | c << { c1 | d } \new Staff { \once \omit Staff.TimeSignature c1 | b } >> c1 } } >> }
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < 譜を追加する ] | [ Up: Contexts and engravers ] | [ ChordNames コンテキストに小節線を追加する > ] |
改行時に譜を追加する
改行時に譜を追加する場合、改行前の行末に不要な空間が追加されてしまいます
(これは調号の変化に対応するためのものですが、どちらにしろ表示されません)。これを解決するには、Staff.explicitKeySignatureVisibility を例のように設定します。
\score { \new StaffGroup \relative c'' { \new Staff \key f \major c1 c^"Unwanted extra space" \break << { c1 | c } \new Staff { \key f \major \once \omit Staff.TimeSignature c1 | c } >> c1 | c^"Fixed here" \break << { c1 | c } \new Staff { \once \set Staff.explicitKeySignatureVisibility = #end-of-line-invisible \key f \major \once \omit Staff.TimeSignature c1 | c } >> } }
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < 改行時に譜を追加する ] | [ Up: Contexts and engravers ] | [ Ambitus after key signature > ] |
ChordNames コンテキストに小節線を追加する
ChordNames コンテキストに小節線を追加するには、Bar_engraver を追加します。
\new ChordNames \with { \override BarLine.bar-extent = #'(-1 . 3) \consists "Bar_engraver" } \chordmode { f1:maj7 f:7 bes:7 }
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < ChordNames コンテキストに小節線を追加する ] | [ Up: Contexts and engravers ] | [ ラベル付きの分析用ブラケット > ] |
Ambitus after key signature
By default, ambitus are positioned at the left of the clef. The
\ambitusAfter function allows for changing this placement.
Syntax is \ambitusAfter grob-interface; see
Graphical
Object Interfaces for a list of possible values for
grob-interface.
A common use case is printing the ambitus between key signature and time signature.
\new Staff \with { \consists Ambitus_engraver } \relative { \ambitusAfter key-signature \key d \major es'8 g bes cis d2 }
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < Ambitus after key signature ] | [ Up: Contexts and engravers ] | [ メロディに合わせて譜の中央にある音符の符幹の向きを自動で変更する > ] |
ラベル付きの分析用ブラケット
Grob HorizontalBracketText の text プロパティを設定することで、分析用のブラケットにテキストを追加することができます。同時に開始するブラケットに異なるテキストを追加する場合には、\tweak
コマンドを使用してください。改行後のテキストは括弧付きで表示されます。
\layout { \context { \Voice \consists "Horizontal_bracket_engraver" \override HorizontalBracket.direction = #UP } } { \once\override HorizontalBracketText.text = "a" c''\startGroup d''\stopGroup \once\override HorizontalBracketText.text = "a'" e''\startGroup d''\stopGroup | c''-\tweak HorizontalBracketText.text \markup \bold \huge "b" \startGroup -\tweak HorizontalBracketText.text "a" \startGroup d''\stopGroup e''-\tweak HorizontalBracketText.text "a'" \startGroup d''\stopGroup\stopGroup | c''-\tweak HorizontalBracketText.text foo \startGroup d'' e'' f'' | \break g'' a'' b'' c'''\stopGroup }
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < ラベル付きの分析用ブラケット ] | [ Up: Contexts and engravers ] | [ MIDI チャンネルをボイスごとに割り当てる > ] |
メロディに合わせて譜の中央にある音符の符幹の向きを自動で変更する
LilyPond では、Voice コンテキストに Melody_engraver を追加し、Stem の neutral-direction をオーバライドすることで、譜の中央にある音符の符幹の向きを、メロディに合わせて変更することができます。
\relative c'' { \time 3/4 a8 b g f b g | \set suspendMelodyDecisions = ##t a b g f b g | \unset suspendMelodyDecisions c b d c b c | } \layout { \context { \Voice \consists "Melody_engraver" \autoBeamOff } }
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < メロディに合わせて譜の中央にある音符の符幹の向きを自動で変更する ] | [ Up: Contexts and engravers ] | [ \scaleDurations を使用した多拍子の部分で拍子記号を変更する > ] |
MIDI チャンネルをボイスごとに割り当てる
MIDI を出力する際、デフォルトの挙動では譜ごとに MIDI チャンネルが作られ、譜の中にある全てのボイスは統合されます。これは、トラックごとに 16 しか存在しない MIDI チャンネルが足りなくなる恐れを減らします。
しかしながら、次の例のように
Staff_performer を Voice コンテキストに移動することで、ボイスごとに独自の MIDI チャンネルを持つようになります:
同じ譜にあるにもかかわらず、2 つの MIDI チャンネルが作られ、異なる
midiInstrument が割り当てられます。
\score { \new Staff << \new Voice \relative c''' { \set midiInstrument = "flute" \voiceOne \key g \major \time 2/2 r2 g-"Flute" ~ g fis ~ fis4 g8 fis e2 ~ e4 d8 cis d2 } \new Voice \relative c'' { \set midiInstrument = "clarinet" \voiceTwo b1-"Clarinet" a2. b8 a g2. fis8 e fis2 r } >> \layout { } \midi { \context { \Staff \remove "Staff_performer" } \context { \Voice \consists "Staff_performer" } \tempo 2 = 72 } }
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < MIDI チャンネルをボイスごとに割り当てる ] | [ Up: Contexts and engravers ] | [ 異なるボイスにまたがるアルペジオを作成する > ] |
\scaleDurations を使用した多拍子の部分で拍子記号を変更する
measureLength, measurePosition プロパティは、小節線がどのタイミングで必要になるかを決定しています。しかし、\scaleDurations を使用する際、拍子記号と整合性が取れなくなることがあります。この場合には、measureLength を ly:make-moment
コールバックを用いて手動でセットします。2 つ目の引数は \scaleDurations
の 2 つ目の引数と一致している必要があります。
\layout { \context { \Score \remove "Timing_translator" \accepts TimingStaffGroup } \context { \StaffGroup \name TimingStaffGroup \alias StaffGroup \consists "Timing_translator" } } << \new TimingStaffGroup << \new Staff { \scaleDurations 8/5 { \time 6/5 % to set measure length in Timing \context Staff \polymetric \time 6/8 b8 b b b b b \time 4/5 % to set measure length in Timing \context Staff \polymetric \time 2/4 b4 b } } >> \new TimingStaffGroup << \new Staff { \clef bass \time 2/4 c2 d e f } >> >>
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < \scaleDurations を使用した多拍子の部分で拍子記号を変更する ] | [ Up: Contexts and engravers ] | [ 空の譜を作成する > ] |
異なるボイスにまたがるアルペジオを作成する
Staff コンテキストに Span_arpeggio_engraver が追加された場合、アルペジオは同じ譜にある異なるボイスにまたがって表示されます。
\new Staff \with { \consists "Span_arpeggio_engraver" } \relative c' { \set Staff.connectArpeggios = ##t << { <e' g>4\arpeggio <d f> <d f>2 } \\ { <d, f>2\arpeggio <g b>2 } >> }
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < 異なるボイスにまたがるアルペジオを作成する ] | [ Up: Contexts and engravers ] | [ 他のコンテキストで譜をまたがるアルペジオを作成する > ] |
空の譜を作成する
空の譜を作成するには、空の小節を作って Score コンテキストから
Bar_number_engraver を削除します。また Staff コンテキストから
Time_signature_engraver, Clef_engraver, Bar_engraver
を削除します。
#(set-global-staff-size 10) % for the documentation % #(set-global-staff-size 20) % for letter and A4 \book { \score { { \repeat unfold 12 { s1 \break } } \layout { indent = 0 \context { \Staff \remove "Time_signature_engraver" \remove "Clef_engraver" \remove "Bar_engraver" } \context { \Score \remove "Bar_number_engraver" } } } % for the documentation \paper { #(set-paper-size "a6") ragged-last-bottom = ##f line-width = 90\mm left-margin = 7.5\mm bottom-margin = 5\mm top-margin = 5\mm tagline = ##f } % uncomment these lines for "letter" size %{ \paper { #(set-paper-size "letter") ragged-last-bottom = ##f line-width = 7.5\in left-margin = 0.5\in bottom-margin = 0.25\in top-margin = 0.25\in tagline = ##f } %} % uncomment these lines for "A4" size %{ \paper { #(set-paper-size "a4") ragged-last-bottom = ##f line-width = 180\mm left-margin = 15\mm bottom-margin = 10\mm top-margin = 10\mm tagline = ##f } %} }
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < 空の譜を作成する ] | [ Up: Contexts and engravers ] | [ カスタマイズされた調号を作成する > ] |
他のコンテキストで譜をまたがるアルペジオを作成する
譜をまたがるアルペジオは Span_arpeggio_engraver が Score
コンテキストに追加されていれば、GrandStaff, PianoStaff, StaffGroup
以外にも作成することができます。
<< \new PianoStaff << \new Voice \relative c' { <c e>2\arpeggio <d f>2\arpeggio <c e>1\arpeggio } \new Voice \relative c { \clef bass <c g'>2\arpeggio <b g'>2\arpeggio <c g'>1\arpeggio } >> \new Staff \relative c { \set Score.connectArpeggios = ##t \clef bass c2\arpeggio g\arpeggio c1\arpeggio } >> \layout { \context { \Score \consists "Span_arpeggio_engraver" } }
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < 他のコンテキストで譜をまたがるアルペジオを作成する ] | [ Up: Contexts and engravers ] | [ 譜をまたがる符幹 > ] |
カスタマイズされた調号を作成する
LilyPond はカスタマイズされた調号をサポートしています。この例では、フラットを広範囲に表示する D マイナーを作成しています。
\new Staff \with { \override StaffSymbol.line-count = #8 \override KeySignature.flat-positions = #'((-7 . 6)) \override KeyCancellation.flat-positions = #'((-7 . 6)) \override KeySignature.sharp-positions = #'((-6 . 7)) \override KeyCancellation.sharp-positions = #'((-6 . 7)) \override Clef.stencil = #(lambda (grob) (grob-interpret-markup grob #{ \markup\combine \musicglyph "clefs.C" \translate #'(-3 . -2) \musicglyph "clefs.F" #})) clefPosition = #3 middleCPosition = #3 middleCClefPosition = #3 } { \key d\minor f bes, f bes, | \key d\major fis b, fis b, | }
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < カスタマイズされた調号を作成する ] | [ Up: Contexts and engravers ] | [ Scheme でエングラーバを定義する: 音域 > ] |
譜をまたがる符幹
このスニペットは、Span_stem_engraver と \crossStaff を用いて、自動的に譜をまたがる符幹を作成しています。
符幹の長さは自動的に計算されるため指定する必要はありません。
\layout { \context { \PianoStaff \consists "Span_stem_engraver" } } \new PianoStaff << \new Staff { <b d'>4 r d'16\> e'8. g8 r\! | e'8 f' g'4 \voiceTwo % Down to lower staff \crossStaff { e'8 e'8 } e'4 | } \new Staff { \clef bass \voiceOne % Up to upper staff \crossStaff { <e g>4 e, g16 a8. c8 } d | g8 f g4 \voiceTwo g8 g g4 | } >>
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < 譜をまたがる符幹 ] | [ Up: Contexts and engravers ] | [ グループ内に演奏する譜がある場合に GrandStaff 全体を表示したままにする > ] |
Scheme でエングラーバを定義する: 音域
この例は、音域のエングラーバをユーザが Scheme で再定義する方法を示しています。
これのほとんどは
lily/ambitus-engraver.cc を Scheme に書き直したものです。
#(use-modules (oop goops)) %%% %%% Grob utilities %%% %%% These are literal rewrites of some C++ methods used by the ambitus %%% engraver. #(define (ly:separation-item::add-conditional-item grob grob-item) "Add GROB-ITEM to the array of conditional elements of GROB. This is a rewrite of function `Separation_item::add_conditional_item` from file `lily/separation-item.cc`." (ly:pointer-group-interface::add-grob grob 'conditional-elements grob-item)) #(define (ly:accidental-placement::accidental-pitch accidental-grob) "Get the pitch from the grob cause of ACCIDENTAL-GROB. This is a rewrite of function `accidental_pitch` from file `lily/accidental-placement.cc`." (ly:event-property (ly:grob-property (ly:grob-parent accidental-grob Y) 'cause) 'pitch)) #(define (ly:accidental-placement::add-accidental grob accidental-grob) "Add ACCIDENTAL-GROB to the list of accidentals grobs of GROB. ACCIDENTAL-GROB is an `Accidental` grob; GROB is an `AccidentalPlacement` grob. This is a rewrite of function `Accidental_placement::add_accidental` from file `lily/accidental-placement.cc`." (let ((pitch (ly:accidental-placement::accidental-pitch accidental-grob))) (set! (ly:grob-parent accidental-grob X) grob) (let* ((accidentals (ly:grob-object grob 'accidental-grobs)) (handle (assq (ly:pitch-notename pitch) accidentals)) (entry (if handle (cdr handle) '()))) (set! (ly:grob-object grob 'accidental-grobs) (assq-set! accidentals (ly:pitch-notename pitch) (cons accidental-grob entry)))))) %%% %%% Ambitus data structures. %%% %%% The <ambitus> class holds the various grobs that are created to %%% print an ambitus: %%% %%% - `ambitus-group`: the grob that groups all the components of an %%% ambitus (`Ambitus` grob); %%% - `ambitus-line`: the vertical line between the upper and lower %%% ambitus notes (`AmbitusLine` grob); %%% - `ambitus-up-note` and `ambitus-down-note`: the note head and %%% accidental for the lower and upper note of the ambitus (see %%% `<ambitus-note>` class below). %%% %%% The other slots define the key and clef context of the engraver: %%% %%% - `start-c0`: position of middle c at the beginning of the piece. %%% It is used to place the ambitus notes according to their pitch; %%% - `start-key-sig`: the key signature at the beginning of the %%% piece. It is used to determine whether accidentals shall be %%% printed next to ambitus notes. #(define-class <ambitus> () (ambitus-group #:accessor ambitus-group) (ambitus-line #:accessor ambitus-line) (ambitus-up-note #:getter ambitus-up-note #:init-form (make <ambitus-note>)) (ambitus-down-note #:getter ambitus-down-note #:init-form (make <ambitus-note>)) (start-c0 #:accessor ambitus-start-c0 #:init-value #f) (start-key-sig #:accessor ambitus-start-key-sig #:init-value '())) %%% Accessor for the lower and upper note data of an ambitus. #(define-method (ambitus-note (ambitus <ambitus>) direction) "Return lower or upper note of AMBITUS depending on DIRECTION." (if (= direction UP) (ambitus-up-note ambitus) (ambitus-down-note ambitus))) %%% The `<ambitus-note>` class holds the grobs that are specific to %%% ambitus (lower and upper) notes: %%% %%% - `head`: an `AmbitusNoteHead` grob; %%% - `accidental`: an `AmbitusAccidental` grob, to be possibly %%% printed next to the ambitus note head. %%% %%% Moreover, %%% %%% - `pitch` is the absolute pitch of the note; %%% - `cause` is the note event that causes this ambitus note, i.e., %%% the lower or upper note of the considered music sequence. #(define-class <ambitus-note> () (head #:accessor ambitus-note-head #:init-value #f) (accidental #:accessor ambitus-note-accidental #:init-value #f) (cause #:accessor ambitus-note-cause #:init-value #f) (pitch #:accessor ambitus-note-pitch #:init-value #f)) %%% %%% Ambitus engraving logic. %%% %%% This is rewrite of the code from file `lily/ambitus-engraver.cc`. #(define (make-ambitus translator) "Build an ambitus object: initialize all the grobs and their relations. The `Ambitus` grob contains all other grobs: Ambitus |- AmbitusLine |- AmbitusNoteHead for upper note |- AmbitusAccidental for upper note |- AmbitusNoteHead for lower note |- AmbitusAccidental for lower note The parent of an accidental is the corresponding note head, and the accidental is set as the `accidental-grob` property of the note head so that is printed by the function that prints notes." ;; Make the ambitus object. (let ((ambitus (make <ambitus>))) ;; Build the `Ambitus` grob, which will contain all other grobs. (set! (ambitus-group ambitus) (ly:engraver-make-grob translator 'Ambitus '())) ;; Build the `AmbitusLine` grob (the line between lower and upper ;; note). (set! (ambitus-line ambitus) (ly:engraver-make-grob translator 'AmbitusLine '())) ;; Build the upper and lower `AmbitusNoteHead` and ;; `AmbitusAccidental`. (for-each (lambda (direction) (let ((head (ly:engraver-make-grob translator 'AmbitusNoteHead '())) (accidental (ly:engraver-make-grob translator 'AmbitusAccidental '())) (group (ambitus-group ambitus))) ;; The parent of the `AmbitusAccidental` grob is the ;; `AmbitusNoteHead` grob. (set! (ly:grob-parent accidental Y) head) ;; The `AmbitusAccidental` grob is set as the ;; `accidental-grob` object of `AmbitusNoteHead`. This is ;; later used by the function that prints notes. (set! (ly:grob-object head 'accidental-grob) accidental) ;; Both the note head and the accidental grobs are added to ;; the main ambitus grob. (ly:axis-group-interface::add-element group head) (ly:axis-group-interface::add-element group accidental) ;; The note head and the accidental grobs are added to the ;; ambitus object. (set! (ambitus-note-head (ambitus-note ambitus direction)) head) (set! (ambitus-note-accidental (ambitus-note ambitus direction)) accidental))) (list DOWN UP)) ;; The parent of the ambitus line is the lower ambitus note head. (set! (ly:grob-parent (ambitus-line ambitus) X) (ambitus-note-head (ambitus-note ambitus DOWN))) ;; The ambitus line is added to the ambitus main grob. (ly:axis-group-interface::add-element (ambitus-group ambitus) (ambitus-line ambitus)) ambitus)) #(define-method (initialize-ambitus-state (ambitus <ambitus>) translator) "Initialize the state of AMBITUS by getting the starting position of middle C and key signature from TRANSLATOR's context." (if (not (ambitus-start-c0 ambitus)) (begin (set! (ambitus-start-c0 ambitus) (ly:context-property (ly:translator-context translator) 'middleCPosition 0)) (set! (ambitus-start-key-sig ambitus) (ly:context-property (ly:translator-context translator) 'keyAlterations))))) #(define-method (update-ambitus-notes (ambitus <ambitus>) note-grob) "Update upper and lower ambitus pitches of AMBITUS using NOTE-GROB." ;; Get the event that caused the `note-grob` creation and check ;; that it is a `note-event`. (let ((note-event (ly:grob-property note-grob 'cause))) (if (ly:in-event-class? note-event 'note-event) ;; Get the pitch from the note event. (let ((pitch (ly:event-property note-event 'pitch))) ;; If this pitch is lower than the current ambitus' lower ;; note pitch (or it has not been initialized yet), then ;; this pitch is the new ambitus' lower pitch. The same is ;; done for the upper pitch (but in the opposite ;; direction). (for-each (lambda (direction pitch-compare) (if (or (not (ambitus-note-pitch (ambitus-note ambitus direction))) (pitch-compare pitch (ambitus-note-pitch (ambitus-note ambitus direction)))) (begin (set! (ambitus-note-pitch (ambitus-note ambitus direction)) pitch) (set! (ambitus-note-cause (ambitus-note ambitus direction)) note-event)))) (list DOWN UP) (list ly:pitch<? (lambda (p1 p2) (ly:pitch<? p2 p1)))))))) #(define-method (typeset-ambitus (ambitus <ambitus>) translator) "Typeset AMBITUS. - Place the lower and upper ambitus notes according to their pitch and the position of the middle C. - Typeset or delete the note accidentals, according to the key signature. An accidental, if it is to be printed, is added to an `AccidentalPlacement` grob (a grob dedicated to the placement of accidentals near a chord). - Both note heads are added to the ambitus line grob so that a line gets printed between them." ;; Check whether there are lower and upper pitches. (if (and (ambitus-note-pitch (ambitus-note ambitus UP)) (ambitus-note-pitch (ambitus-note ambitus DOWN))) ;; Make an `AccidentalPlacement` grob, for placement of note ;; accidentals. (let ((accidental-placement (ly:engraver-make-grob translator 'AccidentalPlacement (ambitus-note-accidental (ambitus-note ambitus DOWN))))) ;; For lower and upper ambitus notes. (for-each (lambda (direction) (let ((pitch (ambitus-note-pitch (ambitus-note ambitus direction)))) ;; Set the cause and the staff position of the ambitus ;; note according to the associated pitch. (set! (ly:grob-property (ambitus-note-head (ambitus-note ambitus direction)) 'cause) (ambitus-note-cause (ambitus-note ambitus direction))) (set! (ly:grob-property (ambitus-note-head (ambitus-note ambitus direction)) 'staff-position) (+ (ambitus-start-c0 ambitus) (ly:pitch-steps pitch))) ;; Determine whether an accidental shall be printed for ;; this note, according to the key signature. (let* ((handle (or (assoc (cons (ly:pitch-octave pitch) (ly:pitch-notename pitch)) (ambitus-start-key-sig ambitus)) (assoc (ly:pitch-notename pitch) (ambitus-start-key-sig ambitus)))) (sig-alter (if handle (cdr handle) 0))) (cond ((= (ly:pitch-alteration pitch) sig-alter) ;; The note alteration is in the key signature ;; => it does not have to be printed. (ly:grob-suicide! (ambitus-note-accidental (ambitus-note ambitus direction))) (set! (ly:grob-object (ambitus-note-head (ambitus-note ambitus direction)) 'accidental-grob) '())) (else ;; Otherwise the accidental shall be printed. (set! (ly:grob-property (ambitus-note-accidental (ambitus-note ambitus direction)) 'alteration) (ly:pitch-alteration pitch))))) ;; Add the `AccidentalPlacement` grob to the conditional ;; items of the `AmbitusNoteHead`. (ly:separation-item::add-conditional-item (ambitus-note-head (ambitus-note ambitus direction)) accidental-placement) ;; Add the `AmbitusAccidental` to the list of the ;; `AccidentalPlacement` grob accidentals. (ly:accidental-placement::add-accidental accidental-placement (ambitus-note-accidental (ambitus-note ambitus direction))) ;; Add the `AmbitusNoteHead` grob to the `AmbitusLine` grob. (ly:pointer-group-interface::add-grob (ambitus-line ambitus) 'note-heads (ambitus-note-head (ambitus-note ambitus direction))))) (list DOWN UP)) ;; Add the `AccidentalPlacement` grob to the main `Ambitus` grob. (ly:axis-group-interface::add-element (ambitus-group ambitus) accidental-placement)) ;; No lower and upper pitches => nothing to print. (begin (for-each (lambda (direction) (ly:grob-suicide! (ambitus-note-accidental (ambitus-note ambitus direction))) (ly:grob-suicide! (ambitus-note-head (ambitus-note ambitus direction)))) (list DOWN UP)) (ly:grob-suicide! ambitus-line)))) %%% %%% Ambitus engraver definition. %%% #(define ambitus-engraver (lambda (context) (let ((ambitus #f)) ;; When music is processed, make the ambitus object if not ;; already built. (make-engraver ((process-music translator) (if (not ambitus) (set! ambitus (make-ambitus translator)))) ;; Set the ambitus clef and key signature state. ((stop-translation-timestep translator) (if ambitus (initialize-ambitus-state ambitus translator))) ;; When a note head grob is built, update the ambitus notes. (acknowledgers ((note-head-interface engraver grob source-engraver) (if ambitus (update-ambitus-notes ambitus grob)))) ;; Finally, typeset the ambitus according to its upper and ;; lower notes (if any). ((finalize translator) (if ambitus (typeset-ambitus ambitus translator))))))) %%% %%% Example %%% \score { \new StaffGroup << \new Staff { c'4 des' e' fis' gis' } \new Staff { \clef "bass" c4 des ~ des ees b, } >> \layout { \context { \Staff \consists #ambitus-engraver } } }
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < Scheme でエングラーバを定義する: 音域 ] | [ Up: Contexts and engravers ] | [ エングラーバを一つずつ > ] |
グループ内に演奏する譜がある場合に GrandStaff 全体を表示したままにする
オーケストラ譜では、いくつかの楽器 (あるいはグループ) が全く演奏されない時間があり、その時の譜は (\removeEmptyStaves で)
削除することができます。
楽器が後で再度演奏される場合には、グループで譜を残しておきたい場合があります。これはグループ化しているコンテキスト (GrandStaff や StaffGroup) に
Keep_alive_together_engraver を追加することで実現できます。
例では、セカンド バイオリンは 2 番目と 3 番目のシステムで演奏されていません。ファースト バイオリンは 2 番目のシステムでは演奏されず、3 番目のシステムでは最後の小節に演奏部分があります。Keep_alive_together_engraver
により、3 番目のシステムではセカンド バイオリンも表示されています。
\score { << \new Staff = "Staff_flute" \with { instrumentName = "Flute" shortInstrumentName = "Fl" } \relative c' { \repeat unfold 3 { c'4 c c c | c c c c | c c c c | \break } } \new StaffGroup = "StaffGroup_Strings" << \new GrandStaff = "GrandStaff_violins" << \new Staff = "StaffViolinI" \with { instrumentName = "Violin I" shortInstrumentName = "Vi I" } \relative c'' { a1 | R1*7 | \repeat unfold 12 a16 a4 | } \new Staff = "StaffViolinII" \with { instrumentName = "Violin II" shortInstrumentName = "Vi II" } \relative c' { e1 | R1*8 | } >> \new Staff = "Staff_cello" \with { instrumentName = "Cello" shortInstrumentName = "Ce" } \relative c { \clef bass \repeat unfold 9 { c1 } | } >> >> } \layout { indent = 3.0\cm short-indent = 1.5\cm \context { \GrandStaff \consists Keep_alive_together_engraver } \context { \Staff \RemoveEmptyStaves } }
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < グループ内に演奏する譜がある場合に GrandStaff 全体を表示したままにする ] | [ Up: Contexts and engravers ] | [ グリッド線: 見た目を変更する > ] |
エングラーバを一つずつ
記号の描画はプラグインによって行われています。それぞれのプラグインはエングラーバと呼ばれます。この例では、エングラーバが一つずつ、次の順番で有効になっています:
- 符頭
- 譜線
- 音部記号
- 符幹
- 連桁、スラー、アクセント
- 臨時記号、小節線、拍子記号、調号
エングラーバはグループ化されています。例えば、符頭、スラー、連桁などで
Voice コンテキストを作り出します。調号、臨時記号、小節線などのエングラーバは Staff コンテキストを作り出します。
topVoice = \relative c' { \key d \major es8([ g] a[ fis]) b4 b16[-. b-. b-. cis-.] d4-> } % empty staff and voice contexts MyStaff = \context { \type Engraver_group \name Staff \accepts Voice \defaultchild Voice } MyVoice = \context { \type Engraver_group \name Voice } % add note heads MyVoice = \context { \MyVoice \consists Note_heads_engraver } \score { \topVoice \layout { \context { \MyStaff } \context { \MyVoice } } } % add staff MyStaff = \context { \MyStaff \consists Staff_symbol_engraver } \score { \topVoice \layout { \context { \MyStaff } \context { \MyVoice } } } % add clef MyStaff = \context { \MyStaff \consists Clef_engraver } \score { \topVoice \layout { \context { \MyStaff } \context { \MyVoice } } } % add stems MyVoice = \context { \MyVoice \consists Stem_engraver } \score { \topVoice \layout { \context { \MyStaff } \context { \MyVoice } } } % add beams, slurs, and accents MyVoice = \context { \MyVoice \consists Beam_engraver \consists Slur_engraver \consists Script_engraver \consists Rhythmic_column_engraver } \score { \topVoice \layout { \context { \MyStaff } \context { \MyVoice } } } % add accidentals, bar, time signature, and key signature MyStaff = \context { \MyStaff \consists Accidental_engraver \consists Bar_engraver \consists Time_signature_engraver \consists Key_engraver } \score { \topVoice \layout { \context { \MyStaff } \context { \MyVoice } } }
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < エングラーバを一つずつ ] | [ Up: Contexts and engravers ] | [ グリッド線: リズムの強調と音符の同期 > ] |
グリッド線: 見た目を変更する
グリッド線の見た目は、プロパティをオーバライドすることで変更することができます。
\new ChoirStaff << \new Staff { \relative c'' { \stemUp c'4. d8 e8 f g4 } } \new Staff { \relative c { % this moves them up one staff space from the default position \override Score.GridLine.extra-offset = #'(0.0 . 1.0) \stemDown \clef bass \once \override Score.GridLine.thickness = 5.0 c4 \once \override Score.GridLine.thickness = 1.0 g'4 \once \override Score.GridLine.thickness = 3.0 f4 \once \override Score.GridLine.thickness = 5.0 e4 } } >> \layout { \context { \Staff % set up grids \consists "Grid_point_engraver" % set the grid interval to one quarter note gridInterval = #1/4 } \context { \Score \consists "Grid_line_span_engraver" % this moves them to the right half a staff space \override NoteColumn.X-offset = -0.5 } }
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < グリッド線: 見た目を変更する ] | [ Up: Contexts and engravers ] | [ Measure counters > ] |
グリッド線: リズムの強調と音符の同期
一定の拍毎に、譜どうしの音符の同期を示す縦線を描画することができます。しかし、モノフォニックな音楽では、このスニペットのように 2 つ目の譜を不可視にして、縦線をより短くすると良い場合があります。
\new ChoirStaff { \relative c'' << \new Staff { \time 12/8 \stemUp c4. d8 e8 f g4 f8 e8. d16 c8 } \new Staff { % hides staff and notes so that only the grid lines are visible \hideNotes \hide Staff.BarLine \override Staff.StaffSymbol.line-count = #0 \hide Staff.TimeSignature \hide Staff.Clef % dummy notes to force regular note spacing \once \override Score.GridLine.thickness = #4.0 c8 c c \once \override Score.GridLine.thickness = #3.0 c8 c c \once \override Score.GridLine.thickness = #4.0 c8 c c \once \override Score.GridLine.thickness = #3.0 c8 c c } >> } \layout { \context { \Score \consists "Grid_line_span_engraver" % center grid lines horizontally below note heads \override NoteColumn.X-offset = #-0.5 } \context { \Staff \consists "Grid_point_engraver" gridInterval = #1/8 % set line length and positioning: % two staff spaces above center line on hidden staff % to four spaces below center line on visible staff \override GridPoint.Y-extent = #'(2 . -4) } }
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < グリッド線: リズムの強調と音符の同期 ] | [ Up: Contexts and engravers ] | [ Measure spanner > ] |
Measure counters
This snippet demonstrates the use of the
Measure_counter_engraver to number groups of successive
measures. Any stretch of measures may be numbered, whether consisting
of repetitions or not.
The engraver must be added to the appropriate context. Here, a
Staff context is used; another possibility is a Dynamics
context.
The counter is begun with \startMeasureCount and ended with
\stopMeasureCount. Numbering will start by default with 1,
but this behavior may be modified by overriding the count-from
property.
When a measure extends across a line break, the number will appear twice, the second time in parentheses.
\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 }
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < Measure counters ] | [ Up: Contexts and engravers ] | [ Mensurstriche レイアウト (譜の間に小節線を表示する) > ] |
Measure spanner
Measure spanners are an alternate way to print annotated brackets. As opposed to horizontal brackets, they extend between two bar lines rather than two notes. The text is displayed in the center of the bracket.
\layout { \context { \Staff \consists Measure_spanner_engraver } } << \new Staff \relative c'' { \key d \minor R1*2 \tweak text "Answer" \startMeasureSpanner \tuplet 3/2 8 { a16[ b c] d[ c b] c[ d e] f[ e d] } e8 a gis g fis f e d~ d c b e \stopMeasureSpanner } \new Staff \relative c' { \key d \minor \tweak text "Subject" \tweak direction #DOWN \startMeasureSpanner \tuplet 3/2 8 { d16[ e f] g[ f e] f[ g a] bes[ a g] } a8 d cis c b bes a g~ g f e a \stopMeasureSpanner \tweak text "Counter-subject" \tweak direction #DOWN \startMeasureSpanner f8 e a r r16 b, c d e fis g e a gis a b c fis, b a gis e a4 g8 \stopMeasureSpanner } >>
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < Measure spanner ] | [ Up: Contexts and engravers ] | [ 譜をネストする > ] |
Mensurstriche レイアウト (譜の間に小節線を表示する)
Mensurstriche (計量音楽風の) レイアウトでは、小節線を譜の中には表示せず、譜と譜の間に表示します。これは、ChoirStaff の代わりに StaffGroup
を用いることで実現できます。譜の中にある小節線は \hide で非表示にします。
\layout { \context { \Staff measureBarType = "-span|" } } music = \fixed c'' { c1 d2 \section e2 f1 \fine } \new StaffGroup << \new Staff \music \new Staff \music >>
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < Mensurstriche レイアウト (譜の間に小節線を表示する) ] | [ Up: Contexts and engravers ] | [ 連桁で繋がれた連符の途中で改行する > ] |
譜をネストする
systemStartDelimiterHierarchy は、より複雑な譜のグループ化を行うために用いることができます。\set StaffGroup.systemStartDelimiterHierarchy コマンドの引数として基となるのは、譜の数だけあるアルファベットのリストです。それぞれの譜の前に SystemStartDelimiter を追加することで、グループ化の始まりを示します。その際、グループとなる譜の範囲を括弧で囲む必要があります。リスト中の要素は省略することができますが、最上位のグループは必ず全ての譜を含みます。SystemStartDelimiter は SystemStartBar,
SystemStartBracket, SystemStartBrace,
SystemStartSquare のいずれかです。
\new StaffGroup \relative c'' << \override StaffGroup.SystemStartSquare.collapse-height = 4 \set StaffGroup.systemStartDelimiterHierarchy = #'(SystemStartSquare (SystemStartBrace (SystemStartBracket a (SystemStartSquare b)) c) d) \new Staff { c1 } \new Staff { c1 } \new Staff { c1 } \new Staff { c1 } \new Staff { c1 } >>
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < 譜をネストする ] | [ Up: Contexts and engravers ] | [ Print chord names with same root and different bass as slash and bass note > ] |
連桁で繋がれた連符の途中で改行する
この作為的な例は、連桁で繋がれた連符の途中で手動あるいは自動の改行を許可する方法を示しています。ただし、拍に収まらない連符は手動で連桁を繋ぐ必要があります。
\layout { \context { \Voice % Permit automatic line breaks within tuplets. \remove "Forbid_line_break_engraver" % Allow beams to be broken at line breaks. \override Beam.breakable = ##t } } \relative c'' { <>^"manually forced line break" a8 \repeat unfold 5 { \tuplet 3/2 { c8[ b g16 a] } } \tuplet 3/2 { c8[ b \break g16 a] } \repeat unfold 5 { \tuplet 3/2 { c8[ b g16 a] } } c8 \bar "||" } \relative c'' { <>^"automatic line break" \repeat unfold 28 a16 \tuplet 11/8 { a16[ b c d e f e d c b a] } \repeat unfold 28 a16 \bar "||" }
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < 連桁で繋がれた連符の途中で改行する ] | [ Up: Contexts and engravers ] | [ リハーサル記号を全ての譜の上に表示する > ] |
Print chord names with same root and different bass as slash and bass note
To print subsequent ChordNames only differing in its bass note
as slash and bass note, use the Scheme engraver defined in this
snippet. The behaviour may be controlled in detail by the
chordChanges context property.
#(define Bass_changes_equal_root_engraver (lambda (ctx) "For sequential `ChordNames` with the same root but a different bass, the root markup is dropped: D D/C D/B -> D /C /B. The behaviour may be controlled by setting the `chordChanges` context property." (let ((chord-pitches '()) (last-chord-pitches '()) (bass-pitch #f)) (make-engraver ((initialize this-engraver) (let ((chord-note-namer (ly:context-property ctx 'chordNoteNamer))) ;; Set 'chordNoteNamer, respect user setting if already done (ly:context-set-property! ctx 'chordNoteNamer (if (procedure? chord-note-namer) chord-note-namer note-name->markup)))) (listeners ((note-event this-engraver event) (let* ((pitch (ly:event-property event 'pitch)) (pitch-name (ly:pitch-notename pitch)) (pitch-alt (ly:pitch-alteration pitch)) (bass (ly:event-property event 'bass #f)) (inversion (ly:event-property event 'inversion #f))) ;; Collect notes of the chord ;; - to compare inversed chords we need to collect the ;; bass note as usual member of the chord, whereas an ;; added bass must be treated separate from the usual ;; chord-notes ;; - notes are stored as pairs containing their ;; pitch-name (an integer), i.e. disregarding their ;; octave and their alteration (cond (bass (set! bass-pitch pitch)) (inversion (set! bass-pitch pitch) (set! chord-pitches (cons (cons pitch-name pitch-alt) chord-pitches))) (else (set! chord-pitches (cons (cons pitch-name pitch-alt) chord-pitches))))))) (acknowledgers ((chord-name-interface this-engraver grob source-engraver) (let ((chord-changes (ly:context-property ctx 'chordChanges #f))) ;; If subsequent chords are equal apart from their bass, ;; reset the 'text-property. ;; Equality is done by comparing the sorted lists of this ;; chord's elements and the previous chord. Sorting is ;; needed because inverted chords may have a different ;; order of pitches. `chord-changes` needs to be true. (if (and bass-pitch chord-changes (equal? (sort chord-pitches car<) (sort last-chord-pitches car<))) (ly:grob-set-property! grob 'text (make-line-markup (list (ly:context-property ctx 'slashChordSeparator) ((ly:context-property ctx 'chordNoteNamer) bass-pitch (ly:context-property ctx 'chordNameLowercaseMinor)))))) (set! last-chord-pitches chord-pitches) (set! chord-pitches '()) (set! bass-pitch #f)))) ((finalize this-engraver) (set! last-chord-pitches '())))))) myChords = \chordmode { % \germanChords \set chordChanges = ##t d2:m d:m/cis d:m/c \set chordChanges = ##f d:m/b e1:7 \set chordChanges = ##t e \break \once \set chordChanges = ##f e1/f e2/gis e/+gis e e:m/f d:m d:m/cis d:m/c \set chordChanges = ##f d:m/b } << \new ChordNames \with { \consists #Bass_changes_equal_root_engraver } \myChords \new Staff \myChords >>
リハーサル記号を全ての譜の上に表示する
リハーサル記号は通常、一番上にある譜の上に表示されますが、全ての譜の上に表示することもできます。
\score { << \new Staff { \mark \default c''1 \textMark "molto" c'' } \new Staff { \mark \default c'1 \textMark "molto" c' } >> \layout { \context { \Score \remove Mark_engraver \remove Text_mark_engraver \remove Staff_collecting_engraver } \context { \Staff \consists Mark_engraver \consists Text_mark_engraver \consists Staff_collecting_engraver } } }
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < リハーサル記号を全ての譜の上に表示する ] | [ Up: Contexts and engravers ] | [ 楽譜から小節番号を削除する > ] |
音楽を異なる拍子記号で表示する
次のスニペットでは、2 つのパートが完全に異なる拍子記号を持っていますが、タイミングは揃っています。小節線はパート毎に独立して表示するため
Score のレベルでは表示されず、Timing_translator が
Score コンテキストから Staff コンテキストに移動しています。
小節番号が必要な場合、Bar_number_engraver も移動する必要があります。このエングラーバは Timing_translator によってセットされるプロパティに依存するためです。小節番号を表示したい譜に \with
を用いることができます。
global = { \time 3/4 s2.*3 \break s2.*3 } \layout { \context { \Score \remove "Timing_translator" \remove "Bar_number_engraver" \override SpacingSpanner.uniform-stretching = ##t \override SpacingSpanner.strict-note-spacing = ##t proportionalNotationDuration = #1/64 } \context { \Staff \consists "Timing_translator" } \context { \Voice \remove "Forbid_line_break_engraver" tupletFullLength = ##t } } Bassklarinette = \new Staff \with { \consists "Bar_number_engraver" barNumberVisibility = #(every-nth-bar-number-visible 2) \override BarNumber.break-visibility = #end-of-line-invisible } << \global { \clef treble \time 3/8 d''4. | \time 3/4 r8 des''2( c''8) | \time 7/8 r4. ees''2 ~ | \time 2/4 \tupletUp \tuplet 3/2 { ees''4 r4 d''4 ~ } | \time 3/8 \tupletUp \tuplet 4/3 { d''4 r4 } | \time 2/4 e''2 | \time 3/8 es''4. | \time 3/4 r8 d''2 r8 | } >> Perkussion = \new StaffGroup << \new Staff << \global { \clef percussion \time 3/4 r4 c'2 ~ | c'2. | R2. | r2 g'4 ~ | g'2. ~ | g'2. | } >> \new Staff << \global { \clef percussion \time 3/4 R2. | g'2. ~ | g'2. | r4 g'2 ~ | g'2 r4 | g'2. | } >> >> \score { << \Bassklarinette \Perkussion >> }
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < 音楽を異なる拍子記号で表示する ] | [ Up: Contexts and engravers ] | [ 譜グループの先頭に角括弧を使用する > ] |
楽譜から小節番号を削除する
Score コンテキストから Bar_number_engraver を削除することで、小節番号を完全に削除することができます。
\layout { \context { \Score \omit BarNumber % or: % \remove "Bar_number_engraver" } } \relative c'' { c4 c c c \break c4 c c c }
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < 楽譜から小節番号を削除する ] | [ Up: Contexts and engravers ] | [ Using mark lines in a Frenched score > ] |
譜グループの先頭に角括弧を使用する
システム開始の境界線 SystemStartSquare は StaffGroup
または ChoirStaff で明示的にセットすることで使用することができます。
\score { \new StaffGroup { << \set StaffGroup.systemStartDelimiter = #'SystemStartSquare \new Staff { c'4 d' e' f' } \new Staff { c'4 d' e' f' } >> } }
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < 譜グループの先頭に角括弧を使用する ] | [ Up: Contexts and engravers ] | [ タグを使用して同じソースから計量音楽譜と現代譜を生成する > ] |
Using mark lines in a Frenched score
Using MarkLine contexts (such as in “Placing rehearsal marks
other than above the top staff”) in a Frenched score can be problematic
if all the staves between two MarkLines are removed in one
system. The Keep_alive_together_engraver can be used within each
StaffGroup to keep the MarkLine alive only as long as the
other staves in the group stay alive.
bars = { \tempo "Allegro" 4=120 s1*2 \repeat unfold 5 { \mark \default s1*2 } \bar "||" \tempo "Adagio" 4=40 s1*2 \repeat unfold 8 { \mark \default s1*2 } \bar "|." } winds = \repeat unfold 120 { c''4 } trumpet = { \repeat unfold 8 g'2 R1*16 \repeat unfold 4 g'2 R1*8 } trombone = { \repeat unfold 4 c'1 R1*8 d'1 R1*17 } strings = \repeat unfold 240 { c''8 } #(set-global-staff-size 16) \paper { systems-per-page = 5 ragged-last-bottom = ##f tagline = ##f } \layout { indent = 16\mm short-indent = 5\mm \context { \name MarkLine \type Engraver_group \consists Output_property_engraver \consists Axis_group_engraver \consists Mark_engraver \consists Metronome_mark_engraver \consists Staff_collecting_engraver \override VerticalAxisGroup.remove-empty = ##t \override VerticalAxisGroup.remove-layer = #'any \override VerticalAxisGroup.staff-affinity = #DOWN \override VerticalAxisGroup.nonstaff-relatedstaff-spacing.padding = 1 keepAliveInterfaces = #'() } \context { \Staff \override VerticalAxisGroup.remove-empty = ##t \override VerticalAxisGroup.remove-layer = ##f } \context { \StaffGroup \accepts MarkLine \consists Keep_alive_together_engraver } \context { \Score \remove Mark_engraver \remove Metronome_mark_engraver \remove Staff_collecting_engraver \override BarNumber.Y-offset = #3 } } \score { << \new StaffGroup = "winds" \with { instrumentName = "Winds" shortInstrumentName = "W." } << \new MarkLine \bars \new Staff \winds >> \new StaffGroup = "brass" << \new MarkLine \bars \new Staff = "trumpet" \with { instrumentName = "Trumpet" shortInstrumentName = "Tp." } \trumpet \new Staff = "trombone" \with { instrumentName = "Trombone" shortInstrumentName = "Tb." } \trombone >> \new StaffGroup = "strings" \with { instrumentName = "Strings" shortInstrumentName = "Str." } << \new MarkLine \bars \new Staff = "strings" { \strings } >> >> }
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < Using mark lines in a Frenched score ] | [ Up: Contexts and engravers ] | [ 詩句とリフレインからなる合唱譜 > ] |
タグを使用して同じソースから計量音楽譜と現代譜を生成する
タグを使用して、同じ音楽に対して計量音楽譜と現代譜の両方を生成することができます。このスニペットでは、menrest 関数が定義されており、計量音楽における休符の位置は維持しながら、現代譜における休符は通常の位置に配置しています。タグは曲の終わりにある小節線を 2 つの楽譜で異なるものにするために使用していますが、区別が必要な他の場面でも用いることができます:
例えば、現代譜では “全休符” (R1, R\breve など) を使用したいが、計量音楽譜では通常の休符 (r1, r\breve など) を使用したい場合です。計量音楽を現代音楽に変換する作業は通常 “転写 (transcription)” と呼ばれます。
\layout { line-width = 150\mm } menrest = #(define-music-function (note) (ly:music?) #{ \tag #'mens $(make-music 'RestEvent note) \tag #'mod $(make-music 'RestEvent note 'pitch '()) #}) Be = \tag #'mod #(begin (ly:expect-warning (G_ "stem does not fit in beam")) (ly:expect-warning (G_ "beam was started here")) (make-span-event 'BeamEvent START)) Am = \tag #'mod ] MenStyle = { \override Score.BarNumber.transparent = ##t \override Stem.neutral-direction = #up \omit Slur \omit Beam } finalis = \section Music = \relative c'' { \key f \major g1 d'2 \menrest bes4 bes a2 \menrest r4 g4 fis4. fis8 fis4 fis g e f4.([ g8] a4[ g8 f] g2.\Be fis8 e\Am fis2) g\breve \finalis } MenLyr = \lyricmode { So farre, deere life, deare life, from thy bright beames ab- ſen- ted, } ModLyr = \lyricmode { So far, dear life, dear life, from your bright beams ab -- sen -- ted, __ } \markup \with-true-dimensions % work around a cropping issue \score { \keepWithTag #'mens { << \new PetrucciStaff { \new PetrucciVoice = "Cantus" { \clef "petrucci-c1" \time 4/4 \MenStyle \Music } } \new Lyrics \lyricsto "Cantus" \MenLyr >> } \layout { \context { \PetrucciVoice % No longer necessary starting with version 2.25.23. \override Flag.style = #'mensural } } } \markup\vspace #1 \score { \keepWithTag #'mod { \new ChoirStaff << \new Staff { \new Voice = "Sop" \with { \remove "Note_heads_engraver" \consists "Completion_heads_engraver" \remove "Rest_engraver" \consists "Completion_rest_engraver" } \shiftDurations 1 0 { \time 2/4 \autoBeamOff \Music } } \new Lyrics \lyricsto "Sop" \ModLyr >> } }
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < タグを使用して同じソースから計量音楽譜と現代譜を生成する ] | [ Up: Contexts and engravers ] | [ 繰り返し括弧をコード ネームの下に表示する > ] |
詩句とリフレインからなる合唱譜
このテンプレートでは、ソロの詩句から始まり、2 つのボイスからなるリフレインが続く楽譜を作成できます。また、\global 変数を用いて、拍子記号の変更 (や、その他の全パートに共通な部分) を楽譜全体に反映させる例も示しています。タイミングを合わせるために空白休符を用いています。
global = { \key g \major % verse \time 3/4 s2.*2 \break % refrain \time 2/4 s2*2 \bar "|." } SoloNotes = \relative g' { \clef "treble" % verse g4 g g | b4 b b | % refrain R2*2 | } SoloLyrics = \lyricmode { One two three | four five six | } SopranoNotes = \relative c'' { \clef "treble" % verse R2.*2 | % refrain c4 c | g4 g | } SopranoLyrics = \lyricmode { la la | la la | } BassNotes = \relative c { \clef "bass" % verse R2.*2 | % refrain c4 e | d4 d | } BassLyrics = \lyricmode { dum dum | dum dum | } \score { << \new Voice = "SoloVoice" << \global \SoloNotes >> \new Lyrics \lyricsto "SoloVoice" \SoloLyrics \new ChoirStaff << \new Voice = "SopranoVoice" << \global \SopranoNotes >> \new Lyrics \lyricsto "SopranoVoice" \SopranoLyrics \new Voice = "BassVoice" << \global \BassNotes >> \new Lyrics \lyricsto "BassVoice" \BassLyrics >> >> \layout { ragged-right = ##t \context { \Staff % these lines prevent empty staves from being printed \RemoveEmptyStaves \override VerticalAxisGroup.remove-first = ##t } } }
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < 詩句とリフレインからなる合唱譜 ] | [ Up: Contexts and engravers ] | [ Volta brackets in multiple staves > ] |
繰り返し括弧をコード ネームの下に表示する
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" } } }
| [ << Contexts and engravers ] | [Top][Contents] | [ Tweaks and overrides >> ] |
| [ < 繰り返し括弧をコード ネームの下に表示する ] | [ Up: Contexts and engravers ] | [ Tweaks and overrides > ] |
Volta brackets in multiple staves
By adding the Volta_engraver to the relevant staff, volte can be
put over staves other than the topmost one in a score.
\repeat and related commands should be present in all staves.
voltaMusic = \relative c'' { \repeat volta 2 { c1 \alternative { \volta 1 { d1 } \volta 2 { e1 } } } } << \new StaffGroup << \new Staff \voltaMusic \new Staff \voltaMusic >> \new StaffGroup << \new Staff \with { \consists "Volta_engraver" } \voltaMusic \new Staff \voltaMusic >> >>
| [ << Contexts and engravers ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < Volta brackets in multiple staves ] | [ Up: Top ] | [ オッターバを単一のボイスに対して適用する > ] |
19 Tweaks and overrides
See also Changing defaults and Tweaking output.
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < Tweaks and overrides ] | [ Up: Tweaks and overrides ] | [ オブジェクトにリンクを追加する > ] |
オッターバを単一のボイスに対して適用する
譜に 2 つ以上のボイスがある場合、オッターバを設定すると、囲みの中にある全てのボイスの音符が移動してしまいます。オッターバを単一のボイスに対して適用したい場合には、middleCPosition とオッターバ囲みを明示的にセットする必要があります。ヘ音記号の middleCPosition は本来 6 にセットされており、これは譜の中央の線から 6 つ上であることを示しています。このスニペットでは、オッターバ部分の middleCPosition を 7 加算して、1 オクターブ移動しています。
\layout { \context { \Staff \remove Ottava_spanner_engraver } \context { \Voice \consists Ottava_spanner_engraver } } { \clef bass << { <g d'>1~ q2 <c' e'> } \\ { r2. \ottava -1 <b,,, b,,>4 ~ | q2 \ottava 0 <c e>2 } >> }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < オッターバを単一のボイスに対して適用する ] | [ Up: Tweaks and overrides ] | [ タブ譜にマークアップを追加する > ] |
オブジェクトにリンクを追加する
grob-stencil にリンクを追加する場合、ここに定義されている add-link を使用することができます。\override や \tweak と動作します。ただし、リンクが設定された Grob は point-and-click が無効になります。
制限: PDF でのみ動作します。
リンクされたオブジェクトに色が付いているのは、別のコマンドによるものです。
#(define (add-link url-strg) (lambda (grob) (let* ((stil (ly:grob-property grob 'stencil))) (if (ly:stencil? stil) (let* ((x-ext (ly:stencil-extent stil X)) (y-ext (ly:stencil-extent stil Y)) (url-expr `(url-link ,url-strg ,x-ext ,y-ext)) (new-stil (ly:stencil-add (ly:make-stencil url-expr x-ext y-ext) stil))) (ly:grob-set-property! grob 'stencil new-stil)))))) %%%% test %% For easier maintenance of this snippet the URL is formatted to use the %% actually used LilyPond version. %% Of course a literal URL would work as well. #(define major.minor-version (string-join (take (string-split (lilypond-version) #\.) 2) ".")) urlI = #(format #f "http://lilypond.org/doc/v~a/Documentation/notation/writing-pitches" major.minor-version) urlII = #(format #f "http://lilypond.org/doc/v~a/Documentation/notation/rhythms" major.minor-version) urlIII = #(format #f "http://lilypond.org/doc/v~a/Documentation/notation/note-heads" major.minor-version) urlIV = #(format #f "http://lilypond.org/doc/v~a/Documentation/notation/beams" major.minor-version) urlV = #(format #f "http://lilypond.org/doc/v~a/Documentation/notation/note-head-styles" major.minor-version) urlVI = #(format #f "http://lilypond.org/doc/v~a/Documentation/notation/writing-pitches" major.minor-version) \relative c' { \key cis \minor \once \override Staff.Clef.color = #green \once \override Staff.Clef.after-line-breaking = #(add-link urlI) \once \override Staff.TimeSignature.color = #green \once \override Staff.TimeSignature.after-line-breaking = #(add-link urlII) \once \override NoteHead.color = #green \once \override NoteHead.after-line-breaking = #(add-link urlIII) cis'1 \once \override Beam.color = #green \once \override Beam.after-line-breaking = #(add-link urlIV) cis8 dis e fis gis2 <gis, \tweak Accidental.color #green \tweak Accidental.after-line-breaking #(add-link urlVI) \tweak color #green \tweak after-line-breaking #(add-link urlV) \tweak style #'harmonic bis dis fis >1 <cis, cis' e> }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < オブジェクトにリンクを追加する ] | [ Up: Tweaks and overrides ] | [ 長いグリッサンドにタイミング マークを追加する > ] |
タブ譜にマークアップを追加する
デフォルトでは、タブ譜にマークアップは表示されません。表示させるには、\revert TabStaff.TextScript.stencil を使用します。
high = { r4 r8 <g c'> q r8 r4 } low = { c4 r4 c8 r8 g,8 b, } pulse = { s8^"1" s^"&" s^"2" s^"&" s^"3" s^"&" s^"4" s^"&" } \score { \new TabStaff { \repeat unfold 2 << \high \\ \low \\ \pulse >> } \layout { \context { \TabStaff \clef moderntab \revert TextScript.stencil \override TextScript.font-series = #'bold \override TextScript.font-size = #-2 \override TextScript.color = #red } \context { \Score proportionalNotationDuration = #1/8 } } }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < タブ譜にマークアップを追加する ] | [ Up: Tweaks and overrides ] | [ 装飾音符のスペースを調整する > ] |
長いグリッサンドにタイミング マークを追加する
長いグリッサンド部分の拍をタイミング マークで表示する場合があります。これは通例符頭が無く符幹だけの音符として表され、この中間部分に発想記号を付け加えることもできます。
符幹がグリッサンドにうまく揃わない場合には、わずかに配置を調整する必要があるかもしれません。
glissandoSkipOn = { \override NoteColumn.glissando-skip = ##t \hide NoteHead \override NoteHead.no-ledgers = ##t } glissandoSkipOff = { \revert NoteColumn.glissando-skip \undo \hide NoteHead \revert NoteHead.no-ledgers } \relative c'' { r8 f8\glissando \glissandoSkipOn f4 g a a8\noBeam \glissandoSkipOff a8 r8 f8\glissando \glissandoSkipOn g4 a8 \glissandoSkipOff a8 | r4 f\glissando \< \glissandoSkipOn a4\f \> \glissandoSkipOff b8\! r | }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 長いグリッサンドにタイミング マークを追加する ] | [ Up: Tweaks and overrides ] | [ Adjusting slur positions vertically > ] |
装飾音符のスペースを調整する
装飾音符のスペーシングは Score.GraceSpacing の spacing-increment
プロパティで調整することができます。
graceNotes = { \grace { c4 c8 c16 c32 } c8 } \relative c'' { c8 \graceNotes \override Score.GraceSpacing.spacing-increment = #2.0 \graceNotes \revert Score.GraceSpacing.spacing-increment \graceNotes }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 装飾音符のスペースを調整する ] | [ Up: Tweaks and overrides ] | [ Adjusting vertical spacing of lyrics > ] |
Adjusting slur positions vertically
Using \override Slur.positions it is possible to set the
vertical position of the start and end points of a slur to absolute
values (or rather, forcing LilyPond’s slur algorithm to consider these
values as desired). In many cases, this means a lot of trial and error
until good values are found. You probably have tried the
\offset command next just to find out that it doesn’t work for
slurs, emitting a warning instead.
The code in this snippet allows you to tweak the vertical start and end
positions by specifying relative changes, similar to
\offset.
Syntax: \offsetPositions #'(dy1 . dy2)
offsetPositions = #(define-music-function (offsets) (number-pair?) #{ \once \override Slur.control-points = #(lambda (grob) (match-let ((((_ . y1) _ _ (_ . y2)) (ly:slur::calc-control-points grob)) ((off1 . off2) offsets)) (set! (ly:grob-property grob 'positions) (cons (+ y1 off1) (+ y2 off2))) (ly:slur::calc-control-points grob))) #}) \relative c'' { c4(^"default" c, d2) \offsetPositions #'(0 . 1) c'4(^"(0 . 1)" c, d2) \offsetPositions #'(0 . 2) c'4(^"(0 . 2)" c, d2) \bar "||" g4(^"default" a d'2) \offsetPositions #'(1 . 0) g,,4(^"(1 . 0)" a d'2) \offsetPositions #'(2 . 0) g,,4(^"(2 . 0)" a d'2) }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < Adjusting slur positions vertically ] | [ Up: Tweaks and overrides ] | [ Aligning text marks to notes > ] |
Adjusting vertical spacing of lyrics
This snippet shows how to bring the lyrics line closer to the staff.
% Default layout: << \new Staff \new Voice = melody \relative c' { c4 d e f | g4 f e d | c1 } \new Lyrics \lyricsto melody { aa aa aa aa aa aa aa aa aa } \new Staff \new Voice = melody \relative c' { c4 d e f | g4 f e d | c1 } % Reducing the minimum space below the staff and above the lyrics: \new Lyrics \with { \override VerticalAxisGroup.nonstaff-relatedstaff-spacing = #'((basic-distance . 1)) } \lyricsto melody { aa aa aa aa aa aa aa aa aa } >>
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < Adjusting vertical spacing of lyrics ] | [ Up: Tweaks and overrides ] | [ 連桁で繋がれた音符の符幹の長さを変更する > ] |
Aligning text marks to notes
By default, TextMark objects are aligned to so-called
NonMusicalPaperColumn grobs, like the left edge of the staff or
a bar line. They can be aligned to a note instead by setting the
non-musical property to #f.
\layout { line-length = 80\mm } { \textMark "mark a" c'1 | \textMark "mark b" c'1 | \break \override Score.TextMark.non-musical = ##f \textMark "mark c" c'1 | \textMark "mark d" c'1 | }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < Aligning text marks to notes ] | [ Up: Tweaks and overrides ] | [ 小節番号を変更する > ] |
連桁で繋がれた音符の符幹の長さを変更する
連桁で繋がれた音符の符幹の長さは、Stem.details の
beamed-lengths プロパティをオーバライドすることで変更できます。引数として単一の値が与えられた場合、設定された長さは連桁内の全ての音符に適用されます。複数の引数が与えられた場合、1 つ目は 8 分音符に対して、2 つ目は 16 分音符に対してというように適用されます。最後の引数は、それより音価の短い音符全てに対しても適用されます。整数でない値を用いることができます。
\relative c'' { \override Stem.details.beamed-lengths = #'(2) a8[ a] a16[ a] a32[ a] \override Stem.details.beamed-lengths = #'(8 10 12) a8[ a] a16[ a] a32[ a] r8 \override Stem.details.beamed-lengths = #'(8) a8[ a] \override Stem.details.beamed-lengths = #'(8.5) a8[ a] \revert Stem.details.beamed-lengths a8[ a] a16[ a] a32[ a] r16 }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 連桁で繋がれた音符の符幹の長さを変更する ] | [ Up: Tweaks and overrides ] | [ 分析用のブラケットを譜の上に表示する > ] |
小節番号を変更する
小節番号を付番する異なる方法が 2 つあり、繰り返しのある音楽に対して有用です。
music = \relative c' { \repeat volta 3 { c4 d e f | \alternative { \volta 1 { c4 d e f | c2 d \break } \volta 2 { f4 g a b | f4 g a b | f2 a | \break } \volta 3 { c4 d e f | c2 d } } } c1 \bar "|." } \markup "default" { \music } \markup \typewriter "numbers" { \set Score.alternativeNumberingStyle = #'numbers \music } \markup \typewriter "numbers-with-letters" { \set Score.alternativeNumberingStyle = #'numbers-with-letters \music }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 小節番号を変更する ] | [ Up: Tweaks and overrides ] | [ ラベル付きの分析用ブラケット > ] |
分析用のブラケットを譜の上に表示する
分析用のブラケットは、デフォルトでは譜の下に表示されます。次の例は譜の上に表示する方法を示しています。
\layout { \context { \Voice \consists "Horizontal_bracket_engraver" } } \relative c'' { \once \override HorizontalBracket.direction = #UP c2\startGroup d2\stopGroup }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 分析用のブラケットを譜の上に表示する ] | [ Up: Tweaks and overrides ] | [ 非対称なスラー > ] |
ラベル付きの分析用ブラケット
Grob HorizontalBracketText の text プロパティを設定することで、分析用のブラケットにテキストを追加することができます。同時に開始するブラケットに異なるテキストを追加する場合には、\tweak
コマンドを使用してください。改行後のテキストは括弧付きで表示されます。
\layout { \context { \Voice \consists "Horizontal_bracket_engraver" \override HorizontalBracket.direction = #UP } } { \once\override HorizontalBracketText.text = "a" c''\startGroup d''\stopGroup \once\override HorizontalBracketText.text = "a'" e''\startGroup d''\stopGroup | c''-\tweak HorizontalBracketText.text \markup \bold \huge "b" \startGroup -\tweak HorizontalBracketText.text "a" \startGroup d''\stopGroup e''-\tweak HorizontalBracketText.text "a'" \startGroup d''\stopGroup\stopGroup | c''-\tweak HorizontalBracketText.text foo \startGroup d'' e'' f'' | \break g'' a'' b'' c'''\stopGroup }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < ラベル付きの分析用ブラケット ] | [ Up: Tweaks and overrides ] | [ Breaking vertical alignment of dynamics and textscripts > ] |
非対称なスラー
音符の流れが対象的な形をしていない場合、それに合わせてスラーを非対称にすることができます。
slurNotes = { d,8( a' d f a f' d, a) } \relative c' { \stemDown \slurUp \slurNotes \once \override Slur.eccentricity = #3.0 \slurNotes }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 非対称なスラー ] | [ Up: Tweaks and overrides ] | [ Caesura (“railtracks”) with fermata > ] |
Breaking vertical alignment of dynamics and textscripts
By default, LilyPond uses DynamicLineSpanner grobs to vertically
align successive dynamic objects like hairpins and dynamic text.
However, this is not always wanted. By inserting
\breakDynamicSpan, which ends the alignment spanner
prematurely, this vertical alignment can be avoided.
{ g1\< | e''\f\> | c'\p } { g1\< | e''\breakDynamicSpan\f\> | c'\p }
Caesura (“railtracks”) with fermata
A caesura is sometimes denoted by a double “railtracks” breath mark with a fermata sign positioned above. This snippet shows an optically pleasing combination of railtracks and fermata.
\relative c'' { c2. % construct the symbol \override BreathingSign.text = \markup { \override #'(direction . 1) \override #'(baseline-skip . 1.8) \dir-column { \translate #'(0.155 . 0) \center-align \musicglyph "scripts.caesura.curved" \center-align \musicglyph "scripts.ufermata" } } \breathe c4 % set the breath mark back to normal \revert BreathingSign.text c2. \breathe c4 \bar "|." }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < Caesura (“railtracks”) with fermata ] | [ Up: Tweaks and overrides ] | [ 連桁の太さとスペーシングを変更する > ] |
Changing a single note’s size in a chord
Individual note heads in a chord can be modified with the
\tweak command inside a chord, by altering the font-size
property.
Inside the chord (within the brackets < >), before the note to
be altered, place the \tweak command, followed by
font-size and define the proper size like #-2 (a tiny
note head).
\relative c' { <\tweak font-size #+2 c e g c \tweak font-size #-2 e>1 ^\markup { A tiny e }_\markup { A big c } }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < Changing a single note’s size in a chord ] | [ Up: Tweaks and overrides ] | [ 複数小節にまたがる休符の形を変更する > ] |
連桁の太さとスペーシングを変更する
連桁を太くしたり細くしたりするには、Beam.beam-thickness プロパティを変更します。連桁と連桁の距離を調節するには、Beam.length-fraction
プロパティを変更します。
\relative f' { \time 1/8 \override Beam.beam-thickness = #0.4 \override Beam.length-fraction = #0.8 c32 c c c \revert Beam.beam-thickness % 0.48 is default thickness \revert Beam.length-fraction % 1.0 is default spacing c32 c c c \override Beam.beam-thickness = #0.6 \override Beam.length-fraction = #1.3 c32 c c c }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 連桁の太さとスペーシングを変更する ] | [ Up: Tweaks and overrides ] | [ 個々の Grob のプロパティを変更する > ] |
複数小節にまたがる休符の形を変更する
休符が複数小節に渡り、それが 10 小節以下の場合には、四全休符や二全休符が並んだものとして表記されます (ドイツ語で Kirchenpausen –
教会休符と呼ばれます)。10 小節より長い場合は、単純な線として表示されます。このデフォルトの 10 を変更するには、expand-limit プロパティをオーバライドします。
\relative c'' { \compressMMRests { R1*2 | R1*5 | R1*9 \override MultiMeasureRest.expand-limit = 3 R1*2 | R1*5 | R1*9 } }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 複数小節にまたがる休符の形を変更する ] | [ Up: Tweaks and overrides ] | [ テキストによる強弱記号のテキストとスパナのスタイルを変更する > ] |
個々の Grob のプロパティを変更する
\applyOutput コマンドは、どのようなコンテキストのどのようなレイアウト オブジェクトも変更することができます。このコマンドは Scheme 関数と 3 つの引数が必要です。
#(define (mc-squared grob grob-origin context) (let ((sp (ly:grob-property grob 'staff-position))) (ly:grob-set-property! grob 'stencil (grob-interpret-markup grob #{ \markup \lower #0.5 #(case sp ((-5) "m") ((-3) "c ") ((-2) #{ \markup \teeny \bold 2 #}) (else "bla")) #})))) \relative c' { <d f g b>2 \applyOutput Voice.NoteHead #mc-squared <d f g b>2 }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 個々の Grob のプロパティを変更する ] | [ Up: Tweaks and overrides ] | [ デフォルトのテキスト フォント ファミリを変更する > ] |
テキストによる強弱記号のテキストとスパナのスタイルを変更する
クレッシェンドやデクレッシェンドに使われるテキストは crescendoText,
decrescendoText コンテキスト プロパティをセットすることで変更できます。
スパナの線は、DynamicTextSpanner の style プロパティをセットすることでスタイルを変更できます。デフォルトの値は 'dashed-line
であり、他に 'line, 'dotted-line, 'none が設定できます。
\relative c'' { \set crescendoText = \markup { \italic { cresc. poco } } \set crescendoSpanner = #'text \override DynamicTextSpanner.style = #'dotted-line a2\< a a2 a a2 a a2 a\mf }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < テキストによる強弱記号のテキストとスパナのスタイルを変更する ] | [ Up: Tweaks and overrides ] | [ 譜のサイズを変更する > ] |
デフォルトのテキスト フォント ファミリを変更する
デフォルトでテキストに使われるフォント ファミリは make-pango-font-tree
をオーバライドすることで変更することができます。
%{ You may have to install additional fonts. Red Hat Fedora dejavu-fonts-all Debian GNU/Linux, Ubuntu fonts-dejavu-core fonts-dejavu-extra %} \paper { %{ run lilypond -dshow-available-fonts to show all fonts available in the process log. %} property-defaults.fonts.serif = "DejaVu Serif" property-defaults.fonts.sans = "DejaVu Sans" property-defaults.fonts.typewriter = "DejaVu Sans Mono" } { g'''4^\markup { DejaVu Serif: \bold bold \italic italic \italic \bold { bold italic } } g4_\markup { \override #'(font-family . sans) { DejaVu Sans: \bold bold \italic italic \italic \bold { bold italic } } } g''2^\markup { \override #'(font-family . typewriter) { DejaVu Sans Mono: \bold bold \italic italic \italic \bold { bold italic } } } }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < デフォルトのテキスト フォント ファミリを変更する ] | [ Up: Tweaks and overrides ] | [ メトロノーム記号を表示せずにテンポを変更する > ] |
譜のサイズを変更する
譜のサイズを変更する一番シンプルな方法は
#(set-global-staff-size xx) を使用することですが、譜ごとにサイズを変更するには staff-space や fontSize
プロパティを使用します。
<< \new Staff { \relative c'' { \dynamicDown c8\ff c c c c c c c } } \new Staff \with { fontSize = #-3 \override StaffSymbol.staff-space = #(magstep -3) } { \clef bass c8 c c c c\f c c c } >>
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 譜のサイズを変更する ] | [ Up: Tweaks and overrides ] | [ サステイン ペダル記号のテキストを変更する > ] |
メトロノーム記号を表示せずにテンポを変更する
楽譜には何も出力せずに MIDI 出力のテンポのみを変更するには、メトロノーム記号を非表示にします。
\score { \new Staff \relative c' { \tempo 4 = 160 c4 e g b c4 b d c \set Score.tempoHideNote = ##t \tempo 4 = 96 d,4 fis a cis d4 cis e d } \layout { } \midi { } }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < メトロノーム記号を表示せずにテンポを変更する ] | [ Up: Tweaks and overrides ] | [ 改行後のスパナの可視性をコントロールする > ] |
サステイン ペダル記号のテキストを変更する
ペダル ダウンやペダル アップに使われるテキストは、Staff.pedalSustainStrings で変更できます。このスニペットに表示されているものがグリフの全てであり、これ以外の文字は使用することができません。
sustainNotes = { c4\sustainOn d e\sustainOff\sustainOn f\sustainOff } \relative c' { \sustainNotes \set Staff.pedalSustainStrings = #'("P" "P-" "-") \sustainNotes \set Staff.pedalSustainStrings = #'("d" "de" "e") \sustainNotes \set Staff.pedalSustainStrings = #'("M" "M-" "-") \sustainNotes \set Staff.pedalSustainStrings = #'("Ped" "*Ped" "*") \sustainNotes } \layout { ragged-right = ##f }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < サステイン ペダル記号のテキストを変更する ] | [ Up: Tweaks and overrides ] | [ Controlling the appearance of tremolo slashes > ] |
改行後のスパナの可視性をコントロールする
改行のすぐ後の音符で終了するスパナの可視性は、after-line-breaking のコールバック ly:spanner::kill-zero-spanned-time によりコントロールされます。
グリッサンドやヘアピンのようなオブジェクトは、デフォルトで改行後のスパナを表示しないようにしています。このコールバックを無効化することで、改行後のスパナが表示されるようになります。
逆に、テキスト スパナなどはデフォルトで改行後に表示されるようになっていますが、コールバックを有効にすることで削除することができます。
\paper { line-width = 50\mm } \relative c'' { \override Hairpin.to-barline = ##f \override Glissando.breakable = ##t % show hairpin \override Hairpin.after-line-breaking = ##t % hide text span \override TextSpanner.after-line-breaking = #ly:spanner::kill-zero-spanned-time e2\<\startTextSpan % show glissando \override Glissando.after-line-breaking = ##t f2\glissando \break f,1\!\stopTextSpan }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 改行後のスパナの可視性をコントロールする ] | [ Up: Tweaks and overrides ] | [ スクリプトの縦方向の優先順位をコントロールする > ] |
Controlling the appearance of tremolo slashes
Using various properties of the StemTremolo grob it is possible
to control the appearance of tremolo slashes.
- Property
slopesets the slope for tremolo slashes. - Property
shapedetermines whether tremolo slashes look like rectangles (valuerectangle) or like very small beams (valuebeam-like). - Property
stylesets both the slope and the shape depending on whether the note has flags, beams, or only a plain stem. This is in contrast to the previous two properties, which change the slope and shape unconditionally. There are two styles defined.-
default: slashes for down-stem flags are longer and more sloped than slashes for up-stem flags; slashes on beamed notes have a rectangular shape and are parallel to the beam. -
constant: all slashes are beam-like and have the same slope except for down-stem flags.
-
music = { a''4:32 a': e''8: \noBeam e': a'':[ a':] f':[ g':] d':[ d':] } \new Staff { <>^\markup "default" \music } \new Staff { <>^\markup \typewriter "style = #'constant" \override StemTremolo.style = #'constant \music } \new Staff { <>^\markup \typewriter "shape = #'rectangle" \override StemTremolo.shape = #'rectangle \music } \new Staff { <>^\markup \typewriter "shape = #'beam-like" \override StemTremolo.shape = #'beam-like \music } \new Staff { <>^\markup \typewriter "slope = -0.2" \override StemTremolo.slope = -0.2 \music }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < Controlling the appearance of tremolo slashes ] | [ Up: Tweaks and overrides ] | [ 連符の括弧の可視性をコントロールする > ] |
スクリプトの縦方向の優先順位をコントロールする
スクリプト (音符に付加する記号) の縦方向の優先順位は、script-priority プロパティでコントロールされます。値が小さいほど、音符の近くに配置されます。この例では、1 つ目は
TextScript (シャープ記号) を低い優先度を持つようにしており、一番低い位置に表示されます。2 つ目はトリル (Script) が低い優先度を持ち、内側に表示されるようになっています。2 つのオブジェクトが同じ優先度を持つ場合には、入力された順番が配置に影響します。
\relative c''' { \once \override TextScript.script-priority = -100 a2^\prall^\markup { \sharp } \once \override Script.script-priority = -100 a2^\prall^\markup { \sharp } \set fingeringOrientations = #'(up) <c-2 a-1>2 <a-1 c\tweak script-priority -100 -2>2 }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < スクリプトの縦方向の優先順位をコントロールする ] | [ Up: Tweaks and overrides ] | [ 遅れターンを作成する > ] |
連符の括弧の可視性をコントロールする
連符の括弧の可視性についての挙動は、デフォルトでは同じ長さの連桁がある場合に表示されないようになっています。これをコントロールするには、bracket-bisibility プロパティを #t (常に表示),
#'if-no-beam (連桁が無い場合にのみ表示。デフォルトの振る舞い),
#f (常に非表示) のいずれかにセットします。
3 つ目の選択肢は、実際には TupletBracket オブジェクトを出力から完全に省略することに相当します。
music = \relative c'' { \tuplet 3/2 { c16[ d e } f8] \tuplet 3/2 { c8 d e } \tuplet 3/2 { c4 d e } } \new Voice { \relative c' { \override Score.TextMark.non-musical = ##f \textMark "default" \music \override TupletBracket.bracket-visibility = #'if-no-beam \textMark \markup \typewriter "'if-no-beam" \music \override TupletBracket.bracket-visibility = ##t \textMark \markup \typewriter "#t" \music \override TupletBracket.bracket-visibility = ##f \textMark \markup \typewriter "#f" \music \omit TupletBracket \textMark \markup \typewriter "omit" \music } }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 連符の括弧の可視性をコントロールする ] | [ Up: Tweaks and overrides ] | [ カスタマイズされた調号を作成する > ] |
遅れターンを作成する
下の音符が臨時記号を持つような遅れターンを作るには、いくつかのオーバライドが必要です。outside-staff-priority プロパティを #f にセットしなければ、avoid-slur プロパティよりも優先されてしまい、スラーの内側に記号が入りません。分数 2/3 と 1/3 は、水平位置を調整しています。
\relative c'' { \after 2*2/3 \turn c2( d4) r | \after 4 \turn c4.( d8) \after 4 { \once \set suggestAccidentals = ##t \once \override AccidentalSuggestion.outside-staff-priority = ##f \once \override AccidentalSuggestion.avoid-slur = #'inside \once \override AccidentalSuggestion.font-size = -3 \once \override AccidentalSuggestion.script-priority = -1 \once \hideNotes cis8\turn \noBeam } d4.( e8) }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 遅れターンを作成する ] | [ Up: Tweaks and overrides ] | [ テキスト スパナを作成する > ] |
カスタマイズされた調号を作成する
LilyPond はカスタマイズされた調号をサポートしています。この例では、フラットを広範囲に表示する D マイナーを作成しています。
\new Staff \with { \override StaffSymbol.line-count = #8 \override KeySignature.flat-positions = #'((-7 . 6)) \override KeyCancellation.flat-positions = #'((-7 . 6)) \override KeySignature.sharp-positions = #'((-6 . 7)) \override KeyCancellation.sharp-positions = #'((-6 . 7)) \override Clef.stencil = #(lambda (grob) (grob-interpret-markup grob #{ \markup\combine \musicglyph "clefs.C" \translate #'(-3 . -2) \musicglyph "clefs.F" #})) clefPosition = #3 middleCPosition = #3 middleCClefPosition = #3 } { \key d\minor f bes, f bes, | \key d\major fis b, fis b, | }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < カスタマイズされた調号を作成する ] | [ Up: Tweaks and overrides ] | [ 譜をまたがる和音 – 連桁との問題を解決する > ] |
テキスト スパナを作成する
\startTextSpan と \stopTextSpan コマンドは、ペダル記号やオッターバのようにテキスト スパナを容易に作成できます。TextSpanner オブジェクトのプロパティをオーバライドすることで、出力を変更することができます。
\paper { ragged-right = ##f } \relative c'' { \override TextSpanner.bound-details.left.text = #"bla" \override TextSpanner.bound-details.right.text = #"blu" a4 \startTextSpan b4 c a4 \stopTextSpan \override TextSpanner.style = #'line \once \override TextSpanner.bound-details.left.stencil-align-dir-y = #CENTER a4 \startTextSpan b4 c a4 \stopTextSpan \override TextSpanner.style = #'dashed-line \override TextSpanner.bound-details.left.text = \markup { \draw-line #'(0 . 1) } \override TextSpanner.bound-details.right.text = \markup { \draw-line #'(0 . -2) } \once \override TextSpanner.bound-details.right.padding = #-2 a4 \startTextSpan b4 c a4 \stopTextSpan \override TextSpanner.dash-period = #10 \override TextSpanner.dash-fraction = #0.5 \override TextSpanner.thickness = #10 a4 \startTextSpan b4 c a4 \stopTextSpan }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < テキスト スパナを作成する ] | [ Up: Tweaks and overrides ] | [ 譜をまたがる符幹 > ] |
譜をまたがる和音 – 連桁との問題を解決する
譜をまたがる和音を作成する際に、連桁の衝突に関する問題が起きないように上の譜の符幹を下向きに伸ばした方が良い場合があります。次の例で下の譜の符幹を伸ばそうとした場合、\override Staff.Beam.collision-voice-only = ##t
を用いて、譜を越えた衝突を検出しないように、連桁の自動衝突解決の設定を変更する必要があります。
\new PianoStaff << \new Staff = up \relative c' << { r4 \override Stem.cross-staff = ##t \override Stem.length = #19 % this is in half-spaces, % so it makes stems 9.5 staffspaces long \override Stem.Y-offset = #-6 % stems are normally lengthened % upwards, so here we must lower the stem by the amount % equal to the lengthening - in this case (19 - 7) / 2 % (7 is default stem length) e e e } { s4 \change Staff = "bottom" \override NoteColumn.ignore-collision = ##t c, c c } >> \new Staff = bottom \relative c' { \clef bass \voiceOne g8 a g a g a g a } >>
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 譜をまたがる和音 – 連桁との問題を解決する ] | [ Up: Tweaks and overrides ] | [ クストス > ] |
譜をまたがる符幹
このスニペットは、Span_stem_engraver と \crossStaff を用いて、自動的に譜をまたがる符幹を作成しています。
符幹の長さは自動的に計算されるため指定する必要はありません。
\layout { \context { \PianoStaff \consists "Span_stem_engraver" } } \new PianoStaff << \new Staff { <b d'>4 r d'16\> e'8. g8 r\! | e'8 f' g'4 \voiceTwo % Down to lower staff \crossStaff { e'8 e'8 } e'4 | } \new Staff { \clef bass \voiceOne % Up to upper staff \crossStaff { <e g>4 e, g16 a8. c8 } d | g8 f g4 \voiceTwo g8 g g4 | } >>
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 譜をまたがる符幹 ] | [ Up: Tweaks and overrides ] | [ フレットボードのフレット図をカスタマイズする > ] |
クストス
クストスは様々なスタイルで譜刻することができます。
\layout { ragged-right = ##t } \markup \with-true-dimensions % work around a cropping issue \score { \new Staff \with { \consists "Custos_engraver" } \relative c' { \override Staff.Custos.neutral-position = #4 \override Staff.Custos.style = #'hufnagel c1^"hufnagel" \break <d a' f'>1 \override Staff.Custos.style = #'medicaea c1^"medicaea" \break <d a' f'>1 \override Staff.Custos.style = #'vaticana c1^"vaticana" \break <d a' f'>1 \override Staff.Custos.style = #'mensural c1^"mensural" \break <d a' f'>1 } }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < クストス ] | [ Up: Tweaks and overrides ] | [ マークアップのフレット図をカスタマイズする > ] |
フレットボードのフレット図をカスタマイズする
フレット図のプロパティは fret-diagram-details からセットできます。FretBoardのフレット図では、オーバライドは FretBoards.FretBoard
オブジェクトに適用されます。FretBoards は Voice のように最下位のコンテキストであるため、プロパティのオーバライドでは省略することができます。
% begin verbatim \include "predefined-guitar-fretboards.ly" \storePredefinedDiagram #default-fret-table \chordmode { c' } #guitar-tuning "x;1-1-(;3-2;3-3;3-4;1-1-);" % shorthand oo = #(define-music-function (grob-path value) (list? scheme?) #{ \once \override $grob-path = #value #}) << \new ChordNames { \chordmode { c1 | c | c | d | bes } } \new FretBoards { % Set global properties of fret diagram \override FretBoards.FretBoard.size = 1.2 \override FretBoard.fret-diagram-details.finger-code = #'in-dot \override FretBoard.fret-diagram-details.dot-color = #'white \chordmode { c \oo FretBoard.size #1.0 \oo FretBoard.fret-diagram-details.barre-type #'straight \oo FretBoard.fret-diagram-details.dot-color #'black \oo FretBoard.fret-diagram-details.finger-code #'below-string c' \oo FretBoard.fret-diagram-details.barre-type #'none \oo FretBoard.fret-diagram-details.number-type #'arabic \oo FretBoard.fret-diagram-details.orientation #'landscape \oo FretBoard.fret-diagram-details.mute-string "M" \oo FretBoard.fret-diagram-details.label-dir #LEFT \oo FretBoard.fret-diagram-details.dot-color #'black c' \oo FretBoard.fret-diagram-details.finger-code #'below-string \oo FretBoard.fret-diagram-details.dot-radius #0.35 \oo FretBoard.fret-diagram-details.dot-position #0.5 \oo FretBoard.fret-diagram-details.fret-count #3 d \oo FretBoard.fret-diagram-details.barre-type #'straight \oo FretBoard.fret-diagram-details.finger-code #'none \oo FretBoard.fret-diagram-details.dot-radius #0.25 \oo FretBoard.fret-diagram-details.dot-color #'black \oo FretBoard.fret-diagram-details.string-overhang #0. \oo FretBoard.fret-diagram-details.barre-thickness #2. bes } } \new Voice { c'1 | c' | c' | d' | bes } >>
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < フレットボードのフレット図をカスタマイズする ] | [ Up: Tweaks and overrides ] | [ システムに譜が 1 つしか存在しない場合にも括弧を表示する > ] |
マークアップのフレット図をカスタマイズする
フレット図のプロパティは fret-diagram-details からセットできます。マークアップのフレット図では、オーバライドは Voice.TextScript
オブジェクトや、マークアップに直接適用されます。
<< \chords { c1 | c | c | d } \new Voice = "mel" { \textLengthOn % Set global properties of fret diagram \override TextScript.size = 1.2 \override TextScript.fret-diagram-details.finger-code = #'in-dot \override TextScript.fret-diagram-details.dot-color = #'white %% C major for guitar, no barre, using defaults % terse style c'1^\markup { \fret-diagram-terse "x;3-3;2-2;o;1-1;o;" } %% C major for guitar, barred on third fret % verbose style % size 1.0 % roman fret label, finger labels below string, straight barre c'1^\markup { % standard size \override #'(size . 1.0) { \override #'(fret-diagram-details . ( (number-type . roman-lower) (finger-code . in-dot) (barre-type . straight))) { \fret-diagram-verbose #'((mute 6) (place-fret 5 3 1) (place-fret 4 5 2) (place-fret 3 5 3) (place-fret 2 5 4) (place-fret 1 3 1) (barre 5 1 3)) } } } %% C major for guitar, barred on third fret % verbose style % landscape orientation, arabic numbers, M for mute string % no barre, fret label down or left, small mute label font c'1^\markup { \override #'(fret-diagram-details . ( (finger-code . below-string) (number-type . arabic) (label-dir . -1) (mute-string . "M") (orientation . landscape) (barre-type . none) (xo-font-magnification . 0.4) (xo-padding . 0.3))) { \fret-diagram-verbose #'((mute 6) (place-fret 5 3 1) (place-fret 4 5 2) (place-fret 3 5 3) (place-fret 2 5 4) (place-fret 1 3 1) (barre 5 1 3)) } } %% simple D chord % terse style % larger dots, centered dots, fewer frets % label below string d'1^\markup { \override #'(fret-diagram-details . ( (finger-code . below-string) (dot-radius . 0.35) (dot-position . 0.5) (fret-count . 3))) { \fret-diagram-terse "x;x;o;2-1;3-2;2-3;" } } } >>
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < マークアップのフレット図をカスタマイズする ] | [ Up: Tweaks and overrides ] | [ Grob の親子関係を表示する > ] |
システムに譜が 1 つしか存在しない場合にも括弧を表示する
ChoirStaff や StaffGroup に譜が 1 つだけ存在する場合、デフォルトでは括弧や行頭の小節線は表示されません。これは collapse-height
をオーバライドし、値を譜線の数より小さくセットすることで変更することができます。
括弧が波の形をしている
PianoStaff や GrandStaff のようなコンテキストでは、別のプロパティをセットする必要があります。例の 2 つ目のシステムを参照してください。
\score { \new StaffGroup << % Must be lower than the actual number of staff lines \override StaffGroup.SystemStartBracket.collapse-height = 4 \override Score.SystemStartBar.collapse-height = 4 \new Staff { c'1 } >> } \score { \new PianoStaff << \override PianoStaff.SystemStartBrace.collapse-height = 4 \override Score.SystemStartBar.collapse-height = 4 \new Staff { c'1 } >> }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < システムに譜が 1 つしか存在しない場合にも括弧を表示する ] | [ Up: Tweaks and overrides ] | [ ハーモニクスの付点 > ] |
Grob の親子関係を表示する
Grob のコールバックを使用する際、Grob の親子関係を理解すると役立つ場合があります。多くの Grob は親を持ち、Grob が表示される位置の基準点となります。X 軸方向の親 (X-parent) と Y 軸方向の親 (Y-parent) はそれぞれ横方向と縦方向の位置の基準となります。同様に、親の Grob にもそれぞれの親が存在します。
残念ながら、Grob の親子関係を分かりにくくしていることがいくつかあります:
* Grob が持つ親の種類はコンテキストに依存する場合があります。
* いくつかの Grob では、X 軸方向の親と Y 軸方向の親が同じです。
* Grob の親が位置の基準以外の役割を果たす場合があります。
* "世代" として考えるのは誤解を生みます。
例えば、System Grob は VerticalAlignment の
(Y 軸方向の) 親にも、(X 軸方向の両方の) 祖父母にもなっています。
このマクロは、Grob の親子関係を (コンソールに) 分かりやすく表示します。
このように呼び出します:
{ \once \override NoteHead.before-line-breaking =
#display-ancestry c }
以下のような出力を得ます:
NoteHead X,Y: NoteColumn
X: PaperColumn
X,Y: System
Y: VerticalAxisGroup
X: NonMusicalPaperColumn
X,Y: System
Y: VerticalAlignment
X: NonMusicalPaperColumn
X,Y: System
Y: System
#(define (get-ancestry grob) (if (not (null? (ly:grob-parent grob X))) (list (grob::name grob) (get-ancestry (ly:grob-parent grob X)) (get-ancestry (ly:grob-parent grob Y))) (grob::name grob))) #(define (format-ancestry lst padding) (string-append (symbol->string (car lst)) "\n" (let ((X-ancestry (if (list? (cadr lst)) (format-ancestry (cadr lst) (+ padding 3)) (symbol->string (cadr lst)))) (Y-ancestry (if (list? (caddr lst)) (format-ancestry (caddr lst) (+ padding 3)) (symbol->string (caddr lst))))) (if (equal? X-ancestry Y-ancestry) (string-append (format #f "~&") (make-string padding #\space) "X,Y: " (if (list? (cadr lst)) (format-ancestry (cadr lst) (+ padding 5)) (symbol->string (cadr lst)))) (string-append (format #f "~&") (make-string padding #\space) "X: " X-ancestry "\n" (make-string padding #\space) "Y: " Y-ancestry (format #f "~&")))) (format #f "~&"))) #(define (display-ancestry grob) (format (current-output-port) "~2&~a~2%~a~&" (make-string 36 #\-) (if (ly:grob? grob) (format-ancestry (get-ancestry grob) 0) (format #f "~a is not a grob" grob)))) \relative c' { \once \override NoteHead.before-line-breaking = #display-ancestry f4 \once \override Accidental.before-line-breaking = #display-ancestry \once \override Arpeggio.before-line-breaking = #display-ancestry <f as c>4\arpeggio }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < Grob の親子関係を表示する ] | [ Up: Tweaks and overrides ] | [ Grob の周りにボックスを表示する > ] |
ハーモニクスの付点
\harmonic を用いて恣意的に作り出すハーモニクスは付点を表示しません。この挙動をオーバライドするには、harmonicDots コンテキスト プロパティをセットします。
\relative c''' { \time 3/4 \key f \major \set harmonicDots = ##t <bes f'\harmonic>2. ~ <bes f'\harmonic>4. <a e'\harmonic>8( <gis dis'\harmonic> <g d'\harmonic>) <fis cis'\harmonic>2. <bes f'\harmonic>2. }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < ハーモニクスの付点 ] | [ Up: Tweaks and overrides ] | [ 様々なオブジェクトの周りを円で囲む > ] |
Grob の周りにボックスを表示する
任意の Grob の周りにボックスを表示するために、print-function をオーバライドすることができます。
\relative c'' { \once \override TextScript.stencil = #(make-stencil-boxer 0.1 0.3 ly:text-interface::print) c'4^"foo" \tweak Stem.stencil #(make-stencil-boxer 0.05 0.25 ly:stem::print) b8 c4.^"bar" c4 \override Score.RehearsalMark.stencil = #(make-stencil-boxer 0.15 0.3 ly:text-interface::print) \mark \default c1 }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < Grob の周りにボックスを表示する ] | [ Up: Tweaks and overrides ] | [ Dynamics spanner with custom text > ] |
様々なオブジェクトの周りを円で囲む
\circle マークアップ コマンドは、様々なオブジェクトの周りに円を描画します (例えば運指記号)。他のオブジェクトに対しては、調整が必要な場合があります: この例は、リハーサル記号と小節番号に対して円を描画する 2 つの方法を示しています。
\relative c' { c1 \set Score.rehearsalMarkFormatter = #(lambda (mark context) (make-circle-markup (format-mark-numbers mark context))) \mark \default c2 d^\markup { \override #'(thickness . 3) { \circle foo } } \override Score.BarNumber.break-visibility = #all-visible \override Score.BarNumber.stencil = #(make-stencil-circler 0.1 0.25 ly:text-interface::print) }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 様々なオブジェクトの周りを円で囲む ] | [ Up: Tweaks and overrides ] | [ Extending a trill spanner > ] |
Dynamics spanner with custom text
Postfix functions for custom crescendo text spanners. The spanners
should start on the first note of the measure. One has to use
-\mycresc, otherwise the spanner start will rather be assigned
to the next note.
% Two functions for (de)crescendo spanners where you can explicitly % give the spanner text. mycresc = #(define-music-function (mymarkup) (markup?) (make-music 'CrescendoEvent 'span-direction START 'span-type 'text 'span-text mymarkup)) mydecresc = #(define-music-function (mymarkup) (markup?) (make-music 'DecrescendoEvent 'span-direction START 'span-type 'text 'span-text mymarkup)) \relative c' { c4-\mycresc "custom cresc" c4 c4 c4 | c4 c4 c4 c4 | c4-\mydecresc "custom decresc" c4 c4 c4 | c4 c4 c4 c4 | c4 c4\! c4 c4 }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < Dynamics spanner with custom text ] | [ Up: Tweaks and overrides ] | [ 繰り返しにまたがるグリッサンド > ] |
Extending a trill spanner
For TrillSpanner grobs, the minimum-length property
becomes effective only if the set-spacing-rods procedure is
called explicitly.
To do this, the springs-and-rods property should be set to
ly:spanner::set-spacing-rods.
\relative c' { \key c\minor \time 2/4 c16( as') c,-. des-. \once\override TrillSpanner.minimum-length = #15 \once\override TrillSpanner.springs-and-rods = #ly:spanner::set-spacing-rods \afterGrace es4\startTrillSpan { d16[(\stopTrillSpan es)] } c( c' g es c g' es d c8) }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < Extending a trill spanner ] | [ Up: Tweaks and overrides ] | [ ペダル記号のブラケットを微調整する > ] |
繰り返しにまたがるグリッサンド
複数の \alternative ブロックにまたがるグリッサンドは、\alternative ブロックの始まりに見えない装飾音符を配置し、グリッサンドを付加することで模倣することができます。装飾音符のピッチはグリッサンドの始端と同じであるべきです。ここでは、装飾音符のピッチを引数に取る音楽関数を定義しています。
多声の音楽では、他のボイスの装飾音符と位置を合わせる必要があります。
repeatGliss = #(define-music-function (grace) (ly:pitch?) #{ % the next two lines ensure the glissando is long enough % to be visible \once \override Glissando.springs-and-rods = #ly:spanner::set-spacing-rods \once \override Glissando.minimum-length = 3.5 \once \hideNotes \grace $grace \glissando #}) \score { \relative c'' { \repeat volta 3 { c4 d e f\glissando } \alternative { { g2 d } { \repeatGliss f g2 e } { \repeatGliss f e2 d } } } } music = \relative c' { \voiceOne \repeat volta 2 { g a b c\glissando } \alternative { { d1 } { \repeatGliss c \once \omit StringNumber e1\2 } } } \score { \new StaffGroup << \new Staff << \new Voice { \clef "G_8" \music } >> \new TabStaff << \new TabVoice { \clef "moderntab" \music } >> >> }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 繰り返しにまたがるグリッサンド ] | [ Up: Tweaks and overrides ] | [ 平坦なタイ > ] |
ペダル記号のブラケットを微調整する
ペダル記号のブラケットの見た目は様々に調整することができます。
\paper { ragged-right = ##f } \relative c'' { c2\sostenutoOn c c2\sostenutoOff c c2\tweak shorten-pair #'(-7 . -2) \sostenutoOn c c2\sostenutoOff c c2\tweak edge-height #'(0 . 3) \sostenutoOn c c2\sostenutoOff c }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < ペダル記号のブラケットを微調整する ] | [ Up: Tweaks and overrides ] | [ Force a cancellation natural before accidentals > ] |
平坦なタイ
この関数は Tie.stencil をデフォルトの引数に取り、このデフォルトのステンシルの寸法を基にサイズが計算されます。更なる調整は
Tie.details.height-limit や \shape で行うことができます。また、カスタム定義をその場で変更することもできます。
#(define ((flared-tie coords) grob) (define (pair-to-list pair) (list (car pair) (cdr pair))) (define (normalize-coords goods x y dir) (map (lambda (coord) (cons (* x (car coord)) (* y dir (cdr coord)))) goods)) (define (my-c-p-s points thick) (make-connected-path-stencil points thick 1.0 1.0 #f #f)) ;; Calling `ly:tie::print` and assigning its return value to a ;; variable in this outer `let` triggers LilyPond to position the ;; tie, allowing us to extract its extents. We only proceed, ;; however, if the tie doesn't get discarded (for whatever reason). (let ((sten (ly:tie::print grob))) (if (grob::is-live? grob) (let* ((layout (ly:grob-layout grob)) (line-thickness (ly:output-def-lookup layout 'line-thickness)) (thickness (ly:grob-property grob 'thickness 0.1)) (used-thick (* line-thickness thickness)) (dir (ly:grob-property grob 'direction)) (xex (ly:stencil-extent sten X)) (yex (ly:stencil-extent sten Y)) (lenx (interval-length xex)) (leny (interval-length yex)) (xtrans (car xex)) (ytrans (if (> dir 0)(car yex) (cdr yex))) ;; Add last point. (coord-list (append coords '((1.0 . 0.0)))) (uplist (map pair-to-list (normalize-coords coord-list lenx (* leny 2) dir)))) (ly:stencil-translate (my-c-p-s uplist used-thick) (cons xtrans ytrans))) '()))) % Define a default tie shape consisting of three straight lines. #(define flare-tie (flared-tie '((0.1 . 0.3) (0.9 . 0.3)))) \relative c' { a4~ a \once \override Tie.stencil = #flare-tie a4~ a \break <a c e a c e a c e>~ q \once \override Tie.stencil = #flare-tie q~ q\break <>^\markup \small \typewriter "height-limit = 14" \override Tie.details.height-limit = 14 a'4~ a \once \override Tie.stencil = #flare-tie a4~ a \break <>^\markup \small \typewriter "height-limit = 0.5" \override Tie.details.height-limit = 0.5 a4~ a \once \override Tie.stencil = #flare-tie a4~ a \break \revert Tie.details.height-limit <>^\markup \small \typewriter "\shape #'((0 . 0) (0 . -1) (0 . -1) (0 . 0))" \shape #'((0 . 0) (0 . -1) (0 . -1) (0 . 0)) Tie a4~ a \once \override Tie.stencil = #flare-tie \shape #'((0 . 0) (0 . -1) (0 . -1) (0 . 0)) Tie a4~ a \break <>^\markup \small \typewriter "#(flared-tie '((0.2 . 2) (0.5 . -3) (0.8 . 1))" \once \override Tie.stencil = #(flared-tie '((0.2 . 2) (0.5 . -3) (0.8 . 1))) a4~ a <>_\markup \small \typewriter "#(flared-tie '((0.5 . 2)))" \once \override Tie.stencil = #(flared-tie '((0.5 . 2))) a'4~ a }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 平坦なタイ ] | [ Up: Tweaks and overrides ] | [ 音符の水平位置を強制的に調整する > ] |
Force a cancellation natural before accidentals
The following example shows how to force a natural sign before an accidental.
\relative c' { \key es \major bes c des \tweak Accidental.restore-first ##t eis }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < Force a cancellation natural before accidentals ] | [ Up: Tweaks and overrides ] | [ フレット図とその調整 > ] |
音符の水平位置を強制的に調整する
組版エンジンがうまく対処できない場合、次の構文で音符の水平位置をオーバライドすることができます。単位は譜スペースです。
\relative c' << { <d g>2 <d g> } \\ { <b f'>2 \once \override NoteColumn.force-hshift = 1.7 <b f'>2 } >>
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 音符の水平位置を強制的に調整する ] | [ Up: Tweaks and overrides ] | [ Generate special note head shapes > ] |
フレット図とその調整
このスニペットは、フレット図を表示し、見た目を様々に調整する方法を示しています。
<< \chords { a1 a \bar "||" \break \repeat unfold 3 { c c c d d \bar "||" \break } } \new Voice { % Set global properties of fret diagram \override TextScript.size = 1.2 \override TextScript.fret-diagram-details .finger-code = #'below-string \override TextScript.fret-diagram-details .dot-color = #'black % 1 % % A chord for ukulele. a'1^\markup \override #'(fret-diagram-details . ((string-count . 4) (dot-color . white) (finger-code . in-dot))) \fret-diagram "4-2-2;3-1-1;2-o;1-o;" % 2 % % A chord for ukulele, with formatting defined in definition % string: 1.2 * size, 4 strings, 4 frets, fingerings below, % string dot radius .35 of fret spacing, dot position 0.55 of % fret spacing. a'1^\markup \override #'(fret-diagram-details . ((dot-color . white) (open-string . "o"))) \fret-diagram "s:1.2;w:4;h:3;f:2;d:0.35;p:0.55;4-2-2;3-1-1;2-o;1-o;" %% %% These chords will be in normal orientation %% % 3 % % C major for guitar, barred on third fret: verbose style, % roman fret label, finger labels below string, straight barre. c'1^\markup % 110% of default size \override #'(size . 1.1) \override #'(fret-diagram-details . ((number-type . roman-lower) (finger-code . below-string) (barre-type . straight))) \fret-diagram-verbose #'((mute 6) (place-fret 5 3 1) (place-fret 4 5 2) (place-fret 3 5 3) (place-fret 2 5 4) (place-fret 1 3 1) (barre 5 1 3)) % 4 % % C major for guitar, barred on third fret: double barre used % to test barre function, verbose style. c'1^\markup % 110% of default size \override #'(size . 1.1) \override #'(fret-diagram-details . ((number-type . arabic) (dot-label-font-mag . 0.9) (finger-code . in-dot) (fret-label-font-mag . 0.6) (fret-label-vertical-offset . 0) (label-dir . -1) (mute-string . "M") (xo-font-magnification . 0.4) (xo-padding . 0.3))) \fret-diagram-verbose #'((mute 6) (place-fret 5 3 1) (place-fret 4 5 2) (place-fret 3 5 3) (place-fret 2 5 4) (place-fret 1 3 1) (barre 4 2 5) (barre 5 1 3)) % 5 % % C major for guitar, with capo on third fret: verbose style. c'1^\markup % 110% of default size \override #'(size . 1.1) \override #'(fret-diagram-details . ((number-type . roman-upper) (dot-label-font-mag . 0.9) (finger-code . none) (fret-label-vertical-offset . 0.5) (xo-font-magnification . 0.4) (xo-padding . 0.3))) \fret-diagram-verbose #'((mute 6) (capo 3) (open 5) (place-fret 4 5 1) (place-fret 3 5 2) (place-fret 2 5 3) (open 1)) % 6 % % Simple D chord. d'1^\markup \override #'(fret-diagram-details . ((finger-code . below-string) (dot-radius . 0.35) (string-thickness-factor . 0.3) (dot-position . 0.5) (fret-count . 3))) \fret-diagram-terse "x;x;o;2-1;3-2;2-3;" % 7 % % Simple D chord, large top fret thickness. d'1^\markup \override #'(fret-diagram-details . ((finger-code . below-string) (dot-radius . 0.35) (dot-position . 0.5) (top-fret-thickness . 7) (fret-count . 3))) \fret-diagram-terse "x;x;o;2-1;3-2;2-3;" %% %% These chords will be in landscape orientation %% \override TextScript.fret-diagram-details .orientation = #'landscape % 8 % % C major for guitar, barred on third fret: verbose style, % roman fret label, finger labels below string, straight % barre. c'1^\markup % 110% of default size \override #'(size . 1.1) \override #'(fret-diagram-details . ((number-type . roman-lower) (finger-code . below-string) (barre-type . straight))) \fret-diagram-verbose #'((mute 6) (place-fret 5 3 1) (place-fret 4 5 2) (place-fret 3 5 3) (place-fret 2 5 4) (place-fret 1 3 1) (barre 5 1 3)) % 9 % % C major for guitar, barred on third fret: Double barre % used to test barre function, verbose style. c'1^\markup % 110% of default size \override #'(size . 1.1) \override #'(fret-diagram-details . ((number-type . arabic) (dot-label-font-mag . 0.9) (finger-code . in-dot) (fret-label-font-mag . 0.6) (fret-label-vertical-offset . 0) (label-dir . -1) (mute-string . "M") (xo-font-magnification . 0.4) (xo-padding . 0.3))) \fret-diagram-verbose #'((mute 6) (place-fret 5 3 1) (place-fret 4 5 2) (place-fret 3 5 3) (place-fret 2 5 4) (place-fret 1 3 1) (barre 4 2 5) (barre 5 1 3)) % 10 % % C major for guitar, with capo on third fret: verbose style. c'1^\markup % 110% of default size \override #'(size . 1.1) \override #'(fret-diagram-details . ((number-type . roman-upper) (dot-label-font-mag . 0.9) (finger-code . none) (fret-label-vertical-offset . 0.5) (xo-font-magnification . 0.4) (xo-padding . 0.3))) \fret-diagram-verbose #'((mute 6) (capo 3) (open 5) (place-fret 4 5 1) (place-fret 3 5 2) (place-fret 2 5 3) (open 1)) % 11 % % Simple D chord. d'1^\markup \override #'(fret-diagram-details . ((finger-code . below-string) (dot-radius . 0.35) (dot-position . 0.5) (fret-count . 3))) \fret-diagram-terse "x;x;o;2-1;3-2;2-3;" % 12 % % Simple D chord, large top fret thickness. d'1^\markup \override #'(fret-diagram-details . ((finger-code . below-string) (dot-radius . 0.35) (dot-position . 0.5) (top-fret-thickness . 7) (fret-count . 3))) \fret-diagram-terse "x;x;o;2-1;3-2;2-3;" %% %% These chords will be in opposing-landscape orientation. %% \override TextScript.fret-diagram-details .orientation = #'opposing-landscape % 13 % % C major for guitar, barred on third fret: verbose style, % roman fret label, finger labels below string, straight % barre. c'1^\markup % 110% of default size \override #'(size . 1.1) \override #'(fret-diagram-details . ((number-type . roman-lower) (finger-code . below-string) (barre-type . straight))) \fret-diagram-verbose #'((mute 6) (place-fret 5 3 1) (place-fret 4 5 2) (place-fret 3 5 3) (place-fret 2 5 4) (place-fret 1 3 1) (barre 5 1 3)) % 14 % % C major for guitar, barred on third fret: double barre % used to test barre function, verbose style. c'1^\markup % 110% of default size \override #'(size . 1.1) \override #'(fret-diagram-details . ((number-type . arabic) (dot-label-font-mag . 0.9) (finger-code . in-dot) (fret-label-font-mag . 0.6) (fret-label-vertical-offset . 0) (label-dir . -1) (mute-string . "M") (xo-font-magnification . 0.4) (xo-padding . 0.3))) \fret-diagram-verbose #'((mute 6) (place-fret 5 3 1) (place-fret 4 5 2) (place-fret 3 5 3) (place-fret 2 5 4) (place-fret 1 3 1) (barre 4 2 5) (barre 5 1 3)) % 15 % % C major for guitar, with capo on third fret: verbose style. c'1^\markup % 110% of default size \override #'(size . 1.1) \override #'(fret-diagram-details . ((number-type . roman-upper) (dot-label-font-mag . 0.9) (finger-code . none) (fret-label-vertical-offset . 0.5) (xo-font-magnification . 0.4) (xo-padding . 0.3))) \fret-diagram-verbose #'((mute 6) (capo 3) (open 5) (place-fret 4 5 1) (place-fret 3 5 2) (place-fret 2 5 3) (open 1)) % 16 % % Simple D chord. d'1^\markup \override #'(fret-diagram-details . ((finger-code . below-string) (dot-radius . 0.35) (dot-position . 0.5) (fret-count . 3))) \fret-diagram-terse "x;x;o;2-1;3-2;2-3;" % 17 % % Simple D chord, large top fret thickness. d'1^\markup \override #'(fret-diagram-details . ((finger-code . below-string) (dot-radius . 0.35) (dot-position . 0.5) (top-fret-thickness . 7) (fret-count . 3))) \fret-diagram-terse "x;x;o;2-1;3-2;2-3;" } >> \paper { ragged-right = ##t system-system-spacing.basic-distance = 20 } \layout { \context { \Score \override SpacingSpanner.spacing-increment = 3 } }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < フレット図とその調整 ] | [ Up: Tweaks and overrides ] | [ 符尾をカスタマイズする > ] |
Generate special note head shapes
When a note head with a special shape cannot easily be generated with
graphic markup, a drawing specification for ly:make-stencil can
be used to generate the shape. This example gives an example for a
parallelogram-shaped note head.
Unfortunately, the available commands in a drawing specification are
currently not
documented; in any case, the used path sub-command has the
following signature, quite similar to the make-path-stencil
Scheme function.
(path thickness command-list line-cap-style line-join-style fill)
The commands in command-list resemble PostScript drawing commands but with arguments after the command name.
parallelogram = #(ly:make-stencil '(path 0.1 (rmoveto 0 0.25 lineto 1.2 0.75 lineto 1.2 -0.25 lineto 0 -0.75 lineto 0 0.25) round round #t) (cons -0.05 1.25) (cons -.75 .75)) myNoteHeads = \override NoteHead.stencil = \parallelogram normalNoteHeads = \revert NoteHead.stencil \relative c'' { \myNoteHeads g4 d' \normalNoteHeads <f, \tweak stencil \parallelogram b e>4 d }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < Generate special note head shapes ] | [ Up: Tweaks and overrides ] | [ Grob をスキップするグリッサンド > ] |
符尾をカスタマイズする
Flag Grob の stencil プロパティをカスタム Scheme 関数にセットし、符尾のグリフを生成することができます。
#(define-public (weight-flag grob) (let* ((stem-grob (ly:grob-parent grob X)) (log (- (ly:grob-property stem-grob 'duration-log) 2)) (is-up? (eqv? (ly:grob-property stem-grob 'direction) UP)) (yext (if is-up? (cons (* log -0.8) 0) (cons 0 (* log 0.8)))) (flag-stencil (make-filled-box-stencil '(-0.4 . 0.4) yext)) (stroke-style (ly:grob-property grob 'stroke-style)) (stroke-stencil (if (equal? stroke-style "grace") (make-line-stencil 0.2 -0.9 -0.4 0.9 -0.4) empty-stencil))) (ly:stencil-add flag-stencil stroke-stencil))) % Create a flag stencil by looking up the glyph from the font #(define (inverted-flag grob) (let* ((stem-grob (ly:grob-parent grob X)) (dir (if (eqv? (ly:grob-property stem-grob 'direction) UP) "d" "u")) (flag (retrieve-glyph-flag "" dir "" grob)) (line-thickness (ly:staff-symbol-line-thickness grob)) (stem-thickness (ly:grob-property stem-grob 'thickness)) (stem-width (* line-thickness stem-thickness)) (stroke-style (ly:grob-property grob 'stroke-style)) (stencil (if (null? stroke-style) flag (add-stroke-glyph flag stem-grob dir stroke-style ""))) (rotated-flag (ly:stencil-rotate-absolute stencil 180 0 0))) (ly:stencil-translate rotated-flag (cons (- (/ stem-width 2)) 0)))) snippetexamplenotes = { \autoBeamOff c'8 d'16 c'32 d'64 \acciaccatura {c'8} d'64 } { \time 1/4 <>^"Normal flags" \snippetexamplenotes <>_"Custom flag: inverted" \override Flag.stencil = #inverted-flag \snippetexamplenotes <>^"Custom flag: weight" \override Flag.stencil = #weight-flag \snippetexamplenotes <>_"Revert to normal" \revert Flag.stencil \snippetexamplenotes }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 符尾をカスタマイズする ] | [ Up: Tweaks and overrides ] | [ 異なるライン スタイルのヘアピン > ] |
Grob をスキップするグリッサンド
NoteColumn Grob をグリッサンドが飛び越すように設定することができます。
\relative c' { a2 \glissando \once \override NoteColumn.glissando-skip = ##t f''4 d, }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < Grob をスキップするグリッサンド ] | [ Up: Tweaks and overrides ] | [ Horizontally aligning custom dynamics like “più f” > ] |
異なるライン スタイルのヘアピン
ヘアピンには line-interface のスタイルを用いることができます:
dashed-line, dotted-line, line, trill, zigzag です。
\relative c' { c2\< c\! \override Hairpin.style = #'dashed-line c2\< c\! \override Hairpin.style = #'dotted-line c2\< c\! \override Hairpin.style = #'line c2\< c\! \override Hairpin.style = #'trill c2\< c\! \override Hairpin.style = #'zigzag c2\< c\! \revert Hairpin.style c2\< c\! }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 異なるライン スタイルのヘアピン ] | [ Up: Tweaks and overrides ] | [ フレット図の位置を変更する方法 > ] |
Horizontally aligning custom dynamics like “più f”
Some dynamic expressions involve additional text, like “sempre pp”. Since dynamics are usually centered under the note, the \pp would be displayed way after the note it applies to.
To correctly align the “sempre pp” horizontally so that it is aligned as if it were only the \pp, there are several approaches:
- Simply use
\once\override DynamicText.X-offset = #-9.2before the note with the dynamics to manually shift it to the correct position. Drawback: This has to be done manually each time you use that dynamic markup... - Add some padding (
#:hspace 7.1) into the definition of your custom dynamic mark so that after LilyPond center-aligns it, it is already correctly aligned. Drawback: The padding really takes up that space and does not allow any other markup or dynamics to be shown in that position. - Shift the dynamic script
\once\override ... .X-offset = .... Drawback:\once\overrideis needed for every invocation! - Set the dimensions of the additional text to 0 (using
#:with-dimensions '(0 . 0) '(0 . 0)). Drawback: For LilyPond, “sempre” has no extent now. This means it might put other stuff there, causing collisions (which are not detected by LilyPond’s collision detection algorithm!). There also seems to be some spacing, so it is not exactly the same alignment as without the additional text. - Add an explicit shift directly inside the scheme function for the dynamic script.
- Set an explicit alignment inside the dynamic script. By default, this
won’t have any effect, only if one sets
X-offset! Drawback: One needs to setDynamicText.X-offset, which will apply to all dynamic texts! Also, it is aligned at the right edge of the additional text, not at the center of \pp.
\paper { ragged-right = ##f indent = 5\cm } % Solution 1: Using a simple markup with a particular halign value % Drawback: It's a markup, not a dynamic command, so \dynamicDown % etc. will have no effect semppMarkup = \markup { \halign #1.4 \italic "sempre" \dynamic "pp" } % Solution 2: Using a dynamic script & shifting with % \once \override ...X-offset = .. % Drawback: \once \override needed for every invocation semppK = #(make-dynamic-script (markup #:line (#:normal-text #:italic "sempre" #:dynamic "pp"))) % Solution 3: Padding the dynamic script so the center-alignment % puts it at the correct position % Drawback: the padding really reserves the space, nothing else can be there semppT = #(make-dynamic-script (markup #:line (#:normal-text #:italic "sempre" #:dynamic "pp" #:hspace 7.1))) % Solution 4: Dynamic, setting the dimensions of the additional text to 0 % Drawback: To lilypond "sempre" has no extent, so it might put % other stuff there => collisions % Drawback: Also, there seems to be some spacing, so it's not exactly the % same alignment as without the additional text semppM = #(make-dynamic-script (markup #:line (#:with-dimensions '(0 . 0) '(0 . 0) #:right-align #:normal-text #:italic "sempre" #:dynamic "pp"))) % Solution 5: Dynamic with explicit shifting inside the scheme function semppG = #(make-dynamic-script (markup #:hspace 0 #:translate '(-18.85 . 0) #:line (#:normal-text #:italic "sempre" #:dynamic "pp"))) % Solution 6: Dynamic with explicit alignment. This has only effect % if one sets X-offset! % Drawback: One needs to set DynamicText.X-offset! % Drawback: Aligned at the right edge of the additional text, % not at the center of pp semppMII = #(make-dynamic-script (markup #:line (#:right-align #:normal-text #:italic "sempre" #:dynamic "pp"))) \new StaffGroup << \new Staff \with { instrumentName = "standard" } \relative c'' { \key es \major c4\pp c\p c c | c\ff c c\pp c } \new Staff \with {instrumentName = "normal markup" } \relative c'' { \key es \major c4-\semppMarkup c\p c c | c\ff c c-\semppMarkup c } \new Staff \with { instrumentName = "explicit shifting" } \relative c'' { \key es \major \once \override DynamicText.X-offset = #-9.2 c4\semppK c\p c c c4\ff c \once \override DynamicText.X-offset = #-9.2 c4\semppK c } \new Staff \with { instrumentName = "right padding" } \relative c'' { \key es \major c4\semppT c\p c c | c\ff c c\semppT c } \new Staff \with { instrumentName = "set dimension to zero" } \relative c'' { \key es \major c4\semppM c\p c c | c\ff c c\semppM c } \new Staff \with { instrumentName = "shift inside dynamics" } \relative c'' { \key es \major c4\semppG c\p c c | c\ff c c\semppG c } \new Staff \with { instrumentName = "alignment inside dynamics" } \relative c'' { \key es \major \override DynamicText.X-offset = #-1 c4\semppMII c\p c c | c\ff c c\semppMII c } >> \layout { \override Staff.InstrumentName.self-alignment-X = #LEFT }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < Horizontally aligning custom dynamics like “più f” ] | [ Up: Tweaks and overrides ] | [ カエスーラを挿入する > ] |
フレット図の位置を変更する方法
衝突を避けたり、2 つの音符の間に配置したいなどの目的で、フレット図の位置を移動したい場合は、いくつかの方法があります:
1) padding または extra-offset の値を変更する (最初のスニペットに表示)。
2) 不可視のボイスを追加し、その音符にフレット図を付加する (2 つ目の例)。
フレット図をある拍の位置に (例では、小節内 3 拍目) 移動したい場合には、音符が拍に揃えられる 2 つ目の方法がより適しています。
harmonies = \chordmode { a8:13 \once \override ChordNames.ChordName.extra-offset = #'(10 . 0) b8:13 s4. | s2 b2:13 } \score { << \new ChordNames \harmonies \new Staff { % Method 1. a8^\markup \fret-diagram "6-x;5-0;4-2;3-0;2-0;1-2;" \once \override TextScript.extra-offset = #'(10 . 0) b4.~^\markup \fret-diagram "6-x;5-2;4-4;3-2;2-2;1-4;" b4. a8 | \break % Method 2. << { a8 b4.~ b4. a8 } { s2 s2^\markup \fret-diagram "6-x;5-2;4-4;3-2;2-2;1-4;" } >> | } >> }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < フレット図の位置を変更する方法 ] | [ Up: Tweaks and overrides ] | [ 音部記号の変更を大きく表示する > ] |
カエスーラを挿入する
カエスーラ記号は BreathingSign オブジェクトの text プロパティをオーバライドすることで作成することができます。曲がったカエスーラ記号も使用することができます。
\relative c'' { \override BreathingSign.text = \markup { \musicglyph "scripts.caesura.straight" } c8 e4. \breathe g8. e16 c4 \override BreathingSign.text = \markup { \musicglyph "scripts.caesura.curved" } g8 e'4. \breathe g8. e16 c4 }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < カエスーラを挿入する ] | [ Up: Tweaks and overrides ] | [ 矢印 > ] |
音部記号の変更を大きく表示する
音部記号が変更される際、その音部記号は行頭のものよりも小さく表示されます。これは full-size-change で変更することができます。
\relative c' { \clef "treble" c1 \clef "bass" c1 \clef "treble" c1 \override Staff.Clef.full-size-change = ##t \clef "bass" c1 \clef "treble" c1 \revert Staff.Clef.full-size-change \clef "bass" c1 \clef "treble" c1 }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 音部記号の変更を大きく表示する ] | [ Up: Tweaks and overrides ] | [ Making an object invisible using the ‘transparent’ property > ] |
矢印
text-spanner, line-spanner (例えば Glissando) に対して矢印を用いることができます。
\relative c'' { \override TextSpanner.bound-padding = #1.0 \override TextSpanner.style = #'line \override TextSpanner.bound-details.right.arrow = ##t \override TextSpanner.bound-details.left.text = #"fof" \override TextSpanner.bound-details.right.text = #"gag" \override TextSpanner.bound-details.right.padding = #0.6 \override TextSpanner.bound-details.right.stencil-align-dir-y = #CENTER \override TextSpanner.bound-details.left.stencil-align-dir-y = #CENTER \override Glissando.bound-details.right.arrow = ##t \override Glissando.arrow-length = #0.5 \override Glissando.arrow-width = #0.25 a8\startTextSpan gis a4 b\glissando b, g'4 c\stopTextSpan c2 }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 矢印 ] | [ Up: Tweaks and overrides ] | [ グリッサンドを改行できるようにする > ] |
Making an object invisible using the ‘transparent’ property
Setting the transparent property will cause an object to be
printed in “invisible ink”: the object is not printed, but all its
other behavior is retained. The object still takes up space, it takes
part in collisions, and slurs, ties and beams can be attached to it.
This snippet demonstrates how to connect different voices using ties. Normally, ties only connect two notes in the same voice. By introducing a tie in a different voice, and blanking the first up-stem in that voice, the tie appears to cross voices.
\relative { \time 2/4 << { \once \hide Stem \once \override Stem.length = #8 b'8 ~ 8\noBeam \once \hide Stem \once \override Stem.length = #8 g8 ~ 8\noBeam } \\ { b8 g g e } >> } \paper { line-width = 40\mm ragged-right = ##f }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < Making an object invisible using the ‘transparent’ property ] | [ Up: Tweaks and overrides ] | [ 連桁の位置を手動でコントロールする > ] |
グリッサンドを改行できるようにする
after-line-breaking と共に breakable プロパティを #t
にすることで、グリッサンドの途中で改行することができます。
glissandoSkipOn = { \override NoteColumn.glissando-skip = ##t \hide NoteHead \override NoteHead.no-ledgers = ##t } music = { \repeat unfold 16 f8 | f1\glissando | a4 r2. | \repeat unfold 16 f8 | f1\glissando \once\glissandoSkipOn | a2 a4 r4 | \repeat unfold 16 f8 } \relative c'' { <>^\markup { \typewriter Glissando.breakable set to \typewriter "#t" } \override Glissando.breakable = ##t \override Glissando.after-line-breaking = ##t \music } \relative c'' { <>^\markup { \typewriter Glissando.breakable not set } \music } \paper { line-width = 100\mm }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < グリッサンドを改行できるようにする ] | [ Up: Tweaks and overrides ] | [ Measure-centered bar numbers > ] |
連桁の位置を手動でコントロールする
連桁の位置は、Beam Grob の positions をオーバライドすることで手動でコントロールすることができます。
\relative c' { \time 2/4 % from upper staff-line (position 2) to center (position 0) \override Beam.positions = #'(2 . 0) c8 c % from center to one above center (position 1) \override Beam.positions = #'(0 . 1) c8 c }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 連桁の位置を手動でコントロールする ] | [ Up: Tweaks and overrides ] | [ Mensurstriche レイアウト (譜の間に小節線を表示する) > ] |
Measure-centered bar numbers
For film scores, a common convention is to center bar numbers within
their measure. This is achieved through setting the
centerBarNumbers context property to #t. When this is
used, the type of the bar number grobs is CenteredBarNumber
rather than BarNumber.
This example demonstrates a number of settings: the centered bar numbers are boxed and placed below the staves.
\layout { \context { \Score centerBarNumbers = ##t barNumberVisibility = #all-bar-numbers-visible \override CenteredBarNumber.stencil = #(make-stencil-boxer 0.1 0.25 ly:text-interface::print) \override CenteredBarNumberLineSpanner.direction = #DOWN } } \new StaffGroup << \new Staff \relative c' { d4-. f8( e d4) bes'-> | d,-. f8( e d4) cis'-> | g-. f8( d e4) g-> | a,1-> | } \new Staff \relative c { \clef bass d4 f8 e d2~ | 4 f8 e d2~ | 4 4 2 | a1 | } >>
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < Measure-centered bar numbers ] | [ Up: Tweaks and overrides ] | [ オッターヴァのスパナの傾きを変更する > ] |
Mensurstriche レイアウト (譜の間に小節線を表示する)
Mensurstriche (計量音楽風の) レイアウトでは、小節線を譜の中には表示せず、譜と譜の間に表示します。これは、ChoirStaff の代わりに StaffGroup
を用いることで実現できます。譜の中にある小節線は \hide で非表示にします。
\layout { \context { \Staff measureBarType = "-span|" } } music = \fixed c'' { c1 d2 \section e2 f1 \fine } \new StaffGroup << \new Staff \music \new Staff \music >>
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < Mensurstriche レイアウト (譜の間に小節線を表示する) ] | [ Up: Tweaks and overrides ] | [ 多声の音楽で付点付きの音符を移動する > ] |
オッターヴァのスパナの傾きを変更する
オッターヴァのスパナの傾きを変更することができます。
\relative c'' { \override Staff.OttavaBracket.stencil = #ly:line-spanner::print \override Staff.OttavaBracket.bound-details = #`((left . ((Y . 0) (attach-dir . ,LEFT) (padding . 0) (stencil-align-dir-y . ,CENTER))) (right . ((Y . 5.0) ; Change the number here (padding . 0) (attach-dir . ,RIGHT) (text . ,(make-draw-dashed-line-markup (cons 0 -1.2)))))) \override Staff.OttavaBracket.left-bound-info = #ly:horizontal-line-spanner::calc-left-bound-info-and-text \override Staff.OttavaBracket.right-bound-info = #ly:horizontal-line-spanner::calc-right-bound-info \ottava 1 c1 c'''1 }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < オッターヴァのスパナの傾きを変更する ] | [ Up: Tweaks and overrides ] | [ スラーの縦方向の位置を移動する > ] |
多声の音楽で付点付きの音符を移動する
上のボイスにある付点付きの音符が、下の音符との衝突を避けるために移動する場合、デフォルトでは右側に移動します。この挙動は、NoteCollision の
prefer-dotted-right プロパティをオーバライドすることで変更できます。
\new Staff \relative c' << { f2. f4 \override Staff.NoteCollision.prefer-dotted-right = ##f f2. f4 \override Staff.NoteCollision.prefer-dotted-right = ##t f2. f4 } \\ { e4 e e e e e e e e e e e } >>
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 多声の音楽で付点付きの音符を移動する ] | [ Up: Tweaks and overrides ] | [ 譜をネストする > ] |
スラーの縦方向の位置を移動する
スラーの縦方向の位置は Slur の positions プロパティによって調整することができます。このプロパティは 2 つのパラメータを取り、1 つ目はスラーの左端、2 つ目はスラーの右端です。このパラメータの値は、スラーの正確な位置を決定するために用いられるわけではありません – LilyPond ではどのようなスラーが見た目として最善かを、このパラメータを基にして決定します。正の値はスラーを上方向に移動するため、符幹が下向きの音符に対して有効です。負の値はスラーを下方向に移動します。
\relative c' { \stemDown e4( a) \override Slur.positions = #'(1 . 1) e4( a) \override Slur.positions = #'(2 . 2) e4( a) \override Slur.positions = #'(3 . 3) e4( a) \override Slur.positions = #'(4 . 4) e4( a) \override Slur.positions = #'(5 . 5) e4( a) \override Slur.positions = #'(0 . 5) e4( a) \override Slur.positions = #'(5 . 0) e4( a) \stemUp \override Slur.positions = #'(-5 . -5) e4( a) \stemDown \revert Slur.positions e4( a) }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < スラーの縦方向の位置を移動する ] | [ Up: Tweaks and overrides ] | [ Overriding articulations by type > ] |
譜をネストする
systemStartDelimiterHierarchy は、より複雑な譜のグループ化を行うために用いることができます。\set StaffGroup.systemStartDelimiterHierarchy コマンドの引数として基となるのは、譜の数だけあるアルファベットのリストです。それぞれの譜の前に SystemStartDelimiter を追加することで、グループ化の始まりを示します。その際、グループとなる譜の範囲を括弧で囲む必要があります。リスト中の要素は省略することができますが、最上位のグループは必ず全ての譜を含みます。SystemStartDelimiter は SystemStartBar,
SystemStartBracket, SystemStartBrace,
SystemStartSquare のいずれかです。
\new StaffGroup \relative c'' << \override StaffGroup.SystemStartSquare.collapse-height = 4 \set StaffGroup.systemStartDelimiterHierarchy = #'(SystemStartSquare (SystemStartBrace (SystemStartBracket a (SystemStartSquare b)) c) d) \new Staff { c1 } \new Staff { c1 } \new Staff { c1 } \new Staff { c1 } \new Staff { c1 } >>
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 譜をネストする ] | [ Up: Tweaks and overrides ] | [ パーセント繰り返しのカウンタの可視性 > ] |
Overriding articulations by type
Sometimes you may want to affect a single articulation type. Although
it is always possible to use \tweak, it might become tedious to
do so for every single sign of a whole score. The following shows how
to tweak articulations with a list of custom settings. One use-case
might be to create a style sheet.
#(define (custom-script-tweaks ls) (lambda (grob) (let* ((type (ly:event-property (ly:grob-property grob 'cause) 'articulation-type)) (tweaks (assoc-ref ls type))) (when tweaks (for-each (lambda (x) (ly:grob-set-property! grob (car x) (cdr x))) tweaks))))) customScripts = #(define-music-function (settings) (list?) #{ \override Script.before-line-breaking = #(custom-script-tweaks settings) #}) revertCustomScripts = \revert Script.before-line-breaking % Example % Predefine two sets of desired tweaks. #(define my-settings-1 '( (accent . ((font-size . 0) (color . (1 0 0)))) (segno . ((font-size . 0) (color . (1 0 0)))) (staccato . ((color . (1 0 0)) (padding . 0.5))) (staccatissimo . ((padding . 1) (color . (1 0 0)))) (tenuto . ((color . (1 0 0)) (rotation . (45 0 0)) (padding . 2) (font-size . 10))) )) #(define my-settings-2 '( (accent . ((font-size . 4) (color . (0 1 0)) (padding . 1.5))) (coda . ((color . (0 1 0)) (padding . 1))) (staccato . ((color . (0 1 0)))) (staccatissimo . ((padding . 2) (color . (0 1 0)))) (tenuto . ((color . (0 1 0)) (font-size . 10))) )) music = { f1-> | f\segno | f-. | f-! | f-- | f--\coda | f-!\fermata | } block = { \music \break \revertCustomScripts \music } \new Staff << \new Voice \with { \customScripts #my-settings-1 } \relative c''{ \voiceOne \block } \new Voice \with { \customScripts #my-settings-2 } \relative c' { \voiceTwo \block } >>
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < Overriding articulations by type ] | [ Up: Tweaks and overrides ] | [ アルペジオの配置 > ] |
パーセント繰り返しのカウンタの可視性
パーセント繰り返しのカウンタは 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 } }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < パーセント繰り返しのカウンタの可視性 ] | [ Up: Tweaks and overrides ] | [ 運指記号の位置を正確にコントロールする > ] |
アルペジオの配置
アルペジオの長さを変更したい場合、上端と下端の位置を独立に変更することができます。
\relative c' { <c e g b>1\arpeggio \once \override Arpeggio.positions = #'(-5 . 0) <c e g b>1\arpeggio \once \override Arpeggio.positions = #'(0 . 5) <c e g b>1\arpeggio \once \override Arpeggio.positions = #'(-5 . 5) <c e g b>1\arpeggio }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < アルペジオの配置 ] | [ Up: Tweaks and overrides ] | [ 複数小節にまたがる休符の位置を変更する > ] |
運指記号の位置を正確にコントロールする
和音内の運指の配置に関するオプションは、デフォルトで良く動作しますが、ある記号の位置を正確にコントロールしたい場合には、以下の調整を用いることができます。これは 2 度音程の和音がある場合の配置に対しては特に有用です。
\markup \with-true-dimensions % work around a cropping issue \score { \relative c' { \set fingeringOrientations = #'(left) <c-1 d-2 a'-5>4 <c-1 d-\tweak extra-offset #'(0 . 0.2)-2 a'-5> \set fingeringOrientations = #'(down) <c-1 d-2 a'-5> <c-\tweak extra-offset #'(0 . -1.1)-1 d-\tweak extra-offset #'(-1.2 . -1.8)-2 a'-5> | \set fingeringOrientations = #'(down right up) <c-1 d-\tweak extra-offset #'(-0.3 . 0)-2 a'-5>4 <c-1 d-\tweak extra-offset #'(-1 . 1.2)-2 a'-5> \set fingeringOrientations = #'(up) <c-1 d-\tweak extra-offset #'(0 . 1.1)-2 a'-\tweak extra-offset #'(0 . 1)-5> <c-1 d-\tweak extra-offset #'(-1.2 . 1.5)-2 a'-\tweak extra-offset #'(0 . 1.4)-5> | } }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 運指記号の位置を正確にコントロールする ] | [ Up: Tweaks and overrides ] | [ テキスト マークアップをスラーの内側に配置する > ] |
複数小節にまたがる休符の位置を変更する
通常の休符と異なり、音符に付加することによって複数小節にまたがる休符の位置を変更するコマンドは用意されていません。しかし、多声の音楽では、奇数番号のボイスと偶数番号のボイスで休符の位置が分けられます。複数小節にまたがる休符の位置は以下のようにコントロールできます:
\relative c'' { % Multi-measure rests by default are set under the fourth line. R1 % They can be moved using an override. \override MultiMeasureRest.staff-position = -2 R1 \override MultiMeasureRest.staff-position = 0 R1 \override MultiMeasureRest.staff-position = 2 R1 \override MultiMeasureRest.staff-position = 3 R1 \override MultiMeasureRest.staff-position = 6 R1 \revert MultiMeasureRest.staff-position \break % In two Voices, odd-numbered voices are under the top line. << { R1 } \\ { a1 } >> % Even-numbered voices are under the bottom line. << { a1 } \\ { R1 } >> % Multi-measure rests in both voices remain separate. << { R1 } \\ { R1 } >> % Separating multi-measure rests in more than two voices % requires an override. << { R1 } \\ { R1 } \\ \once \override MultiMeasureRest.staff-position = 0 { R1 } >> % Using compressed bars in multiple voices requires another override % in all voices to avoid multiple instances being printed. \compressMMRests << \revert MultiMeasureRest.direction { R1*3 } \\ \revert MultiMeasureRest.direction { R1*3 } >> }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 複数小節にまたがる休符の位置を変更する ] | [ Up: Tweaks and overrides ] | [ 小節番号を四角や丸の中に表示する > ] |
テキスト マークアップをスラーの内側に配置する
テキスト マークアップをスラーの内側に配置するには、outside-staff-priority
プロパティを #f に設定する必要があります。
\relative c'' { \override TextScript.avoid-slur = #'inside \override TextScript.outside-staff-priority = ##f c2(^\markup { \halign #-10 \natural } d4.) c8 }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < テキスト マークアップをスラーの内側に配置する ] | [ Up: Tweaks and overrides ] | [ メトロノーム記号やリハーサル記号を譜の下に表示する > ] |
小節番号を四角や丸の中に表示する
小節番号は四角や丸の中に表示することができます。
\relative c' { % Center bar numbers except at the beginning of a staff. \override Score.BarNumber.self-alignment-X = #(break-alignment-list CENTER CENTER 0.3) % Prevent bar numbers at the end of a line and permit them elsewhere. \override Score.BarNumber.break-visibility = #end-of-line-invisible \set Score.barNumberVisibility = #(every-nth-bar-number-visible 4) % Increase the size of the bar number by 2. \override Score.BarNumber.font-size = 2 % Draw a circle round the following bar number(s). \override Score.BarNumber.stencil = #(make-stencil-circler 0.1 0.25 ly:text-interface::print) \repeat unfold 7 { c1 } \break % Draw a box round the following bar number(s). \override Score.BarNumber.stencil = #(make-stencil-boxer 0.1 0.25 ly:text-interface::print) \repeat unfold 7 { c1 } \bar "|." }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 小節番号を四角や丸の中に表示する ] | [ Up: Tweaks and overrides ] | [ 音名を表示し、オクターブの表示を制御する > ] |
メトロノーム記号やリハーサル記号を譜の下に表示する
デフォルトでは、メトロノーム記号やリハーサル記号は譜の上に表示されます。これらを譜の下に表示するには、MetronomeMark や RehearsalMark
の direction プロパティを正しくセットします。
\layout { ragged-right = ##f } { % Metronome marks below the staff \override Score.MetronomeMark.direction = #DOWN \tempo 8. = 120 c''1 % Rehearsal marks below the staff \override Score.RehearsalMark.direction = #DOWN \mark \default c''1 }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < メトロノーム記号やリハーサル記号を譜の下に表示する ] | [ Up: Tweaks and overrides ] | [ Printing tuplet brackets on the note head side > ] |
音名を表示し、オクターブの表示を制御する
音符の音名を表示するために、NoteNames コンテキストを用いることができます。printOctaveNames プロパティは音符のオクターブを表示するか否かを設定します。
scale = \relative c' { a4 b c d e4 f g a } \new Staff { << \scale \context NoteNames { \set printOctaveNames = ##f \scale } >> R1 << \scale \context NoteNames { \set printOctaveNames = ##t \scale } >> }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 音名を表示し、オクターブの表示を制御する ] | [ Up: Tweaks and overrides ] | [ プロポーショナル ノーテーションで厳格モードを使用する > ] |
Printing tuplet brackets on the note head side
Whichever option you choose for controlling the tuplet bracket
visibility, it will show or hide the tuplet bracket irrespectively of
tuplet bracket placement (stem side or note head side). However, when
placing the tuplet bracket on the note head side some authors recommend
always printing the tuplet bracket. The option
visible-over-note-heads can be used to achieve this.
music = \relative c'' { \tupletNeutral \tuplet 3/2 { c16[ d e } f8] \tupletUp \tuplet 3/2 { c8 d e } } \new Voice { \relative c' { \override TextScript.staff-padding = #2.5 \time 2/4 \override TupletBracket.visible-over-note-heads = ##t \override Score.TextMark.non-musical = ##f <>^\markup "default" \music \override TupletBracket.bracket-visibility = #'if-no-beam <>^\markup \typewriter "if-no-beam" \music } }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < Printing tuplet brackets on the note head side ] | [ Up: Tweaks and overrides ] | [ ピアノ曲の先頭にあるブレースを削除する > ] |
プロポーショナル ノーテーションで厳格モードを使用する
strict-note-spacing がセットされている場合、音符のスペーシングはシステム内にある小節線や音部記号に影響されません。これらは対応する音符の直前に配置されます。これらが衝突を引き起こす場合があります。
\relative c'' << \override Score.SpacingSpanner.strict-note-spacing = ##t \set Score.proportionalNotationDuration = #1/16 \new Staff { c8[ c \clef alto c c \grace { d16 } c8 c] c4 c2 \grace { c16[ c16] } c2 } \new Staff { c2 \tuplet 3/2 { c8 \clef bass cis,, c } c4 c1 } >>
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < プロポーショナル ノーテーションで厳格モードを使用する ] | [ Up: Tweaks and overrides ] | [ StaffGroup, PianoStaff, GrandStaff の譜を繋ぐ小節線を削除する > ] |
ピアノ曲の先頭にあるブレースを削除する
このスニペットは、PianoStaff や GrandStaff から先頭にあるブレース (波括弧) を削除しています。これは譜刻された既存の音楽の一部を切り取って見せる場合に有用です。
これは \alterBroken を使用しています。
someMusic = { \once \omit Staff.Clef \once \omit Staff.TimeSignature \repeat unfold 3 c1 \break \repeat unfold 5 c1 \break \repeat unfold 5 c1 } \score { \new PianoStaff << \new Staff = "right" \relative c'' \someMusic \new Staff = "left" \relative c' { \clef F \someMusic } >> \layout { indent=75\mm \context { \PianoStaff \alterBroken transparent #'(#t) SystemStartBrace } } }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < ピアノ曲の先頭にあるブレースを削除する ] | [ Up: Tweaks and overrides ] | [ 先頭の空行を削除する > ] |
StaffGroup, PianoStaff, GrandStaff の譜を繋ぐ小節線を削除する
デフォルトでは、StaffGroup, PianoStaff, GrandStaff 内の譜の小節線は繋がります。この挙動は譜ごとにオーバライドできます。
\relative c' { \new StaffGroup << \new Staff { e1 | e \once \override Staff.BarLine.allow-span-bar = ##f e1 | e | e } \new Staff { c1 | c | c \once \override Staff.BarLine.allow-span-bar = ##f c1 | c } \new Staff { a1 | a | a | a | a } >> }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < StaffGroup, PianoStaff, GrandStaff の譜を繋ぐ小節線を削除する ] | [ Up: Tweaks and overrides ] | [ 休符のスタイル > ] |
先頭の空行を削除する
VerticalAxisGroup の remove-first プロパティをセットすることで、楽譜の先頭にある空の譜を削除することができます。これはグローバルの
\layout ブロックでも行うことができますし、特定の譜を削除したい場合には譜の内部で使用することもできます。後者の場合には、プロパティ名の前にコンテキストを指定する必要があります
(Staff は現在の譜にしか影響しません)。
2 つ目のグループの下側の譜は削除されていません。設定が記述されている譜にのみ適用されるからです。
\layout { \context { \Staff \RemoveEmptyStaves % To use the setting globally, uncomment the following line: % \override VerticalAxisGroup.remove-first = ##t } } \new StaffGroup << \new Staff \relative c' { e4 f g a \break c1 } \new Staff { % To use the setting globally, comment this line, % uncomment the line in the \layout block above \override Staff.VerticalAxisGroup.remove-first = ##t R1 \break R } >> \new StaffGroup << \new Staff \relative c' { e4 f g a \break c1 } \new Staff { R1 \break R } >>
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 先頭の空行を削除する ] | [ Up: Tweaks and overrides ] | [ リズム スラッシュ > ] |
休符のスタイル
休符には様々なスタイルが使用できます。
restsA = { r\maxima r\longa r\breve r1 r2 r4 r8 r16 s32 s64 s128 s256 s512 s1024 s1024 } restsB = { r\maxima r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r256 r512 r1024 s1024 } \new Staff \relative c { \omit Score.TimeSignature \cadenzaOn \override Staff.Rest.style = #'mensural <>^\markup \typewriter { mensural } \restsA \bar "" \break \override Staff.Rest.style = #'neomensural <>^\markup \typewriter { neomensural } \restsA \bar "" \break \override Staff.Rest.style = #'classical <>^\markup \typewriter { classical } \restsB \bar "" \break \override Staff.Rest.style = #'z <>^\markup \typewriter { z-style } \restsB \bar "" \break \override Staff.Rest.style = #'default <>^\markup \typewriter { default } \restsB \bar "" \break }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 休符のスタイル ] | [ Up: Tweaks and overrides ] | [ 調号の取り消し表示を新たな調号から離す > ] |
リズム スラッシュ
“シンプルな” リード シートでは、実際の音符を書かずに、代わりに“リズム パターン” とコード ネームのみを書き、曲の構造を示すことがあります。これは、曲の構造だけを作成あるいは転写する際や、リード シートをギタリストやジャズ
ミュージシャンに共有する際などに有用です。これを実現するために \repeat percent を用いるのは不適切です。\repeat percent では、最初の音符や休符として何かを指定しなければならないからです。次の例では 2 つの解決法を示しています。どちらも通常の休符をスラッシュとして表示するものです。(拍の長さを 4 分音符から変えたい場合は、定義中にある
r4 を適切に変更してください。)
startPat = { \improvisationOn \omit Stem } stopPat = { \improvisationOff \undo \omit Stem } \new Voice \with { \consists Pitch_squash_engraver } { c'4 d' e' f' | \startPat 4 4 4 4 | \stopPat f'4 e' d' c' }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < リズム スラッシュ ] | [ Up: Tweaks and overrides ] | [ 小節線にぶつかるヘアピンの挙動を設定する > ] |
調号の取り消し表示を新たな調号から離す
デフォルトでは、調号が変更される際のナチュラルによる取り消し表示は、新たな調号のすぐ隣に配置されます。この挙動は、BreakAlignment Grob の
break-align-orders プロパティをオーバライドすることで変更できます。
break-align-orders は長さ 3 のベクトルで、それぞれが改行可能なアイテムを要素とした quote リストを取ります。この例では
2 つ目のリストのみを変更しており、key-cancellation を staff-bar
の前に移動しています。2 番目の要素はシステムの途中における配置に影響し、行頭あるいは行末には影響しません。
#(define (insert-before where what lst) (cond ((null? lst) ; If the list is empty, (list what)) ; return a single-element list. ((eq? where (car lst)) ; If we find symbol `where`, (cons what lst)) ; insert `what` before curr. position. (else ; Otherwise keep building the list by (cons (car lst) ; adding the current element and ; recursing with the next element. (insert-before where what (cdr lst)))))) cancellationFirst = \override Score.BreakAlignment.break-align-orders = #(grob-transformer 'break-align-orders (lambda (grob orig) (let* ((middle (vector-ref orig 1)) (middle (delq 'key-cancellation middle)) (middle (insert-before 'staff-bar 'key-cancellation middle))) (vector ;; end of line (vector-ref orig 0) ;; middle of line middle ;; beginning of line (vector-ref orig 2))))) music = { \key es \major d'1 \bar "||" \key a \major d'1 } { <>^\markup "default" \music } { <>^\markup "cancellation first" \cancellationFirst \music }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 調号の取り消し表示を新たな調号から離す ] | [ Up: Tweaks and overrides ] | [ システム セパレータを設定する > ] |
小節線にぶつかるヘアピンの挙動を設定する
ヘアピンの終端となる音符が強拍にある場合、ヘアピンはその前にある小節線の直前が終端となります。この挙動は to-barline プロパティをオーバライドすることで調整できます。
\relative c'' { e4\< e2. e1\! \override Hairpin.to-barline = ##f e4\< e2. e1\! }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 小節線にぶつかるヘアピンの挙動を設定する ] | [ Up: Tweaks and overrides ] | [ Shape individual ties in chords > ] |
システム セパレータを設定する
システムとシステムの間にシステム セパレータを挿入することができます。任意のマークアップが使用できますが、デフォルト値は \slashSeparator
となっています。
#(set-default-paper-size "a5") \paper { system-separator-markup = \slashSeparator tagline = ##f } notes = \relative c' { c1 | c \break c1 | c \break c1 | c } \book { \score { \new GrandStaff << \new Staff \notes \new Staff \notes >> } }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < システム セパレータを設定する ] | [ Up: Tweaks and overrides ] | [ 同じアーティキュレーションを音符や和音の上と下の両方に表示する > ] |
Shape individual ties in chords
To shape individual ties in chords use the method demonstrated below.
{ \textMark "Chords can be tied note by note." <c'~ e'~ g'~ c''~>2 q } { \textMark \markup \override #'(baseline-skip . 3) \wordwrap { Modifying those ties with \typewriter "\\shape" does not succeed, because \typewriter TieColumn positions them on its own behalf, ignoring \typewriter "\\shape" input more or less. You may circumvent this by setting \typewriter positioning-done to \typewriter "#t" – alas, \typewriter positioning-done is an internal property, and setting it to \typewriter "#t" means: all positioning is done, don’t do anything further. The next example demonstrates a case where the positioning is not finished: all tie directions are down, and the thickness is not accurate. } <c'~ e'~ g'~ c''~>2 \once \override TieColumn.positioning-done = ##t q } { \textMark "To fix that, enter ties with explicit direction modifiers." <c'_~ e'_~ g'_~ c''^~>2 \once \override TieColumn.positioning-done = ##t q } { \textMark \markup { Now you can use \typewriter "\\shape" for each tie as usual. } <c'-\shape #'((0 . 0) (0 . -10) (0 . -10) (0 . 0)) _~ e'-\shape #'((0 . 0) (0 . -5) (0 . -5) (0 . 0)) _~ g'-\shape #'((0 . 0) (0 . -2) (0 . -2) (0 . 0)) _~ c''-\shape #'((0 . 0) (0 . 5) (0 . 5) (0 . 0)) ^~ >2 \once \override TieColumn.positioning-done = ##t q } { \textMark "This also works at line breaks." <c'-\shape #'(((0 . 0) (0 . -10) (0 . -10) (0 . 0)) ((0 . 0) (0 . -10) (0 . -10) (0 . 0))) _~ e'-\shape #'(((0 . 0) (0 . -5) (0 . -5) (0 . 0)) ((0 . 0) (0 . -5) (0 . -5) (0 . 0))) _~ g'-\shape #'(((0 . 0) (0 . -2) (0 . -2) (0 . 0)) ((0 . 0) (0 . -2) (0 . -2) (0 . 0))) _~ c''-\shape #'(((0 . 0) (0 . 5) (0 . 5) (0 . 0)) ((0 . 0) (0 . 5) (0 . 5) (0 . 0))) ^~ >2 \break \once \override TieColumn.positioning-done = ##t q } { \textMark \markup { It also works with the \typewriter tieWaitForNote property. } \set tieWaitForNote = ##t c'4-\shape #'((0 . 0) (0 . -10) (0 . -10) (0 . 0)) _~ e'-\shape #'((0 . 0) (0 . -5) (0 . -5) (0 . 0)) _~ g'-\shape #'((0 . 0) (0 . -2) (0 . -2) (0 . 0)) _~ c''-\shape #'((0 . 0) (0 . 5) (0 . 5) (0 . 0)) ^~ \once \override TieColumn.positioning-done = ##t <c' e' g' c''>1 } \layout { indent = 0 \context { \Score \override TextMark.padding = #4 \override TextMark.break-align-symbols = #'(left-edge) } } \paper { score-system-spacing.padding = 3 }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < Shape individual ties in chords ] | [ Up: Tweaks and overrides ] | [ 弦番号の延長線 > ] |
同じアーティキュレーションを音符や和音の上と下の両方に表示する
デフォルトでは、LilyPond は同じアーティキュレーション
(例えばアクセント、フェルマータ、フラジョレットなど) を音符の上と下に表示することを認めていません。例えば、c4_\fermata^\fermata では、フェルマータが音符の下のみに表示され、上に表示するよう指定したフェルマータは無視されます。しかし、和音表記を用いてその内部にアーティキュレーションを配置すると、(運指記号と同じように)
アーティキュレーションを好きなだけ表示することができます。このアプローチでは符幹を無視し、アーティキュレーションを符頭との相対位置で配置します。これはこのスニペットのフラジョレットに見られます。和音外に配置されるアーティキュレーションと同じ挙動を得るには、add-stem-support が必要となります。そのため、解決策は音符を和音として表記し、<...> の中にアーティキュレーションを追加することです。
向きは常に上向きですが、\tweak によって変更することができます:
<c-\tweak direction #DOWN-\fermata^\fermata>
\relative c' { <>^"Wrong" c2_\fermata^\fermata % The second fermata is ignored! <e d'>2^\flageolet_\flageolet \stopStaff s1 \startStaff <>^"Works if written inside a chord" <e_\flageolet d'^\flageolet>2 <e_\flageolet d'^\flageolet>2 <e_\flageolet^\flageolet>2 <e_\fermata^\fermata>2 }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 同じアーティキュレーションを音符や和音の上と下の両方に表示する ] | [ Up: Tweaks and overrides ] | [ 音符の衝突に関する警告を抑制する > ] |
弦番号の延長線
弦番号の延長線を追加し、続く音符が全て同じ弦で演奏されることを示します。
stringNumberSpanner = #(define-music-function (StringNumber) (string?) #{ \override TextSpanner.style = #'solid \override TextSpanner.font-size = #-5 \override TextSpanner.bound-details.left.stencil-align-dir-y = #CENTER \override TextSpanner.bound-details.left.text = \markup { \circle \number $StringNumber } #}) \relative c { \clef "treble_8" \textSpannerDown \stringNumberSpanner "5" a8\startTextSpan b c d e f\stopTextSpan \stringNumberSpanner "4" g\startTextSpan a | bes4 a g2\stopTextSpan }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 弦番号の延長線 ] | [ Up: Tweaks and overrides ] | [ Time signature in brackets > ] |
音符の衝突に関する警告を抑制する
異なるボイスにあり、符幹が同じ向きの音符が同じ位置に配置されており、両方のボイスにシフトが指定されていないか同じシフトが指定されている場合、LilyPond ファイルのコンパイル時にエラー メッセージ ‘warning: ignoring too many clashing note columns’
が表示されます。このメッセージは、NoteColumn オブジェクトの
ignore-collision プロパティを #t にすることで抑制できます。これは警告を抑制するだけでなく、LilyPond による衝突の回避を完全に無効にします。そのため、注意して使用しないと予期しない結果をもたらすことがあります。
ignore = \override NoteColumn.ignore-collision = ##t \relative c' { \new Staff << \new Voice { \ignore \stemDown f2 g } \new Voice { c2 \stemDown c, } >> }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 音符の衝突に関する警告を抑制する ] | [ Up: Tweaks and overrides ] | [ 括弧に囲まれた拍子記号 > ] |
Time signature in brackets
The time signature can be enclosed within brackets.
\relative c'' { \override Staff.TimeSignature.stencil = #(lambda (grob) (bracketify-stencil (ly:time-signature::print grob) Y 0.1 0.2 0.1)) \time 2/4 a4 b8 c }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < Time signature in brackets ] | [ Up: Tweaks and overrides ] | [ 拍子記号の (分数ではなく) 分子のみを数字で表示する > ] |
括弧に囲まれた拍子記号
拍子記号は括弧で囲むことができます。
\relative c'' { \override Staff.TimeSignature.stencil = #(lambda (grob) (parenthesize-stencil (ly:time-signature::print grob) 0.1 0.4 0.4 0.1)) \time 2/4 a4 b8 c }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 括弧に囲まれた拍子記号 ] | [ Up: Tweaks and overrides ] | [ 連符のブラケットと譜の変更 > ] |
拍子記号の (分数ではなく) 分子のみを数字で表示する
拍子記号の分数全体を表示せず、分子のみ (今回は 7) を表示したい場合があります。これは \override Staff.TimeSignature.style = #'single-number を用いてスタイルを永続的に変更することで簡単に実現できます。\revert Staff.TimeSignature.style を使用することで、この設定を元に戻すことが出来ます。1 つの拍子記号に対してのみ単一の数字で表示したい場合は、\override の前に \once を記述します。
\relative c'' { \time 3/4 c4 c c % Change the style permanently \override Staff.TimeSignature.style = #'single-number \time 2/4 c4 c \time 3/4 c4 c c % Revert to default style: \revert Staff.TimeSignature.style \time 2/4 c4 c % single-number style only for the next time signature \once \override Staff.TimeSignature.style = #'single-number \time 5/4 c4 c c c c \time 2/4 c4 c }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 拍子記号の (分数ではなく) 分子のみを数字で表示する ] | [ Up: Tweaks and overrides ] | [ 音部記号のプロパティを調整する > ] |
連符のブラケットと譜の変更
このスニペットは、下の譜で始まり上の譜で終わる連符を作成する方法を示しています。
aigues = \relative c' { \time 6/8 s4. \stemDown c16[ bes' e] \stemUp g c e \stemDown g8 } basses = \relative c { \time 3/4 \clef F \tweak positions #'(4.5 . 9.5) \tweak edge-height #'(1 . -1) \tuplet 7/6 { c16[ bes' e] \change Staff = md \stemUp g[ c e g] } s4.s8 } \new PianoStaff \with { \omit TimeSignature } << \new Staff = md \aigues \new Staff = mg \basses >>
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 連符のブラケットと譜の変更 ] | [ Up: Tweaks and overrides ] | [ 装飾音符のスタイルを調整する > ] |
音部記号のプロパティを調整する
音部記号のグリフ、位置、オクターブ記号を変更するだけでは、変更後の音符の位置は変更されません。調号を正しい位置に表示するためには、middleCClefPosition
も設定する必要があります。これは、“ミドル C” の位置を、中央の譜線を 0、上方向を正、下方向を負として設定します。
例えば、\clef "treble_8" は、clefGlyph, clefPosition,
(音部記号自体の縦位置) middleCPosition, clefTransposition
を設定するのと同等です。これらのプロパティの (middleCPosition を除く)
どれかが変更された場合、新たに音部記号が表示されます。
次の例は、これらのプロパティを手動でセットする方法を示しています。最初の行では音部記号と音符の位置関係は通常通りですが、次の行ではそうではありません。
{ % The default treble clef. \key f \major c'1 % The standard bass clef \set Staff.clefGlyph = "clefs.F" \set Staff.clefPosition = 2 \set Staff.middleCPosition = 6 \set Staff.middleCClefPosition = 6 \key g \major c'1 % The baritone clef. \set Staff.clefGlyph = "clefs.C" \set Staff.clefPosition = 4 \set Staff.middleCPosition = 4 \set Staff.middleCClefPosition = 4 \key f \major c'1 % The standard choral tenor clef. \set Staff.clefGlyph = "clefs.G" \set Staff.clefPosition = -2 \set Staff.clefTransposition = -7 \set Staff.middleCPosition = 1 \set Staff.middleCClefPosition = 1 \key f \major c'1 % A non-standard clef. \set Staff.clefPosition = 0 \set Staff.clefTransposition = 0 \set Staff.middleCPosition = -4 \set Staff.middleCClefPosition = -4 \key g \major c'1 \break % The following clef changes do not preserve % the normal relationship between notes, key signatures % and clefs. \set Staff.clefGlyph = "clefs.F" \set Staff.clefPosition = 2 c'1 \set Staff.clefGlyph = "clefs.G" c'1 \set Staff.clefGlyph = "clefs.C" c'1 \set Staff.clefTransposition = 7 c'1 \set Staff.clefTransposition = 0 \set Staff.clefPosition = 0 c'1 % Return to the normal clef. \set Staff.middleCPosition = 0 c'1 }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 音部記号のプロパティを調整する ] | [ Up: Tweaks and overrides ] | [ 符尾のスタイルを変更する > ] |
装飾音符のスタイルを調整する
add-grace-property, remove-grace-property を用いて、装飾音符のスタイルを楽譜全体にわたって変更することができます。次の例は
常に上向きとなっている Stem の向きの設定を無効にして、またデフォルトの符頭をクロスに変更しています。
\relative c'' { \new Staff { $(remove-grace-property 'Voice 'Stem 'direction) $(add-grace-property 'Voice 'NoteHead 'style 'cross) \new Voice { \acciaccatura { f16 } g4 \grace { d16 e } f4 \appoggiatura { f,32 g a } e2 } } }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 装飾音符のスタイルを調整する ] | [ Up: Tweaks and overrides ] | [ \tweak で Grob にアクセスするために ly:grob-object を用いる > ] |
符尾のスタイルを変更する
8 分音符やそれより短い音符の符尾は、Flag の stencil
プロパティをオーバライドすることで変更できます。有効な値は
modern-straight-flag, old-straight-flag,
flat-flag です。
"@" = #(define-music-function (music) (ly:music?) #{ \set stemLeftBeamCount = 0 $music [] #}) testnotes = { \autoBeamOff c8 d16 e''32 f64 \acciaccatura { g,,,8 } a128 b } \relative c' { \override TextScript.staff-padding = 6 \time 1/4 <>^"default" \testnotes \override Flag.stencil = #modern-straight-flag <>_"modern straight" \testnotes \override Flag.stencil = #old-straight-flag <>^"old straight" \testnotes \override Flag.stencil = #flat-flag <>_"flat" \testnotes \revert Flag.stencil \flagStyleStacked <>^"stacked" \testnotes \flagStyleDefault <>_"default" \testnotes } \relative c' { \time 3/4 \override Flag.stencil = #flat-flag <>^"flat" c8 c[ c] d16 d[ d] e''32 e[ e] f64 f[ f] \acciaccatura { g,,,8 } a128 a[ a a a a] <>^"beam-like" @c8 c[ c] @d16 d[ d] @e''32 e[ e] @f64 f[ f] \acciaccatura { g,,,8 } @a128 a[ a a a a] } \layout { indent = 0 \context { \Score \override NonMusicalPaperColumn.line-break-permission = ##f } }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 符尾のスタイルを変更する ] | [ Up: Tweaks and overrides ] | [ 個々の Grob を調整するために \tweak コマンドを使用する > ] |
\tweak で Grob にアクセスするために ly:grob-object を用いる
いくつかの Grob は、他の Grob のコールバックからアクセスすることができます。これらは通常、grob-interface の
"Internal properties" セクションにある "layout objects" にリストアップされています。ly:grob-object は、これらの Grob にアクセスするために使用します。
以下に示したのは、NoteHead コールバック内で Grob にアクセスするいくつかの方法ですが、このテクニックは NoteHead に限ったものではありません。しかし、NoteHead は \tweak コマンドで暗黙的に指定されるために、このコールバックは特に重要です。
以下で定義された例の関数 ("display-grobs") はそこまで有用ではないかもしれませんが、Grob が実際にアクセスできることを示しています。
例のコンソール出力:
#Grob Accidental () #Grob Stem
#(define (notehead-get-accidental notehead) ;; notehead is grob (ly:grob-object notehead 'accidental-grob)) #(define (notehead-get-arpeggio notehead) ;; notehead is grob (let ((notecolumn (notehead-get-notecolumn notehead))) (ly:grob-object notecolumn 'arpeggio))) #(define (notehead-get-notecolumn notehead) ;; notehead is grob (ly:grob-parent notehead X)) #(define (notehead-get-stem notehead) ;; notehead is grob (let ((notecolumn (notehead-get-notecolumn notehead))) (ly:grob-object notecolumn 'stem))) #(define (display-grobs notehead) ;; notehead is grob (let ((accidental (notehead-get-accidental notehead)) (arpeggio (notehead-get-arpeggio notehead)) (stem (notehead-get-stem notehead))) (format (current-error-port) "~2&~a\n" (make-string 20 #\-)) (for-each (lambda (x) (format (current-error-port) "~a\n" x)) (list accidental arpeggio stem)))) \relative c' { %% display grobs for each note head: %\override NoteHead.before-line-breaking = #display-grobs <c %% or just for one: \tweak before-line-breaking #display-grobs es g>1\arpeggio }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < \tweak で Grob にアクセスするために ly:grob-object を用いる ] | [ Up: Tweaks and overrides ] | [ 強弱記号やテキスト スクリプトを縦方向に揃える > ] |
個々の Grob を調整するために \tweak コマンドを使用する
\tweak コマンドを用いて、全ての Grob を直接調整できます。以下は使用可能な \tweak の例を示しています。
\relative c' { \time 2/4 \set fingeringOrientations = #'(right) < \tweak font-size #3 c \tweak color #red d-\tweak font-size #8 -4 \tweak style #'cross g \tweak duration-log #2 a >2 }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 個々の Grob を調整するために \tweak コマンドを使用する ] | [ Up: Tweaks and overrides ] | [ オッシアと歌詞の縦方向の揃え位置 > ] |
強弱記号やテキスト スクリプトを縦方向に揃える
全ての DynamicLineSpanner オブジェクト (ヘアピンや強弱記号テキスト)
は、他のアイテムが邪魔しない限り、譜から少なくとも staff-padding だけ離れた基準線に配置されます。staff-padding を十分に大きくすると、強弱記号を揃えることができます。
また、\textLengthOn を用いて、テキスト スクリプトをベースラインに揃えることができます。
music = \relative c' { a'2\p b\f e4\p f\f\> g, b\p c2^\markup { \huge gorgeous } c^\markup { \huge fantastic } } { \music \break \override DynamicLineSpanner.staff-padding = 3 \textLengthOn \override TextScript.staff-padding = 1 \music } \paper { tagline = ##f }
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < 強弱記号やテキスト スクリプトを縦方向に揃える ] | [ Up: Tweaks and overrides ] | [ Vertically aligning stanza numbers of different staves > ] |
オッシアと歌詞の縦方向の揃え位置
このスニペットは、歌詞とオッシアの位置を調整するために
alignBelowContext と alignAboveContext コンテキスト
プロパティを使用する方法を示しています。
\relative c' << \new Staff = "1" { c4 c c c } \new Staff = "2" { d4 d d d } \new Staff = "3" { e4 e e e } { \skip 2 << \lyrics { \set alignBelowContext = "1" lyrics4 below } \new Staff \with { alignAboveContext = "3" fontSize = -2 \override StaffSymbol.staff-space = #(magstep -2) \remove "Time_signature_engraver" \override VerticalAxisGroup.staff-staff-spacing = #'((minimum-distance . 0) (basic-distance . 0) (padding . 1)) } { \tuplet 6/4 { \override TextScript.padding = 2 c8[^"ossia above" d e d e f] } } >> } >>
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < オッシアと歌詞の縦方向の揃え位置 ] | [ Up: Tweaks and overrides ] | [ 共通な通奏低音の延長線を縦方向に中央揃えする > ] |
Vertically aligning stanza numbers of different staves
It can happen that stanza numbers don’t align vertically if the verses
are attached to different staves. To fix that, override the
self-alignment-X property of the LyricText grob.
\markup { default behavior } << \new Staff { b b b b } \lyrics { \set stanza = "3." a a a a } \new Staff { b b b b } \lyrics { \set stanza = "1." aaaaaaaaaa a a a } \lyrics { \set stanza = "2." a a a a } >> \markup \vspace #1 \markup { using \typewriter "self-alignment-X = #LEFT" } << \new Staff { b b b b } \new Lyrics \lyricmode { \set stanza = "3." a a a a } \new Staff { b b b b } \new Lyrics \lyricmode { \set stanza = "1." \once \override LyricText.self-alignment-X = #LEFT aaaaaaaaaa a a a } \new Lyrics \lyricmode { \set stanza = "2." a a a a } >>
| [ << Tweaks and overrides ] | [Top][Contents] | [ Paper and layout >> ] |
| [ < Vertically aligning stanza numbers of different staves ] | [ Up: Tweaks and overrides ] | [ Paper and layout > ] |
共通な通奏低音の延長線を縦方向に中央揃えする
通奏低音の延長線は useBassFigureExtenders が #t にセットされている場合に使用されます。figuredBassCenterContinuations が
#t にセットされている場合、同一な延長線がまとめられ、縦方向に中央揃えされます。
<< \relative c' { \repeat unfold 3 { c8 c b b a a c16 c b b } } \figures { \set useBassFigureExtenders = ##t <6+ 4 3>4 <6 4 3>8 r <6+ 4 3>4 <6 4 3>8 <4 3+>16 r \set figuredBassCenterContinuations = ##t <6+ 4 3>4 <6 4 3>8 r <6+ 4 3>4 <6 4 3>8 <4 3+>16 r \set figuredBassCenterContinuations = ##f <6+ 4 3>4 <6 4 3>8 r <6+ 4 3>4 <6 4 3>8 <4 3+>16 r } >>
| [ << Tweaks and overrides ] | [Top][Contents] | [ Titles >> ] |
| [ < 共通な通奏低音の延長線を縦方向に中央揃えする ] | [ Up: Top ] | [ 楽器名を揃える > ] |
20 Paper and layout
See also Spacing issues.
| [ << Paper and layout ] | [Top][Contents] | [ Titles >> ] |
| [ < Paper and layout ] | [ Up: Paper and layout ] | [ 異なる歌詞を同じ行に表示する > ] |
楽器名を揃える
楽器名の水平方向の位置は Staff.InstrumentName.self-alignment-X
プロパティを変更することで調整することができます。\layout 変数は indent と short-indent を定義しており、それぞれ最初のシステムとその後のシステムで、楽器名に割くスペースの量を変更することができます。
\paper { left-margin = 3\cm } \new StaffGroup << \new Staff \with { \override InstrumentName.self-alignment-X = #LEFT instrumentName = \markup \left-column { "Left aligned" "instrument name" } shortInstrumentName = "Left" } { c''1 \break c''1 } \new Staff \with { \override InstrumentName.self-alignment-X = #CENTER instrumentName = \markup \center-column { Centered "instrument name" } shortInstrumentName = "Centered" } { g'1 g'1 } \new Staff \with { \override InstrumentName.self-alignment-X = #RIGHT instrumentName = \markup \right-column { "Right aligned" "instrument name" } shortInstrumentName = "Right" } { e'1 e'1 } >> \layout { indent = 4\cm short-indent = 2\cm line-width = 6.5\cm }
| [ << Paper and layout ] | [Top][Contents] | [ Titles >> ] |
| [ < 楽器名を揃える ] | [ Up: Paper and layout ] | [ ブック パート > ] |
異なる歌詞を同じ行に表示する
例えば演者が頻繁に入れ替わるような歌曲の場合などに、異なる演者の歌詞を 1 行で表示したい場合があります。このスニペットは
\override
VerticalAxisGroup.nonstaff-nonstaff-spacing.minimum-distance = ##f
を用いて、それを実現する方法を示しています。
\layout { \context { \Lyrics \override VerticalAxisGroup .nonstaff-nonstaff-spacing .minimum-distance = ##f } } aliceSings = \markup { \smallCaps "Alice" } eveSings = \markup { \smallCaps "Eve" } << \new Staff << \new Voice = "alice" { f'4^\aliceSings g' r2 | s1 | f'4^\aliceSings g' r2 | s1 | \break % ... \voiceOne s2 a'8^\aliceSings a' b'4 | \oneVoice g'1 } \new Voice = "eve" { s1 | a'2^\eveSings g' | s1 | a'2^\eveSings g' % ... \voiceTwo f'4^\eveSings a'8 g' f'4 e' | \oneVoice s1 } >> \new Lyrics \lyricsto "alice" { may -- be sec -- ond % ... Shut up, you fool! } \new Lyrics \lyricsto "eve" { that the words are % ... …and then I was like– } >>
| [ << Paper and layout ] | [Top][Contents] | [ Titles >> ] |
| [ < 異なる歌詞を同じ行に表示する ] | [ Up: Paper and layout ] | [ 譜のサイズを変更する > ] |
ブック パート
\bookpart は、ブックをいくつかの部分に分けるために用いることができます。それぞれの \bookpart の最後のページがragged-last-bottom の影響を受けます。ヘッダやフッタのマークアップは
\bookpart ごとの最後のページを識別することができ、ブック全体の最後のページには異なるマークアップを用いることもできます。
#(set-default-paper-size "a6") \book { %% book paper, which is inherited by all children bookparts \paper { ragged-last-bottom = ##t %% Page footer: add a different part-tagline at part last page oddFooterMarkup = \markup { \column { \fill-line { %% Copyright header field only on book first page. \if \on-first-page \fromproperty #'header:copyright } \fill-line { %% Part tagline header field only on each part last page. \if \on-last-page-of-part \fromproperty #'header:parttagline } \fill-line { %% Tagline header field only on book last page. \if \on-last-page \fromproperty #'header:tagline } } } } %% book header, which is inherited by the first bookpart \header { title = "Book title" copyright = "Copyright line on book first page" parttagline = "Part tagline" tagline = "Book tagline" } \bookpart { %% a different page breaking function may be used on each part \paper { page-breaking = #ly:minimal-breaking } \header { subtitle = "First part" } \markup { The first book part } \markup { a page break } \pageBreak \markup { first part last page } \markup \wordwrap { with ragged-last-bottom (see the space below this text) } } \bookpart { \header { subtitle = "Second part" } { c'4 } } }
| [ << Paper and layout ] | [Top][Contents] | [ Titles >> ] |
| [ < ブック パート ] | [ Up: Paper and layout ] | [ システムをクリップする > ] |
譜のサイズを変更する
譜のサイズを変更する一番シンプルな方法は
#(set-global-staff-size xx) を使用することですが、譜ごとにサイズを変更するには staff-space や fontSize
プロパティを使用します。
<< \new Staff { \relative c'' { \dynamicDown c8\ff c c c c c c c } } \new Staff \with { fontSize = #-3 \override StaffSymbol.staff-space = #(magstep -3) } { \clef bass c8 c c c c\f c c c } >>
| [ << Paper and layout ] | [Top][Contents] | [ Titles >> ] |
| [ < 譜のサイズを変更する ] | [ Up: Paper and layout ] | [ 空の譜を作成する > ] |
システムをクリップする
このコードは、フルスコアから部分をクリップ (抽出) する方法を示しています。
このファイルは -dclip-systems を付加して個別に実行する必要があり、スニペットのページに示されている出力は結果を示しているものではありません。
出力されるファイルの名前は ‘base-from-start-to-end[-count].eps’ の形になります。
システムの始端や終端が含まれている場合は、System Grob の領域も出力に含まれます (例: 楽器名)。
クリップ領域の終端にある装飾音符は出力に含まれません。
クリップ領域は複数のシステムを含むことができます。この場合には、複数の EPS ファイルが出力されます。
#(set-default-paper-size "a6" 'landscape) \layout { indent = 2.4\cm } #(ly:set-option 'clip-systems) #(ly:set-option 'separate-page-formats "ps") #(define output-suffix "1") origScore = \new Staff \with { instrumentName = "Instrument" } \relative c' { c1 d1 \grace c16 e1 \key d \major f1 \break \clef bass g,1 fis1 } \book { \score { \origScore \layout { % Each clip-region is a (START . END) pair % where both are rhythmic locations. Syntax: % % (make-rhythmic-locations BAR-NUMBER NUM DEN) % % means NUM/DEN whole-notes into bar numbered BAR-NUMBER clip-regions = #(list (cons (make-rhythmic-location 2 0 1) (make-rhythmic-location 4 0 1)) (cons (make-rhythmic-location 0 0 1) (make-rhythmic-location 4 0 1)) (cons (make-rhythmic-location 0 0 1) (make-rhythmic-location 6 0 1))) } } } #(ly:set-option 'clip-systems #f) #(ly:set-option 'separate-page-formats #f) #(define output-suffix #f) \book { \score { \origScore } \markup { \bold \fontsize #6 clips } \score { \lyrics { "from-2.0.1-to-4.0.1-clip.eps" \markup \epsfile #X #30.0 #(format #f "~a-1-from-2.0.1-to-4.0.1-clip.eps" (ly:parser-output-name)) } } }
| [ << Paper and layout ] | [Top][Contents] | [ Titles >> ] |
| [ < システムをクリップする ] | [ Up: Paper and layout ] | [ Demonstrating all \header fields > ] |
空の譜を作成する
空の譜を作成するには、空の小節を作って Score コンテキストから
Bar_number_engraver を削除します。また Staff コンテキストから
Time_signature_engraver, Clef_engraver, Bar_engraver
を削除します。
#(set-global-staff-size 10) % for the documentation % #(set-global-staff-size 20) % for letter and A4 \book { \score { { \repeat unfold 12 { s1 \break } } \layout { indent = 0 \context { \Staff \remove "Time_signature_engraver" \remove "Clef_engraver" \remove "Bar_engraver" } \context { \Score \remove "Bar_number_engraver" } } } % for the documentation \paper { #(set-paper-size "a6") ragged-last-bottom = ##f line-width = 90\mm left-margin = 7.5\mm bottom-margin = 5\mm top-margin = 5\mm tagline = ##f } % uncomment these lines for "letter" size %{ \paper { #(set-paper-size "letter") ragged-last-bottom = ##f line-width = 7.5\in left-margin = 0.5\in bottom-margin = 0.25\in top-margin = 0.25\in tagline = ##f } %} % uncomment these lines for "A4" size %{ \paper { #(set-paper-size "a4") ragged-last-bottom = ##f line-width = 180\mm left-margin = 15\mm bottom-margin = 10\mm top-margin = 10\mm tagline = ##f } %} }
| [ << Paper and layout ] | [Top][Contents] | [ Titles >> ] |
| [ < 空の譜を作成する ] | [ Up: Paper and layout ] | [ グループ内に演奏する譜がある場合に GrandStaff 全体を表示したままにする > ] |
Demonstrating all \header fields
A demonstration of all header fields that LilyPond defines by default.
Thanks to setting print-all-headers to #t, much more
fields as usual are displayed, indicating the hiearchy of
\header blocks.
\paper { #(set-paper-size "a6" 'landscape) print-all-headers = ##t } \book { \header { title = "title" subtitle = "subtitle" composer = "composer" arranger = "arranger" instrument = "instrument" meter = "meter" opus = "opus" piece = "piece" poet = "poet" copyright = "copyright" tagline = "tagline" } \bookpart { \score { \relative c'' { c1 | c | c | c } \header { title = "localtitle" subtitle = "localsubtitle" composer = "localcomposer" arranger = "localarranger" instrument = "localinstrument" meter = "localmeter" opus = "localopus" piece = "localpiece" poet = "localpoet" copyright = "localcopyright" tagline = "localtagline" } } } }
| [ << Paper and layout ] | [Top][Contents] | [ Titles >> ] |
| [ < Demonstrating all \header fields ] | [ Up: Paper and layout ] | [ システム セパレータを設定する > ] |
グループ内に演奏する譜がある場合に GrandStaff 全体を表示したままにする
オーケストラ譜では、いくつかの楽器 (あるいはグループ) が全く演奏されない時間があり、その時の譜は (\removeEmptyStaves で)
削除することができます。
楽器が後で再度演奏される場合には、グループで譜を残しておきたい場合があります。これはグループ化しているコンテキスト (GrandStaff や StaffGroup) に
Keep_alive_together_engraver を追加することで実現できます。
例では、セカンド バイオリンは 2 番目と 3 番目のシステムで演奏されていません。ファースト バイオリンは 2 番目のシステムでは演奏されず、3 番目のシステムでは最後の小節に演奏部分があります。Keep_alive_together_engraver
により、3 番目のシステムではセカンド バイオリンも表示されています。
\score { << \new Staff = "Staff_flute" \with { instrumentName = "Flute" shortInstrumentName = "Fl" } \relative c' { \repeat unfold 3 { c'4 c c c | c c c c | c c c c | \break } } \new StaffGroup = "StaffGroup_Strings" << \new GrandStaff = "GrandStaff_violins" << \new Staff = "StaffViolinI" \with { instrumentName = "Violin I" shortInstrumentName = "Vi I" } \relative c'' { a1 | R1*7 | \repeat unfold 12 a16 a4 | } \new Staff = "StaffViolinII" \with { instrumentName = "Violin II" shortInstrumentName = "Vi II" } \relative c' { e1 | R1*8 | } >> \new Staff = "Staff_cello" \with { instrumentName = "Cello" shortInstrumentName = "Ce" } \relative c { \clef bass \repeat unfold 9 { c1 } | } >> >> } \layout { indent = 3.0\cm short-indent = 1.5\cm \context { \GrandStaff \consists Keep_alive_together_engraver } \context { \Staff \RemoveEmptyStaves } }
| [ << Paper and layout ] | [Top][Contents] | [ Titles >> ] |
| [ < グループ内に演奏する譜がある場合に GrandStaff 全体を表示したままにする ] | [ Up: Paper and layout ] | [ 目次 > ] |
システム セパレータを設定する
システムとシステムの間にシステム セパレータを挿入することができます。任意のマークアップが使用できますが、デフォルト値は \slashSeparator
となっています。
#(set-default-paper-size "a5") \paper { system-separator-markup = \slashSeparator tagline = ##f } notes = \relative c' { c1 | c \break c1 | c \break c1 | c } \book { \score { \new GrandStaff << \new Staff \notes \new Staff \notes >> } }
| [ << Paper and layout ] | [Top][Contents] | [ Titles >> ] |
| [ < システム セパレータを設定する ] | [ Up: Paper and layout ] | [ Vertically aligned StaffGroups without connecting SystemStartBar > ] |
目次
目次は \markuplines \table-of-contents によって挿入することができます。目次のアイテムは \tocItem で追加します。
#(set-default-paper-size "a7" 'landscape) #(set-global-staff-size 11) \paper { print-all-headers = ##t } \book { \markuplist \table-of-contents \pageBreak \tocItem \markup { The first score } \score { { c'1 \pageBreak \mark \default \tocItem \markup { Mark A } d'1 } \header { title = "First score" } } \pageBreak \tocItem \markup { The second score } \score { { e'1 } \header { title = "Second score" } } }
| [ << Paper and layout ] | [Top][Contents] | [ Titles >> ] |
| [ < 目次 ] | [ Up: Paper and layout ] | [ Titles > ] |
Vertically aligned StaffGroups without connecting SystemStartBar
This snippet shows how to achieve vertically aligned StaffGroups
with a SystemStartBar for each StaffGroup, but without
connecting them.
Note that this only works properly for music that can be printed as a single system.
#(set-global-staff-size 15) \paper { ragged-right = ##f print-all-headers = ##t tagline = ##f } \layout { indent = 0 \context { \StaffGroup \consists Text_mark_engraver \consists Staff_collecting_engraver systemStartDelimiterHierarchy = #'(SystemStartBrace (SystemStartBracket a b)) } \context { \Score \remove Text_mark_engraver \remove Staff_collecting_engraver \override SystemStartBrace.style = #'bar-line \omit SystemStartBar \override SystemStartBrace.padding = #-0.1 \override SystemStartBrace.thickness = #1.6 \override StaffGrouper.staffgroup-staff-spacing.basic-distance = #15 } } %%%% EXAMPLE txt = \lyricmode { Wer4 nur den lie -- ben Gott läßt wal2 -- ten4 und4 hof -- fet auf ihn al -- le Zeit2. } % First StaffGroup "exercise" eI = \relative c' { \textMark \markup { \bold Teacher: This is a simple setting of the choral. Please improve it. } \key a \minor \time 4/4 \voiceOne \partial 4 e4 a b c b a b gis2 e4\fermata g! g f e a a gis a2.\fermata \bar ":|." } eII = \relative c' { \key a \minor \time 4/4 \voiceTwo \partial 4 c4 e e e gis a f e2 b4 b d d c c d d c2. \bar ":|." } eIII = \relative c' { \key a \minor \time 4/4 \clef bass \voiceOne \partial 4 a4 c b a b c d b2 gis4 g g b c a f e e2. } eIV = \relative c' { \key a \minor \time 4/4 \clef bass \voiceTwo \partial 4 a,4 a' gis a e a, d e2 e,4\fermata e' b g c f d e a,2.\fermata \bar ":|." } exercise = \new StaffGroup = "exercise" << \new Staff << \new Voice \eI \new Voice \eII >> \new Lyrics \txt \new Staff << \new Voice \eIII \new Voice \eIV >> >> % Second StaffGroup "simple Bach" sbI = \relative c' { \textMark \markup { \bold" Pupil:" Here's my version! } \key a \minor \time 4/4 \voiceOne \partial 4 e4 a b c b a b gis2 e4\fermata g! g f e a a gis a2.\fermata \bar ":|." } sbII = \relative c' { \key a \minor \time 4/4 \voiceTwo \partial 4 c8 d e4 e e8 f g4 f f e2 b4 b8 c d4 d e8 d c4 b8 c d4 c2. \bar ":|." } sbIII = \relative c' { \key a \minor \time 4/4 \clef bass \voiceOne \partial 4 a8 b c4 b a b8 c d4 d8 c b2 gis4 g g8 a b4 b a8 g f4 e e2. } sbIV = \relative c' { \key a \minor \time 4/4 \clef bass \voiceTwo \partial 4 a,4 a' gis a e f8 e d4 e2 e,4\fermata e' b a8 g c4 f8 e d4 e a,2.\fermata \bar ":|." } simpleBach = \new StaffGroup = "simple Bach" << \new Staff << \new Voice \sbI \new Voice \sbII >> \new Lyrics \txt \new Staff << \new Voice \sbIII \new Voice \sbIV >> >> % Third StaffGroup "chromatic Bach" cbI = \relative c' { \textMark \markup { \bold "Teacher:" \column { "Well, you simply copied and transposed a version of J.S.Bach." "Do you know this one?" } } \key a \minor \time 4/4 \voiceOne \partial 4 e4 a b c b a b gis4. fis8 e4\fermata g! g f e a a8 b gis4 a2.\fermata \bar ":|." } cbII = \relative c' { \key a \minor \time 4/4 \voiceTwo \partial 4 c8 d e4 e e8 fis gis4 a8 g! f!4 e2 b4 e e d d8[ cis] d dis e fis e4 e2. \bar ":|." } cbIII = \relative c' { \key a \minor \time 4/4 \clef bass \voiceOne \partial 4 a8 b c[ b] a gis8 a4 d, e8[ e'] d c b4. a8 gis4 b c d8 c b[ a] a b c b b c16 d c2. } cbIV = \relative c' { \key a \minor \time 4/4 \clef bass \voiceTwo \partial 4 a4 c, e a, b c d e2 e4\fermata e a b8 c gis[ g] fis f e dis e4 a,2.\fermata \bar ":|." } chromaticBach = \new StaffGroup = "chromatic Bach" << \new Staff << \new Voice \cbI \new Voice \cbII >> \new Lyrics \txt \new Staff << \new Voice \cbIII \new Voice \cbIV >> >> % Score \score { << \exercise \simpleBach \chromaticBach >> \header { title = \markup \column { \combine \null \vspace #1 "Exercise: Improve the given choral" " " } } \layout { \context { \Lyrics \override LyricText.X-offset = #-1 } } }
| [ << Paper and layout ] | [Top][Contents] | [ Spacing >> ] |
| [ < Vertically aligned StaffGroups without connecting SystemStartBar ] | [ Up: Top ] | [ 楽譜に現在日時を追加する > ] |
21 Titles
See also Titles and headers.
| 楽譜に現在日時を追加する | ||
| 楽器名を揃える | ||
| Demonstrating all \header fields | ||
| バージョン番号を出力する |
| [ << Titles ] | [Top][Contents] | [ Spacing >> ] |
| [ < Titles ] | [ Up: Titles ] | [ 楽器名を揃える > ] |
楽譜に現在日時を追加する
少しの Scheme コードで、楽譜に現在日時を追加することができます。
\paper { tagline = ##f } % first, define a variable to hold the formatted date: date = #(strftime "%d-%m-%Y" (localtime (current-time))) % use it in the title block: \header { title = "Including the date!" subtitle = \date } \score { \relative c'' { c4 c c c } } % and use it in a \markup block: \markup { \date }
| [ << Titles ] | [Top][Contents] | [ Spacing >> ] |
| [ < 楽譜に現在日時を追加する ] | [ Up: Titles ] | [ Demonstrating all \header fields > ] |
楽器名を揃える
楽器名の水平方向の位置は Staff.InstrumentName.self-alignment-X
プロパティを変更することで調整することができます。\layout 変数は indent と short-indent を定義しており、それぞれ最初のシステムとその後のシステムで、楽器名に割くスペースの量を変更することができます。
\paper { left-margin = 3\cm } \new StaffGroup << \new Staff \with { \override InstrumentName.self-alignment-X = #LEFT instrumentName = \markup \left-column { "Left aligned" "instrument name" } shortInstrumentName = "Left" } { c''1 \break c''1 } \new Staff \with { \override InstrumentName.self-alignment-X = #CENTER instrumentName = \markup \center-column { Centered "instrument name" } shortInstrumentName = "Centered" } { g'1 g'1 } \new Staff \with { \override InstrumentName.self-alignment-X = #RIGHT instrumentName = \markup \right-column { "Right aligned" "instrument name" } shortInstrumentName = "Right" } { e'1 e'1 } >> \layout { indent = 4\cm short-indent = 2\cm line-width = 6.5\cm }
| [ << Titles ] | [Top][Contents] | [ Spacing >> ] |
| [ < 楽器名を揃える ] | [ Up: Titles ] | [ バージョン番号を出力する > ] |
Demonstrating all \header fields
A demonstration of all header fields that LilyPond defines by default.
Thanks to setting print-all-headers to #t, much more
fields as usual are displayed, indicating the hiearchy of
\header blocks.
\paper { #(set-paper-size "a6" 'landscape) print-all-headers = ##t } \book { \header { title = "title" subtitle = "subtitle" composer = "composer" arranger = "arranger" instrument = "instrument" meter = "meter" opus = "opus" piece = "piece" poet = "poet" copyright = "copyright" tagline = "tagline" } \bookpart { \score { \relative c'' { c1 | c | c | c } \header { title = "localtitle" subtitle = "localsubtitle" composer = "localcomposer" arranger = "localarranger" instrument = "localinstrument" meter = "localmeter" opus = "localopus" piece = "localpiece" poet = "localpoet" copyright = "localcopyright" tagline = "localtagline" } } } }
| [ << Titles ] | [Top][Contents] | [ Spacing >> ] |
| [ < Demonstrating all \header fields ] | [ Up: Titles ] | [ Spacing > ] |
バージョン番号を出力する
lilypond-version の出力を歌詞に配置することで、楽譜内に、あるいはlilypond-book で生成されたドキュメント内に LilyPond のバージョン番号を表示することができます。あるいは、以下のようにしてバージョン番号を他の文字列と結合することができます。
\markup { Processed with LilyPond version #(lilypond-version) }
| [ << Titles ] | [Top][Contents] | [ MIDI >> ] |
| [ < バージョン番号を出力する ] | [ Up: Top ] | [ Adjusting vertical spacing of lyrics > ] |
22 Spacing
See also Spacing issues.
| [ << Spacing ] | [Top][Contents] | [ MIDI >> ] |
| [ < Spacing ] | [ Up: Spacing ] | [ 運指記号を譜の内側に表示する > ] |
Adjusting vertical spacing of lyrics
This snippet shows how to bring the lyrics line closer to the staff.
% Default layout: << \new Staff \new Voice = melody \relative c' { c4 d e f | g4 f e d | c1 } \new Lyrics \lyricsto melody { aa aa aa aa aa aa aa aa aa } \new Staff \new Voice = melody \relative c' { c4 d e f | g4 f e d | c1 } % Reducing the minimum space below the staff and above the lyrics: \new Lyrics \with { \override VerticalAxisGroup.nonstaff-relatedstaff-spacing = #'((basic-distance . 1)) } \lyricsto melody { aa aa aa aa aa aa aa aa aa } >>
| [ << Spacing ] | [Top][Contents] | [ MIDI >> ] |
| [ < Adjusting vertical spacing of lyrics ] | [ Up: Spacing ] | [ Breaking vertical alignment of dynamics and textscripts > ] |
運指記号を譜の内側に表示する
デフォルトでは、縦方向の運指記号は譜の外側に配置されます。この挙動を取り消すことができます。注意: この場合、和音でない場合にも <> を用いる必要があります。
\relative c' { <c-1 e-2 g-3 b-5>2 \override Fingering.staff-padding = #'() <c-1 e-2 g-3 b-5>4 g'-0 a8[-1 b]-2 g-0 r \override Fingering.add-stem-support = ##f a[-1 b]-2 g-0 r \override Fingering.add-stem-support = ##t a[-1 b]-2 g-0 r \override Fingering.add-stem-support = #only-if-beamed a[-1 b]-2 g-0 r }
| [ << Spacing ] | [Top][Contents] | [ MIDI >> ] |
| [ < 運指記号を譜の内側に表示する ] | [ Up: Spacing ] | [ ページ ラベル > ] |
Breaking vertical alignment of dynamics and textscripts
By default, LilyPond uses DynamicLineSpanner grobs to vertically
align successive dynamic objects like hairpins and dynamic text.
However, this is not always wanted. By inserting
\breakDynamicSpan, which ends the alignment spanner
prematurely, this vertical alignment can be avoided.
{ g1\< | e''\f\> | c'\p } { g1\< | e''\breakDynamicSpan\f\> | c'\p }
| [ << Spacing ] | [Top][Contents] | [ MIDI >> ] |
| [ < Breaking vertical alignment of dynamics and textscripts ] | [ Up: Spacing ] | [ プロポーショナル ノーテーションで厳格モードを使用する > ] |
ページ ラベル
ページ ラベルは音楽の中またはトップ レベルに配置でき、マークアップ内で参照できます。
\label license \markup "This snippet is available under the Creative Commons Public Domain Dedication license." { \repeat volta 2 { \label startRepeat \repeat unfold 20 { c'2 2 } \pageBreak 2 2 } \textEndMark \markup { \with-link #'startRepeat \line { To page \page-ref #'startRepeat "0" "?" } } } \markup { See page \page-ref #'license "0" "?" for licensing information. }
プロポーショナル ノーテーションで厳格モードを使用する
strict-note-spacing がセットされている場合、音符のスペーシングはシステム内にある小節線や音部記号に影響されません。これらは対応する音符の直前に配置されます。これらが衝突を引き起こす場合があります。
\relative c'' << \override Score.SpacingSpanner.strict-note-spacing = ##t \set Score.proportionalNotationDuration = #1/16 \new Staff { c8[ c \clef alto c c \grace { d16 } c8 c] c4 c2 \grace { c16[ c16] } c2 } \new Staff { c2 \tuplet 3/2 { c8 \clef bass cis,, c } c4 c1 } >>
| [ << Spacing ] | [Top][Contents] | [ MIDI >> ] |
| [ < プロポーショナル ノーテーションで厳格モードを使用する ] | [ Up: Spacing ] | [ 強弱記号やテキスト スクリプトを縦方向に揃える > ] |
Reconciliating bar lines thickness when staves are of different sizes (TODO duplicates snippet in Documentation/en/notation/spacing.itely)
A regularly occurring problem in ensemble or chamber music scores, particularly with piano, is that when some of the staves are printed in a smaller size, their bar lines do not not match those of larger staves. This may become particularly egregious for closing double bar lines, as demonstrated here.
There are different solutions, which all involve correcting some of the
properties overridden by the \magnifyStaff command: namely,
kern thick-thickness and hair-thickness (the
latter of which also governs ordinary bar lines). These are properties
of the BarLine graphical object (“grob”), which resides
in the Staff context.
This can be done by using either the \revert command, or more
advanced commands such as revert-props. Alternatively, some
effects of \magnifyStaff may be replicated on other staves
through the scale-props command, which may be used to harmonize
all bar lines either to their appearance on the smallest staves, or to
some intermediate value.
%% This snippet relies on some internal commands that are not part of the %% most common and stable syntax generally recommended to regular users. \markup \fontsize #-3 { \center-column { \vspace #0.3 Default: \vspace #1.7 \score { \new StaffGroup << \new Staff \with { \magnifyStaff #1/2 } { b1 b \bar "|."} \new Staff { b b } >> } } \hspace #2 \center-column { "Reverting only the" "final bar line:" \vspace #1.2 \score { \new StaffGroup << \new Staff \with { \magnifyStaff #1/2 } { b1 b \revert Staff.BarLine.thick-thickness \revert Staff.BarLine.hair-thickness \revert Staff.BarLine.kern \bar "|." } \new Staff { b b } >> } } \hspace #2 \center-column { \line {Cancelling \typewriter "\magnifyStaff"} "only for bar lines:" \vspace #1.1 \score { \new StaffGroup << \new Staff \with { \magnifyStaff #1/2 #(revert-props 'magnifyStaff 0 '((BarLine thick-thickness) (BarLine hair-thickness) (BarLine kern))) } { b1 b \bar "|."} \new Staff { b b } >> } } \hspace #2 \center-column { \line {Mimicking \typewriter "\magnifyStaff"} "on the other staves:" \vspace #1.3 \score { \new StaffGroup << \new Staff \with { \magnifyStaff #1/2 } { b1 b \bar "|." } \new Staff \with { #(scale-props 'magnifyStaff 1/2 #t '((BarLine thick-thickness) (BarLine hair-thickness) (BarLine kern))) } { b b } >> } } \hspace #2 \center-column { "Applying an intermediate" "value to all staves:" \vspace #1.3 \score { \new StaffGroup << \new Staff \with { \magnifyStaff #1/2 #(scale-props 'magnifyStaff 3/2 #t '((BarLine thick-thickness) (BarLine hair-thickness) (BarLine kern))) } { b1 b \bar "|." } \new Staff \with { #(scale-props 'magnifyStaff 3/4 #t '((BarLine thick-thickness) (BarLine hair-thickness) (BarLine kern))) } { b b } >> } } } \layout { indent = 0 }
強弱記号やテキスト スクリプトを縦方向に揃える
全ての DynamicLineSpanner オブジェクト (ヘアピンや強弱記号テキスト)
は、他のアイテムが邪魔しない限り、譜から少なくとも staff-padding だけ離れた基準線に配置されます。staff-padding を十分に大きくすると、強弱記号を揃えることができます。
また、\textLengthOn を用いて、テキスト スクリプトをベースラインに揃えることができます。
music = \relative c' { a'2\p b\f e4\p f\f\> g, b\p c2^\markup { \huge gorgeous } c^\markup { \huge fantastic } } { \music \break \override DynamicLineSpanner.staff-padding = 3 \textLengthOn \override TextScript.staff-padding = 1 \music } \paper { tagline = ##f }
| [ << Spacing ] | [Top][Contents] | [ MIDI >> ] |
| [ < 強弱記号やテキスト スクリプトを縦方向に揃える ] | [ Up: Spacing ] | [ MIDI > ] |
オッシアと歌詞の縦方向の揃え位置
このスニペットは、歌詞とオッシアの位置を調整するために
alignBelowContext と alignAboveContext コンテキスト
プロパティを使用する方法を示しています。
\relative c' << \new Staff = "1" { c4 c c c } \new Staff = "2" { d4 d d d } \new Staff = "3" { e4 e e e } { \skip 2 << \lyrics { \set alignBelowContext = "1" lyrics4 below } \new Staff \with { alignAboveContext = "3" fontSize = -2 \override StaffSymbol.staff-space = #(magstep -2) \remove "Time_signature_engraver" \override VerticalAxisGroup.staff-staff-spacing = #'((minimum-distance . 0) (basic-distance . 0) (padding . 1)) } { \tuplet 6/4 { \override TextScript.padding = 2 c8[^"ossia above" d e d e f] } } >> } >>
| [ << Spacing ] | [Top][Contents] | [ Templates >> ] |
| [ < オッシアと歌詞の縦方向の揃え位置 ] | [ Up: Top ] | [ MIDI チャンネルをボイスごとに割り当てる > ] |
23 MIDI
See also Creating MIDI output.
| MIDI チャンネルをボイスごとに割り当てる | ||
| メトロノーム記号を表示せずにテンポを変更する | ||
| MIDI 出力でカスタム強弱記号を作成する | ||
| Demo of MIDI instruments | ||
| デフォルトの MIDI 楽器の音量を置き換える |
| [ << MIDI ] | [Top][Contents] | [ Templates >> ] |
| [ < MIDI ] | [ Up: MIDI ] | [ メトロノーム記号を表示せずにテンポを変更する > ] |
MIDI チャンネルをボイスごとに割り当てる
MIDI を出力する際、デフォルトの挙動では譜ごとに MIDI チャンネルが作られ、譜の中にある全てのボイスは統合されます。これは、トラックごとに 16 しか存在しない MIDI チャンネルが足りなくなる恐れを減らします。
しかしながら、次の例のように
Staff_performer を Voice コンテキストに移動することで、ボイスごとに独自の MIDI チャンネルを持つようになります:
同じ譜にあるにもかかわらず、2 つの MIDI チャンネルが作られ、異なる
midiInstrument が割り当てられます。
\score { \new Staff << \new Voice \relative c''' { \set midiInstrument = "flute" \voiceOne \key g \major \time 2/2 r2 g-"Flute" ~ g fis ~ fis4 g8 fis e2 ~ e4 d8 cis d2 } \new Voice \relative c'' { \set midiInstrument = "clarinet" \voiceTwo b1-"Clarinet" a2. b8 a g2. fis8 e fis2 r } >> \layout { } \midi { \context { \Staff \remove "Staff_performer" } \context { \Voice \consists "Staff_performer" } \tempo 2 = 72 } }
| [ << MIDI ] | [Top][Contents] | [ Templates >> ] |
| [ < MIDI チャンネルをボイスごとに割り当てる ] | [ Up: MIDI ] | [ MIDI 出力でカスタム強弱記号を作成する > ] |
メトロノーム記号を表示せずにテンポを変更する
楽譜には何も出力せずに MIDI 出力のテンポのみを変更するには、メトロノーム記号を非表示にします。
\score { \new Staff \relative c' { \tempo 4 = 160 c4 e g b c4 b d c \set Score.tempoHideNote = ##t \tempo 4 = 96 d,4 fis a cis d4 cis e d } \layout { } \midi { } }
| [ << MIDI ] | [Top][Contents] | [ Templates >> ] |
| [ < メトロノーム記号を表示せずにテンポを変更する ] | [ Up: MIDI ] | [ Demo of MIDI instruments > ] |
MIDI 出力でカスタム強弱記号を作成する
次の例は、デフォルトのリストには含まれていない強弱記号を作成し、MIDI 出力に反映されるように音量値を割り当てる方法を示しています。
強弱記号 \rfz は 0.9 の値が割り当てられています。
#(define (myDynamics dynamic) (if (equal? dynamic "rfz") 0.9 (default-dynamic-absolute-volume dynamic))) \score { \new Staff { \set Staff.midiInstrument = "cello" \set Score.dynamicAbsoluteVolumeFunction = #myDynamics \new Voice { \relative { a'4\pp b c-\rfz } } } \layout {} \midi {} }
| [ << MIDI ] | [Top][Contents] | [ Templates >> ] |
| [ < MIDI 出力でカスタム強弱記号を作成する ] | [ Up: MIDI ] | [ デフォルトの MIDI 楽器の音量を置き換える > ] |
Demo of MIDI instruments
Problem: How to know which midiInstrument values would be best
for your composition?
Solution: A LilyPond demo file. You have to compile this snippet by yourself and listen to the created MIDI output file.
melody = \relative c' { \tempo 4 = 150 c4.\mf g c16 b' c d e16 d e f g4 g'4 r R1 } \score { \new Voice \melody \layout { } } \score { \new Voice { r\mf % 1-8 keyboard \set Staff.midiInstrument = "acoustic grand" \melody \set Staff.midiInstrument = "bright acoustic" \melody \set Staff.midiInstrument = "electric grand" \melody \set Staff.midiInstrument = "honky-tonk" \melody \set Staff.midiInstrument = "electric piano 1" \melody \set Staff.midiInstrument = "electric piano 2" \melody \set Staff.midiInstrument = "harpsichord" \melody \set Staff.midiInstrument = "clav" \melody % 9-16 chrom percussion \set Staff.midiInstrument = "celesta" \melody \set Staff.midiInstrument = "glockenspiel" \melody \set Staff.midiInstrument = "music box" \melody \set Staff.midiInstrument = "vibraphone" \melody \set Staff.midiInstrument = "marimba" \melody \set Staff.midiInstrument = "xylophone" \melody \set Staff.midiInstrument = "tubular bells" \melody \set Staff.midiInstrument = "dulcimer" \melody % 17-24 organ \set Staff.midiInstrument = "drawbar organ" \melody \set Staff.midiInstrument = "percussive organ" \melody \set Staff.midiInstrument = "rock organ" \melody \set Staff.midiInstrument = "church organ" \melody \set Staff.midiInstrument = "reed organ" \melody \set Staff.midiInstrument = "accordion" \melody \set Staff.midiInstrument = "harmonica" \melody \set Staff.midiInstrument = "concertina" \melody % 25-32 guitar \set Staff.midiInstrument = "acoustic guitar (nylon)" \melody \set Staff.midiInstrument = "acoustic guitar (steel)" \melody \set Staff.midiInstrument = "electric guitar (jazz)" \melody \set Staff.midiInstrument = "electric guitar (clean)" \melody \set Staff.midiInstrument = "electric guitar (muted)" \melody \set Staff.midiInstrument = "overdriven guitar" \melody \set Staff.midiInstrument = "distorted guitar" \melody \set Staff.midiInstrument = "guitar harmonics" \melody % 33-40 bass \set Staff.midiInstrument = "acoustic bass" \melody \set Staff.midiInstrument = "electric bass (finger)" \melody \set Staff.midiInstrument = "electric bass (pick)" \melody \set Staff.midiInstrument = "fretless bass" \melody \set Staff.midiInstrument = "slap bass 1" \melody \set Staff.midiInstrument = "slap bass 2" \melody \set Staff.midiInstrument = "synth bass 1" \melody \set Staff.midiInstrument = "synth bass 2" \melody % 41-48 strings \set Staff.midiInstrument = "violin" \melody \set Staff.midiInstrument = "viola" \melody \set Staff.midiInstrument = "cello" \melody \set Staff.midiInstrument = "contrabass" \melody \set Staff.midiInstrument = "tremolo strings" \melody \set Staff.midiInstrument = "pizzicato strings" \melody \set Staff.midiInstrument = "orchestral harp" \melody \set Staff.midiInstrument = "timpani" \melody % 49-56 ensemble \set Staff.midiInstrument = "string ensemble 1" \melody \set Staff.midiInstrument = "string ensemble 2" \melody \set Staff.midiInstrument = "synthstrings 1" \melody \set Staff.midiInstrument = "synthstrings 2" \melody \set Staff.midiInstrument = "choir aahs" \melody \set Staff.midiInstrument = "voice oohs" \melody \set Staff.midiInstrument = "synth voice" \melody \set Staff.midiInstrument = "orchestra hit" \melody % 57-64 brass \set Staff.midiInstrument = "trumpet" \melody \set Staff.midiInstrument = "trombone" \melody \set Staff.midiInstrument = "tuba" \melody \set Staff.midiInstrument = "muted trumpet" \melody \set Staff.midiInstrument = "french horn" \melody \set Staff.midiInstrument = "brass section" \melody \set Staff.midiInstrument = "synthbrass 1" \melody \set Staff.midiInstrument = "synthbrass 2" \melody % 65-72 reed \set Staff.midiInstrument = "soprano sax" \melody \set Staff.midiInstrument = "alto sax" \melody \set Staff.midiInstrument = "tenor sax" \melody \set Staff.midiInstrument = "baritone sax" \melody \set Staff.midiInstrument = "oboe" \melody \set Staff.midiInstrument = "english horn" \melody \set Staff.midiInstrument = "bassoon" \melody \set Staff.midiInstrument = "clarinet" \melody % 73-80 pipe \set Staff.midiInstrument = "piccolo" \melody \set Staff.midiInstrument = "flute" \melody \set Staff.midiInstrument = "recorder" \melody \set Staff.midiInstrument = "pan flute" \melody \set Staff.midiInstrument = "blown bottle" \melody \set Staff.midiInstrument = "shakuhachi" \melody \set Staff.midiInstrument = "whistle" \melody \set Staff.midiInstrument = "ocarina" \melody % 81-88 synth lead \set Staff.midiInstrument = "lead 1 (square)" \melody \set Staff.midiInstrument = "lead 2 (sawtooth)" \melody \set Staff.midiInstrument = "lead 3 (calliope)" \melody \set Staff.midiInstrument = "lead 4 (chiff)" \melody \set Staff.midiInstrument = "lead 5 (charang)" \melody \set Staff.midiInstrument = "lead 6 (voice)" \melody \set Staff.midiInstrument = "lead 7 (fifths)" \melody \set Staff.midiInstrument = "lead 8 (bass+lead)" \melody % 89-96 synth pad \set Staff.midiInstrument = "pad 1 (new age)" \melody \set Staff.midiInstrument = "pad 2 (warm)" \melody \set Staff.midiInstrument = "pad 3 (polysynth)" \melody \set Staff.midiInstrument = "pad 4 (choir)" \melody \set Staff.midiInstrument = "pad 5 (bowed)" \melody \set Staff.midiInstrument = "pad 6 (metallic)" \melody \set Staff.midiInstrument = "pad 7 (halo)" \melody \set Staff.midiInstrument = "pad 8 (sweep)" \melody % 97-104 synth effects \set Staff.midiInstrument = "fx 1 (rain)" \melody \set Staff.midiInstrument = "fx 2 (soundtrack)" \melody \set Staff.midiInstrument = "fx 3 (crystal)" \melody \set Staff.midiInstrument = "fx 4 (atmosphere)" \melody \set Staff.midiInstrument = "fx 5 (brightness)" \melody \set Staff.midiInstrument = "fx 6 (goblins)" \melody \set Staff.midiInstrument = "fx 7 (echoes)" \melody \set Staff.midiInstrument = "fx 8 (sci-fi)" \melody % 105-112 ethnic \set Staff.midiInstrument = "sitar" \melody \set Staff.midiInstrument = "banjo" \melody \set Staff.midiInstrument = "shamisen" \melody \set Staff.midiInstrument = "koto" \melody \set Staff.midiInstrument = "kalimba" \melody \set Staff.midiInstrument = "bagpipe" \melody \set Staff.midiInstrument = "fiddle" \melody \set Staff.midiInstrument = "shanai" \melody % 113-120 percussive \set Staff.midiInstrument = "tinkle bell" \melody \set Staff.midiInstrument = "agogo" \melody \set Staff.midiInstrument = "steel drums" \melody \set Staff.midiInstrument = "woodblock" \melody \set Staff.midiInstrument = "taiko drum" \melody \set Staff.midiInstrument = "melodic tom" \melody \set Staff.midiInstrument = "synth drum" \melody \set Staff.midiInstrument = "reverse cymbal" \melody % 121-128 sound effects \set Staff.midiInstrument = "guitar fret noise" \melody \set Staff.midiInstrument = "breath noise" \melody \set Staff.midiInstrument = "seashore" \melody \set Staff.midiInstrument = "bird tweet" \melody \set Staff.midiInstrument = "telephone ring" \melody \set Staff.midiInstrument = "helicopter" \melody \set Staff.midiInstrument = "applause" \melody \set Staff.midiInstrument = "gunshot" \melody } \midi { } }
| [ << MIDI ] | [Top][Contents] | [ Templates >> ] |
| [ < Demo of MIDI instruments ] | [ Up: MIDI ] | [ Templates > ] |
デフォルトの MIDI 楽器の音量を置き換える
デフォルトの MIDI 楽器の音量は Score コンテキストの
instrumentEqualizer プロパティをセットすることで置き換えることができます。セットするのは Scheme 関数で、音色名を引数で与えられた際にその音色に対応する最小音量と最大音量 (音量は割合で指定) のペアを返すものです。
次の例は、それぞれフルートとクラリネットに対して最小音量を最大音量をセットしています。
#(define my-instrument-equalizer-alist '()) #(set! my-instrument-equalizer-alist (append '(("flute" . (0.7 . 0.9)) ("clarinet" . (0.3 . 0.6))) my-instrument-equalizer-alist)) #(define (my-instrument-equalizer s) (let ((entry (assoc s my-instrument-equalizer-alist))) (if entry (cdr entry)))) \score { << \new Staff { \key g \major \time 2/2 \set Score.instrumentEqualizer = #my-instrument-equalizer \set Staff.midiInstrument = "flute" \new Voice \relative { r2 g''\mp g fis~ 4 g8 fis e2~ 4 d8 cis d2 } } \new Staff { \key g \major \set Staff.midiInstrument = "clarinet" \new Voice \relative { b'1\p a2. b8 a g2. fis8 e fis2 r } } >> \layout { } \midi { } }
| [ << MIDI ] | [Top][Contents] | [ >> ] |
| [ < デフォルトの MIDI 楽器の音量を置き換える ] | [ Up: Top ] | [ Ancient notation template – modern transcription of Gregorian music > ] |
24 Templates
| [ << Templates ] | [Top][Contents] | [ >> ] |
| [ < Templates ] | [ Up: Templates ] | [ アングリカン チャントのテンプレート > ] |
Ancient notation template – modern transcription of Gregorian music
This example demonstrates how to do modern transcription of Gregorian music. Gregorian music has no measure, no stems; it uses only half and quarter note heads, and special marks, indicating rests of different length.
chant = \relative c' { \set Score.timing = ##f f4 a2 \divisioMinima g4 b a2 f2 \divisioMaior g4( f) f( g f) a2 \finalis \break f4 a2 \divisioMinima g4 b a2 f2 \divisioMaior g4( f) f( g a) g2( f) \finalis } verba = \lyricmode { Lo -- rem ip -- sum do -- lor sit a -- met, lo -- rem ip -- sum do -- lor sit a -- met. } \score { \new GregorianTranscriptionStaff << \new GregorianTranscriptionVoice = "melody" \chant \new GregorianTranscriptionLyrics = "one" \lyricsto melody \verba >> }
| [ << Templates ] | [Top][Contents] | [ >> ] |
| [ < Ancient notation template – modern transcription of Gregorian music ] | [ Up: Templates ] | [ 賛美歌のテンプレート > ] |
アングリカン チャントのテンプレート
このテンプレートは、詩篇のアングリカン チャントを譜刻する 1 つの方法を示しています。また、詞を音楽の下に独立して追加する方法も示しています。2 つの詞はそれぞれ別の方法で作られています。
SopranoMusic = \relative g' { g1 | c2 b | a1 | \bar "||" a1 | d2 c | c b | c1 | \bar "||" } AltoMusic = \relative c' { e1 | g2 g | f1 | f1 | f2 e | d d | e1 | } TenorMusic = \relative a { c1 | c2 c | c1 | d1 | g,2 g | g g | g1 | } BassMusic = \relative c { c1 | e2 e | f1 | d1 | b2 c | g' g | c,1 | } global = { \time 2/2 } dot = \markup { \raise #0.7 \musicglyph "dots.dot" } tick = \markup { \raise #1 \fontsize #-5 \musicglyph "scripts.rvarcomma" } % Use markup to center the chant on the page \markup \fill-line { \score { % centered \new ChoirStaff << \new Staff << \global \clef "treble" \new Voice = "Soprano" << \voiceOne \SopranoMusic >> \new Voice = "Alto" << \voiceTwo \AltoMusic >> >> \new Staff << \clef "bass" \global \new Voice = "Tenor" << \voiceOne \TenorMusic >> \new Voice = "Bass" << \voiceTwo \BassMusic >> >> >> \layout { \context { \Score \override SpacingSpanner.base-shortest-duration = \musicLength 2 } \context { \Staff \remove "Time_signature_engraver" } } } % End score } % End markup \markup \fill-line { \left-column { \null \null \null \line { \fontsize #5 O \fontsize #3 come let us \bold sing | unto \dot the | Lord : let } \line { us heartily \concat { re \bold joice } in the | strength of | our } \line { sal | vation. } \null \line { \hspace #2.5 8. Today if ye will hear his voice * } \line { \concat { \bold hard en } \tick not your \tick hearts : as in the pro- } \line { vocation * and as in the \bold day of tempt- \tick } \line { -ation \tick in the \tick wilderness. } } }
| [ << Templates ] | [Top][Contents] | [ >> ] |
| [ < アングリカン チャントのテンプレート ] | [ Up: Templates ] | [ ジャズ コンボのテンプレート > ] |
賛美歌のテンプレート
このテンプレートは、それぞれの行が部分小節で開始し終了する賛美歌を作成する方法を示しています。また、詞を音楽の下に単独で表示する方法も示しています。
Timeline = { \time 4/4 \tempo 4=96 \partial 2 s2 | s1 | s2 \breathe s2 | s1 | s2 \caesura \break s2 | s1 | s2 \breathe s2 | s1 | s2 \fine } SopranoMusic = \relative g' { g4 g | g g g g | g g g g | g g g g | g2 g4 g | g g g g | g g g g | g g g g | g2 } AltoMusic = \relative c' { d4 d | d d d d | d d d d | d d d d | d2 d4 d | d d d d | d d d d | d d d d | d2 } TenorMusic = \relative a { b4 b | b b b b | b b b b | b b b b | b2 b4 b | b b b b | b b b b | b b b b | b2 } BassMusic = \relative g { g4 g | g g g g | g g g g | g g g g | g2 g4 g | g g g g | g g g g | g g g g | g2 } global = { \key g \major } \score { % Start score \new PianoStaff << % Start pianostaff \new Staff << % Start Staff = RH \global \clef "treble" \new Voice = "Soprano" << % Start Voice = "Soprano" \Timeline \voiceOne \SopranoMusic >> % End Voice = "Soprano" \new Voice = "Alto" << % Start Voice = "Alto" \Timeline \voiceTwo \AltoMusic >> % End Voice = "Alto" >> % End Staff = RH \new Staff << % Start Staff = LH \global \clef "bass" \new Voice = "Tenor" << % Start Voice = "Tenor" \Timeline \voiceOne \TenorMusic >> % End Voice = "Tenor" \new Voice = "Bass" << % Start Voice = "Bass" \Timeline \voiceTwo \BassMusic >> % End Voice = "Bass" >> % End Staff = LH >> % End pianostaff } % End score \markup \fill-line { \left-column { "This is line one of the first verse" "This is line two of the same" \null "And here's line one of the second verse" "And the next line of the same" } } \layout { \context { \Score caesuraType = #'((bar-line . "||")) fineBarType = "||" } } \paper { % Start paper block indent = 0 % don't indent first system line-width = 130 % shorten line length to suit music tagline = ##f % Don't print tag line, can be removed } % End paper block
| [ << Templates ] | [Top][Contents] | [ >> ] |
| [ < 賛美歌のテンプレート ] | [ Up: Templates ] | [ オーケストラ、コーラス、ピアノのテンプレート > ] |
ジャズ コンボのテンプレート
これはジャズ アンサンブルのための非常に高度なテンプレートです。全ての楽器が \key c \major で記述されています。これはコンサート
ピッチでの調を示しており、\transpose セクション内では自動的に移調されます。
\header { title = "Song" subtitle = "(tune)" composer = "Me" meter = "moderato" piece = "Swing" tagline = \markup \column { "LilyPond example file by Amelie Zapf," "Berlin 07/07/2003" } } % To make the example display properly in the documentation. \paper { paper-width = 130\mm paper-height = 205\mm } % #(set-global-staff-size 16) \include "english.ly" %%%%%%%%%%%% Some macros %%%%%%%%%%%%%%%%%%% sl = { \override NoteHead.style = #'slash \hide Stem } nsl = { \revert NoteHead.style \undo \hide Stem } crOn = \override NoteHead.style = #'cross crOff = \revert NoteHead.style % Insert chord name style stuff here. jazzChords = { } %%%%%%%%%%%% Keys'n'thangs %%%%%%%%%%%%%%%%% global = { \time 4/4 } Key = { \key c \major } % ############ Horns ############ % ------ Trumpet ------ trpt = \transpose c d \relative c'' { \Key c1 | c | c | } trpHarmony = \transpose c' d { \jazzChords } trumpet = { \global \clef treble \trpt } % ------ Alto Saxophone ------ alto = \transpose c a \relative c' { \Key c1 | c | c | } altoHarmony = \transpose c' a { \jazzChords } altoSax = { \global \clef treble \alto } % ------ Baritone Saxophone ------ bari = \transpose c a' \relative c { \Key c1 | c1 | \sl d4^"Solo" d d d \nsl | } bariHarmony = \transpose c' a \chordmode { \jazzChords s1 | s | d2:maj e:m7 | } bariSax = { \global \clef treble \bari } % ------ Trombone ------ tbone = \relative c { \Key c1 | c | c | } tboneHarmony = \chordmode { \jazzChords } trombone = { \global \clef bass \tbone } % ############ Rhythm Section ############# % ------ Guitar ------ gtr = \relative c'' { \Key c1 | \sl b4 b b b \nsl | c1 | } gtrHarmony = \chordmode { \jazzChords s1 | c2:min7+ d2:maj9 | s1 | } guitar = { \global \clef treble \gtr } %% ------ Piano ------ rhUpper = \relative c'' { \voiceOne \Key c1 | c | c | } rhLower = \relative c' { \voiceTwo \Key e1 | e | e | } lhUpper = \relative c' { \voiceOne \Key g1 | g | g | } lhLower = \relative c { \voiceTwo \Key c1 | c | c | } PianoRH = { \clef treble \global << \new Voice = "one" \rhUpper \new Voice = "two" \rhLower >> } PianoLH = { \clef bass \global << \new Voice = "one" \lhUpper \new Voice = "two" \lhLower >> } piano = << \new Staff = "upper" \PianoRH \new Staff = "lower" \PianoLH >> % ------ Bass Guitar ------ Bass = \relative c { \Key c1 | c | c | } bass = { \global \clef bass \Bass } % ------ Drums ------ up = \drummode { \voiceOne hh4 <hh sn> hh <hh sn> | hh4 <hh sn> hh <hh sn> | hh4 <hh sn> hh <hh sn> | } down = \drummode { \voiceTwo bd4 s bd s | bd4 s bd s | bd4 s bd s | } drumContents = { \global << \new DrumVoice \up \new DrumVoice \down >> } %%%%%%%%% It All Goes Together Here %%%%%%%%%%%%%%%%%%%%%% \book { % For the LilyPond documentation. \score { << \new StaffGroup = "horns" << \new Staff = "trumpet" \with { instrumentName = "Trumpet" } \trumpet \new Staff = "altosax" \with { instrumentName = "Alto Sax" } \altoSax \new ChordNames = "barichords" \with { instrumentName = "Bari Sax" } \bariHarmony \new Staff = "barisax" \with { instrumentName = "Bari Sax" } \bariSax \new Staff = "trombone" \with { instrumentName = "Trombone" } \trombone >> \new StaffGroup = "rhythm" << \new ChordNames = "chords" \with { instrumentName = "Guitar" } \gtrHarmony \new Staff = "guitar" \with { instrumentName = "Guitar" } \guitar \new PianoStaff = "piano" \with { instrumentName = "Piano" midiInstrument = "acoustic grand" } \piano \new Staff = "bass" \with { instrumentName = "Bass" } \bass \new DrumStaff \with { instrumentName = "Drums" } \drumContents >> >> \layout { \context { \Staff \RemoveEmptyStaves } \context { \Score \override BarNumber.padding = 3 \override RehearsalMark.padding = 2 skipBars = ##t } } \midi { } } }
| [ << Templates ] | [Top][Contents] | [ >> ] |
| [ < ジャズ コンボのテンプレート ] | [ Up: Templates ] | [ ピアノ テンプレート (シンプル) > ] |
オーケストラ、コーラス、ピアノのテンプレート
このテンプレートは StaffGroup と GrandStaff コンテキストをネストさせて用いることで、楽器のサブ グループを表示しています。また、\transpose を使用して、移調楽器の音符をコンサート ピッチの状態で変数に格納しています。
#(set-global-staff-size 17) \paper { indent = 3.0\cm % add space for instrumentName short-indent = 1.5\cm % add less space for shortInstrumentName } fluteMusic = \relative c' { \key g \major g'1 b } % Pitches as written on a manuscript for Clarinet in A % are transposed to concert pitch. clarinetMusic = \transpose c' a \relative c'' { \key bes \major bes1 d } trumpetMusic = \relative c { \key g \major g''1 b } % Key signature is often omitted for horns hornMusic = \transpose c' f \relative c { d'1 fis } percussionMusic = \relative c { \key g \major g1 b } sopranoMusic = \relative c'' { \key g \major g'1 b } sopranoLyrics = \lyricmode { Lyr -- ics } altoIMusic = \relative c' { \key g \major g'1 b } altoILyrics = \sopranoLyrics altoIIMusic = \relative c' { \key g \major g'1 b } altoIILyrics = \lyricmode { Ah -- ah } tenorMusic = \relative c' { \clef "treble_8" \key g \major g1 b } tenorLyrics = \sopranoLyrics pianoRHMusic = \relative c { \key g \major g''1 b } pianoLHMusic = \relative c { \clef bass \key g \major g1 b } violinIMusic = \relative c' { \key g \major g'1 b } violinIIMusic = \relative c' { \key g \major g'1 b } violaMusic = \relative c { \clef alto \key g \major g'1 b } celloMusic = \relative c { \clef bass \key g \major g1 b } bassMusic = \relative c { \clef "bass_8" \key g \major g,1 b } \book { \score { << \new StaffGroup = "StaffGroup_woodwinds" << \new Staff = "Staff_flute" \with { instrumentName = "Flute" } \fluteMusic \new Staff = "Staff_clarinet" \with { instrumentName = \markup { \concat { "Clarinet in B" \flat } } } % Declare that written Middle C in the music % to follow sounds a concert B flat, for % output using sounded pitches such as MIDI. %\transposition bes % Print music for a B-flat clarinet \transpose bes c' \clarinetMusic >> \new StaffGroup = "StaffGroup_brass" << \new Staff = "Staff_hornI" \with { instrumentName = "Horn in F" } % \transposition f \transpose f c' \hornMusic \new Staff = "Staff_trumpet" \with { instrumentName = "Trumpet in C" } \trumpetMusic >> \new RhythmicStaff = "RhythmicStaff_percussion" \with { instrumentName = "Percussion" } \percussionMusic \new PianoStaff \with { instrumentName = "Piano" } << \new Staff { \pianoRHMusic } \new Staff { \pianoLHMusic } >> \new ChoirStaff = "ChoirStaff_choir" << \new Staff = "Staff_soprano" \with { instrumentName = "Soprano" } \new Voice = "soprano" \sopranoMusic \new Lyrics \lyricsto "soprano" { \sopranoLyrics } \new GrandStaff = "GrandStaff_altos" \with { \accepts Lyrics } << \new Staff = "Staff_altoI" \with { instrumentName = "Alto I" } \new Voice = "altoI" \altoIMusic \new Lyrics \lyricsto "altoI" { \altoILyrics } \new Staff = "Staff_altoII" \with { instrumentName = "Alto II" } \new Voice = "altoII" \altoIIMusic \new Lyrics \lyricsto "altoII" { \altoIILyrics } >> \new Staff = "Staff_tenor" \with { instrumentName = "Tenor" } \new Voice = "tenor" \tenorMusic \new Lyrics \lyricsto "tenor" { \tenorLyrics } >> \new StaffGroup = "StaffGroup_strings" << \new GrandStaff = "GrandStaff_violins" << \new Staff = "Staff_violinI" \with { instrumentName = "Violin I" } \violinIMusic \new Staff = "Staff_violinII" \with { instrumentName = "Violin II" } \violinIIMusic >> \new Staff = "Staff_viola" \with { instrumentName = "Viola" } \violaMusic \new Staff = "Staff_cello" \with { instrumentName = "Cello" } \celloMusic \new Staff = "Staff_bass" \with { instrumentName = "Double Bass" } \bassMusic >> >> } }
| [ << Templates ] | [Top][Contents] | [ >> ] |
| [ < オーケストラ、コーラス、ピアノのテンプレート ] | [ Up: Templates ] | [ 中央に歌詞を配置したピアノ テンプレート > ] |
ピアノ テンプレート (シンプル)
いくつかの音符を持つシンプルなピアノ譜を示します。
upper = \relative c'' { \clef treble \key c \major \time 4/4 a4 b c d } lower = \relative c { \clef bass \key c \major \time 4/4 a2 c } \score { \new PianoStaff \with { instrumentName = "Piano" } << \new Staff = "upper" \upper \new Staff = "lower" \lower >> \layout { } \midi { } }
| [ << Templates ] | [Top][Contents] | [ >> ] |
| [ < ピアノ テンプレート (シンプル) ] | [ Up: Templates ] | [ 旋律と歌詞を持つピアノ テンプレート > ] |
中央に歌詞を配置したピアノ テンプレート
旋律と歌詞のための総譜ではなく、歌詞をピアノ譜の 2 つの譜の間に配置することができます。
upper = \relative c'' { \clef treble \key c \major \time 4/4 a4 b c d } lower = \relative c { \clef bass \key c \major \time 4/4 a2 c } text = \lyricmode { Aaa Bee Cee Dee } \score { \new PianoStaff << \new Staff = upper { \new Voice = "singer" \upper } \new Lyrics \lyricsto "singer" \text \new Staff = lower { \lower } >> \layout { } \midi { } }
| [ << Templates ] | [Top][Contents] | [ >> ] |
| [ < 中央に歌詞を配置したピアノ テンプレート ] | [ Up: Templates ] | [ SATB 合唱譜テンプレート - 4 譜 > ] |
旋律と歌詞を持つピアノ テンプレート
これは一般的な歌曲のフォーマットです: 旋律と歌詞を持つ譜と、その下にピアノ伴奏譜があります。
melody = \relative c'' { \clef treble \key c \major \time 4/4 a b c d } text = \lyricmode { Aaa Bee Cee Dee } upper = \relative c'' { \clef treble \key c \major \time 4/4 a4 b c d } lower = \relative c { \clef bass \key c \major \time 4/4 a2 c } \score { << \new Voice = "mel" { \autoBeamOff \melody } \new Lyrics \lyricsto mel \text \new PianoStaff << \new Staff = "upper" \upper \new Staff = "lower" \lower >> >> \layout { \context { \Staff \RemoveEmptyStaves } } \midi { } }
| [ << Templates ] | [Top][Contents] | [ >> ] |
| [ < 旋律と歌詞を持つピアノ テンプレート ] | [ Up: Templates ] | [ 音符、歌詞、コードを持つ単一譜のテンプレート > ] |
SATB 合唱譜テンプレート - 4 譜
SATB 合唱譜テンプレート (4 譜)
global = { \key c \major \time 4/4 \dynamicUp } sopranonotes = \relative c'' { c2 \p \< d c d \f } sopranowords = \lyricmode { do do do do } altonotes = \relative c'' { c2\p d c d } altowords = \lyricmode { re re re re } tenornotes = { \clef "G_8" c2\mp d c d } tenorwords = \lyricmode { mi mi mi mi } bassnotes = { \clef bass c2\mf d c d } basswords = \lyricmode { mi mi mi mi } \score { \new ChoirStaff << \new Staff << \new Voice = "soprano" << \global \sopranonotes >> \new Lyrics \lyricsto "soprano" \sopranowords >> \new Staff << \new Voice = "alto" << \global \altonotes >> \new Lyrics \lyricsto "alto" \altowords >> \new Staff << \new Voice = "tenor" << \global \tenornotes >> \new Lyrics \lyricsto "tenor" \tenorwords >> \new Staff << \new Voice = "bass" << \global \bassnotes >> \new Lyrics \lyricsto "bass" \basswords >> >> }
| [ << Templates ] | [Top][Contents] | [ >> ] |
| [ < SATB 合唱譜テンプレート - 4 譜 ] | [ Up: Templates ] | [ Single-staff template with notes, lyrics, chords, and frets > ] |
音符、歌詞、コードを持つ単一譜のテンプレート
これは旋律、歌詞、コードを持つ歌曲の楽譜のためのテンプレートです。
melody = \relative c' { \clef treble \key c \major \time 4/4 a4 b c d } text = \lyricmode { Aaa Bee Cee Dee } harmonies = \chordmode { a2 c } \score { << \new ChordNames { \set chordChanges = ##t \harmonies } \new Voice = "one" { \autoBeamOff \melody } \new Lyrics \lyricsto "one" \text >> \layout { } \midi { } }
| [ << Templates ] | [Top][Contents] | [ >> ] |
| [ < 音符、歌詞、コードを持つ単一譜のテンプレート ] | [ Up: Templates ] | [ 音符とコードを持つ単一譜のテンプレート > ] |
Single-staff template with notes, lyrics, chords, and frets
Here is a simple lead sheet template with melody, lyrics, chords, and fret diagrams.
verseI = \lyricmode { \set stanza = #"1." This is the first verse } verseII = \lyricmode { \set stanza = #"2." This is the second verse. } theChords = \chordmode { % insert chords for chordnames and fretboards here c2 g4 c } staffMelody = \relative c' { \key c \major \clef treble % Type notes for melody here c4 d8 e f4 g \bar "|." } \score { << \context ChordNames { \theChords } \context FretBoards { \theChords } \new Staff { \context Voice = "voiceMelody" { \staffMelody } } \new Lyrics = "lyricsI" { \lyricsto "voiceMelody" \verseI } \new Lyrics = "lyricsII" { \lyricsto "voiceMelody" \verseII } >> \layout { } \midi { } }
| [ << Templates ] | [Top][Contents] | [ >> ] |
| [ < Single-staff template with notes, lyrics, chords, and frets ] | [ Up: Templates ] | [ 音符と歌詞を持つ単一譜のテンプレート > ] |
音符とコードを持つ単一譜のテンプレート
旋律とコードを持つリード譜を欲しくはありませんか?他を見る必要はありません!
melody = \relative c' { \clef treble \key c \major \time 4/4 f4 e8[ c] d4 g | a2 ~ a } harmonies = \chordmode { c4:m f:min7 g:maj c:aug | d2:dim b4:5 e:sus } \score { << \new ChordNames { \set chordChanges = ##t \harmonies } \new Staff \melody >> \layout{ } \midi { } }
| [ << Templates ] | [Top][Contents] | [ >> ] |
| [ < 音符とコードを持つ単一譜のテンプレート ] | [ Up: Templates ] | [ 音符だけを持つ単一譜のテンプレート > ] |
音符と歌詞を持つ単一譜のテンプレート
この小さなテンプレートは歌詞を持つ簡単な旋律を表しています。カット&ペーストして、音符を付け加えて、それから歌詞の単語を付け加えてください。この例は自動ビームを off にしています。これはボーカル パートでは一般的なことです。自動ビームを使用するには、対応する行を変更するか、コメント アウトしてください。
melody = \relative c' { \clef treble \key c \major \time 4/4 a4 b c d } text = \lyricmode { Aaa Bee Cee Dee } \score{ << \new Voice = "one" { \autoBeamOff \melody } \new Lyrics \lyricsto "one" \text >> \layout { } \midi { } }
| [ << Templates ] | [Top][Contents] | [ >> ] |
| [ < 音符と歌詞を持つ単一譜のテンプレート ] | [ Up: Templates ] | [ 弦楽四重奏テンプレート (シンプル) > ] |
音符だけを持つ単一譜のテンプレート
これは音符を持つ譜を提供するとても簡単なテンプレートであり、ソロの楽器や旋律の楽譜断片に適しています。これをファイルにカット&ペーストして、音符を付け加えれば完了です!
melody = \relative c' { \clef treble \key c \major \time 4/4 a4 b c d } \score { \new Staff \melody \layout { } \midi { } }
| [ << Templates ] | [Top][Contents] | [ >> ] |
| [ < 音符だけを持つ単一譜のテンプレート ] | [ Up: Templates ] | [ パートを個々に持つ弦楽四重奏テンプレート > ] |
弦楽四重奏テンプレート (シンプル)
これは簡単な弦楽四重奏のためのテンプレートです。これは拍子記号と調号のために \global セクションを使っています。
global= { \time 4/4 \key c \major } violinOne = \new Voice \relative c'' { c2 d e1 \bar "|." } violinTwo = \new Voice \relative c'' { g2 f e1 \bar "|." } viola = \new Voice \relative c' { \clef alto e2 d c1 \bar "|." } cello = \new Voice \relative c' { \clef bass c2 b a1 \bar "|." } \score { \new StaffGroup << \new Staff \with { instrumentName = "Violin 1" } << \global \violinOne >> \new Staff \with { instrumentName = "Violin 2" } << \global \violinTwo >> \new Staff \with { instrumentName = "Viola" } << \global \viola >> \new Staff \with { instrumentName = "Cello" } << \global \cello >> >> \layout { } \midi { } }
| [ << Templates ] | [Top][Contents] | [ >> ] |
| [ < 弦楽四重奏テンプレート (シンプル) ] | [ Up: Templates ] | [ 合唱テンプレート > ] |
パートを個々に持つ弦楽四重奏テンプレート
“弦楽四重奏テンプレート” は適切な弦楽四重奏の楽譜を作り出しますが、個々のパート譜を譜刻する必要がある場合はどうでしょうか?今度の新しいテンプレートは \tag 機能を用いて容易に楽曲を個々のパートに分ける方法を示しています。
このテンプレートは別々のファイルに分ける必要があります。ファイル名は各ファイルの開始部分のコメントの中に記述されています。piece.ly はすべての音楽定義を保持しています。他のファイル - score.ly,
vn1.ly, vn2.ly, vla.ly それに vlc.ly - は対応するパートを作り出します。
別々のファイルに分ける場合は、指定されたコメントを外すことを忘れないでください!
% piece.ly % (This is the global definitions file.) global= { \time 4/4 \key c \major } Violinone = \new Voice \relative c'' { c2 d e1 \bar "|." } Violintwo = \new Voice \relative c'' { g2 g e1 \bar "|." } Viola = \new Voice \relative c' { \clef alto e2 d c1 \bar "|." } Cello = \new Voice \relative c' { \clef bass c2 b a1 \bar "|." } music = << \tag #'score \tag #'vn1 \new Staff \with { instrumentName = "Violin 1" } << \global \Violinone >> \tag #'score \tag #'vn2 \new Staff \with { instrumentName = "Violin 2" } << \global \Violintwo >> \tag #'score \tag #'vla \new Staff \with { instrumentName = "Viola" } << \global \Viola >> \tag #'score \tag #'vlc \new Staff \with { instrumentName = "Cello" } << \global \Cello >> >> % These are the other files you need to save on your computer % score.ly % (This is the main file.) % Uncomment the line below when using a separate file. % \include "piece.ly" #(set-global-staff-size 14) \score { \new StaffGroup \keepWithTag #'score \music \layout { } \midi { } } %{ Uncomment this block when using separate files. % vn1.ly % (This is the Violin 1 part file.) \include "piece.ly" \score { \keepWithTag #'vn1 \music \layout { } } % vn2.ly % (This is the Violin 2 part file.) \include "piece.ly" \score { \keepWithTag #'vn2 \music \layout { } } % vla.ly % (This is the Viola part file.) \include "piece.ly" \score { \keepWithTag #'vla \music \layout { } } % vlc.ly % (This is the Cello part file.) \include "piece.ly" \score { \keepWithTag #'vlc \music \layout { } } %}
| [ << Templates ] | [Top][Contents] | [ >> ] |
| [ < パートを個々に持つ弦楽四重奏テンプレート ] | [ Up: Templates ] | [ 自動ピアノ伴奏譜を持つ合唱譜 > ] |
合唱テンプレート
これは標準の 4 パート SATB (ソプラノ、アルト、テナー、バス) ボーカル譜です。もっと大きな合唱では、すべてのパートで使用されるセクションをインクルードすると便利です。例えば、拍子記号と調号はほとんど常にすべてのパートで同じです。“賛美歌” テンプレートのように、4 つのボイスは 2 つの譜にグループ分けされています。
\paper { top-system-spacing.basic-distance = 10 score-system-spacing.basic-distance = 20 system-system-spacing.basic-distance = 20 last-bottom-spacing.basic-distance = 10 } global = { \key c \major \time 4/4 } sopMusic = \relative { c''4 c c8[( b)] c4 } sopWords = \lyricmode { hi hi hi hi } altoMusic = \relative { e'4 f d e } altoWords = \lyricmode { ha ha ha ha } tenorMusic = \relative { g4 a f g } tenorWords = \lyricmode { hu hu hu hu } bassMusic = \relative { c4 c g c } bassWords = \lyricmode { ho ho ho ho } \score { \new ChoirStaff << \new Lyrics = "sopranos" \with { % this is needed for lyrics above a staff \override VerticalAxisGroup.staff-affinity = #DOWN } \new Staff = "women" << \new Voice = "sopranos" { \voiceOne << \global \sopMusic >> } \new Voice = "altos" { \voiceTwo << \global \altoMusic >> } >> \new Lyrics = "altos" \new Lyrics = "tenors" \with { % this is needed for lyrics above a staff \override VerticalAxisGroup.staff-affinity = #DOWN } \new Staff = "men" << \clef bass \new Voice = "tenors" { \voiceOne << \global \tenorMusic >> } \new Voice = "basses" { \voiceTwo << \global \bassMusic >> } >> \new Lyrics = "basses" \context Lyrics = "sopranos" \lyricsto "sopranos" \sopWords \context Lyrics = "altos" \lyricsto "altos" \altoWords \context Lyrics = "tenors" \lyricsto "tenors" \tenorWords \context Lyrics = "basses" \lyricsto "basses" \bassWords >> }
| [ << Templates ] | [Top][Contents] | [ >> ] |
| [ < 合唱テンプレート ] | [ Up: Templates ] | [ 上下に歌詞を配置した合唱譜テンプレート > ] |
自動ピアノ伴奏譜を持つ合唱譜
このテンプレートは、“合唱テンプレート” で示した標準の SATB ボーカル譜に自動ピアノ譜を付け加えています。これは LilyPond の強みの 1 つを示しています - 音楽定義を何回も使用することができます。ボーカルの音符 (例えば、tenorMusic
の音符) に変更が加えられた場合、その変更はピアノ譜にも適用されます。
\paper { top-system-spacing.basic-distance = 10 score-system-spacing.basic-distance = 20 system-system-spacing.basic-distance = 20 last-bottom-spacing.basic-distance = 10 } global = { \key c \major \time 4/4 } sopMusic = \relative { c''4 c c8[( b)] c4 } sopWords = \lyricmode { hi hi hi hi } altoMusic = \relative { e'4 f d e } altoWords =\lyricmode { ha ha ha ha } tenorMusic = \relative { g4 a f g } tenorWords = \lyricmode { hu hu hu hu } bassMusic = \relative { c4 c g c } bassWords = \lyricmode { ho ho ho ho } \score { << \new ChoirStaff << \new Lyrics = "sopranos" \with { % This is needed for lyrics above a staff \override VerticalAxisGroup.staff-affinity = #DOWN } \new Staff = "women" << \new Voice = "sopranos" { \voiceOne << \global \sopMusic >> } \new Voice = "altos" { \voiceTwo << \global \altoMusic >> } >> \new Lyrics = "altos" \new Lyrics = "tenors" \with { % This is needed for lyrics above a staff \override VerticalAxisGroup.staff-affinity = #DOWN } \new Staff = "men" << \clef bass \new Voice = "tenors" { \voiceOne << \global \tenorMusic >> } \new Voice = "basses" { \voiceTwo << \global \bassMusic >> } >> \new Lyrics = "basses" \context Lyrics = "sopranos" \lyricsto "sopranos" \sopWords \context Lyrics = "altos" \lyricsto "altos" \altoWords \context Lyrics = "tenors" \lyricsto "tenors" \tenorWords \context Lyrics = "basses" \lyricsto "basses" \bassWords >> \new PianoStaff << \new Staff << \set Staff.printPartCombineTexts = ##f \partCombine << \global \sopMusic >> << \global \altoMusic >> >> \new Staff << \clef bass \set Staff.printPartCombineTexts = ##f \partCombine << \global \tenorMusic >> << \global \bassMusic >> >> >> >> }
| [ << Templates ] | [Top][Contents] | [ >> ] |
| [ < 自動ピアノ伴奏譜を持つ合唱譜 ] | [ Up: Templates ] | [ 詩句とリフレインからなる合唱譜 > ] |
上下に歌詞を配置した合唱譜テンプレート
このテンプレートは基本的に単純な “合唱” テンプレートと同じですが、歌詞が
alignAboveContext と alignBelowContext を用いて配置されています。
global = { \key c \major \time 4/4 } sopMusic = \relative c'' { c4 c c8[( b)] c4 } sopWords = \lyricmode { hi hi hi hi } altoMusic = \relative c' { e4 f d e } altoWords = \lyricmode { ha ha ha ha } tenorMusic = \relative c' { g4 a f g } tenorWords = \lyricmode { hu hu hu hu } bassMusic = \relative c { c4 c g c } bassWords = \lyricmode { ho ho ho ho } \score { \new ChoirStaff << \new Staff = "women" << \new Voice = "sopranos" { \voiceOne << \global \sopMusic >> } \new Voice = "altos" { \voiceTwo << \global \altoMusic >> } >> \new Lyrics \with { alignAboveContext = "women" } \lyricsto "sopranos" \sopWords \new Lyrics \with { alignBelowContext = "women" } \lyricsto "altos" \altoWords % we could remove the line about this with the line below, since % we want the alto lyrics to be below the alto Voice anyway. % \new Lyrics \lyricsto "altos" \altoWords \new Staff = "men" << \clef bass \new Voice = "tenors" { \voiceOne << \global \tenorMusic >> } \new Voice = "basses" { \voiceTwo << \global \bassMusic >> } >> \new Lyrics \with { alignAboveContext = "men" } \lyricsto "tenors" \tenorWords \new Lyrics \with { alignBelowContext = "men" } \lyricsto "basses" \bassWords % again, we could replace the line above this with the line below. % \new Lyrics \lyricsto "basses" \bassWords >> }
| [ << Templates ] | [Top][Contents] | [ >> ] |
| [ < 上下に歌詞を配置した合唱譜テンプレート ] | [ Up: Templates ] | [ > ] |
詩句とリフレインからなる合唱譜
このテンプレートでは、ソロの詩句から始まり、2 つのボイスからなるリフレインが続く楽譜を作成できます。また、\global 変数を用いて、拍子記号の変更 (や、その他の全パートに共通な部分) を楽譜全体に反映させる例も示しています。タイミングを合わせるために空白休符を用いています。
global = { \key g \major % verse \time 3/4 s2.*2 \break % refrain \time 2/4 s2*2 \bar "|." } SoloNotes = \relative g' { \clef "treble" % verse g4 g g | b4 b b | % refrain R2*2 | } SoloLyrics = \lyricmode { One two three | four five six | } SopranoNotes = \relative c'' { \clef "treble" % verse R2.*2 | % refrain c4 c | g4 g | } SopranoLyrics = \lyricmode { la la | la la | } BassNotes = \relative c { \clef "bass" % verse R2.*2 | % refrain c4 e | d4 d | } BassLyrics = \lyricmode { dum dum | dum dum | } \score { << \new Voice = "SoloVoice" << \global \SoloNotes >> \new Lyrics \lyricsto "SoloVoice" \SoloLyrics \new ChoirStaff << \new Voice = "SopranoVoice" << \global \SopranoNotes >> \new Lyrics \lyricsto "SopranoVoice" \SopranoLyrics \new Voice = "BassVoice" << \global \BassNotes >> \new Lyrics \lyricsto "BassVoice" \BassLyrics >> >> \layout { ragged-right = ##t \context { \Staff % these lines prevent empty staves from being printed \RemoveEmptyStaves \override VerticalAxisGroup.remove-first = ##t } } }
| [Top][Contents] |
Table of Contents
- 1 Pitches
- 音域をボイスごとに追加する
- オッターバを単一のボイスに対して適用する
- Aiken head thin variant noteheads
- 連桁で繋がれた音符の符幹の長さを変更する
- 音域
- Ambitus after key signature
- 複数のボイスを持つ譜での音域
- 音階に応じて異なる符頭のスタイルを適用する
- メロディに合わせて譜の中央にある音符の符幹の向きを自動で変更する
- オッターバ囲みのテキストを変更する
- 音域の隙間を変更する
- 譜線の音程を変更する
- 音部記号を移動する
- ピッチに応じて符頭の色を変更する
- 異なるピッチの音符列を作成する
- カスタマイズされた調号を作成する
- Direction of merged ‘fa’ shape note heads
- Force a cancellation natural before accidentals
- 音部記号を強制的に表示する
- ランダムな音符を生成する
- タイで繋がれた音符が改行した際の臨時記号を隠す
- 音部記号の変更を大きく表示する
- マカームの例
- オッターヴァのスパナの傾きを変更する
- 非伝統的な調号
- 演奏を容易にする記譜法で数字を使用する
- オーケストラ、コーラス、ピアノのテンプレート
- 追加のナチュラル記号が自動で追加されないようにする
- 調号が変化する際にナチュラル記号が表示されないようにする
- 移調を含む他のボイスの引用
- 調号の取り消し表示を新たな調号から離す
- Transposing pitches with minimum accidentals (“smart” transpose)
- Turkish Makam example
- 音部記号のプロパティを調整する
- Using \autoChange with more than one voice
- 2 Rhythms
- Adding beams, slurs, ties, etc., when using tuplet and non-tuplet rhythms
- ドラム パートを追加する
- 装飾音符のスペースを調整する
- 小節番号を揃える
- 二全音符を変更する
- Appoggiatura or grace note before a bar line
- 自動的な連桁細分
- 自動で音価を変更する
- Score コンテキストでの自動連桁
- Beam nibs
- 改行に跨る連桁
- 向きの変わる連桁が作られる符頭間の距離を変更する
- 複数小節にまたがる休符の形を変更する
- 音符ごとに付点の数を独立して変更する
- メトロノーム記号を表示せずにテンポを変更する
- 連符の数字を変更する
- \scaleDurations を使用した多拍子の部分で拍子記号を変更する
- Chant or psalm notation
- 複合拍子
- 小節のグループ化記号
- 連符の括弧の可視性をコントロールする
- Cow and ride bell example
- マークアップ モードでメトロノーム記号を作成する
- タイを手動で譜刻する
- トレモロを符幹に接触せずに譜刻する
- 一つの \tuplet コマンドで複数の連符を入力する
- リハーサル記号を指定した番号や文字から始める
- 符尾をカスタマイズする
- ギター ストロークのリズム
- 多拍子記号を大きくカスタマイズする
- High and low woodblock example
- Making an object invisible using the ‘transparent’ property
- 複雑な破線のスラーを作成する
- 連桁の位置を手動でコントロールする
- 多声の部分で複数小節にまたがる休符を統合する
- 連符のブラケットの長さを変更する
- 多声の音楽で付点付きの音符を移動する
- 複数小節にまたがる休符の長さをコントロールする
- 複数小節にまたがる休符にマークアップを付加する
- デフォルトでない連符の数字
- 単一の小節の休符に数字を付ける
- Partcombine and \autoBeamOff
- Percussion example
- 連桁で繋がれた連符の途中で改行する
- 装飾音符の連桁を通常の連桁の高さと同じになるよう配置する
- 装飾音符を浮いたスペースに配置する
- 複数小節にまたがる休符の位置を変更する
- Positioning opposing fermatas on a bar line
- 最後にリハーサル記号を配置した際に連符が削除されないようにする
- 一定間隔で小節番号を表示する
- Printing bar numbers for broken measures
- 小節番号を四角や丸の中に表示する
- Printing bar numbers using modulo-bar-number-visible
- 小節番号が表示される間隔を変更する
- メトロノーム記号やリハーサル記号を譜の下に表示する
- 音楽を異なる拍子記号で表示する
- 最初の小節に小節番号を表示する
- Printing tuplet brackets on the note head side
- 装飾音符のデフォルトの挙動を再定義する
- 楽譜から小節番号を削除する
- 休符のスタイル
- デフォルトの連桁のグループ化規則を置き換える
- リズム スラッシュ
- 歌詞モードでのスキップ
- 歌詞モードでのスキップ (2)
- 小符幹 (ステムレット)
- 厳密な拍に基づく連桁
- 連桁を細分する
- Tam-tam example
- Tambourine example
- 3 方向ボックス
- Time signature in brackets
- 括弧に囲まれた拍子記号
- 拍子記号の (分数ではなく) 分子のみを数字で表示する
- 装飾音符のスタイルを調整する
- ユーザ定義の拍子記号
- 符尾のスタイルを変更する
- 通常の符頭で装飾音符のスラッシュを使用する
- アルペジオにタイを使用する
- 3 Expressive marks
- 発想記号や和音の音符に括弧を追加する
- 長いグリッサンドにタイミング マークを追加する
- Adjusting slur positions vertically
- fall や doit の形を調整する
- Aligning the ends of hairpins to NoteColumn directions
- 二全音符を変更する
- 非対称なスラー
- ブレス記号
- 一部が隠されたクレッシェンドのヘアピン
- Caesura (“railtracks”) with fermata
- ヘアピンの下にテキストを中央揃えする
- テキストによる強弱記号のテキストとスパナのスタイルを変更する
- スラーを実線から点線や破線に変更する
- ブレス記号を変更する
- 音符ごとに付点の数を独立して変更する
- 強弱記号をマークアップ テキストと結合する
- Combining dynamics with markup texts (2)
- 現代のグリッサンド
- 改行後のスパナの可視性をコントロールする
- 和音内の運指記号の位置をコントロールする
- スクリプトの縦方向の優先順位をコントロールする
- Creating “real” parenthesized dynamics
- 遅れターンを作成する
- 異なるボイスにまたがるアルペジオを作成する
- ピアノ譜で譜をまたがるアルペジオを作成する
- 他のコンテキストで譜をまたがるアルペジオを作成する
- 2 桁の運指記号を作成する
- ボイスをまたがるスラーを作成する
- テキスト スパナを作成する
- Dynamics spanner with custom text
- Grob をスキップするグリッサンド
- 異なるライン スタイルのヘアピン
- テキスト強弱記号の線を隠す
- Horizontally aligning custom dynamics like “più f”
- カエスーラを挿入する
- レセ ヴィブレのタイ
- 矢印
- 複雑な破線のスラーを作成する
- アーティキュレーションの省略記法のデフォルト値を書き換える
- スラーの縦方向の位置を移動する
- ヘアピンの端点を移動する
- アルペジオの配置
- テキスト マークアップをスラーの内側に配置する
- ヘアピンを様々なスタイルで表示する
- ヘアピンの表示に al niente 記譜法を用いる
- メトロノーム記号やリハーサル記号を譜の下に表示する
- 小節線にぶつかるヘアピンの挙動を設定する
- ヘアピンの最小長さをセットする
- 同じアーティキュレーションを音符や和音の上と下の両方に表示する
- Snap pizzicato (“Bartok” pizzicato)
- Using \arpeggioBracket to make divisi more visible
- ブレス記号にチェックを使用する
- 和音のレガートに 2 つのスラーを使用する
- whiteout プロパティを使用する
- バロック音楽の縦線アーティキュレーション マーク
- 複数の音符にまたがる強弱記号を縦方向に揃える
- 4 Repeats
- デフォルトの小節線を変更する
- Controlling the appearance of tremolo slashes
- 譜をまたがるトレモロ
- トレモロを符幹に接触せずに譜刻する
- 独立したパーセント繰り返し
- Measure counters
- パーセント繰り返しのカウンタの可視性
- パーセント繰り返しのカウンタ
- セーニョとコーダを (改行を挟んで) 配置する
- 入れ替え部分がある場合の二重繰り返しのデフォルトをセットする
- 繰り返し括弧を短くする
- Unfolding tremolo repeats
- 繰り返し括弧をコード ネームの下に表示する
- Volta brackets in multiple staves
- repeatCommands を用いて入れ替え部分のテキストにマークアップを使用する
- 5 Simultaneous notes
- 6 Staff notation
- 音域をボイスごとに追加する
- 譜を追加する
- 改行時に譜を追加する
- 改行後に分かれる譜について、指示を表示する
- ボーカル譜にオーケストラの合図音符を追加する
- 小節番号を変更する
- Ambitus after key signature
- デフォルトの小節線を変更する
- 譜線の数を変更する
- 譜のサイズを変更する
- 空の譜を作成する
- カスタマイズされた調号を作成する
- 譜をまたがる符幹
- システムに譜が 1 つしか存在しない場合にも括弧を表示する
- グループ内に演奏する譜がある場合に GrandStaff 全体を表示したままにする
- Extending a trill spanner
- 繰り返しにまたがるグリッサンド
- 平坦なタイ
- Forcing measure width to adapt to a metronome mark’s width
- Grob をスキップするグリッサンド
- インキピット
- 譜の上にマークアップとして楽譜片を挿入する
- TabStaff で最高弦を下に表示する
- 文字でタブ譜をフォーマットする
- グリッサンドを改行できるようにする
- いくつかの譜線を他より太くする
- Measure counters
- Mensurstriche レイアウト (譜の間に小節線を表示する)
- オッターヴァのスパナの傾きを変更する
- 譜をネストする
- 非伝統的な調号
- オーケストラ、コーラス、ピアノのテンプレート
- Print chord names with same root and different bass as slash and bass note
- 歌詞を譜の内部に表示する
- 他のボイスを引用する
- 移調を含む他のボイスの引用
- Reconciliating bar lines thickness when staves are of different sizes (TODO duplicates snippet in Documentation/en/notation/spacing.itely)
- ピアノ曲の先頭にあるブレースを削除する
- StaffGroup, PianoStaff, GrandStaff の譜を繋ぐ小節線を削除する
- 先頭の空行を削除する
- システム セパレータを設定する
- Shape individual ties in chords
- ティック小節線
- Time signature in brackets
- 括弧に囲まれた拍子記号
- 音部記号のプロパティを調整する
- 1 つの譜で 2 つの \partCombine を使用する
- 譜グループの先頭に角括弧を使用する
- Using \autoChange with more than one voice
- Using mark lines in a Frenched score
- Vertically aligned StaffGroups without connecting SystemStartBar
- 繰り返し括弧をコード ネームの下に表示する
- Volta brackets in multiple staves
- 7 Editorial annotations
- 楽譜に運指記号を追加する
- オブジェクトにリンクを追加する
- タブ譜にマークアップを追加する
- 運指記号を譜の内側に表示する
- 小節番号を変更する
- 分析用のブラケットを譜の上に表示する
- ラベル付きの分析用ブラケット
- 音階に応じて異なる符頭のスタイルを適用する
- \whiteout コマンドで譜線を隠す
- Changing a single note’s size in a chord
- スラーを実線から点線や破線に変更する
- ピッチに応じて符頭の色を変更する
- 和音内の運指記号の位置をコントロールする
- 遅れターンを作成する
- 空の譜を作成する
- 2 桁の運指記号を作成する
- 譜の中央にある音符の符幹のデフォルトの向き
- Different font size settings for instrumentName and shortInstrumentName
- Grob の周りにボックスを表示する
- 符頭の周りを円で囲む
- 様々なオブジェクトの周りを円で囲む
- \markup ブロックにネイティブ PostScript を埋め込む
- Generate special note head shapes
- グリッド線: 見た目を変更する
- グリッド線: リズムの強調と音符の同期
- ハンマリング オンとプリング オフ
- 和音に対してハンマリング オンやプリング オフを使用する
- ボイスに対してハンマリング オンやプリング オフを使用する
- いくつかの譜線を他より太くする
- Marking notes of spoken parts with a cross on the stem (Sprechstimme)
- Measure counters
- Measure spanner
- 運指記号の位置を正確にコントロールする
- テキスト マークアップをスラーの内側に配置する
- テキストを右から左へ表示する
- 弦番号の延長線
- whiteout プロパティを使用する
- 8 Text
- タブ譜にマークアップを追加する
- 楽譜に現在日時を追加する
- Adjusting vertical spacing of lyrics
- 楽器名を揃える
- 歌詞音節をメリスマに揃える
- Aligning text marks to notes
- \whiteout コマンドで譜線を隠す
- ヘアピンの下にテキストを中央揃えする
- オッターバ囲みのテキストを変更する
- デフォルトのテキスト フォント ファミリを変更する
- 強弱記号をマークアップ テキストと結合する
- Combining dynamics with markup texts (2)
- 2 つのパートを 1 つの譜にまとめる
- Creating “real” parenthesized dynamics
- テキスト スパナを作成する
- Demonstrating all \header fields
- \markup ブロックにネイティブ PostScript を埋め込む
- 歌詞音節をフォーマットする
- 歌詞音節の間にタイを入力する
- 歌詞の揃え位置
- Markup list
- 複数小節にまたがる休符にマークアップを付加する
- Of the ubiquity of markup objects
- バージョン番号を出力する
- 中央に歌詞を配置したピアノ テンプレート
- リハーサル記号を全ての譜の上に表示する
- テキストを右から左へ表示する
- 歌詞を譜の内部に表示する
- 独立したテキストの 2 段組み
- 弦番号の延長線
- 3 方向ボックス
- UTF-8
- 上下に歌詞を配置した合唱譜テンプレート
- repeatCommands を用いて入れ替え部分のテキストにマークアップを使用する
- 9 Vocal music
- 音域をボイスごとに追加する
- 改行後に分かれる譜について、指示を表示する
- ボーカル譜にオーケストラの合図音符を追加する
- Adjusting vertical spacing of lyrics
- 歌詞音節をメリスマに揃える
- 音域
- Ambitus after key signature
- 複数のボイスを持つ譜での音域
- Ancient notation template – modern transcription of Gregorian music
- アングリカン チャントのテンプレート
- 異なる歌詞を同じ行に表示する
- 歌詞の節のフォントを変更する
- Chant or psalm notation
- ハイフンを強制的に表示する
- 歌詞音節をフォーマットする
- 歌詞音節の間にタイを入力する
- 賛美歌のテンプレート
- 歌詞の揃え位置
- Marking notes of spoken parts with a cross on the stem (Sprechstimme)
- オーケストラ、コーラス、ピアノのテンプレート
- 旋律と歌詞を持つピアノ テンプレート
- 歌詞を譜の内部に表示する
- SATB 合唱譜テンプレート - 4 譜
- 音符、歌詞、コードを持つ単一譜のテンプレート
- Single-staff template with notes, lyrics, chords, and frets
- 音符と歌詞を持つ単一譜のテンプレート
- 歌詞モードでのスキップ
- 歌詞モードでのスキップ (2)
- Using \arpeggioBracket to make divisi more visible
- タグを使用して同じソースから計量音楽譜と現代譜を生成する
- オッシアと歌詞の縦方向の揃え位置
- Vertically aligning stanza numbers of different staves
- 共通な歌詞を縦方向に中央揃えする
- 合唱テンプレート
- 自動ピアノ伴奏譜を持つ合唱譜
- 上下に歌詞を配置した合唱譜テンプレート
- 詩句とリフレインからなる合唱譜
- 10 Chord notation
- 通奏低音を音符の上か下に追加する
- ChordNames コンテキストに小節線を追加する
- Adjusting figured bass alteration glyphs
- Changing a single note’s size in a chord
- コード ネームの区切り記号を変更する
- 通奏低音の変化記号の位置を変更する
- コード ネームの例外
- メジャー セブンスのコード ネーム
- Chord names alternative
- Chords with stretched fingering for FretBoards and TabVoice
- クラスタ
- 和音内の運指記号の位置をコントロールする
- 譜をまたがる和音 – 連桁との問題を解決する
- Customizing the chord grid style
- Customizing the no-chord symbol
- Display non-English chord names
- 複雑な和音を表示する
- 通奏低音の延長線を一部だけ途切れさせる
- Print chord names with same root and different bass as slash and bass note
- コード ネームを変更時のみ表示する
- シンプル リード シート
- 音符、歌詞、コードを持つ単一譜のテンプレート
- Single-staff template with notes, lyrics, chords, and frets
- 音符とコードを持つ単一譜のテンプレート
- 共通な通奏低音の延長線を縦方向に中央揃えする
- 繰り返し括弧をコード ネームの下に表示する
- 11 Keyboard and other multi-staff instruments
- アコーディオンの音色切り替え記号
- サステイン ペダル記号のテキストを変更する
- クラスタ
- 和音内の運指記号の位置をコントロールする
- ボイスをまたがるスラーを作成する
- 譜をまたがる和音 – 連桁との問題を解決する
- 譜をまたがるトレモロ
- ペダル記号のブラケットを微調整する
- ブラケット型のアルペジオで譜をまたぐ和音を表示する
- ジャズ コンボのテンプレート
- レセ ヴィブレのタイ
- ピアノ テンプレート (シンプル)
- 中央に歌詞を配置したピアノ テンプレート
- 旋律と歌詞を持つピアノ テンプレート
- ピアノ曲の先頭にあるブレースを削除する
- Using \autoChange with more than one voice
- 自動ピアノ伴奏譜を持つ合唱譜
- 12 Percussion
- 13 Fretted string instruments
- 楽譜に運指記号を追加する
- タブ譜に運指記号を追加する
- タブ譜にマークアップを追加する
- 運指記号を譜の内側に表示する
- Automatic fretboards barré
- フレット図の向きを変更する
- Chord changes for fretboards
- タブ譜での和音のグリッサンド
- Chords with stretched fingering for FretBoards and TabVoice
- 和音内の運指記号の位置をコントロールする
- フレットボードのフレット図をカスタマイズする
- マークアップのフレット図をカスタマイズする
- 弦番号と右手の運指
- フラメンコの記譜法
- フレット図とその調整
- 代替フレット テーブル
- フレットのある楽器のハーモニクスをタブ譜で表示する
- ギターのスライド
- ギター ストロークのリズム
- ハンマリング オンとプリング オフ
- 和音に対してハンマリング オンやプリング オフを使用する
- ボイスに対してハンマリング オンやプリング オフを使用する
- フレット図の位置を変更する方法
- ジャズ コンボのテンプレート
- レセ ヴィブレのタイ
- TabStaff で最高弦を下に表示する
- 文字でタブ譜をフォーマットする
- タブ譜で開放弦のハーモニクスを表示する
- 右手の運指記号の配置
- タブ譜における多声
- Setting up predefined fretboards for other instruments
- タブ譜でのスライド
- タブ譜での符幹と連桁の挙動
- 弦番号の延長線
- 14 Unfretted string instruments
- 15 Wind instruments
- 16 Ancient notation
- 17 World music
- 18 Contexts and engravers
- 音域をボイスごとに追加する
- 譜を追加する
- 改行時に譜を追加する
- ChordNames コンテキストに小節線を追加する
- Ambitus after key signature
- ラベル付きの分析用ブラケット
- メロディに合わせて譜の中央にある音符の符幹の向きを自動で変更する
- MIDI チャンネルをボイスごとに割り当てる
- \scaleDurations を使用した多拍子の部分で拍子記号を変更する
- 異なるボイスにまたがるアルペジオを作成する
- 空の譜を作成する
- 他のコンテキストで譜をまたがるアルペジオを作成する
- カスタマイズされた調号を作成する
- 譜をまたがる符幹
- Scheme でエングラーバを定義する: 音域
- グループ内に演奏する譜がある場合に GrandStaff 全体を表示したままにする
- エングラーバを一つずつ
- グリッド線: 見た目を変更する
- グリッド線: リズムの強調と音符の同期
- Measure counters
- Measure spanner
- Mensurstriche レイアウト (譜の間に小節線を表示する)
- 譜をネストする
- 連桁で繋がれた連符の途中で改行する
- Print chord names with same root and different bass as slash and bass note
- リハーサル記号を全ての譜の上に表示する
- 音楽を異なる拍子記号で表示する
- 楽譜から小節番号を削除する
- 譜グループの先頭に角括弧を使用する
- Using mark lines in a Frenched score
- タグを使用して同じソースから計量音楽譜と現代譜を生成する
- 詩句とリフレインからなる合唱譜
- 繰り返し括弧をコード ネームの下に表示する
- Volta brackets in multiple staves
- 19 Tweaks and overrides
- オッターバを単一のボイスに対して適用する
- オブジェクトにリンクを追加する
- タブ譜にマークアップを追加する
- 長いグリッサンドにタイミング マークを追加する
- 装飾音符のスペースを調整する
- Adjusting slur positions vertically
- Adjusting vertical spacing of lyrics
- Aligning text marks to notes
- 連桁で繋がれた音符の符幹の長さを変更する
- 小節番号を変更する
- 分析用のブラケットを譜の上に表示する
- ラベル付きの分析用ブラケット
- 非対称なスラー
- Breaking vertical alignment of dynamics and textscripts
- Caesura (“railtracks”) with fermata
- Changing a single note’s size in a chord
- 連桁の太さとスペーシングを変更する
- 複数小節にまたがる休符の形を変更する
- 個々の Grob のプロパティを変更する
- テキストによる強弱記号のテキストとスパナのスタイルを変更する
- デフォルトのテキスト フォント ファミリを変更する
- 譜のサイズを変更する
- メトロノーム記号を表示せずにテンポを変更する
- サステイン ペダル記号のテキストを変更する
- 改行後のスパナの可視性をコントロールする
- Controlling the appearance of tremolo slashes
- スクリプトの縦方向の優先順位をコントロールする
- 連符の括弧の可視性をコントロールする
- 遅れターンを作成する
- カスタマイズされた調号を作成する
- テキスト スパナを作成する
- 譜をまたがる和音 – 連桁との問題を解決する
- 譜をまたがる符幹
- クストス
- フレットボードのフレット図をカスタマイズする
- マークアップのフレット図をカスタマイズする
- システムに譜が 1 つしか存在しない場合にも括弧を表示する
- Grob の親子関係を表示する
- ハーモニクスの付点
- Grob の周りにボックスを表示する
- 様々なオブジェクトの周りを円で囲む
- Dynamics spanner with custom text
- Extending a trill spanner
- 繰り返しにまたがるグリッサンド
- ペダル記号のブラケットを微調整する
- 平坦なタイ
- Force a cancellation natural before accidentals
- 音符の水平位置を強制的に調整する
- フレット図とその調整
- Generate special note head shapes
- 符尾をカスタマイズする
- Grob をスキップするグリッサンド
- 異なるライン スタイルのヘアピン
- Horizontally aligning custom dynamics like “più f”
- フレット図の位置を変更する方法
- カエスーラを挿入する
- 音部記号の変更を大きく表示する
- 矢印
- Making an object invisible using the ‘transparent’ property
- グリッサンドを改行できるようにする
- 連桁の位置を手動でコントロールする
- Measure-centered bar numbers
- Mensurstriche レイアウト (譜の間に小節線を表示する)
- オッターヴァのスパナの傾きを変更する
- 多声の音楽で付点付きの音符を移動する
- スラーの縦方向の位置を移動する
- 譜をネストする
- Overriding articulations by type
- パーセント繰り返しのカウンタの可視性
- アルペジオの配置
- 運指記号の位置を正確にコントロールする
- 複数小節にまたがる休符の位置を変更する
- テキスト マークアップをスラーの内側に配置する
- 小節番号を四角や丸の中に表示する
- メトロノーム記号やリハーサル記号を譜の下に表示する
- 音名を表示し、オクターブの表示を制御する
- Printing tuplet brackets on the note head side
- プロポーショナル ノーテーションで厳格モードを使用する
- ピアノ曲の先頭にあるブレースを削除する
- StaffGroup, PianoStaff, GrandStaff の譜を繋ぐ小節線を削除する
- 先頭の空行を削除する
- 休符のスタイル
- リズム スラッシュ
- 調号の取り消し表示を新たな調号から離す
- 小節線にぶつかるヘアピンの挙動を設定する
- システム セパレータを設定する
- Shape individual ties in chords
- 同じアーティキュレーションを音符や和音の上と下の両方に表示する
- 弦番号の延長線
- 音符の衝突に関する警告を抑制する
- Time signature in brackets
- 括弧に囲まれた拍子記号
- 拍子記号の (分数ではなく) 分子のみを数字で表示する
- 連符のブラケットと譜の変更
- 音部記号のプロパティを調整する
- 装飾音符のスタイルを調整する
- 符尾のスタイルを変更する
- \tweak で Grob にアクセスするために ly:grob-object を用いる
- 個々の Grob を調整するために \tweak コマンドを使用する
- 強弱記号やテキスト スクリプトを縦方向に揃える
- オッシアと歌詞の縦方向の揃え位置
- Vertically aligning stanza numbers of different staves
- 共通な通奏低音の延長線を縦方向に中央揃えする
- 20 Paper and layout
- 21 Titles
- 22 Spacing
- Adjusting vertical spacing of lyrics
- 運指記号を譜の内側に表示する
- Breaking vertical alignment of dynamics and textscripts
- ページ ラベル
- プロポーショナル ノーテーションで厳格モードを使用する
- Reconciliating bar lines thickness when staves are of different sizes (TODO duplicates snippet in Documentation/en/notation/spacing.itely)
- 強弱記号やテキスト スクリプトを縦方向に揃える
- オッシアと歌詞の縦方向の揃え位置
- 23 MIDI
- 24 Templates
- Ancient notation template – modern transcription of Gregorian music
- アングリカン チャントのテンプレート
- 賛美歌のテンプレート
- ジャズ コンボのテンプレート
- オーケストラ、コーラス、ピアノのテンプレート
- ピアノ テンプレート (シンプル)
- 中央に歌詞を配置したピアノ テンプレート
- 旋律と歌詞を持つピアノ テンプレート
- SATB 合唱譜テンプレート - 4 譜
- 音符、歌詞、コードを持つ単一譜のテンプレート
- Single-staff template with notes, lyrics, chords, and frets
- 音符とコードを持つ単一譜のテンプレート
- 音符と歌詞を持つ単一譜のテンプレート
- 音符だけを持つ単一譜のテンプレート
- 弦楽四重奏テンプレート (シンプル)
- パートを個々に持つ弦楽四重奏テンプレート
- 合唱テンプレート
- 自動ピアノ伴奏譜を持つ合唱譜
- 上下に歌詞を配置した合唱譜テンプレート
- 詩句とリフレインからなる合唱譜