Guy Stalnaker <[email protected]> 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
