lilypond-user
[Top][All Lists]
Advanced

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

Re: grace note suppresses instrument name!


From: David Kastrup
Subject: Re: grace note suppresses instrument name!
Date: Sun, 22 Jan 2017 12:27:09 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Richard Shann <address@hidden> writes:

> Consider:
>
> \version "2.19.43"
>         \new Staff 
>             << 
>                 \set Staff.instrumentName = \markup "Treble Recorder"
>                  {
>                    \grace f'8
>                    g'4  g'
>                 }
>             >>
>
> with the grace note the instrument name is not printed, without it, it
> is. Should the syntax used here work?

No.

> I realize that by replacing << >> with {} it works, but is there a
> good reason why this <<>> syntax suddenly fails when a grace note
> starts the music?

It doesn't fail.  Due to choosing simultaneous music for setting the
instrument name, the instrument name gets set at time 0.  The grace
note, however, gets typeset at time 0-1/8G (namely an eighth note's
grace time duration before that) and triggers creation of the staff.

This can be viewed as related to the _expectations_ of issue 34 in the
issue tracker.

But stuff like instrument names actually is a static property of the
staff.  You really, really should set it like

\new Staff \with { instrumentName = "Treble Recorder" }
{
  \grace f'8
  g'4 g'
}

At some point of time, a fix to issue 34 might change the behavior in
situations like this.  But I don't feel that such a fix would
unambiguously address your failed expectations here: in some respect the
behavior is actually correct and might be retained in this situation in
spite of an issue 34 fix.

-- 
David Kastrup



reply via email to

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