----- Original Message -----
From: "David Sumbler" <[email protected]>
To: <[email protected]>
Sent: Tuesday, November 08, 2016 3:14 PM
Subject: Combining \markup and \set
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\version "2.19.48"
pizz = \markup { \larger \italic "pizz." }
midiPizz = \set Staff.midiInstrument = "pizzicato strings"
arco = \markup { \larger \italic "arco" }
midiArco = \set Staff.midiInstrument = "violin"
\score {
\relative c'' {
\new Staff \with { midiInstrument = "violin" } {
c2 \midiPizz c4^\pizz c |
\midiArco c2^\arco r \bar "|."
}
}
\layout { }
\midi { }
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
The above works as I would wish it to. However, I am wondering whether
it can be simplified.
1) Is there a way of combining \pizz and \midiPizz into one variable?
Preferably it needs to be attached to the note (as \pizz already is)
so that the printed marking can be placed above or below the stave.
Similarly, of course, for \arco and \midiArco.
2) '\unset Staff.midiInstrument' would be preferable to 'set
Staff.midiInstrument = "violin"', because it would not need to be
redefined in each instrumental part. However it does not work in a
voice context. Is there a way of reverting the midiInstrument to its
previous setting which could still be included in a variable?
David
In http://lilypond.org/doc/v2.19/Documentation/notation/writing-parts
there's a section starting: "The shortInstrumentName may be changed in the
middle of a piece" This seems to me to be what you want?
--
Phil Holmes
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user