[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Attaching markup to high-level objects
From: |
lilypond |
Subject: |
Re: Attaching markup to high-level objects |
Date: |
Sun, 13 Nov 2011 12:18:02 -0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Sun, Nov 13, 2011 at 11:39:20AM +0100, Urs Liska wrote:
> Hi,
>
> I also often run into this situation, but it also applies to dynamic
> marks etc. (e.g. a phrase is repeated eight times, and I need a mf at
> the beginning and p at the fifth repetition). There probably are more
> situations where you have this problem.
>
> The workaround I sometimes use (if it is less work than changing the
> variables) is to to use a separate voice that mainly consists of skips.
> Then I can insert markups wherever I want (with s1^\markup ...).
Thank you very much, Urs. This is a good tip. I used your suggestion
just in the repeat endings, since that is where most of my markup
is needed. My arrangement (or rather, the melody staff) now
looks like this, and I have plenty of 'hooks' to hang markup on,
if needed. Having one markup location per bar also eliminates
much of the need for large x-axis offsets. The granularity of
the s1 elements can be adjusted to s4 s4 s4 s4 if I need finer
control of x-axis placement that will still 'float' with changes in
layout/page breaks, etc.
Most grateful!
Jim
melody = \relative c' {
\key ees \major
\time 4/4
\bar "|:"
\repeat percent 2 \introMelody
\bar ":|:"
\break
\mark \markup \musicglyph #"scripts.segno"
\repeat volta 4 { \headMelody }
\alternative {
% first ending:
{
\break
<<
\new Voice = "first" {
\firstEndingMelody
} % first Voice
\new Voice = "second" {
s1 s1 s1 s1 s1
} % second Voice
>>
\bar ":|"
} % first ending
% second ending:
{
\break
<<
\new Voice = "first" {
\secondEndingMelody
} % first Voice
\new Voice = "second" {
s1
} % second Voice
>>
\bar ":|"
} % second ending
% third ending:
{
\set chordChanges = ##f
<<
\new Voice = "first" {
\thirdEndingMelody
} % first Voice
\new Voice = "second" {
s1 s1 s1 s1 s1
} % second Voice
>>
\set chordChanges = ##t
} % third ending
% fourth ending:
{
\break
<<
\new Voice = "first" {
\fourthEndingMelody
} % first Voice
\new Voice = "second" {
s1 s1 s1 s1 s1 s1
} % second Voice
>>
} % fourth ending
} % repeat/alternative
\bar "|."
} % melody