On 2021-11-22 11:15 am, Bruno wrote:
Hi all,

I have been working on chord charts which I wanted to use as the input for my arranger to generate MIDI backing files, I wanted to use Program Change messages to switch the sections of the auto-accompaniment. While trying to
achieve that I found the following bug:

% somewhere in the included file:
pc_fillB =  \set Staff.midiInstrument = #"pad 1 (new age)"

% in the file itself:
intro = \chordmode {
    \repeat percent 2 { c1 a:m f \pc_fillB g }
}

In the resulting MIDI file the Program Change message is sent only once, at
the beginning of the 4th bar. All the 8 bars of notes are generated
properly. Yes, I understand that Lilypond is *not* a MIDI sequencer :-)

Thanks in advance for the time of everyone who cares to look into it.

Did you forget to \unfoldRepeats?  The following works fine for me:

%%%%
\version "2.22.0"
\include "articulate.ly"

instrA = \set Staff.midiInstrument = #"acoustic grand"
instrB = \set Staff.midiInstrument = #"flute"
instrC = \set Staff.midiInstrument = #"string ensemble 1"

music = { \repeat percent 2 { \instrA b'4 \instrB 4 \instrC 2 } }

\score { \music \layout { } }
\score { \articulate \unfoldRepeats \music \midi { } }
%%%%


-- Aaron Hill

_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond

Reply via email to