I'm trying to "install" the edition engraver in a programmatically
generated score construction.
I have this code somewhere in the function to create a score:
(ly:score-add-output-def! score
#{
\layout {
\context {
\Score
#(editionID #f movement-path)
}
}
#})
where movement-path is a symbol list identifying the current movement's
score, e.g. #'(masses three kyrie)
I know this is working because the page-layout openLilyLib package
properly uses that successfully. So I know each score has its own
edition-id.
Now in order to make it possible to use \editionMod and friends I need
to add the \editionID to each staff. I tested
\displayMusic
\new Staff \with { \editionID test } { c' }
and got
(make-music
'ContextSpeccedMusic
'create-new
#t
'property-operations
(list (list 'assign
'edition-id
(list (quote ICEID) (quote test))))
'context-type
'Staff
'element
(make-music
'SequentialMusic
'elements
(list (make-music
'NoteEvent
'pitch
(ly:make-pitch 0 0)
'duration
(ly:make-duration 2)))))
as a result.
So I thought I could inject the edition-id simply with
(list 'assign 'edition-id (append (list 'ICEID) path))
with 'path' being e.g. #'(masses three kyrie violin-one)
This is the current version of that (sub-)function:
;; Create a named Staff context with the appropriate
;; context modifications.
;; content is a variable number of music expressions
(make-staff
(lambda (name . content)
(make-music
'ContextSpeccedMusic 'create-new #t
'property-operations
(list
(list 'assign 'edition-id (append (list 'ICEID) path))
(list 'assign 'instrumentName (car instrument-names))
(list 'assign 'shortInstrumentName (cdr instrument-names))
(list 'assign 'midiInstrument
(getOption `(kayser instruments ,base-part
midi-instrument)))
(list 'assign 'instrumentTransposition transposition-from)
frenched-score
lyric-mods)
'context-id name 'context-type 'Staff
'element (make-simultaneous-music content))))
This works without warnings or errors but doesn't seem to work.
\addEdition part
\editionMod part 1 0/4 masses.three.kyrie.violin-one.Voice.A \once \override
NoteHead.color = #red
\editionMod part 2 0/4 masses.three.kyrie.Score.A \once \override
NoteHead.color = #red
Here only the second mod is applied (the one to Score.A), the mod to
violin-one.Voice.A is ignored.
This is somewhat in line with the edition.log file which only reports a
(masses three kyrie Score A) ""
context.
Does this information give any indication what I might be doing wrong?
If I look at the definition of \editionID it doesn't give me any further
hints.
TIA
Urs
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user