lilypond-user
[Top][All Lists]
Advanced

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

Re: Possible bug: Grace note at the beginning makes instrumentName disap


From: Valentin Petzel
Subject: Re: Possible bug: Grace note at the beginning makes instrumentName disappear?
Date: Thu, 17 Feb 2022 20:15:47 +0000 (UTC)

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.scharkowski@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 <dak@gnu.org>:
>> 
>> 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



reply via email to

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