\version "2.11.39" \header { title = "Scores generated by Scheme" } % Definitions of the music, staves, piece names, instrument names, etc. testmusic = {f'4 d'2. f'1 } \addQuote "Test" \testmusic anothermusic = { c''4 \cueDuring #"Test" #DOWN {r4 r2 R1} } anotherInstrumentName = "another inst." anotherShortInstrumentName = "a." anotherstaff = \new Staff \with { instrumentName = \anotherInstrumentName shortInstrumentName = \anotherShortInstrumentName } << \anothermusic >> % classical lilypond style \score { \anotherstaff \header { piece = "Classical lilypond code, cues shown" } } createscoreV = #(define-music-function (parser location) () (let* ( (score (ly:make-score anotherstaff)) (header (make-module)) ) ; Set the piecename in the header and apply it to the score (module-define! header 'piece "Scheme functions used, cues are not shown") (ly:score-set-header! score header) ; Schedule the score for typesetting (collect-scores-for-book parser score) ) ; This is a void function, the score has been schedulled for typesetting already (make-music 'Music 'void #t) ) \createscoreV #(define (createscoreVI) (let* ( (score (ly:make-score anotherstaff)) (header (make-module)) ) (module-define! header 'piece "Scheme functions used, cues are not shown") (ly:score-set-header! score header) (ly:export score) ) ) \score { #(createscoreVI) }