簡體   English   中英

Lilypond:控制譜號和鍵簽名可見性,對齊標記

[英]Lilypond: controlling clef and key signature visibility, aligning markup

我努力創建一個包含六個不同部分的文檔的文檔遇到了一些問題。 有人可以幫忙嗎? 我正在粘貼下面的代碼(為了提出問題,我已經稍微減少了示例)。

問題1:如何隱藏線末端的譜號和鍵簽名? \\ score中的命令不符合我認為的基於文檔的行為。

問題2:如何將文本標記與行的開頭對齊? 我希望“1號”等在工作人員的一開始就左對齊。

額外查詢:有沒有人知道為什么使用\\ partial會破壞部分度量之前的度量中的波束? 對此有一般性的解決方法嗎? (沒有使用[]對正確的光束進行硬編碼。)

任何幫助感激不盡!

=========================

\version "2.16.2"

notes = {
  \bar""\mark\markup\normalsize{No. 1}
  \clef bass
  \time 6/8
  \key g \major
  \partial 8 \once \stemUp d=8 |
  g( d e) e( c d) |
  \partial 8*5 d g d b g
  \bar""
  \break

  \mark\markup\normalsize{No. 2}
  \clef bass
  \time 3/8
  \key d \minor
  \partial 8 a=8 |
  d,4 bes'8 | 
  \partial 4 cis,4
  \bar""
  \break

  \mark\markup\normalsize{No. 3}
  \clef bass
  \time 3/8
  \key c \major
  \partial 8 g=8 |
  c8 c,16( d e f) |
  \partial 4 g8( a)
  \bar""
  \break

  \mark\markup\normalsize{No. 4}
  \clef bass
  \time 12/8
  \key es \major
  \partial 8 es8 |
  es( d es) bes( c d) es( d es) g( f g) |
  \break

  \mark\markup\normalsize{No. 5}
  \clef bass
  \time 3/8
  %\key c \minor
  \partial 8 g=8 |
  es8. f16 d8 |
  \partial 16*3 es8.
  \bar""
  \break

  \mark\markup\normalsize{No. 6}
  \clef alto
  \time 6/8
  \key d \major
  \partial 8 a='8 |
  << { d,4. e8 fis g |\noBreak
       fis d a' \stemDown a16( g fis g) a8 \stemUp |\noBreak
       d, a d e fis g |\noBreak } \\
     { fis,4. a8 s s |
       d, s8*5 |
       fis8 s s a s s | } \\
     { s2. |
       a8 s8*5 |
       s2. | } >>
  fis'8 d a d,4
}

\score {
  \relative c <<
    \new Staff \notes
    \override Score.TextScript #'font-family = #'sans
    \override Score.RehearsalMark #'font-family = #'sans
    \override Staff.Clef #'break-visibility = #begin-of-line-visible
    \override Staff.Clef #'explicitClefVisibility = #begin-of-line-visible
    \override Staff.TimeSignature #'break-visibility = #begin-of-line-
visible
    \override Staff.KeySignature #'break-visibility = #begin-of-line-visible
    \override Staff.KeySignature #'explicitKeySignatureVisibility = #begin-
of-line-visible
    \override Staff.KeyCancellation #'break-visibility = #all-invisible
    \override Staff.KeyCancellation #'explicitKeySignatureVisibility = #all-
invisible
  >>
  \layout {
  }
}

\paper {
  paper-height = 250\pt%7in=504pt max.
  line-width = 432\pt
  paper-width = 432\pt
  left-margin = 0\pt
  top-margin = 0\pt
  bottom-margin = 0\pt
  indent = 0
  head-separation = 0\pt
  page-top-space = 0\pt
  after-title-space = 0\pt
  before-title-space = 0\pt
  between-system-padding = 0\pt
  between-system-space = 0\pt
  between-title-space = 0\pt
  foot-separation = 0\pt
  ragged-bottom = ##f
  ragged-right = ##t
}

\book {
  #(set-global-staff-size 13)
}

\header {
  tagline = ""%removed
  title = ""
}

以下是您的兩個問題的解決方案:

1)我編寫了上面的代碼,警告譜號已經隱藏了。 時間簽名問題將通過使用\\set Staff.explicitKeySignatureVisibility = #begin-of-line-visible

2)要解決此問題,您可以將\\mark\\markup文本與譜號對齊,然后將其移位水平量。

只需替換這個\\score

\score {
  \relative c <<
    \new Staff \notes
    \override Score.RehearsalMark.break-align-symbols = #'(clef) %this will put the \mark\markup texts above the clefs
    \override Score.Clef.break-align-anchor-alignment = #0.3 % %this controls its horizontal displacement. In my test, 0.3 was the ideal value to have the No. x exactly at the beginning of each system
    \override Score.TextScript #'font-family = #'sans
    \override Score.RehearsalMark #'font-family = #'sans
    \override Staff.Clef #'break-visibility = #begin-of-line-visible
    \override Staff.Clef #'explicitClefVisibility = #begin-of-line-visible
    \override Staff.TimeSignature #'break-visibility = #begin-of-line-visible
    \set Staff.explicitKeySignatureVisibility = #begin-of-line-visible % this will do the job with the time signatures
    \override Staff.KeyCancellation #'break-visibility = #all-invisible
    \override Staff.KeyCancellation #'explicitKeySignatureVisibility = #all-invisible
  >>
  \layout {
  }
}

關於你的額外問題:我在LilyPond(v2.12)的舊文檔中找到以下引文:

\\ partial命令僅用於片段的開頭。 如果您在開始后使用它,可能會出現一些奇怪的警告。

也許這就是你遇到這些問題的原因。 我會建議一些解決方法,如使用隱形休息(輸入為sn ,其中n是持續時間)。 發射問題的另一種可能性是手動控制發射。 這很煩人,但它完成了工作:) Ex:替換你的1號的音樂內容,這是:

  \partial 8 \once \stemUp d=8 |
  g( d e) e([ c d)] |
  \partial 8*5 d g d b g

對於:

  \partial 8 \once \stemUp d=8 |
  g( d e) e([ c d)] |
  \partial 8*5 d[ g d] b[ g]

我希望這有幫助。

所以這里的問題是你有一個單獨的樂器工作人員被分解成6件,這會導致各種各樣的問題,包括譜號,拾音條,關鍵簽名。 雖然我上面發布的解決方法效果很好(除了譜號),但最理想的是必須將你的六個例子中的每一個都作為一個小分數考慮。 然后你可以讓LilyPond打印一個在彼此之下。 這是一個最小的例子:

A = {c'4 d' e' f'}
B = {\clef bass c2 g c1}
C = {e'4 d' cis' fis' | e' d' cis' }

\score {\new Staff \A}
\score {\new Staff \B}
\markup {This text will be added between the scores...}
\score {\new Staff \C}

結果如下:

在此輸入圖像描述

注意C的最后一個條只有3個四分音符因此保持打開狀態,沒有任何\\bar ""命令。 此外,譜號,關鍵簽名和拾取條的所有問題現在都消失了。

這是你的代碼重做了。 我想現在它運作得很好:

\version "2.16.2"

A = {
  \bar""\mark\markup\normalsize{No. 1}
  \clef bass
  \time 6/8
  \key g \major
  \partial 8 \once \stemUp d=8 |
  g( d e) e( c d) |
  d g d b g
}

B = {
  \mark\markup\normalsize{No. 2}
  \clef bass
  \time 3/8
  \key d \minor
  \partial 8 a'8 |
  d,4 bes'8 | 
  cis,4
}

C = {
  \mark\markup\normalsize{No. 3}
  \clef bass
  \time 3/8
  \key c \major
  \partial 8 g'8 |
  c8 c,16( d e f) |
  g8( a)
}

D = {
  \mark\markup\normalsize{No. 4}
  \clef bass
  \time 12/8
  \key es \major
  \partial 8 es8 |
  es( d es) bes( c d) es( d es) g( f g) |
}

E = {
  \mark\markup\normalsize{No. 5}
  \clef bass
  \time 3/8
  %\key c \minor
  \partial 8 g'8 |
  es8. f16 d8 |
  es8.
}

F = {
  \mark\markup\normalsize{No. 6}
  \clef alto
  \time 6/8
  \key d \major
  \partial 8 a''8 |
  << { d,4. e8 fis g |\noBreak
       fis d a' \stemDown a16( g fis g) a8 \stemUp |\noBreak
       d, a d e fis g |\noBreak } \\
     { fis,4. a8 s s |
       d, s8*5 |
       fis8 s s a s s | } \\
     { s2. |
       a8 s8*5 |
       s2. | } >>
  fis'8 d a d,4
}

\score {
  \relative c <<
    \new Staff \A
    \override Score.RehearsalMark.break-align-symbols = #'(clef) %this will put the \mark\markup texts above the clefs
    \override Score.Clef.break-align-anchor-alignment = #0.3 % %this controls its horizontal displacement. In my test, 0.3 was the ideal value to have the No. x exactly at the beginning of each system
    \override Score.TextScript #'font-family = #'sans
    \override Score.RehearsalMark #'font-family = #'sans
  >>
  \layout { }
}

\score {
  \relative c <<
    \new Staff \B
    \override Score.RehearsalMark.break-align-symbols = #'(clef) %this will put the \mark\markup texts above the clefs
    \override Score.Clef.break-align-anchor-alignment = #0.3 % %this controls its horizontal displacement. In my test, 0.3 was the ideal value to have the No. x exactly at the beginning of each system
    \override Score.TextScript #'font-family = #'sans
    \override Score.RehearsalMark #'font-family = #'sans
  >>
  \layout { }
}

\score {
  \relative c <<
    \new Staff \C
    \override Score.RehearsalMark.break-align-symbols = #'(clef) %this will put the \mark\markup texts above the clefs
    \override Score.Clef.break-align-anchor-alignment = #0.3 % %this controls its horizontal displacement. In my test, 0.3 was the ideal value to have the No. x exactly at the beginning of each system
    \override Score.TextScript #'font-family = #'sans
    \override Score.RehearsalMark #'font-family = #'sans
  >>
  \layout { }
}

\score {
  \relative c <<
    \new Staff \D
    \override Score.RehearsalMark.break-align-symbols = #'(clef) %this will put the \mark\markup texts above the clefs
    \override Score.Clef.break-align-anchor-alignment = #0.3 % %this controls its horizontal displacement. In my test, 0.3 was the ideal value to have the No. x exactly at the beginning of each system
    \override Score.TextScript #'font-family = #'sans
    \override Score.RehearsalMark #'font-family = #'sans
  >>
  \layout { }
}

\score {
  \relative c <<
    \new Staff \E
    \override Score.RehearsalMark.break-align-symbols = #'(clef) %this will put the \mark\markup texts above the clefs
    \override Score.Clef.break-align-anchor-alignment = #0.3 % %this controls its horizontal displacement. In my test, 0.3 was the ideal value to have the No. x exactly at the beginning of each system
    \override Score.TextScript #'font-family = #'sans
    \override Score.RehearsalMark #'font-family = #'sans
  >>
  \layout { }
}

\score {
  \relative c <<
    \new Staff \F
    \override Score.RehearsalMark.break-align-symbols = #'(clef) %this will put the \mark\markup texts above the clefs
    \override Score.Clef.break-align-anchor-alignment = #0.3 % %this controls its horizontal displacement. In my test, 0.3 was the ideal value to have the No. x exactly at the beginning of each system
    \override Score.TextScript #'font-family = #'sans
    \override Score.RehearsalMark #'font-family = #'sans
  >>
  \layout { }
}


\paper {
  paper-height = 250\pt%7in=504pt max.
  line-width = 432\pt
  paper-width = 432\pt
  left-margin = 0\pt
  top-margin = 0\pt
  bottom-margin = 0\pt
  indent = 0
  head-separation = 0\pt
  page-top-space = 0\pt
  after-title-space = 0\pt
  before-title-space = 0\pt
  between-system-padding = 0\pt
  between-system-space = 0\pt
  between-title-space = 0\pt
  foot-separation = 0\pt
  ragged-bottom = ##f
  ragged-right = ##t
}

\book {
  #(set-global-staff-size 13)
}

\header {
  tagline = ""%removed
  title = ""
}

生產:

在此輸入圖像描述

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM