lilypond-user
[Top][All Lists]
Advanced

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

Re: partial in the middle of piece


From: tisimst
Subject: Re: partial in the middle of piece
Date: Mon, 16 Jun 2014 11:56:22 -0700 (PDT)

This probably isn't a permanent solution, but it seems to get the job done
and it's simple:

midpartial = 
#(define-music-function (parser location music)
   (ly:music?)
   #{
     \cadenzaOn
     #music
     \cadenzaOff
   #})

upper = { 
  \time 4/4 
  \partial 4 c'4 
  c'1 
  c'1
  \midpartial c'4 \bar "|"
  c'1 
  c'1 
} 

lower = { 
  \time 4/4 
  \partial 4 r4 
  R1 
  R1 
  r4  % explicitly putting "\midpartial" here is unnecessary, but may be
visually helpful.
  R1 
  R1 
} 

\score { 
  \new PianoStaff << 
    \new Staff = "upper" \upper 
    \new Staff = "lower" \lower 
  >> 
}

The only thing I've noticed from this is that because the cadenza macro
temporarily turns off timing, automatic beaming is also turned off. There
may be other implications to doing it this way, but other than that, you can
put whatever you want after \midpartial as long as it's in brackets {...} if
more than one note/object is used, like:

  \midpartial { c'8 [ d' ] } \bar "|"

You could even put the '\bar "|"' inside the music function (after "#music")
so that it's unnecessary to explicitly use it in the body of the music:

midpartial = 
#(define-music-function (parser location music)
   (ly:music?)
   #{
     \cadenzaOn
     #music \bar "|"
     \cadenzaOff
   #})

Just my two cents.

-Abraham



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/partial-in-the-middle-of-piece-tp163365p163392.html
Sent from the User mailing list archive at Nabble.com.



reply via email to

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