lilypond-user
[Top][All Lists]
Advanced

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

Re: MIDI & repeats


From: Lukas-Fabian Moser
Subject: Re: MIDI & repeats
Date: Tue, 2 Aug 2022 20:24:27 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

Hi Benjamin,

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!

Thanks in advance.

Some of this can be achieved using the \volta command:

\version "2.23.7"

myScore =
\relative {
  <>^"2nd time left, 3rd time right!"
  \repeat volta 3
  {
    \tag MIDI \volta 2 \set midiPanPosition = -1
    % \tag MIDI \volta 2 \set midiMaximumVolume = 0 % does not do anything; why?
    \tag MIDI \volta 3 \set midiPanPosition = 1
    c'4 d \tag MIDI \volta 3 <>\pp e f
  }
}

\score {
  \removeWithTag MIDI \myScore
}

\score {
  \unfoldRepeats \myScore
  \midi {}
  \layout {} % for debugging only
}

Here I used a tag to keep the print version of the score clean from all the MIDI stuff.

I just do not know why the setting of midiMaximumVolume does not do anything if put inside a \volta construction. For the pan position, it works like a charm...

Lukas




reply via email to

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