> I run into a problem when I create a (very high) single-page PDF file from a
> Lilypond score. 'After a certain time', the rest of the page is rendered in
> white.
> 
> In my use case, I wanted to make a large system staff, and white-on-black
> music, because of readability-reasons. Specifically: Puttin this on a tablet,
> and using one page for continuous scrolling to make the music less 'jumpy'
> (even staff spacing, not constrained to page height).
> 
> Can anyone shed a light on what goes wrong here? I've attached my files for
> reference.


You have

          \filled-box #'(-1000 . 1000) #'(-1000 . 4000) #0

in your color.ily file. That's painting a big black box for the background, but
the box just happens not to be big enough. Try adding an extra zero to the
second -1000 value.

Also, are you sure you need the big color-staff-lines function? It goes through
hoops to allow coloring each staff line in its own color, but if you just
want all staff lines in white, you can just add an
\override Score.StaffSymbol.color
with the other overrides in the \color function.

And also, LilyPond has supported CSS-style colors natively for a long time,
so this whole function:

color =
#(define-music-function (parser location color) (string?)
   (define (hexa->decimal x)
     (let ((num (string->number x 16)))
       (if (= 0 num)
           num
           (exact->inexact
            (/ 255 num)))))
   (let* ((str (string-take
                (if (string-prefix? "#" color)
                    (string-drop color 1)
                    color)
                6))
          (r (string-take str 2))
          (g (string-drop (string-drop-right str 2) 2))
          (b (string-take-right str 2))
          (translated-color
           (map hexa->decimal
                (list r g b)))
          (lily-color (primitive-eval
                       (cons rgb-color translated-color))))
     #{
       \override Score.BarNumber.color = #lily-color
       [...]
     #}))


can be simplified to just

color =
#(define-music-function (parser location lily-color) (string?)
     #{
       \override Score.BarNumber.color = #lily-color
       [...]
     #})


HTH
Jean

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to