lilypond-user
[Top][All Lists]
Advanced

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

Re: Persian music package


From: Kees van den Doel
Subject: Re: Persian music package
Date: Sun, 1 Aug 2021 10:16:55 -0700



On Sun, Aug 1, 2021 at 1:33 AM Jean Abou Samra <jean@abou-samra.fr> wrote:

Does this code illustrate your problem?

\version "2.22.1"

{
   \override Accidental.X-extent = #'(-2 . 2)
   <ges' aes'>
}

Yes and no. Your code *does* allow me to set the X-extent with those 2 numbers and it has an effect, whereas in persian.ly changing the X-extent numbers has zero effect. 

I added your code but get a runtime error or warning (?) at your "(ly:stencil-add", referring to attached persianT.ly:

mintty screen dump
Drawing systems...persianT.ly:349:8: In procedure ly_stencil_add in _expression_ (
ly:stencil-add (ly:grob-property grob #) (ly:separation-item::print grob)):     
persianT.ly:349:8: Wrong type (expecting Stencil): #f                           
 
I still can't control spacing with those additions by tweaking the #s.

Next, if I just add the latter part of your suggested code (ie not after-line-breaking = stuff) there is an effect.
I can now move the first troublesome koron around with the X-extent number pair, but this is no help as the notes don't move out of the way and the accidental is still on top of one of the notes, so it seems to control location but not size of the accidental?.

Cheers,
Kees


If so, this comes from the spacing of accidentals
being based on so-called skylines, namely outlines,
and not only extents. This was probably not the
case for accidentals in an old version such as 2.12.
You can observe the skylines using

\version "2.22.1"

#(ly:set-option 'debug-skylines)

\layout {
   \context {
     \Score
     \override Accidental.after-line-breaking =
     #(lambda (grob)
        (set! (ly:grob-property grob 'stencil)
              (ly:stencil-add
                (ly:grob-property grob 'stencil)
                (ly:separation-item::print grob))))
     % \override Accidental.horizontal-skylines =
#ly:grob::simple-horizontal-skylines-from-extents
   }
}

{
   \override Accidental.X-extent = #'(-2 . 2)
   <ges' aes'>
}


Now try adding

\layout {
   \context {
     \Score
     \override Accidental.horizontal-skylines =
#ly:grob::simple-horizontal-skylines-from-extents
   }
}

and you'll get an effect on spacing.

Best,
Jean

Attachment: persianT.ly
Description: Text Data


reply via email to

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