lilypond-user
[Top][All Lists]
Advanced

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

Re: MIDI & repeats


From: Henning Hraban Ramm
Subject: Re: MIDI & repeats
Date: Tue, 2 Aug 2022 19:29:54 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:102.0) Gecko/20100101 Thunderbird/102.1.0

Am 02.08.22 um 18:10 schrieb Benjamin Tordoff:
Hi all, I’m wondering if there’s a smart way to make the midi output for a 
particular part do the following two things (both common in Sousa marches):

1. Have a part play only on 2nd time through the repeat.
2. Have different dynamic for 1st and 2nd times through repeat.

A minimal example of how I would typically typeset this is below but produces 
midi output that plays all repeats with uniform volume. I've had a good hunt 
around the internet for examples of doing this but either I'm searching for the 
wrong things or this is a somewhat obscure request!

You already have different blocks for PDF and MIDI, that’s a start.

In such cases, I usually define more, smaller parts that I combine differently, like

first = { s1 | s1 | }
second = { c''1 | c''1 | }

notes = {
\repeat volta 2 { \second }
}

midis = {
\first \second
}

Also, use another variable for dynamics that you can combine like

<< \dynamics \notes >>

Hraban


Thanks in advance.

Ben


\version "2.23.10"

notes = {
   \repeat volta 2 {
     <>^\markup{(2nd time only)}
     c''1 | c''1 |
   }
   \repeat volta 2 {
     <>_\markup {\dynamic "pp" "(2nd time " \dynamic "ff" ")"}
     d''1 | d''1 |
   }
}

\score { % PDF output
   << \new Staff \notes >>
   \layout {}
}

\score { % MIDI output
   \unfoldRepeats << \new Staff \notes >>
   \midi {}
}






reply via email to

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