lilypond-user
[Top][All Lists]
Advanced

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

Re: Problem with hemiola notation


From: Thomas Morley
Subject: Re: Problem with hemiola notation
Date: Sun, 15 Sep 2013 19:29:37 +0200

2013/9/15 Alan McConnell <address@hidden>:
> First of all, my thanks to both David K and Robert S for
> their quick responses!
>
> On Sun, Sep 15, 2013 at 05:25:33PM +0200, David Kastrup wrote:
>> Alan McConnell <address@hidden> writes:
>>
>
>> > (start)--------------------------
>> > \version "2.16.0"
>> >
>> > global =  {
>> >   \key d \minor
>> >   \time 3/4
>> > }
>> >
>> > %  Here is a "hemiola"
>> >
>> > |ees4 d c | c4. d8 bes4. | a8 a4. g8 | g2 r4 |
>> >                        ^
>> >                 ------------------------(finish)
>                     I wish the word "snippet" were available to
>                     denote the above.  But Snippet is now a
>                     well-established term in the copious Lilypond
>                     documentation.  So I had to say "extract".
>
>
>> >
>> > The '^' marks the dot on the dotted Bb that I wish
>> > to move into the next bar.  The part compiles just
>> > fine;
>>
>> No, it doesn't.
>           <G>  Not the above excerpt, for sure.  But the
>           part from which this is taken compiles fine;
>           I've printed out the resulting .pdf and friends
>           here in Silver Spring and in Los Angeles have
>           played them.
>
>
>
>> > Of course I could tie over the bes4 into a bes8 in
>> > the next measure, but I thought it would be nice to
>> > transcribe just as the Bach Gesellschaft has it.
>>
>> You'll be surprised at how few of the readers here have the Dover scores
>> available,
>         <G> No I wouldn't.  I'll bet almost all Lilypond users
>         have heard of Bach, but why should readers without
>         special needs or interest have Bach Dover scores?  But I
>         would expect tho folks who do have such scores to easily
>         recognize my problem from the "extract" that I gave, and
>         reproduce above.  It is a notation that I've seen often
>         elsewhere, but at the moment I can cite only the Bach
>         Gesellschaft editions.
>
>
>> so it might be useful to actually include a scan of what you
>> are asking for: it should not require more than about three notes, so
>> neither mailing list bandwidth nor copyright should be problematic here.
>           I am Attaching a .jpg of a small chunk of a download that
>           I got from IMSLP, that illustrates the Bach Gesellschaft
>           practice.  I am fairly sure that the  Mailman SW will
>           strip this Attachment, but I hope it will go through to
>           Messrs K and S.   If anyone else here is interested,
>           lemme know; and I'll be glad to send this small .jpg.
>
> Again thanks, and I hope for illumination from any/all available
> experts.
>
> Alan
>
> --
> Alan McConnell :  http://globaltap.com/~alan/
>    Know thyself.  If you need help, call the C.I.A.
>    Whenever anyone says, "theoretically", they really mean, "not really".
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>

Hi Alan,

I've got the image, thanks.
Now it's clear what you deserve.

Maybe you find my code below helpful.
Though let me write some remarks before.

I know no way to let LilyPond checking bars without complain for code like:
\relative c' { \time 3/4 c4. d8 bes4. | a8 a4. g8 | }
Even if you use the "Completion_heads_engraver".

If you want barchecks you have to write:
\relative c' { \time 3/4 c4. d8 bes4~ | bes8 a8 a4. g8 | }

My code now tweaks the Tie and the right bound of it. Making the Tie
transparent, replacing the right NoteHead by a dot, making its Flag
and Stem transparent, too.

Drawbacks/limitations:
You have to insert \noBeam before the next Note.
I didn't manage to code 'no-ledgers for the tied Note from inside the
Tie-override for unknown reasons. You'll have to insert the relevant
override in case the tied NoteHead has Ledgers.

So far it works for all tested versions (2.12.3 up to 2.17.26)

\version "2.16.2"

tiedToDot =
\once \override Tie #'before-line-breaking =
  #(lambda (grob)
    (let* ((right-bound (ly:spanner-bound grob RIGHT))
           (dot
              (ly:font-get-glyph (ly:grob-default-font right-bound) "dots.dot"))
           (dot-X-length
              (interval-length (ly:stencil-extent dot X)))
           (staff-pos (ly:grob-property right-bound 'staff-position))
           (stem (ly:grob-object right-bound 'stem))
           (right-note-stencil (ly:grob-property right-bound 'stencil))
           (right-note-head-X-length
              (interval-length (ly:stencil-extent right-note-stencil X)))
           (flag (ly:grob-object stem 'flag))
           (dir (if (even? staff-pos)
                    -2
                    0))
           (x-offset
             (/ (- right-note-head-X-length dot-X-length) 2))
           (new-note-stencil
              (ly:stencil-translate-axis
                 (ly:stencil-aligned-to dot Y dir)
                 x-offset
                 X)))

    (ly:grob-set-property! grob 'transparent #t)
    (if (not (null? stem)) (ly:grob-set-property! stem 'stencil point-stencil))
    (if (not (null? flag)) (ly:grob-set-property! flag 'stencil point-stencil))
    ;; No idea why it doesn't work:
    (ly:grob-set-property! right-bound 'no-ledgers #t)
    (ly:grob-set-property! right-bound 'stencil new-note-stencil)))


\relative c''
<<
   { \tiedToDot d4~ d8\noBeam d }
   \\
   { d,4 d8 d }
>>

mus =
\relative c'' {
    \key d\minor
    \time 3/4
    ees4 d c |
    c4. d8 \tiedToDot bes4~ |
%    \once \override NoteHead #'no-ledgers = ##t
    bes8 \noBeam a8 a4. g8 |
    g2 r4 |
}

\new Staff { \mus \transpose c c' \mus }



HTH,
  Harm

Attachment: tie-to-dot.png
Description: PNG image


reply via email to

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