[Top][All Lists]

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

Re: MIDI commands are not emitted in repetitions

From: Aaron Hill
Subject: Re: MIDI commands are not emitted in repetitions
Date: Mon, 22 Nov 2021 12:22:55 -0800
User-agent: Roundcube Webmail/1.4.9

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

reply via email to

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