[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: compress full bar rests
From: |
Thomas Morley |
Subject: |
Re: compress full bar rests |
Date: |
Sat, 10 Oct 2015 00:41:01 +0200 |
2015-10-09 22:31 GMT+02:00 Flaming Hakama by Elaine <address@hidden>:
> Somehow, through this framework, I cannot get full bar rests to compress
> when I use a globals treatment.
>
> Does anyone have a clue as to how to get them to compress?
>
> Thanks.
>
>
>
> \version "2.19.15"
>
> structure = \relative c {
> \compressFullBarRests
> \override MultiMeasureRest.expand-limit = #2
> \override Score.RehearsalMark.self-alignment-X = #LEFT
> \mark "Globally Uncompressed"
> s1 |
> s1 | s | s | s \bar "||"
> }
>
> globals = #(define-music-function (parser location mus) (ly:music?) #{ <<
> \structure \relative { $mus } >> #})
>
> melody = \relative c'' {
> \compressFullBarRests
> \override MultiMeasureRest.expand-limit = #2
> c1 | R1*4 ||
> }
>
> melodyGlobal = \globals { \melody }
>
>
> <<
> \new Staff {
> \compressFullBarRests
> \override MultiMeasureRest.expand-limit = #2
> \override Score.RehearsalMark.self-alignment-X = #LEFT
> \mark "Simple and Compressed"
> \melody
> }
>>>
>
> <<
> \new Staff {
> \compressFullBarRests
> \override MultiMeasureRest.expand-limit = #2
> \melodyGlobal
> }
>>>
>
>
> David Elaine Alt
A sequence of single SkipEvents like { s1 s1 } will not be compressed.
You need to write { s1*2 }.
See the following tiny examples:
\new Staff <<
{ s1 s1 }
{ \compressFullBarRests R1*2 }
>>
\new Staff <<
\displayMusic { s1*2 }
{ \compressFullBarRests R1*2 }
>>
Your example cold read:
\version "2.19.28"
structure = \relative c {
\compressFullBarRests
\override MultiMeasureRest.expand-limit = #2
\override Score.RehearsalMark.self-alignment-X = #LEFT
\mark "Globally compressed"
s1*5 \bar "||"
}
globals = #(define-music-function (parser location mus) (ly:music?)
#{ << \structure \relative { $mus } >> #})
melody = \relative c'' {
c1 | R1*4 ||
}
melodyGlobal = \globals { \melody }
<<
\new Staff {
\melodyGlobal
}
>>
HTH,
Harm