On 01/29/2014 03:38 PM, Gonçalo Nogueira wrote:
Is there a way I can define a music function so that I can write

\alignLyrics #0.7 syllable

The attachment shows what I have tried but is not compiling.

Try the following:

alignLyrics =
#(define-music-function
      (parser location alignment text)
      (number? ly:music?)
    #{
      \once \override LyricText.self-alignment-X = $alignment $text
    #})

Note that you can access a parameter as $name between #{ .. #}. Also note that you should interpret text as ly:music; if it's markup, I can see no obvious way to attach the hyphen to it without going through hoops again.


Best,
Alexander

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to