... there is a function
ly:score-add-output-def!
to add layout- and midi-blocks to a score object.
Cheers
Jan-Peter
Am 3. April 2018 11:34:58 MESZ schrieb Urs Liska <li...@openlilylib.org>:
>I ran into an issue with the edition-engraver, targeting individual
>scores when multiple scores are compiled within a bookpart.
>
>It's actually within the 'page-layout' or rather the 'breaks'
>openLilyLib package, and I can imagine that my issue is related to
>another one that was raised recently (that either of these packages
>didn't work well with independent edition-engraver targets).
>
>The 'breaks' package
>(https://github.com/openlilylib/breaks/blob/master/package.ily)
>installs
>itself like this:
>
>% Install editionID
>\layout {
> \context {
> \Score
> \editionID ##f breaks
> }
>}
>
>which can later (e.g. in the page-layout.conditional-breaks package:
>https://github.com/openlilylib/page-layout/blob/master/conditional-breaks/module.ily#L113)
>
>be addressed with (for example)
>
> % insert invisible barlines to enable breaks within measures
> \editionModList conditional-breaks breaks.Score.A
> \bar "" #in-measure-breaks
>
>This works perfectly - as long as there is only one score to be
>compiled. However, if more than one score is compiled (at least in the
>same bookpart) it seems that all the mods for all scores are merged
>together, with the result that in each score all the line breaks for
>all
>scores are applied.
>
>Am I understanding it right that I would have to use \editionID in a
>layout block that only affects an individual score, giving them
>individual names?
>
>And how could I do that if I don't have a literal \score {} block but
>generate the scores like the following
>(https://git.openlilylib.org/bfsc/kayser/blob/techdoc/includes/lib/engrave.ily#L163)
>
> (ly:book-process
> workgroup-book ; a \book {} object
> #{ \paper {} #} ; non-functional, placeholder
> $defaultlayout ;; merged from all layout definitions
> (get-output-name))))
>
>where 'workgroup-book' is a \book to which multiple bookparts are added
>with
>
> (ly:book-add-bookpart! workgroup-book
> (ly:make-book-part
> (let ((movements (get-movement-list work-path)))
> (reverse
> (append-map
> list
> (map (lambda (mvt)
> (list (makeMovementTitle (append work-path (list mvt)))))
> movements)
> (map (lambda (mvt)
> (make-score (append work-path (list mvt))))
> movements))))))
>
>where a list of alternating title markups and scores are added to the
>bookpart, and the scores are created with (at its core)
>
> (ly:make-score
> (make-music 'SimultaneousMusic 'elements
> (filter
> (lambda (l) (not (null? l)))
> (map (lambda (elt) (staff elt)) elements))))
>
>
>So IIUC it boils down to the question: how can I apply \editionID (or
>some equivalent code) to a score that is created with ly:make-score. As
>
>far as I have seen ly:make-score will only accept the music expression
>and not the \layout {} or \midi {} blocks I can nest within a \score {}
>
>written in LilyPond language.
>And: if I manage to "install" an edition ID within that expression, is
>it true that I can later address this score specifically?
>
>Thanks for any hints or explanations
>Urs
--
Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user