lilypond-user
[Top][All Lists]
Advanced

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

Re: Question regarding instrumentName.


From: Thomas Morley
Subject: Re: Question regarding instrumentName.
Date: Tue, 1 Aug 2017 13:14:43 +0200

2017-08-01 11:40 GMT+02:00 Hwaen Ch'uqi <address@hidden>:
> Greetings All,
>
> The code below is drawn from a work for piano four hands. However, the
> instrumentName indications do not print in the first system. In the
> following systems, the shortInstrumentName indications print as
> requested. If I remove all the \grace sections, the instrumentName
> indications appear in the output. Can anyone explain what I am doing
> wrong?

A minimal:

\new PianoStaff
  <<
    \set PianoStaff.instrumentName = #"Primo"
    { \grace s4 r1 }
  >>

If I understand correctly:
It's simultaneous music, but the context-setting of instrumentName is
not synchronisized with { \grace s4 r1 }.
(It comes too late.)
Related to issue 34.

One should never set instrumentName in another place than \with to
avoid such things.
Usually the same holds for shortInstrumentName, but ofcourse
shortInstrumentName can be reset later. In this case you need to care
about synchronisation yourself. Although this may be a rare case.

Your example:

    \score {
      <<
        \new PianoStaff \with {
            instrumentName = #"Primo"
            shortInstrumentName = #"pr."
        }
        <<
          \new Staff = up \with {
            \consists "Metronome_mark_engraver"
          }
          \relative c' {
            \key a \minor \time 2/4 \clef treble
            \ottava #2 \grace { e'''16[ fis gis] } <a e c>8 r r4 %1
            \grace { e16[ fis gis] } <a e c>8 \ottava #0 r r4 %2
          }
          \new Staff = down {
            \relative c' {
              \key a \minor \time 2/4 \clef treble
              \grace { s16 s s } <a' c e a>8 r r4 %1
              \grace { s16 s s } <a c e a>8 r r8. dis,16 %2
            }
          }
        >>
        \new PianoStaff \with {
            instrumentName = #"Secondo"
            shortInstrumentName = #"sec."
        }
        <<
          \new Staff = felice \with {
            \consists "Metronome_mark_engraver"
          }
          \relative c' {
            \key a \minor \time 2/4 \clef bass
            \grace { s16 s s } <c a e c>8 r r4 %1
            \grace { s16 s s } <c a e c>8 r r4 %2
          }
          \new Staff = hwaen {
            \relative c' {
              \key a \minor \time 2/4 \clef bass
              \grace { s16 s s } r8 \ottava #-1 <a,,, a'> r4 %1
              \grace { s16 s s } r8 <a a'> \ottava #0 r4 %2
            }
          }
        >>
      >>
    }

HTH,
  Harm



reply via email to

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