lilypond-user
[Top][All Lists]
Advanced

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

Re: Problems with instrumentswitch


From: Reinhold Kainhofer
Subject: Re: Problems with instrumentswitch
Date: Fri, 29 Oct 2010 17:12:10 +0200
User-agent: KMail/1.13.5 (Linux/2.6.35-22-generic; KDE/4.5.2; i686; ; )

Am Freitag, 29. Oktober 2010, um 16:46:31 schrieb James Worlton:
> However, if the notes are included in a variable, the name gets duplicated:
> %%%%%
> \version "2.13.37"
> \addInstrumentDefinition #"two"
>   #`((instrumentTransposition . ,(ly:make-pitch -1 0 0))
>      (shortInstrumentName . "T.")
>      (clefGlyph . "clefs.G")
>      (clefOctavation . 0)
>      (middleCPosition . -6)
>      (clefPosition . -2)
>      (instrumentCueName . ,(markup #:fontsize 1 #:smallCaps "Instr. Two"))
>      (midiInstrument . "voice oohs"))
> 
> notes = \relative c' { c1 }
> 
> \score {
>     \new Staff = "one" {
>         \set Staff.instrumentName = \markup \right-column { "One " }
>         \set Staff.shortInstrumentName = \markup \right-column { "O. " }
>         \notes
>         \instrumentSwitch "two"
>         \notes
>     }
> }
> %%%%%
> 
> This appears to be some kind of bug, unless I'm using the instrument switch
> command wrong.

Actually, I think this has nothing to do with \instrumentSwitch itself, but 
only with the handling of instrumentCueName settings, which is messed up at 
the end of blocks like \note. In particular, in the following example, the cue 
name is printed in the second bar, too, although the cue name was not changed 
at all:

%%%%%
\version "2.13.37"
notes = \relative c' { c1 }
\score { 
    \new Staff = "one" { 
         \set Staff.instrumentCueName = "Cue"
         \notes
         d'1
    }
}
%%%%%

Cheers,
Reinhold

-- 
------------------------------------------------------------------
Reinhold Kainhofer, address@hidden, http://reinhold.kainhofer.com/
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org



reply via email to

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