Re: Array variables and loops (for lyrics)

2023-09-20 Thread Jean Abou Samra
Le mercredi 20 septembre 2023 à 20:37 +0200, Mauro Levra a écrit : > Without the empty '() in the else branch, when the if condition is false  > nothing is returned to the #@ operator. Well, that “nothing” actually is something — it's *unspecified* , a special value used in Guile when a value is

Re: Array variables and loops (for lyrics)

2023-09-20 Thread Mauro Levra
On 17/09/2023 00:11, Jean Abou Samra wrote: Is is possible to conditionally execute the #@ expression based on whether the 'textArray' variable is bound? \version "2.24.2" textArray = << { \lyricmode { \set stanza = "1" fo -- o bar } } { \lyricmode { \set stanza = "2" fo -- o bar } }

Re: Array variables and loops (for lyrics)

2023-09-16 Thread Jean Abou Samra
> Is is possible to conditionally execute the #@ expression based on  > whether the 'textArray' variable is bound? \version "2.24.2" textArray = << { \lyricmode { \set stanza = "1" fo -- o bar } } { \lyricmode { \set stanza = "2" fo -- o bar } } >> \score { << \new Voice = "soprano" {

Re: Array variables and loops (for lyrics)

2023-09-15 Thread Mauro Levra
Wonderful! Thank you very much. It works perfectly. Is is possible to conditionally execute the #@ expression based on whether the 'textArray' variable is bound? I have tried, but I have not succeeded. As a workaround I have defined an empty 'textArray' in my head.ly which is sometimes redefine

Re: Array variables and loops (for lyrics)

2023-09-15 Thread Jean Abou Samra
Hi, Try \version "2.24.2" textArray = << { \lyricmode { \set stanza = "1" fo -- o bar } } { \lyricmode { \set stanza = "2" fo -- o bar } } >> \score { << \new Voice = "soprano" { c'1 1 1 } #@(map (lambda (mus) #{ \new Lyrics { \lyricsto "soprano" { #mus } } #}) (ly:musi