異なるピッチの音符列を作成する

同じ音符列が異なる音高で複数出現する音楽では、次の音楽関数が便利です。これは音符を引数として取り、その音高のみが使用されます。この例では Holst の The Planets の一曲、Mars に使用されるリズムを作り出しています。

rhythm =
#(define-music-function (p) (ly:pitch?)
   "Make the rhythm in Mars (the Planets) at the given pitch"
  #{ \tuplet 3/2 { $p 8 8 8 } 4 4 8 8 4 #})

\new Staff {
  \time 5/4
  \rhythm c'
  \rhythm c''
  \rhythm g
}

[image of music]

LilyPond snippets v2.25.15 (開発版).