gpt4 book ai didi

Lilypond:控制谱号和调号可见性,对齐标记

转载 作者:行者123 更新时间:2023-12-02 19:07:05 26 4
gpt4 key购买 nike

我创建一个包含来自不同部分的六个开头的文档的努力是遇到几个问题。有人可以帮忙吗?我粘贴我的代码下面(为了提出问题,我稍微简化了示例)。

问题 1:如何隐藏乐谱末尾的谱号和调号线?\score 中的命令的行为并不像我想象的那样在文档上。

问题 2:如何将文本标记与行首对齐?我想“No. 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)的旧文档中找到了以下引用:

The \partial command is intended to be used only at the beginning of a piece. If you use it after the beginning, some odd warnings may occur.

也许这就是您遇到这些问题的原因。我建议一些解决方法,例如使用不可见的休止符(输入为 sn,其中 n 是持续时间)。发射问题的另一种可能性是手动控制发射。这很烦人,但它完成了工作:) 例如:替换您的 No.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]

我希望这会有所帮助。

关于Lilypond:控制谱号和调号可见性,对齐标记,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18818803/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com