lilypond-user
[Top][All Lists]
Advanced

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

Re: Midi Instrument: change?


From: David Kastrup
Subject: Re: Midi Instrument: change?
Date: Sun, 05 Sep 2021 00:09:33 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Guy Stalnaker <jimmyg521@gmail.com> writes:

> David and Jerry,
>
> I've been using the "method" shown on that Lilypond doc page for
> years. I confirm that it does work for me. I can put
>
> \set midiInstrument = #"<name>"
>
> anywhere in a voice and LP will change the midi instrument. Which is
> why I suggested it to Jerry.

\set midiInstrument = ... is the same as \set Bottom.midiInstrument = ...
and in the normal Staff, Bottom will be a Voice context in general.  So
the change in midiInstrument is only visible within a Voice and moving
the Staff_performer to Voice level lets it see that change.

But that is putting the cart before the horse.  If you want to change
the instrument used by the Staff_performer at, well, Staff level, using
\set Staff.midiInstrument = ... is the right choice.  Moving the
Staff_performer has its uses (and the example in the manual shows
exactly one such use that may be common in a partitura, namely different
_simultaneous_ instruments in a Staff), but doing it just to avoid
setting midiInstrument at Staff level is rather strange and will have
additional effects not all of which may be desirable.

-- 
David Kastrup



reply via email to

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