bug-lilypond
[Top][All Lists]

## Re: MIDI commands are not emitted in repetitions

 From: Bruno Subject: Re: MIDI commands are not emitted in repetitions Date: Mon, 22 Nov 2021 23:09:52 +0100

```First of all, thanks for the tip to use articulate, it might help in the
future. Yes, I have been using \unfoldRepeats already. I think I have
nailed the issue: Lilypond is actually quite MIDI aware, even too much for
my situation. In Aaron's code al PCs are being sent, because he keeps
changing the instrument. In my code I'm trying to send the same PC twice,
and apparently Lilypond figures out that "nothing has changed, no need to
send a PC".

In my particular case a Program Change switches the accompaniment to the
Fill-In section, which plays a bar or two and then switches back to the
Variation that has been playing before. That's not how every generic MIDI
instrument works (changing instruments by itself) and it's quite
reasonable, why Lilypond tries to optimize the MIDI data being sent. So
it's the classic case of "feature, not bug".

With that being said I can easily bypass this by mentioning the Variation
(different instrument) I'm using at the beginning  of the repeated block.