Hello Thomas, in your case using a with block is definitely the best option. One can also solve such issues by adding a skip column before the main beat like this
\new Staff << {\set Staff.instrumentName = #"abc" \grace s} \new Voice \grace c c >> which can be useful with stuff like tempo in a global block (this can cause some headache with multiple voices or staves if on starts on a grace, as get the tempo both before the grace as well after the grace). Cheers, Valentin 17.02.2022 08:46:32 Thomas Scharkowski <t.scharkow...@t-online.de>: > 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