lilypond-user
[Top][All Lists]
Advanced

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

Re: How to get a (rhythmic) dot to follow a barline


From: Thomas Morley
Subject: Re: How to get a (rhythmic) dot to follow a barline
Date: Wed, 8 Aug 2012 01:30:47 +0200

2012/8/8 james <address@hidden>:
>
> On Aug 6, 2012, at 12:20 PM, David G wrote:
>
> I would like to put a dot after the barline to show (something like) a
> crotchet tied to a quaver - or according to
> http://ranumspanat.com/jacquet_dots.htm subtly different(!)
>
> It's more clear in this Beethoven string quartet:
> http://erato.uvt.nl/files/imglnks/usimg/2/28/IMSLP04769-Beethoven_-_String_Quartet_No.15_Dover.pdf
> e.g. page 17, second system, fourth bar violin 2 and 'cello; fifth bar
> viola.
>
> I did find this thread
> http://lists.gnu.org/archive/html/lilypond-user/2005-05/msg00122.html from
> seven years ago through the search but it didn't seem to come to any solid
> conclusion, so I was wondering if things were different now?
>
> I am not concerned about MIDI output etc., so I would be happy to use an
> invisible rest and insert the dot as an "independent" object if possible? In
> a broader sense, that means being able to insert an arbitrary object. Any
> help/pointing me to the right part of documentation would be greatly
> appreciated.
>
>
> I'm pretty sure I've done this in the past by simply replacing the notehead
> font with the dot (maybe a period, I can't remember) and not print the stem
> or flag. You might want to look into this method, it might get what you want
> far more easily.
>
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>

As James suggested (using a functio):

\version "2.15.39"

tieToDotted =
#(define-music-function (parser location music) (ly:music?)
#{
        \once \override Tie #'transparent = ##t
        $music
        \once \autoBeamOff
        \once \override NoteHead #'stencil =
          #(lambda (grob)
            (let* ((staff-pos (ly:grob-property grob 'staff-position))
                   (staff-space (ly:staff-symbol-staff-space grob)))
            (ly:stencil-translate-axis
              (ly:font-get-glyph (ly:grob-default-font grob) "dots.dot")
              (if (even? staff-pos)
                 (/ staff-space 3)
                 0) Y)))

        \once \override NoteHead #'Y-extent =
        #(ly:make-unpure-pure-container
           ly:grob::stencil-height
           (lambda (grob start end) (ly:grob::stencil-height grob)))
        \once \override NoteHead #'X-extent = #'(-1 . 1)
        \once \override Stem #'stencil = ##f
        \once \override Flag #'stencil = ##f
#})

\relative c' {
        cis dis e \tieToDotted fis~
        fis8 fis \tieToDotted gis4~ gis8 fis gis4
        cis1
}

-Harm



reply via email to

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