I tryed your code with my standard lilypond without success.
Obviously you use a package oll-core
https://github.com/openlilylib/oll-core
that is not part of standard install of lilypond and seems to be the
central problem of your code. May be you get competent help of the
oll-core users?
Regards
Am 26.01.2018 16:55, schrieb Stefano Troncaro:
Thank you Jan-Peter, that's really useful!
In regards to the first problem, I experimented with it a little.
Using the same snippet as before, It turns out that if I write this
line like this:
new Staff with { editionID LH } { clef F <<
Then the path to Piano.LH.Voice.A doesn't seem to work and the note
isn't colored. This is the output of the logfile:
[context-counter] Piano/LH/Staff: (0 . #f)
[context-counter] Piano/LH/Staff/A:
[context-counter] Piano/LH/Voice: (1 . #f)
[context-counter] Piano/LH/Voice/A:
[context-counter] Piano/LH/Voice/B:
[context-counter] Piano/PianoStaff: (0 . #f)
[context-counter] Piano/PianoStaff/A:
[context-counter] Piano/RH/Staff: (0 . #f)
[context-counter] Piano/RH/Staff/A:
[context-counter] Piano/RH/Voice: (1 . #f)
[context-counter] Piano/RH/Voice/A:
[context-counter] Piano/RH/Voice/B:
[context-counter] Score: (0 . new)
[context-counter] Score/A: new
(Piano LH Staff A) ""
(Piano LH Voice A) ""
(Piano LH Voice B) ""
(Piano PianoStaff A) ""
(Piano RH Staff A) ""
(Piano RH Voice A) ""
(Piano RH Voice B) ""
(Score A) "new"
On the other hand, if I write it like this:
new Staff with { editionID LH } { << clef F
Now that the clef F is inside the << >> the path to Piano.LH.Voice.A
works properly. This is the output of the logfile:
[context-counter] Piano/LH/Staff: (0 . #f)
[context-counter] Piano/LH/Staff/A:
[context-counter] Piano/LH/Voice: (1 . #f)
[context-counter] Piano/LH/Voice/A:
[context-counter] Piano/LH/Voice/B:
[context-counter] Piano/PianoStaff: (0 . #f)
[context-counter] Piano/PianoStaff/A:
[context-counter] Piano/RH/Staff: (0 . #f)
[context-counter] Piano/RH/Staff/A:
[context-counter] Piano/RH/Voice: (1 . #f)
[context-counter] Piano/RH/Voice/A:
[context-counter] Piano/RH/Voice/B:
[context-counter] Score: (0 . new)
[context-counter] Score/A: new
(Piano LH Staff A) ""
(Piano LH Voice A) ""
(Piano LH Voice B) ""
(Piano PianoStaff A) ""
(Piano RH Staff A) ""
(Piano RH Voice A) ""
(Piano RH Voice B) ""
(Score A) "new"
Which is exactly the same as before. Yet one works and the other
doesn't. Is there a way to have more specific logging in order to
better trace the issue?
I attached a .ly for both examples in case you find it more
convenient.
Thank you for your help!
Stefano
2018-01-26 4:06 GMT-03:00 Jan-Peter Voigt <jp.vo...@gmx.de>:
Hello Stefano,
I can't reproduce the misbehaviour/error you mentioned first. The
overrides are applied irrespective of the clefs placement. If the
error persists, you might send the <document>.edition.log file.
To reduce the redundancy you mentioned you can create variables:
LH = Piano.LH
RH = Piano.RH
Then you can use them like this:
editionMod test 1 0/4 RH.Voice.A { ... }
Internally the modifications are stored in a hierarchically
structured manner before the targets are known. Thet is the reason
the full path is needed.
HTH
Jan-Peter
Am 25.01.2018 um 23:35 schrieb Stefano Troncaro:
Hello everyone! So, I'm learning to use the edition-engraver, but
there are some behaviors that I can't figure out.
Take the following snippet:
version "2.19.80" language "english" include
"oll-core/package.ily" loadPackage edition-engraver
addEdition test
editionMod test1 0/4 RH.Voice.A{ once override
NoteHead.color = #green } editionMod test1 0/4 LH.Voice.A{
once override NoteHead.color = #green } consistToContexts
#edition-engraver Score.PianoStaff.Staff.Voice
score { new PianoStaff << new Staff with {
editionID RH} << new Voice relative c''{ voiceOne
c4. d8 d4. g8 | e4.( d8 c b g4) } new Voice
relative c''{ voiceTwo a2. g4~ | g f2 e4 |} >> new
Dynamics { s1mp } new Staff with { editionID LH} {
<< new Voice relative c'{ clef F voiceOne e8 d c4
d8 c b4 | c8 b a2 g4 |} new Voice relative c{
voiceTwo f2 e | d g,4 c |} >> } >> }
In the left hand staff, if I move the clef F from inside one of
the two voices to the outside, like in the following example:
new Staff with { editionID LH} { clef F <<
new Voice relative c'{ voiceOne e8 d c4 d8 c b4 |
c8 b a2 g4 |} new Voice relative c{ voiceTwo f2
e | d g,4 c |} >> }
then I can't find a way to reference the voices contained in the
Staff. Why does this happen?
Secondly, if I give an editionID to the PianoStaff, then I can
only reference the staves by giving a full route. For example, if
I gave it the ID Piano I would have to write Piano.LH.Voice.A to
reference the first voice. Is there a way to avoid this
redundancy?
In relation with the last question, I have tried and I can't
figure out how to give an ID to a Voice context so that I can
reference it directly, without having to "walk to it" from a
reference to a Staff. Is this possible?
Those are all my doubts, at least for the moment. Thank you in
advance!
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user [1]
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user [1]
Links:
------
[1] https://lists.gnu.org/mailman/listinfo/lilypond-user
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user