Hello ! Thank you for your answer and your suggestions. I plan anyways to use inclusion and to split my code between multiple files. My main problem is that the number of verses can vary between songs. But a solution to this could be to build the list in the lyric file, which is specific to each song.
Then I can use the other functions you suggested me in the template file. Thanks a lot I'll look to the code to figure out it's different parts. Best regards. Yann Le 6 avr. 2013 12:33, "Felix Janda" <felix.ja...@posteo.de> a écrit : > > Hi, > > how about putting the lyrics into a list and looping over this list? > Like: > > ------------------------------------------------------------ > > \version "2.16.0" > > one = \lyricmode {Some text } > two = \lyricmode {more text } > #(define rawlyrics (list #{ \one #} #{ \two #})) > #(define packedlyrics (map (lambda (arg) #{ > \new Lyrics \lyricsto "voice" $arg > #}) rawlyrics)) > #(define alllyrics (make-simultaneous-music packedlyrics)) > > \score { > \new Staff << > \new Voice = "voice" { > \relative c'' {c c } > } > \alllyrics > >> > \layout {} > } > > ------------------------------------------------------------ > > > As an alternative to putting the score templates into a music function > one could also use "\include": > > score.ily -------------------------------------------------- > > \version "2.16.0" > > % Score template > > \score { > \new Staff << > \music > } > \layout {} > } > > song1.ly --------------------------------------------------- > > \version "2.16.0" > > music = \relative c'' c > \include "score.ily" > > ------------------------------------------------------------ > > Felix
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user