From: Keith OHara Date: Sun, 31 Aug 2014 06:44:48 +0000 (-0700) Subject: Remove documentation for \instrumentSwitch X-Git-Tag: release/2.19.16-1~2^2~38^2~6 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a7c014b60702e96bbc376892249b495bc10b8662;p=lilypond.git Remove documentation for \instrumentSwitch in favor of \set to set properties, and Textscripts for markup --- diff --git a/Documentation/notation/staff.itely b/Documentation/notation/staff.itely index d2bb608d32..bb59664769 100644 --- a/Documentation/notation/staff.itely +++ b/Documentation/notation/staff.itely @@ -963,67 +963,49 @@ that context. For details, see @ref{Modifying context plug-ins}. @cindex instrument names, changing @cindex changing instrument names -The @code{shortInstrumentName} may be changed in the middle of a piece. +The @code{shortInstrumentName} may be changed in the middle of a piece, +along with other settings as needed for the new instrument. However, only the first instance of @code{instrumentName} will be printed and subsequent changes will be ignored: -@lilypond[verbatim,quote,ragged-right,relative=1] -\new Staff \with { - instrumentName = #"Flute" - shortInstrumentName = #"Flt." -} -{ - c1 c c c \break - c1 c c c \break - \set Staff.instrumentName = #"Clarinet" - \set Staff.shortInstrumentName = #"Clt." - c1 c c c \break - c1 c c c \break +@lilypond[verbatim,quote,ragged-right] +prepPiccolo = <>^\markup \italic { muta in Piccolo } + +setPiccolo = { + \set Staff.instrumentName = #"Piccolo" + \set Staff.shortInstrumentName = #"Picc." + \set Staff.midiInstrument = #"piccolo" + <>^\markup \bold { Piccolo } + \transposition c'' } -@end lilypond - -@cindex instrument switch -@cindex switching instruments -@funindex \addInstrumentDefinition -@funindex addInstrumentDefinition -@funindex \instrumentSwitch -@funindex instrumentSwitch +prepFlute = <>^\markup \italic { muta in Flauto } -If an instrument @emph{switch} is needed, -@code{\addInstrumentDefinition} may be used in combination with -@code{\instrumentSwitch} to create a detailed list of the -necessary changes for the switch. The -@code{\addInstrumentDefinition} command has two arguments: an -identifying string, and an association list of context properties -and values to be used for the instrument. It must be placed in -the toplevel scope. @code{\instrumentSwitch} is used in the music -expression to declare the instrument switch: - -@lilypond[verbatim,quote,ragged-right] -\addInstrumentDefinition #"contrabassoon" - #`((instrumentTransposition . ,(ly:make-pitch -1 0 0)) - (shortInstrumentName . "Cbsn.") - (clefGlyph . "clefs.F") - (middleCPosition . 6) - (clefPosition . 2) - (instrumentCueName . ,(make-bold-markup "cbsn.")) - (midiInstrument . "bassoon")) +setFlute = { + \set Staff.instrumentName = #"Flute" + \set Staff.shortInstrumentName = #"Flt." + \set Staff.midiInstrument = #"flute" + <>^\markup \bold { Flute } + \transposition c' +} \new Staff \with { - instrumentName = #"Bassoon" + instrumentName = #"Flute" + shortInstrumentName = #"Flt." + midiInstrument = #"flute" } -\relative c' { - \clef tenor - \compressFullBarRests - c2 g' - R1*16 - \instrumentSwitch "contrabassoon" - c,,2 g \break - c,1 ~ | 1 +\relative c'' { + g1 g g g \break + g1 g \prepPiccolo R R \break + \setPiccolo + g1 g g g \break + g1 g \prepFlute R R \break + \setFlute + g1 g g g } @end lilypond + @seealso Notation Reference: @ref{paper variables for shifts and indents,,@code{@bs{}paper} variables for shifts and indents}, @@ -1300,7 +1282,7 @@ fluteNotes = \relative c'' { oboeNotes = \relative c'' { R1 - \new CueVoice { \set instrumentCueName = "flute" } + <>^\markup \tiny { flute } \cueDuring #"flute" #UP { R1 } g2 c, } @@ -1343,11 +1325,8 @@ oboeNotes = \relative c'' { } @end lilypond -The name of the instrument playing the cue can be printed by setting -the @code{instrumentCueName} property in a temporary @code{CueVoice} -context. The placement and style of the @code{instrumentCueName} is -controlled by the @code{InstrumentSwitch} object, see -@ref{Instrument names}. If the cue notes require a change in clef, +Markup can be used to show the name of the quoted instrument. +If the cue notes require a change in clef, this can be done manually but the original clef should also be restored manually at the end of the cue notes. @@ -1360,7 +1339,7 @@ bassoonNotes = \relative c { \clef bass R1 \clef treble - \new CueVoice { \set instrumentCueName = "flute" } + <>^\markup \tiny { flute } \cueDuring #"flute" #UP { R1 } \clef bass g4. b8 d2 @@ -1386,7 +1365,7 @@ fluteNotes = \relative c'' { bassoonNotes = \relative c { \clef bass R1 - \new CueVoice { \set instrumentCueName = "flute" } + <>^\markup { \tiny "flute" } \cueDuringWithClef #"flute" #UP #"treble" { R1 } g4. b8 d2 } @@ -1441,8 +1420,6 @@ bassClarinetNotes = \relative c' { @funindex \killCues @funindex killCues -@funindex \addInstrumentDefinition -@funindex addInstrumentDefinition The @code{\killCues} command removes cue notes from a music expression, so the same music expression can be used to produce @@ -1462,7 +1439,7 @@ bassoonNotes = \relative c { R1 \tag #'part { \clef treble - \new CueVoice { \set instrumentCueName = "flute" } + <>^\markup \tiny { flute } } \cueDuring #"flute" #UP { R1 } \tag #'part \clef bass diff --git a/Documentation/notation/vocal.itely b/Documentation/notation/vocal.itely index db60c370c6..013fabfd9b 100644 --- a/Documentation/notation/vocal.itely +++ b/Documentation/notation/vocal.itely @@ -2650,10 +2650,7 @@ pianoRH = \relative c'' { c4. g8 % position name of cue-ing instrument just before the cue notes, % and above the staff - \new CueVoice { - \override InstrumentSwitch.self-alignment-X = #RIGHT - \set instrumentCueName = "Flute" - } + <>^\markup { \right-align { \tiny "Flute" } } \cueDuring "flute" #UP { g4 bes4 } } pianoLH = \relative c { c4 e, } @@ -2676,11 +2673,7 @@ specify its key so the conversion of its cue notes will be done automatically. The example below shows this transposition for a B-flat clarinet. The notes in this example are low on the staff so @code{DOWN} is specified in @code{\cueDuring} (so the stems are -down) and the instrument name is positioned below the staff. Note -also that the piano right-hand voice is explicitly declared. This -is because the cue notes in this example begin at the start of the -first bar and this would otherwise cause the entire piano right-hand -notes to be placed in a @code{CueVoice} context. +down) and the instrument name is positioned below the staff. @lilypond[quote,verbatim] clarinet = \relative c' { @@ -2692,11 +2685,7 @@ clarinet = \relative c' { pianoRH = \relative c'' { \transposition c' % position name of cue-ing instrument below the staff - \new CueVoice { - \override InstrumentSwitch.self-alignment-X = #RIGHT - \override InstrumentSwitch.direction = #DOWN - \set instrumentCueName = "Clar." - } + <>_\markup { \right-align { \tiny "Clar." } } \cueDuring "clarinet" #DOWN { c4. g8 } g4 bes4 } @@ -2744,7 +2733,6 @@ Snippets: @rlsr{Vocal music}. Internals Reference: -@rinternals{InstrumentSwitch}, @rinternals{CueVoice}. @knownissues