[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Inputting music in parts
From: |
Jean Abou Samra |
Subject: |
Re: Inputting music in parts |
Date: |
Thu, 6 Jan 2022 22:50:39 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 |
Le 06/01/2022 à 21:36, Paulo Matos a écrit :
Hi,
I have some music I want to transcribe that has 2 parts: A and B the
music goes:
part A
part B
part A with special ending
I could of course define variables like:
\partA =
\partAtransition =
\partAending =
\partB =
and then write the music as
\partA
\partAtransition
\partB
\partA
\partAending
However, I would like to simplify the final score. What's the best way
to write this? I saw repeats but that doesn't seem to be exactly what I
need.
However the partA with different endings sound like it could be where I
could use \alternative, but unsure how to put it all together. Any
suggestions?
You can use \unfoldRepeats for this purpose. It
takes repeats notated with repeat bars and volta
brackets (or, in very recent and unreleased versions,
segno repeats), and just unfolds them to make them
written out.
\version "2.22.1"
\unfoldRepeats {
\repeat unfold 2 {
c'1 %% Part A
}
\alternative {
{ d'1 } %% Part A transition and part B
{ e'1 } %% Part A Ending
}
}
This command is primarily meant for MIDI output,
so it is documented here:
https://lilypond.org/doc/v2.23/Documentation/notation/using-repeats-with-midi
If you need a more complex structure, you might
want the \volta command introduced in version
2.23. It is more flexible than the traditional
way to write \alternative blocks, allowing to
write, e.g.
\alternative {
\volta 1,2 { ... }
\volta 3 { ... }
}
See
https://lilypond.org/doc/v2.23/Documentation/notation/long-repeats.html#alternative-endings
Best,
Jean