lilypond-user
[Top][All Lists]
Advanced

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

Re: initial grace notes prevent instrumentName &, systemStartBrace/Squar


From: Patrick Schmidt
Subject: Re: initial grace notes prevent instrumentName &, systemStartBrace/Square
Date: Thu, 9 Sep 2010 11:46:53 +0200


Am 09.09.2010 um 11:12 schrieb Mats Bengtsson:


Good morning LilyPond,

\version "2.13.31" % on Mac OS X
\paper{ raggedright = ##t }

initialAcciaccatura = \relative c' {
       \acciaccatura <c e g>8
       <d fis a>8
}

initialGrace = \relative c'' {
        \grace c16
        c4
}

initialAppoggiatura = \relative c'' {
        \appoggiatura c16
        c4
}

middleGrace = \relative c'' {
        c4 \grace c16
        c4
}

\markup { initial acciaccatura prevents instrument name and system
start brace }
\score {
   \new StaffGroup = "Guitar"
   \with {\consists "Instrument_name_engraver"}
   <<
     \set StaffGroup.instrumentName = #"Guitar"
     \set StaffGroup.systemStartDelimiter = #'SystemStartBrace
     \new Staff {
            \initialAcciaccatura
     }
     \new TabStaff {
       \initialAcciaccatura
     }
   >>
}

snip

This is just another manifestation of our old favourite bug which is documented under "Known issues and warnings" in http:// lilypond.org/doc/v2.13/Documentation/notation/special-rhythmic- concerns#grace-notes. However, your example is a bit more subtle, since you do property settings that happen in parallel with the grace notes and it seems that LilyPond thinks that these settings happen after the grace notes, which means that they have not taken effect when the StaffGroup is created.
There are two simple remedies:
1) Move the settings to the \with{...} clause:
\score {
  \new StaffGroup = "Guitar"
  \with {
    \consists "Instrument_name_engraver"
    instrumentName = #"Guitar"
    systemStartDelimiter = #'SystemStartBrace
  }
  <<
    \new Staff {
           \initialAcciaccatura
    }
    \new TabStaff {
      \initialAcciaccatura
    }
  >>
}


2) Move the settings to within one of the Staff contexts that you define and do them before the grace notes:
\score {
  \new StaffGroup = "Guitar"
  \with {\consists "Instrument_name_engraver"}
  <<
         \new Staff {
           \set StaffGroup.instrumentName = #"Guitar"
           \set StaffGroup.systemStartDelimiter = #'SystemStartBrace
           \initialGrace
    }
    \new TabStaff {
      \initialGrace
    }
  >>
}

Of course, alternative 1) is gives a more aesthetically pleasing input file.

    /Mats

Thank your for your explanation and solutions. I had read the "Known Issues" section but wasn't sure whether it's the same bug.

Cheers,
patrick




reply via email to

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