LilyPond:无括号的括号中的音高(手风琴符号)
问题描述:
对于手风琴乐谱表示法,通常在圆括号中指定 音高,例如, (E在下面的片段括号中)。这是我的目标:LilyPond:无括号的括号中的音高(手风琴符号)
括号(1)不奏不应该占用额外的逻辑时间的措施螺距(读乐谱时,它们用于播放的方便),( 2)他们应该留在和弦附近。
我LilyPond的代码现在如下:
\version "2.18.2"
\include "deutsch.ly"
#(set-global-staff-size 20.0)
\relative c {
\clef bass
e8 <gis d' e>^7 h, q
\override Stem.details.beamed-lengths = #'(0)
\grace \parenthesize e
\revert Stem.details
e <gis d' e> gis, q
\override Stem.details.beamed-lengths = #'(0)
\grace \parenthesize e'
\revert Stem.details
}
使用lilypond --pdf sample.ly
我得到以下的结果:
我LilyPond的获得的结果有几个问题:(一)杆长对宽限音符没有影响,(ii)宽限音符被移到下一个小节,理想情况下它应该保持在和弦附近,(iii)括号太小(尽管它只是一个小小的评论)。
如何使用LilyPond达到预期的效果(即如第一张图)?
P.S.编辑:
我能够创建一个解决方法(见下文),这是不优雅,但这项工作:
\version "2.18.2"
\include "deutsch.ly"
#(set-global-staff-size 20.0)
\relative c {
\clef bass
e8 <gis d' e>^7 h, \afterGrace q
{
\override Stem.thickness = #-1.0
\parenthesize e4
\revert Stem.thickness
}
e8 <gis d' e> gis,_B \afterGrace q
{
\override Stem.thickness = #-1.0
\parenthesize e'4
\revert Stem.thickness
}
}
上述片断的输出如下:
有没有更好的方法来实现它?
答
而不是使用\override Stem.thickness = #-1.0
,更优雅的解决方案是使用stencil
属性。此属性可用于省略词干,标志,音符头等。此外,如果您只想覆盖单个音符/和弦并在其后自动恢复,则可以使用语句\once \override <something>
。最后,你还可以定义一个音乐功能来自动处理所有这些,特别是如果你经常使用这种结构。在下面这个例子中,参数是装饰音及装饰音本身之前的音符/和弦立即见:
\version "2.18.2"
\include "deutsch.ly"
#(set-global-staff-size 20.0)
accordionGrace = #(define-music-function
(parser location firstNote secondNote)
(ly:music? ly:music?)
#{
\afterGrace
$firstNote
{
\once \override Stem.stencil = ##f
\once \override Flag.stencil = ##f
\parenthesize $secondNote
}
#}
)
\relative c {
\clef bass
e8 <gis d' e>^7 h,
\accordionGrace q e8
e8 <gis d' e> gis,_B
\accordionGrace q e'8
}
正是我一直在寻找!非常感谢 – selyunin