lilypond-user
[Top][All Lists]
Advanced

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

Re: Create a bookpart with a scheme function


From: Timothy Lanfear
Subject: Re: Create a bookpart with a scheme function
Date: Sun, 20 Nov 2016 16:14:52 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

On 18/11/16 08:47, Freddy Ouellette wrote:
Still a little confused about how to dynamically create a bookpart:

\version "2.18.2"

freddy = \bookpart {
  \score {
    \new Staff {
      c d e f g
    }
  }
}

full_scores = \book {

}

#(ly:book-add-bookpart! full_scores freddy)

\full_scores


this doesn't seem to work.

C:/Program Files
(x86)/LilyPond/usr/share/lilypond/current/scm/lily-library.scm:242:5: In
procedure ly:book-process in expression (process-procedure book paper ...):

C:/Program Files
(x86)/LilyPond/usr/share/lilypond/current/scm/lily-library.scm:242:5:
Wrong type (expecting real number): #<undefined>


Freddy

This will create a book "full_scores", add the "freddy" bookpart to "full_scores" and process the resulting book.

\version "2.18.2"

freddy = \bookpart {
  \score {
    \new Staff {
      c d e f g
    }
  }
}

#(begin
 (let ((full_scores (ly:make-book $defaultpaper $defaultheader)))
   (ly:book-add-bookpart! full_scores freddy)
   (ly:book-process full_scores $defaultpaper $defaultlayout "freddy")))

Tim Lanfear




reply via email to

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