[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What is the significance of X in Lilypond?
From: |
David Sumbler |
Subject: |
Re: What is the significance of X in Lilypond? |
Date: |
Tue, 04 Aug 2020 16:27:47 +0100 |
On Tue, 2020-08-04 at 08:21 -0600, Carl Sorensen wrote:
>
>
> On Tue, Aug 4, 2020 at 7:00 AM David Sumbler <david@aeolia.co.uk>
> wrote:
> > My latest Lilypond project had been compiling satisfactorily. But
> > at a
> > certain point it began throwing out the following message:
> >
> > %%%%%
> > Preprocessing graphical
> > objects.../usr/local/lilypond/usr/share/lilypond/current/ly/engrave
> > r-
> > init.ly:836:5: In procedure ly:stencil-extent in expression
> > (ly:stencil-extent (ly:note-head::print g) X):
>
> This particular line is trying to find the X-extent (horizontal
> extent) of the note-head you are printing.
>
> X and Y are defined as Scheme constants for the X (horizontal) and Y
> (vertical) directions.
>
> One feature of Scheme is that you can redefine anything. So you
> redefined X and it caused problems.
>
> A general rule for lilypond is to avoid any variable names that are
> all uppercase. In addition to X and Y, LEFT, CENTER, RIGHT, UP, and
> DOWN are all defined Scheme constants, and if you redefine them it
> will cause problems.
>
> HTH,
>
> Carl
Thank you for that clear explanation. I knew it must be something like
that, but couldn't guess what X was.
I had started off with lower-case Roman numerals, but that gives a
problem with 100 and 500, which are also note-names. I suppose the
best solution is probably to use upper case C and D (and M, probably),
and lower case i, v, x and l, so that 1,444 would be MCDxliv. That
doesn't look too bad, and should keep me, Lilypond and Scheme all
happy.
David