【发布时间】:2013-10-28 03:34:06
【问题描述】:
目前我编写的lilypond 代码如下所示:
\version "2.14.2"
P = #parenthesize
\relative c, {
\clef bass
<c \P c'> <e \P e'> <g \P g'>2 <c, \P c'>4 <d \P d'> <e \P e'>2
}
我重复的意思是“这个音符,连同高一个八度的同一个音符,用括号括起来”。
我想要一个缩写的方法,这样我就可以写这样的东西:
\version "2.14.2"
poct = ...
\relative c, {
\clef bass
\poct c \poct e \poct g2 \poct c,4 \poct d \poct e2
}
正如a helpful answer to an earlier question of mine 中所建议的那样,我尝试使用a music function,但我无法让它工作。我能得到的最接近的是
poct = #(define-music-function
(parser location note)
(ly:music?)
#{
<< $note \transpose c c \parenthesize $note >>
#})
但这使用<< .. >> 而不是< .. >,它不会呈现我想要的方式(并且带有警告),我不知道为什么\transpose c c 实际上转置任何东西。
最后,切线相关,在尝试音乐功能时,我发现仅仅创建一个模仿\repeat unfold 2的音乐功能是不可能的;以下在第三个和第四个c之间跳了一个八度:
\version "2.14.2"
double = #(define-music-function
(parser location note)
(ly:music?)
#{
$note $note
#})
\relative c, {
\clef bass
\double c \double e \double g2 \double c,4 \double d \double e2
}
标签: lilypond scheme guile lilypond music-notation