[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Absolute temporal positioning of mm-rests
From: |
Malte Meyn |
Subject: |
Re: Absolute temporal positioning of mm-rests |
Date: |
Sat, 10 Mar 2018 12:06:31 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
Am 09.03.2018 um 11:45 schrieb Arttu Punkkinen:
I was wondering, if there is a way to specify a multimeasure rest which
length is only relatively defined so that it ends at predetermined bar
number?
I often find myself needing to adjust or add material between
multimeasure rests, which currently need manual adjustment to keep
alignment.
Not for bar numbers but for “anchors” that can be placed in a separate
music expression, you could use the code below. You find the file
alignTo.ily attached. This is a modified version of the file posted
here: http://lists.gnu.org/archive/html/lilypond-user/2015-07/msg00235.html
The following commands are defined:
• \anchor, to be used as
\anchor "anchorname"
• \until, to be used as
s \until "anchorname"
or
R \until "anchorname"
or even
f \until "anchorname"
The latter for long notes is probably useful only if you use the
Completion_heads_engraver.
• \quoteUntil, to be used as
\quoteUntil "instrument" "anchorname"
Here you have to use \alignTo in the \addQuote command for correct results.
• \alignTo and \useAndAlignTo, to be used as
\alignTo \anchormusic \music
The former only makes use of the anchors, the latter also uses the music
of \anchormusic (f. e. key signature changes).
Thanks to the original authors!
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\version "2.19.81"
\include "alignTo.ily"
global = {
\key es \major
s1*3
\anchor "1st theme"
\time 3/4
s2.*8
\anchor "mid"
s2.*4
\anchor "coda"
\tempo "Coda"
s2. \bar "|."
}
flute = \relative {
R \until "1st theme"
es'4 f g as bes c d2.
s \until "mid"
es4 d c bes as g f es f es2.
}
\addQuote "flute" \alignTo \global \flute
clarinet = \relative {
\transposition bes
c'1
R \until "mid"
es4 f g as bes c
\quoteUntil "flute" "coda"
es2.
}
\addQuote "clarinet" \alignTo \global \clarinet
\new StaffGroup <<
\new Staff \useAndAlignTo \global \flute
\new Staff \transpose bes c' \useAndAlignTo \global \clarinet
>>
alignTo.ily
Description: Text document