Here is my situation. I'm using Lilypond 2.18.2.
I am working on a lilypond edition of an opera, which will include a piano-vocal score, full score, and orchestral parts.
I have set up my score with the goal of reusing elements as much as possible, including instrument staves. So I have, for example, a \FirstViolinStaff variable defined in the Strings.ly file like so:
FirstViolinStaff = \new Staff \with {
instrumentName = "Violin 1"
shortInstrumentName = "Vl. 1"
midiInstrument = "violin"
\clef treble
}
{
<<
\GlobalA
\FirstViolinNotesA
>>
<<
\GlobalB
\FirstViolinNotesB
>>
}
Strings.ly is importing the Global and Notes files from their own files. The full project will have multiple sections for each staff, and some more complicated code for things like doubled and tacet instruments, chorus and solo parts, etc.
I then use this \FirstViolinStaff in two separate book files: one for the orchestral score, and one for the Violin I part.
The problem is that I do want the full and short instrument names to appear in the full score, but I don't want them to appear in the violin part. The only way I've been able to come up with so far to make this happen is to use tags in the staff definitions:
\tag #'FirstViolinPart {
\set Staff.instrumentName = #""
\set Staff.shortInstrumentName = #""
}
This works, but it strikes me as a little klugy.
What I'd like to do is to get rid of the instrument names from within the book block, which (simplified) currently looks like this:
\book {
\score {
\keepWithTag #'FirstViolinPart
\FirstViolinStaff
\layout {}
\midi {}
}
}
either by modifying the already-defined staff to eliminate the instrument names, or by modifying some element of the page, book or score context to suppress display of the existing instrument names. Is this possible?