| [ << Tweaks and overrides ] | [トップ][目次] | [ Titles >> ] |
| [ < Tweaks and overrides: 共通な通奏低音の延長線を縦方向に中央揃えする ] | [ 上へ : Top ] | [ Paper and layout: 楽器名を揃える > ] |
Paper and layout
| [ << Paper and layout ] | [トップ][目次] | [ Titles >> ] |
| [ < Paper and layout ] | [ 上へ : Paper and layout ] | [ Paper and layout: 異なる歌詞を同じ行に表示する > ] |
楽器名を揃える
楽器名の水平方向の位置は Staff.InstrumentName.self-alignment-X
プロパティを変更することで調整することができます。\layout 変数は indent と short-indent を定義しており、それぞれ最初のシステムとその後のシステムで、楽器名に割くスペースの量を変更することができます。
\paper { left-margin = 3\cm }
\score {
\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 {
ragged-right = ##t
indent = 4\cm
short-indent = 2\cm
}
}
| [ << Paper and layout ] | [トップ][目次] | [ Titles >> ] |
| [ < Paper and layout: 楽器名を揃える ] | [ 上へ : Paper and layout ] | [ 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 ] | [トップ][目次] | [ Titles >> ] |
| [ < Paper and layout: 異なる歌詞を同じ行に表示する ] | [ 上へ : Paper and layout ] | [ 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.
\on-the-fly #first-page \fromproperty #'header:copyright
}
\fill-line {
%% Part tagline header field only on each part last page.
\on-the-fly #part-last-page \fromproperty #'header:parttagline
}
\fill-line {
%% Tagline header field only on book last page.
\on-the-fly #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 ] | [トップ][目次] | [ Titles >> ] |
| [ < Paper and layout: ブック パート ] | [ 上へ : Paper and layout ] | [ 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 ] | [トップ][目次] | [ Titles >> ] |
| [ < Paper and layout: 譜のサイズを変更する ] | [ 上へ : Paper and layout ] | [ Paper and layout: 空の譜を作成する > ] |
システムをクリップする
このコードは、フルスコアから部分をクリップ (抽出) する方法を示しています。
このファイルは -dclip-systems を付加して個別に実行する必要があり、スニペットのページに示されている出力は結果を示しているものではありません。
出力されるファイルの名前は ‘base-from-start-to-end[-count].eps’ の形になります。
システムの始端や終端が含まれている場合は、System Grob の領域も出力に含まれます (例: 楽器名)。
クリップ領域の終端にある装飾音符は出力に含まれません。
クリップ領域は複数のシステムを含むことができます。この場合には、複数の EPS ファイルが出力されます。
#(ly:set-option 'clip-systems)
#(define output-suffix "1")
origScore = \score {
\relative c' {
\new Staff \with { instrumentName = "Instrument" }
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.
% (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)
#(define output-suffix #f)
\book {
\score { \origScore }
\markup { \bold \fontsize #6 clips }
\score {
\lyrics {
\markup { 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 ] | [トップ][目次] | [ Titles >> ] |
| [ < Paper and layout: システムをクリップする ] | [ 上へ : Paper and layout ] | [ Paper and layout: 全てのヘッダの例示 > ] |
空の譜を作成する
空の譜を作成するには、空の小節を作って Score コンテキストから
Bar_number_engraver を削除します。また Staff コンテキストから
Time_signature_engraver, Clef_engraver, Bar_engraver
を削除します。
#(set-global-staff-size 20)
\score {
{
\repeat unfold 12 { s1 \break }
}
\layout {
indent = 0\in
\context {
\Staff
\remove "Time_signature_engraver"
\remove "Clef_engraver"
\remove "Bar_engraver"
}
\context {
\Score
\remove "Bar_number_engraver"
}
}
}
% 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
}
%}
% uncomment these lines for "A4" size
%{
\paper {
#(set-paper-size "a4")
ragged-last-bottom = ##f
line-width = 180
left-margin = 15
bottom-margin = 10
top-margin = 10
}
%}
| [ << Paper and layout ] | [トップ][目次] | [ Titles >> ] |
| [ < Paper and layout: 空の譜を作成する ] | [ 上へ : Paper and layout ] | [ Paper and layout: システム セパレータを設定する > ] |
全てのヘッダの例示
全てのヘッダの例示です。
\header {
copyright = "copyright"
title = "title"
subtitle = "subtitle"
composer = "composer"
arranger = "arranger"
instrument = "instrument"
metre = "metre"
opus = "opus"
piece = "piece"
poet = "poet"
texidoc = "All header fields with special meanings."
copyright = "public domain"
enteredby = "jcn"
source = "urtext"
}
\layout {
ragged-right = ##f
}
\score {
\relative c'' { c1 | c | c | c }
}
\score {
\relative c'' { c1 | c | c | c }
\header {
title = "localtitle"
subtitle = "localsubtitle"
composer = "localcomposer"
arranger = "localarranger"
instrument = "localinstrument"
metre = "localmetre"
opus = "localopus"
piece = "localpiece"
poet = "localpoet"
copyright = "localcopyright"
}
}
| [ << Paper and layout ] | [トップ][目次] | [ Titles >> ] |
| [ < Paper and layout: 全てのヘッダの例示 ] | [ 上へ : Paper and layout ] | [ Paper and layout: 目次 > ] |
システム セパレータを設定する
システムとシステムの間にシステム セパレータを挿入することができます。任意のマークアップが使用できますが、デフォルト値は \slashSeparator
となっています。
\paper {
system-separator-markup = \slashSeparator
line-width = 120
}
notes = \relative c' {
c1 | c \break
c1 | c \break
c1 | c
}
\book {
\score {
\new GrandStaff <<
\new Staff \notes
\new Staff \notes
>>
}
}
| [ << Paper and layout ] | [トップ][目次] | [ Titles >> ] |
| [ < Paper and layout: システム セパレータを設定する ] | [ 上へ : Paper and layout ] | [ Paper and layout: SystemStartBar を接続せずに StaffGroups を縦方向に揃える > ] |
目次
目次は \markuplines \table-of-contents によって挿入することができます。目次のアイテムは \tocItem で追加します。
#(set-default-paper-size "a6")
\book {
\markuplist \table-of-contents
\pageBreak
\tocItem \markup { The first score }
\score {
{
c'1 \pageBreak
\mark "A" \tocItem \markup { Mark A }
d'1
}
}
\pageBreak
\tocItem \markup { The second score }
\score {
{ e'1 }
\header { piece = "Second score" }
}
}
| [ << Paper and layout ] | [トップ][目次] | [ Titles >> ] |
| [ < Paper and layout: 目次 ] | [ 上へ : Paper and layout ] | [ Titles > ] |
SystemStartBar を接続せずに StaffGroups を縦方向に揃える
このスニペットは、それぞれに SystemStartBar のある複数の StaffGroup を、SystemStartBar を繋げずに縦方向に揃える方法を示しています。
% by Thomas Morley
#(set-global-staff-size 18)
\paper {
indent = 0
ragged-right = ##f
print-all-headers = ##t
}
\layout {
\context {
\Staff
\consists "Mark_engraver"
\override RehearsalMark.self-alignment-X = #LEFT
}
\context {
\StaffGroup
systemStartDelimiterHierarchy =
#'(SystemStartBrace (SystemStartBracket a b))
}
\context {
\Score
\override SystemStartBrace.style = #'bar-line
\omit SystemStartBar
\override SystemStartBrace.padding = #-0.1
\override SystemStartBrace.thickness = #1.6
\remove "Mark_engraver"
\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' {
\mark \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' {
\mark \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' {
\mark \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 ] | [トップ][目次] | [ Titles >> ] |
| [ < Paper and layout: 目次 ] | [ 上へ : Paper and layout ] | [ Titles > ] |