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 } 

enter image description here

hopefully can adapted want! replace mars rhythm own. , please note space needed between variable $p , durations.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -