[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grace note suppresses instrument name!
From: |
Thomas Morley |
Subject: |
Re: grace note suppresses instrument name! |
Date: |
Sun, 22 Jan 2017 12:23:46 +0100 |
2017-01-22 11:40 GMT+01:00 Richard Shann <address@hidden>:
> 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? 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?
>
> Richard
Hi Richard,
the << ... >> initializes simultaneous music.
So the first expression is: \set Staff.instrumentName = ...
The second: { \grace f'8 ... }
Maybe you see it already: it's issue 34, grace-synchronization.
And indeed the following works:
\new Staff
<<
{ \set Staff.instrumentName = \markup "Treble Recorder" \grace s8 }
{ \grace f'8 g'4 g' }
>>
Ofcourse nobody wants this sort of code.
Best you can do is setting the instrumentName in \with {}:
\new Staff
\with { instrumentName = \markup "Treble Recorder" }
{ \grace f'8 g'4 g' }
Personally, I think we should change the docs to always show \with {
instrumentName = ... }.
A snippet showing a reasonable use-case for \set Staff.instrumentName
= ... could be added, although I can't think of such reasonable
use-case. Sometimes it makes sense to change th shortInstrumentName
with this command, though.
Cheers,
Harm