lilypond-user
[Top][All Lists]
Advanced

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

Re: Replacing the r1 glyph


From: Oscar Dub
Subject: Re: Replacing the r1 glyph
Date: Wed, 26 Sep 2012 18:47:14 +0100

Thanks to both!

Janek, your information about accessing the internals of Feta and LilyPond is very useful. As there's no way to add .mf syntax to a LilyPond file (as far as I know), I'm going to try to follow along Marc's lines. It would be great to solve the problem without hacking LilyPond's source, but it's good to know nonetheless.

On 26 Sep 2012, at 09:44, Marc Hohl <address@hidden> wrote:

[…] create a markup that looks like the shape.
Once you managed this, you can write a callback for Rest #'stencil that checks for the duration
of the rest, applies your markup if it is 1 and calls ly:rest::print otherwise.

I've managed to implement both separate parts.

My markup looks like this:
\markup
{
  \combine
  \musicglyph #"scripts.ufermata"
  \translate #'(-0.01 . 0.19)
  \with-color #(x11-color 'white)
  \draw-circle #0.28 #0 ##t
}

The output is attached.
For the scheme function to place in the override, I have cannibalised this snippet (http://lsr.dsi.unimi.it/LSR/Item?id=548) to make a basic outline:

#(define (ly:rest-interface::kurtag-rests grob)
  (let ((duration (ly:grob-property grob 'duration-log))))
  (if (= duration 0)
   ( %{ markup function goes HERE %} )
   (ly:rest::print grob) % else print normal grob
 ))

With the plan being to call this code in via:
\override Rest #'stencil = #ly:rest-interface::kurtag-rests

My problem now is combining the two stages. I'm not sure how to render the markup in scheme at the position shown in the code.

Thanks again,

Oscar

reply via email to

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