Lilypond function; add a rhythm to a note -
how can write lilypond function takes in note , outputs note rhythm? say: input: c' output: c'8 c'16 c'
in lilypond documentation can find example:
rhythm = #(define-music-function (parser location p) (ly:pitch?) "make rhythm in mars (the planets) @ 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 }
hopefully can adapted want! replace mars rhythm own. , please note space needed between variable $p
, durations.
Comments
Post a Comment