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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -