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

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -