[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: passing lyrics to music function
From: |
Wilbert Berendsen |
Subject: |
Re: passing lyrics to music function |
Date: |
Tue, 8 Feb 2011 10:40:49 +0100 |
User-agent: |
KMail/1.13.5 (Linux/2.6.32-28-generic; KDE/4.5.0; i686; ; ) |
Op maandag 07 februari 2011 schreef janof:
> How to define (music) functinns, where is possible pass lyrics as
> parameter? I want to create an abstract template for adding lyrics with
> specific formatting.
an expression with lyrics is also a normal music expression, I think. E.g.:
\version "2.13.44"
bla = #
(define-music-function (parser location lyrics) (ly:music?)
(music-map
(lambda (m)
(if (equal? (ly:music-property m 'name) 'LyricEvent)
(ly:music-set-property! m 'text (string-append "BLA"
(ly:music-property
m 'text))))
m) lyrics))
text = \lyricmode {
hi there!
}
\new Lyrics \bla \text
best regards,
Wilbert Berendsen
--
Frescobaldi, LilyPond editor for KDE: http://www.frescobaldi.org/
Nederlands LilyPond forum: http://www.lilypondforum.nl/