Thank you David for this lesson, I appreciate it a lot.
Thomas

> Am 16.02.2022 um 18:50 schrieb David Kastrup <d...@gnu.org>:
> 
> Thomas Scharkowski <t.scharkow...@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


Reply via email to