Home
Random
Log in
Settings
About LilyPond wiki
LilyPond wiki
Search
Editing
Repeats with parallelMusic
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
Sometimes for short polyphonic pieces – and to make the source more readable –, it can be helpful to use <code>\parallelMusic</code>. Troubles come with repeats that should be entered as <pre>\parallelMusic #'(voiceA voiceB) { \repeat volta 2 { mes.1 mes.2 ... mes.n } | \repeat volta 2 { mes.1 mes.2 ... mes.n } | }</pre> so the code becomes less readable and the use of <code>\parallelMusic</code> less understandable. This snippet is a workaround that shows another way to write repeats in <code>\parallelMusic</code> mode by simply adding a bar at the end of the score. It also handles the wanted repeats in the midi output. <lilypond version="2.24" full> %% http://lsr.di.unimi.it/LSR/Item?id=924 % => http://lilypond.1069038.n5.nabble.com/snippet-Repeats-with-parallelMusic-td163832.html % => http://lilypond.1069038.n5.nabble.com/parallelMusic-and-repeat-td27560.html % by P.P.Schneider on June 2014. %here starts the snippet: \parallelMusic #'(voiceA voiceB) { \time 3/4 \key a\minor \clef "G_8" \repeat volta 2 { % Bar 1 a4 e'2 | a,2. | % Bar 2 d'8 c' b c' a4 | a,2. | % Bar 3 b8 gis e gis e' b | e,2 c4 | % Bar 4 d'8 c' b c' a4 | a,2. | % Bar 5 f'8 e' d' c' b a | d2. | % Bar 6 gis2. | e4 e d | % Bar 7 e'4 d' c' | c2. | % Bar 8 b2. | e4 e2 | } \repeat volta 2 { % Bar 9 e'4 a' e' | c2. | % Bar 10 f'8 e' f' e' d'4 | d2. | % Bar 11 d'4 g' d' | b,2. | % Bar 12 e'8 d' e' d' c'4 | c2. | % Bar 13 f'8 e' d' c' b a | d2. | % Bar 14 gis2. | e4 e8 d c b, | % Bar 15 c8 e' d' c' b c' | c4 d e | % Bar 16 a2. | a,4 a,2 | } \mark\markup\small\italic "D.C." % here's the hacky trick : | } \score { \new Staff \with { instrumentName = Guitar } << \voiceA \\ \voiceB >> } \score { \new Staff { \unfoldRepeats << \voiceA \\ \voiceB >> << \voiceA \\ \voiceB >> } \midi { \context { \Score tempoWholesPerMinute = #(ly:make-moment 128/4) } } } \paper { tagline = ##f } </lilypond> [[Category:Simultaneous notes]] [[Category:Repeats]] [[Category:Fretted strings]] [[Category:Workaround]] [[Category:Snippet]]
Summary:
Please note that all contributions to LilyPond wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Meta:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)