如何编写一个接受音符并输出有节奏音符的Lilypond函数?输入: c‘输出: c'8 c'16 c’
发布于 2015-06-20 15:44:29
在LilyPond documentation中,您可以找到以下示例:
rhythm =
#(define-music-function (parser location p) (ly:pitch?)
"Make the rhythm in Mars (the Planets) at the given pitch"
#{ \tuplet 3/2 { $p 8 $p $p } $p 4 $p $p 8 $p $p 4 #})
\new Staff {
\time 5/4
\rhythm c'
\rhythm c''
\rhythm g
}

希望它能被修改为你想做的事情!用你自己的节奏来代替火星节奏。请注意,变量$p和持续时间之间需要一个空格。
https://stackoverflow.com/questions/30948445
复制相似问题