Re: Question regarding instrumentName.

2017-08-01 Thread Hwaen Ch'uqi
Wow, though in theory I was aware of that principle, that would have
NEVER occurred to me! Thank you so much for that solution!

Hwaen Ch'uqi


On 8/1/17, Thomas Morley  wrote:
> 2017-08-01 11:40 GMT+02:00 Hwaen Ch'uqi :
>> 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] } 8 r r4 %1
> \grace { e16[ fis gis] } 8 \ottava #0 r r4 %2
>   }
>   \new Staff = down {
> \relative c' {
>   \key a \minor \time 2/4 \clef treble
>   \grace { s16 s s } 8 r r4 %1
>   \grace { s16 s s } 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 } 8 r r4 %1
> \grace { s16 s s } 8 r r4 %2
>   }
>   \new Staff = hwaen {
> \relative c' {
>   \key a \minor \time 2/4 \clef bass
>   \grace { s16 s s } r8 \ottava #-1  r4 %1
>   \grace { s16 s s } r8  \ottava #0 r4 %2
> }
>   }
> >>
>   >>
> }
>
> HTH,
>   Harm
>

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Question regarding instrumentName.

2017-08-01 Thread Thomas Morley
2017-08-01 11:40 GMT+02:00 Hwaen Ch'uqi :
> 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] } 8 r r4 %1
\grace { e16[ fis gis] } 8 \ottava #0 r r4 %2
  }
  \new Staff = down {
\relative c' {
  \key a \minor \time 2/4 \clef treble
  \grace { s16 s s } 8 r r4 %1
  \grace { s16 s s } 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 } 8 r r4 %1
\grace { s16 s s } 8 r r4 %2
  }
  \new Staff = hwaen {
\relative c' {
  \key a \minor \time 2/4 \clef bass
  \grace { s16 s s } r8 \ottava #-1  r4 %1
  \grace { s16 s s } r8  \ottava #0 r4 %2
}
  }
>>
  >>
}

HTH,
  Harm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user