lilypond-user
[Top][All Lists]
Advanced

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

Openlilylib edition-engraver. I need help understanding how to reference


From: Stefano Troncaro
Subject: Openlilylib edition-engraver. I need help understanding how to reference contexts.
Date: Thu, 25 Jan 2018 19:35:03 -0300

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 test 1 0/4 RH.Voice.A {
  \once \override NoteHead.color = #green
}

\editionMod test 1 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 { s1\mp }
    \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!

reply via email to

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