Hi David,

Thank you for the swift and precise response. That was exactly it. When I
am in search of new functionality, I usually search this page for keywords:
https://lilypond.org/doc/v2.23/Documentation/internals/scheme-functions
That was how I found the ly:make-score. Is there some way of deducing if a
function is intended to be called directly or is only an internal utility
function?

Best regards,
Morten

On Mon, Sep 9, 2024 at 11:28 PM David Kastrup <d...@gnu.org> wrote:

> Morten Lemvigh <morten.lemv...@gmail.com> writes:
>
> > 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
>
> If you define the function with define-scheme-function instead of
> #(define ...), why not call it as
>
> new-score = \make-rehearsal \choirScore
>
> ?  That's just a detail.  The main problem is that ly:make-score is an
> internal function that does not do the full required job of creating a
> score from unprepared music.
>
> To get the full preparation necessary, use scorify-music instead of
> ly:make-music .  It uses ly:make-music internally but does other
> required things.
>
> --
> David Kastrup
>

Reply via email to