lilypond-user
[Top][All Lists]
Advanced

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

Re: short instrument name setting


From: chip
Subject: Re: short instrument name setting
Date: Mon, 05 Jan 2009 16:38:11 -0700
User-agent: Thunderbird 2.0.0.17 (X11/20080925)

Reinhold Kainhofer wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am Montag, 5. Januar 2009 22:53:26 schrieb chip:
trumpet = {
  \global
  \set Staff.instrumentName = #"Trumpet 1"
  \set Staff.shortInstrumentName = #"Tpt 1"       ~~~~~~~ I set this so
it shows on all the score pages
  \set
  \clef treble
  <<
    \trpt
 >>
}
[...]
\book { \score { << \new Staff = "trumpet" \with { \remove
shortInstrumentName } \trumpet >> } }

You can't unset shortInstrumentName here, since \trumpet will later set it again... (also, you'd have to use \unset rather than \remove to unset a variable like shortInstrumentName)

However, you can remove the engraver, i.e. the internal program part that is responsible for reading the shortInstrumentName setting and generating the appropriate graphical object for it; Lilypond consists of lots of such small independent modules (engravers), where each is responsible for one small part of the output. That way it is simple to turn of some output by simply removing the engraver.:

\book { \score { << \new Staff = "trumpet" \with { \remove
Instrument_name_engraver } \trumpet >> } }

Attached is the file from you mail, where I only changed shortInstrumentName to Instrument_name_engraver (and commented/removed lines that referred to definitions you deleted).

Cheers,
Reinhold
Cool, thanks, that works. Actually it works too well. So I need to place the instrument name in the header somewhere. It looks like using the header item Piece will work fine so I tried this -

\book { \score { \header {piece="Trumpet 1"} << \new Staff = "trumpet" \with { \remove Instrument_name_engraver } \trumpet >> } }

but get an error about an unexpected \header. The \header goes inside the \score{} right? So why doesn't this work?
--
Chip




reply via email to

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