lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

split { {a b} {c' d'} {e' f'} } in multiple expression


From: Gianmaria Lari
Subject: split { {a b} {c' d'} {e' f'} } in multiple expression
Date: Tue, 15 May 2018 18:43:34 +0200

I have a musical _expression_ made of several musical _expression_ like the following:

{ {a b} {c' d'} {e' f'} }

I would like to loop on it and generate a different score with each sub-_expression_. Something like this:

{ foreach x in X
    \myScore \x 
}

How can I do it?
Thank you.

P.S. The following example show how I defined  \myScore and how I use it:

\version "2.19.81"
myScore = #(define-void-function (music) (ly:music?) 
             (add-score #{ \score { $music \layout{} }#})
             (add-score #{ \score { \unfoldRepeats $music \midi{}}#})               
             )

seqa = {a a}
seqb = {b b}
seqc = {a b}

\book {
  \myScore \seqa
  \myScore \seqb
  \myScore \seqc
}


reply via email to

[Prev in Thread] Current Thread [Next in Thread]