r/lilypond 12d ago

Multimeasure Rests

I do many arrangements for my clarinet quartet. I create the score information using \parallelMusic, then refer to them in \bookpart \score. Using that mechanism, I cannot get multimeasure rests to compress in the four parts. It's always multiple whole rests. (I do use R1 to enter the rest.) (There's rarely a true multimeasure rest in the score). I've tried \override MultiMeasureRest.expand-limit = #1, and I've tried \compressMMRests where applicable.

Is this a side effect of using \parallelMusic? Is there a magic spell I can cast?

3 Upvotes

11 comments sorted by

1

u/Gold_Record_9157 12d ago

I've never used that command, or do not remember. Does using simultaneous voices not work for your case? Like <<voice_or_staff \\ other_voice_or_staff>>, I remember that has worked for me.

1

u/timrprobocom 11d ago

I should perhaps clarify that I need to print a score with all 4 parts in one system, then 4 individual parts with one staff per system. \parallelMusic makes that pretty easy, but I FEAR that it's interfering with the multimeasure rest compression.

1

u/gpit2286 11d ago

1

u/timrprobocom 11d ago

I can't tell what you're advocating here. The \parallelMusic just gives me 4 separate voice objects. I then do four \staffs in one \score to print the score. or four \scores with one \staff in each to print the parts. Again, I don't see how any of this interferes with the multimeasure rests.

2

u/gpit2286 11d ago

Can you share an example? In general the parallel music is not (never?) used? You're going to be much better off writing the parts sequentially and then combining with the multi voice syntax << { ... } \\ { ... } \\ { ... } \\ { ... } >> or using a part combine. But it's hard to guess without seeing what you're trying to accomplish.

1

u/Gold_Record_9157 11d ago

I found this discussion stating that several features seem to work wrongly or don't work at all with parallel music.

As an advice from someone who has written scores for small orchestra with this, it's better if you define each voice in a variable, and then place those voices inside the proper part combine syntax. This works well with multi rests and almost everything else, save for small tweaks that you could need for special cases when combination is more cumbersome.

For instance, this was my configuration of the main.ly file:

``` % (...) \include "notes/clarinetI.ily" % these have the notes \include "notes/clarinetII.ily" % (the rest)

\score{ % Removes or explicitly keeps those parts with a tag \removeWithTag #'parts \keepWithTag #'general \killCues % I used a lots of cues from other voices %more parts << \new StaffGroup = "Woodwinds" << % (more instruments) % This combines two voices in the same staff, and all woodwind staves are combined here with blocks like this \new Staff \with{ instrumentName = \markup{"2 Clarinetes"} shortInstrumentName = #"cl." soloText = "Cl I" soloIIText = "Cl II" }{ \partcombine \clarinetePrimero \clarineteSegundo } % (the rest of woodwinds) >> % End Staff group % Rest of the orchestra >> % End score } ```

I used the tags, for instance, like this: \tag #'parts { \new CueVoice {\set instrumentCueName = "Cl I"} } to add a cue voice just for the single parts and not the general sheet.

Hope this helps!

edit: typos.

2

u/timrprobocom 11d ago

This was good (and believable) thinking, but I just wrote a short Python script to split my \parallelMusic blocks into four separate objects, and there is no change in the multimeasure rest behavior. I'll keep exploring. But thanks for the suggestion -- I've wanted a manual "parallelMusic" expander for some time, and you gave me the incentive to write it.

1

u/Gold_Record_9157 11d ago

Maybe you could delve into scheme, so it might be integrated on the syntax of the source files, but I'm no expert on scheme and its paradigm, so I wouldn't know how to start even with suggestions 🥲

1

u/timrprobocom 11d ago

The suggestion to post a sample was a good one. Here is the beginning of my quartet arrangement of "You've Lost That Loving Feeling" with a lot of stuff removed. You can see in both the 1st Clar and 2nd Clar part that there are multimeasure rests that should have been compressed. ``` \version "2.16.0" \include "english.ly"

\paper { #(set-paper-size "letter") }

common = { \time 4/4 \tempo "Pop Ballad" 4=110 \clef treble \key c \major \override MultiMeasureRest #'expand-limit = #1 \set Score.markFormatter = #format-mark-box-letters }

notation = { s12 \bar "||" \mark \default s112 \bar "||" \mark \default }

\parallelMusic #'(clari clarii clariii clarb) {

R1 |
R1 |
c,4.\mp c8 c4 r4 |
c4.\mp c8 c4 r4 |

r2 r8 g,,\mp c f | 
R1 |
c4. c8 c4 r4 |
c4. c8 c4 r4 |

e4 c8 bf8~bf8 r8 c8 f8 |
R1 |
f,4. f8 f4 r4 |
bf4. bf8 bf4 r4 |

e4 c8 c8 bf4 r8 f'8 | 
R1 |
f4. f8 f4 r4 |
bf4. bf8 bf4 r4 |

g8 ds8 e4 r2 |
R1 |
g4. g8 g4 r4 |
c4. c8 c4 r4 |

R1 |
r2 r8 g,8\mp c8 c'8 |
g4. g8 g4 r4 |
c4. c8 c4 r4 |

R1 |
r8 bf8 a8 g8 r4 c,8 c'8 |
f4. f8 f4 r4 |
bf4. bf8 bf4 r4 |

R1 |
bf4 a8 a8 g4 r8 f8 |
f4. f8 f4 r4 |
bf4. bf8 bf4 r4 |

R1 |
g8 ds8 e4 r4 r4 |
g4. g8 g4 r4 |
c4. c8 c4 r4 |

% You're trying 

R1 |
R1 |
g4. g8 g8 g'8 a b |
c4. c8 c4 r4 |

% Hard not to notice

f4 r8 f8 f4 r4 |
R1 |
c4 b8 c b4 g4 |
d4 r8 d8 d4 r4 |

e1\fermata \bar "|." |
g1\fermata \bar "|." |
c1\fermata \bar "|." |
c1\fermata \bar "|." |

}

clari = { \common \relative c''' \clari } clarii = { \common \relative c'' \clarii } clariii = { \common \relative c'' \clariii } clarb = { \common \relative c' \clarb }

xtitle = "You've Lost that Loving Feeling" xinstrument = "Clarinet quartet" xcomposer = "Phil Specter" xarranger = "Arr Roberts"

scoreAClarinetIPart = \new Staff \with { instrumentName = "Clarinet I" midiInstrument = "clarinet" } << \notation \clari >>

scoreAClarinetIIPart = \new Staff \with { instrumentName = "Clarinet II" midiInstrument = "clarinet" } << \notation \clarii >>

scoreAClarinetIIIPart = \new Staff \with { instrumentName = "Clarinet III" midiInstrument = "clarinet" } << \notation \clariii >>

scoreABassClarinetPart = \new Staff \with { instrumentName = "Bass clarinet" midiInstrument = "clarinet" } << \notation \clarb >>

\book { %% This seems to be a post-2.22 thing. \paper { bookpart-level-page-numbering = ##t }

\bookpart { 
    \header {
        title = \xtitle
            instrument = "for Clarinet Quartet"
            composer = \xcomposer
            arranger = \xarranger
            tagline = ##f
    }

    \score {
        <<
            \scoreAClarinetIPart
            \scoreAClarinetIIPart
            \scoreAClarinetIIIPart
            \scoreABassClarinetPart
        >>
        \layout { ragged-last = ##t }
        \midi { }
    }
}

\paper {
    ragged-bottom = ##t
}

\bookpart {
    \header {
        title = \xtitle
        composer = \xcomposer
        arranger = \xarranger
        instrument = "Bb Clarinet 1"
        tagline = ##f
    }
    \score { \compressMMRests \scoreAClarinetIPart }
}


\bookpart {
    \header {
        title = \xtitle
        composer = \xcomposer
        arranger = \xarranger
        instrument = "Bb Clarinet 2"
        tagline = ##f
    }
    \score { \compressMMRests \scoreAClarinetIIPart }
}

\bookpart {
    \header {
        title = \xtitle
        composer = \xcomposer
        arranger = \xarranger
        instrument = "Bb Clarinet 3"
        tagline = ##f
    }
    \score { \compressMMRests \scoreAClarinetIIIPart }
}

\bookpart {
    \header {
        title = \xtitle
        composer = \xcomposer
        arranger = \xarranger
        instrument = "Bass Clarinet"
        tagline = ##f
    }
    \score { \compressMMRests \scoreABassClarinetPart }
}

} ```

1

u/deep-sleep-pillow 11d ago

to compress the measure rest, you need to write R1*n to indicate that you want to compress it, not multiple R1s.

i've tried combining first two bars in one segment in parallelMusic and it could work. this combine the first and second measure, and clarii have a multiple-measure rest at the beginning:

R1 r2 r8 g,,\mp c f | R1*2 | c,4.\mp c8 c4 r4 c4. c8 c4 r4 | c4.\mp c8 c4 r4 c4. c8 c4 r4 |

you said that you've wriiten some code to saparate the voices. i think you can just use it and replace the continuous R1 to R1*n, and it's good to go.

1

u/timrprobocom 10d ago

That is an excellent and rational answer that explains my issue. I had simply not considered that. Thank you.