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 {}
}