[Top][All Lists]

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

Deprecation of instrumentCueName and instrument switch stuffs

From: Xavier Scheuer
Subject: Deprecation of instrumentCueName and instrument switch stuffs
Date: Tue, 13 Dec 2022 10:55:15 +0100


While replying to a query on the French-speaking list I realized that in
the latest versions of LilyPond the instrumentCueName property was
considered deprecated (as well as the engraver
"Instrument_switch_engraver", the grob "InstrumentSwitch" and the music
functions instrumentSwitch and addInstrumentDefinition).
Commit 5df7147b5977b010179bab53c2e077d559ec8ed7

This is a property that I commonly use (see typical example of my use
below) and I don't understand the rationale for removing it. Furthermore I
find promoting simple "catch-all" TextScripts (attached to an empty chord,
cf. NR 1.6.3) to indicate the instrument cue name a bad practice when you
can have a dedicated property and grob.
With a dedicated object it is cleaner, "modular" and future-proof: if you
want to adapt the size or font of all the instrument cue names you just
have to modify the properties of this object. With the approach promoted
now you have to search for all occurrences where you have induced the
instrument cue name with a TextScript and modify them.

So I agree that the old approach wasn't perfect (especially the mix of
instrument cue name and instrument switch, two uses for one
object/property/engraver), but in this case I'd rather have two properties
(instrumentCueName and instrumentSwitchName), objects (InstrumentCueName
and InstrumentSwitch) and engravers ("Instrument_cue_name_engraver" and
"Instrument_switch_engraver"), than remove everything!

Thanks for your attention and have a nice day.

%%%% Use of instrumentCueName for advanced formatting of cues from other
flute = \relative c' {
  c4\f d e f |
  g4 a b c |
  c4 b a g |
  f4 e d c
\addQuote "flute" { \flute }

violin = \relative c' {
  R1*2 |

  c1\mp |

violinCues = {
    \new CueVoice = "fluteCueVoice" \with {
      instrumentCueName = "Flute"
    } {
      \quoteDuring "flute" { s1 }
      \quoteDuring "flute" { s1 }

\layout {
  \context {
    quotedEventTypes = #'(note-event

\score {
    \new Staff = "violinStaff" \with {
      % instrumentName = "Violin"
      % shortInstrumentName = "V"
    } {
        \new Voice = "violinVoice" {

Kind regards,

reply via email to

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