lilypond-user
[Top][All Lists]
Advanced

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

Re: Stem #'stroke-style


From: Gagi Petrovic
Subject: Re: Stem #'stroke-style
Date: Sat, 24 Nov 2012 18:26:25 +0100

Thank you for the tip David and David :) It works fine now.

Unfortunately this (just like acciaccatura) only works on one note instead grouped notes. Basically i simply need the beam to be stroked. Now i'm using the following workaround, but the output is not really satisfactory and i constantly need to adjust the Y-axis. 

\version "2.16.1"  
stroke = {
  \once\override Stem #'stencil =
    #(lambda (grob)
       (let* ((x-parent (ly:grob-parent grob X))
              (is-rest? (ly:grob? (ly:grob-object x-parent 'rest))))
         (if is-rest?
             empty-stencil
             (ly:stencil-combine-at-edge
              (ly:stem::print grob)
              Y
              (- (ly:grob-property grob 'direction))
              (grob-interpret-markup grob
                                     (markup #:center-align #:fontsize 2
                                             #:musicglyph "flags.ugrace"))
              -5.2))))
}

\relative c' {
%  \once\override Flag #'stroke-style = #"grace"
%  \teeny d8 \normalsize c4.  c2

  \teeny\stroke c32[d e f g a b c~]  \normalsize c2.
}

It also seems like a lot of work for something quite simple. Any suggestion would be really helpful and greatly appreciated.

Thank you in advance!
Gagi

reply via email to

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