lilypond-user
[Top][All Lists]
Advanced

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

Creating score with unfolded repeats in scheme


From: Morten Lemvigh
Subject: Creating score with unfolded repeats in scheme
Date: Mon, 9 Sep 2024 23:10:41 +0200

Hi,

I am experimenting with a system to create choir rehearsal midi files. A part of that is to unfold repeats. I have a function that accepts a score and creates a new score. The steps are:
1. Extract the music from the score
2. Unfold the repeats
3. Make a new score 

For some reason only the first note of the score is repeated and I get a

"programming error: Moment is not increasing. Aborting interpretation."


When I try to display-scheme-music of the unfolded music it looks like everything is there, but it is not included in the final score.
I have tried to create a minimal example that reproduces the issue. It is pasted below.

So the question is: what have I misunderstood? :-)

Best regards,
Morten

\version "2.24.2"

choirScore = \score {
    \new Staff {
        \relative c' {
            \repeat volta 2 {
                c d e f
            }
        }
    }
}

make-rehearsal =
#(define-scheme-function
  (the-score)
  (ly:score?)
  (ly:make-score (unfold-repeats-fully (ly:score-music the-score))))

new-score = #(make-rehearsal choirScore)
\new-score

reply via email to

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