lilypond-user
[Top][All Lists]
Advanced

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

Re: Problem with hemiola notation


From: Jim Long
Subject: Re: Problem with hemiola notation
Date: Mon, 16 Sep 2013 22:20:08 -0700
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Sep 16, 2013 at 07:17:08PM -0400, Alan McConnell wrote:
> \version "2.16.0"
> 
> \header {
>   title = "A Jazzy 3/4 Tune!"
> }
> 
> %  Put some vertical space here!
> \markup { \vspace #1 }
> 
> global =  {
>   \key g \major 
>   \time 3/4
> }
> 
> 
> violinOne = \new Voice \relative c'' {
>   \set Staff.instrumentName = #"Violin 1 "
> 
> d4. e8 d c | b4 g g4. \bar ""  a8 d,4 d | b' g g \bar "|."
> 
> }
> 
> %  Challenge:  to get rid of the barline between  g g4. and a8 d,  !
> 
> 
> \score {
>       \new Staff
>       << \global \violinOne
>       >>
> }
> 
> \layout { }

I have two solutions for you.  The "ugly" one uses note scaling and a spacer
rest to achieve the desired engraved notation, at the expenses of slightly
inaccurate MIDI playback (if that is a concern to you).

violinOne = \new Voice \relative c'' {
  \set Staff.instrumentName = #"Violin 1 "

d4. e8 d c | b4 g g4. * 2/3 \bar "" s8 a8 d,4 d | b' g g \bar "|."

}

As Harm pointed out, the \bar command *must* come at a bar boundary
to be effective.  If you haven't encountered note duration
scaling yet,  "g4. * 2/3" *engraves a dotted quarter* -- the
literal duration -- in the output, but in Lilyponds internal
rhythmic counting, the duration is computed as 2/3 of the dotted
quarter, which of course is just a regular quarter note.  So the
\bar command now does indeed fall at a bar boundary.  The "s8"
after the \bar command is a spacer rest with an eighth-note
duration, because the engraved output for that bar appears to
have only 2 and a half beats.  The s8 adds one eighth note to the
duration of the measure following the \bar command.

The less ugly method, and one that achieves correct MIDI output,
is to create another music variable.  This variable can hold all
sorts of editorial notations, volta repeats, double bar lines,
dashed bar lines, invisible bar lines, tempo changes, etc.  Then
by placing that music into the simultaneous music (<< ... >>)
structure of the violin staff, those bar line properties get set
for the violin part.  In this solution, I also moved the final
bar '\bar "|."' out of the violin part and into the barLines
variable to illustrate.

violinOne = \new Voice \relative c'' {
        \set Staff.instrumentName = #"Violin 1 "
        d4. e8 d c | b4 g g4. a8 d,4 d | b' g g
}

%  Challenge:  to get rid of the barline between  g g4. and a8 d,  !

barLines = {
        s1 * 2 * 3/4 % skip 2 measures of 3/4 time
        \bar ""      % then blank out the ensuing barline
        s1 * 2 * 3/4 % skip 2 more measures of 3/4 time
        \bar "|."    % and set a final barline
}

\score {
        \new Staff
        << \global \violinOne \barLines
        >>
}

\layout { }




HTH,

Jim



reply via email to

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