[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possible bug: Grace note at the beginning makes instrumentName disap
From: |
David Kastrup |
Subject: |
Re: Possible bug: Grace note at the beginning makes instrumentName disappear? |
Date: |
Wed, 16 Feb 2022 18:50:23 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Thomas Scharkowski <t.scharkowski@t-online.de> writes:
> Grace note at the beginning makes instrumentName disappear:
> macOs 12.1
> LilyPond 2.23.6
>
> --
> \version "2.23.6"
>
> GraceVoice = \new Voice
> {
> \grace
> c'8 b4
> }
>
> GraceStaff = \new Staff
> <<
> \set Staff.instrumentName = "Grace"
> \GraceVoice
>>>
>
> \score {
> \GraceStaff
> }
>
> NoGraceVoice = \new Voice
> {
> b4
> }
>
> NoGraceStaff = \new Staff
> <<
> \set Staff.instrumentName = "NoGrace"
> \NoGraceVoice
>>>
>
> \score {
> \NoGraceStaff
> }
>
No, it doesn't. \grace c'8 occurs before the beat, \set
Staff.instrumentName occurs on the beat and consequently has no effect
on the already created Staff.
You probably want to write
\new Staff \with { instrumentName = ... } ...
in order to have instrumentName exist from the beginning of the
context's life-time rather than from its first beat (which may be later
in the case of grace notes).
--
David Kastrup