lilypond-user
[Top][All Lists]
Advanced

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

Re: Jianpu Notation


From: Paul Morris
Subject: Re: Jianpu Notation
Date: Thu, 30 Apr 2015 11:39:24 -0400

> On Apr 30, 2015, at 9:45 AM, Werner LEMBERG <address@hidden> wrote:
> 
> Looking at this, I see a fundamental error.  The lilypond output has
> beams in reversed order, for example
> 
> 
>     0.         6
>               ---
>    --------------
> 
> However, it should be exactly the opposite:
> 
>     0.         6
>    --------------
>

Yes, I am aware of this.  Thanks for that real-world example.  A simple fix 
would be to just flip the beam stencil, but there doesn’t seem to be a function 
that does that.  There is ly:stencil-rotate but no ly:stencil-flip-horizontal 
or ly:stencil-flip-vertical (or say, ly:stencil-flip-axis).  

(The jianpu-ly python script has this same problem, as you can see from the 
little example image on this page: 
http://people.ds.cam.ac.uk/ssb22/mwrhome/jianpu-ly.html )

<time lapse>

Aha! a search of the source code led me to the stencil-scale.ly regression test 
that indicates that ly:stencil-scale can be used to flip a stencil if you feed 
it negative numbers.  

"Negative values will flip or mirror the stencil without changing its origin; 
this
may result in collisions unless the scaled stencil is realigned"

I’ll have to give this a try.  

Would it be worth defining “flip” functions that call ly:stencil-scale with 
negative, non-scaling, numbers (i.e. -1) ?  That would be more discoverable and 
result in clearer code.  And/or the doc string for ly:stencil-scale could 
indicate that it can be used in this way, currently it only says:

"Scale stil using the horizontal and vertical scaling factors x and y."

-Paul




reply via email to

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