lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Markup for repeated notes or phrases


From: Simon Albrecht
Subject: Re: Markup for repeated notes or phrases
Date: Mon, 9 Nov 2015 19:20:19 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

Hello Stephan,

On 09.11.2015 18:45, Stephan Neuhaus wrote:
Dear list,

I have a piece that contains phrases that are repeated often. For
example, let us assume that the phrase consists of two sixteenth notes.
In the piece in question, the unit of repetition is in fact much longer;
this is just an example. So I have done this:

phrase = { c16 d16 }
\relative c' { \repeat unfold 8 \phrase }

But the composer has sometimes put expressive marks on some of the notes
in the phrase, some of the time. For example:

\relative c' { c16 d c d c d c d\staccato c d c d c d c d }

Obviously I could do

\relative c' {
   \repeat unfold 3 \phrase
   c d\staccato
   \repeat unfold 4 \phrase
}

But this obscures the fact that the "c d\staccato" is the same as
"\phrase", just with expression markings added. (When the unit of
repetition is several bars long, this is not as obvious as in this
simplified example.)

Is there an elegant way to keep the structure visible, and yet to add
markings to selected parts of \phrase?

You can use parallel music expressions within one voice: either explicitly (first score in the example) or through a handy music function (second score):

%%%%%%%%%%%%%%%%%
\version "2.18.2"
pattern = { c16 d16 }
music = \relative c' { \repeat unfold 8 \pattern }
\new Voice <<
  \music
  { s4.. s16-. s4 s16 s8.-> }
>>

%music function by David Kastrup and Simon Albrecht
after =
#(define-music-function (parser location t e m) (ly:duration? ly:music? ly:music?)
   #{
     <<
       #m
       { \skip $t <> -\tweak extra-spacing-width #empty-interval $e }
     >>
   #})
\new Voice { \after 4.. -. \after 16*13 -> \music }
%%%%%%%%%%%%%%%

HTH, Simon



reply via email to

[Prev in Thread] Current Thread [Next in Thread]