lilypond-user
[Top][All Lists]
Advanced

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

Re: Combining \markup and \set


From: Phil Holmes
Subject: Re: Combining \markup and \set
Date: Tue, 8 Nov 2016 15:35:18 -0000

----- Original Message ----- From: "David Sumbler" <address@hidden>
To: <address@hidden>
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



reply via email to

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