Re: One-page PDF cut off after a certain height?

2024-05-22 Thread Christ van Willegen
Hello Jean,

On Mon, May 20, 2024 at 11:54 AM Jean Abou Samra  wrote:

(Lots of helpful stuff)


> HTH
> Jean
>

Yes, that was exactly what was wrong, thanks!

Christ van Willegen


Re: One-page PDF cut off after a certain height?

2024-05-20 Thread Jean Abou Samra

> 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



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


One-page PDF cut off after a certain height?

2024-05-20 Thread Christ van Willegen
Hi,

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.

...and I _think_ I saw a better way to create black-on-white music, but I
haven't been able to find it.

Christ van Willegen


color.ily
Description: Binary data


base.ily
Description: Binary data
\version "2.25.1"

\include "base.ily"

\header {
  title = \markup { \with-color #white { "Grease Medley" } }
  arranger = \markup { \with-color #white { "Marieke Jacobse" } }
  poet = \markup { \with-color #white { "" } }
  % Standaard LilyPond-tagline verwijderen
  tagline = ##f
}


\layout {
  \context {
\Voice
\consists "Melody_engraver"
  }
}

global = {
  \black
  \override TupletBracket.bracket-visibility = ##t
}

globalWeGo = {
  \global
  \key bes \major
  \time 4/4
}

globalSummer = {
  \global
  \key d \major
  \time 4/4
}

globalGreased = {
  \global
  \key bes \major
  \time 4/4
}

globalWeGoTwo = {
  \global
  \key bes \major
  \time 4/4
}

sopranoVoiceWeGo = \relative c' {
  \globalWeGo
  \dynamicUp
  % Muziek volgt hier.
  \compressEmptyMeasures

  r4 d f g |
  a4. g4 r8 g4 |
  es8 es es es es es4 es8 |
  f8 f8 f g4 g8 f4 |
  r4 d8 f4 f8 g4 |
  a4. g4 r8 g4 |
  es8 es4 es8 es es es es |
  f8 f f g4 g8 f4 |
  r4 d' d r |
  bes8 bes bes bes4 a8 g4 |
  r4 c2 bes4 |
  a4. bes c4 |
  c4.( d8~d2~ |
  d2) r4 f4 |
  es1 |
  f4\glissando \cadenzaOn \hideNotes a,4 \unHideNotes \cadenzaOff r4 r2 |
  r4 d, f8 f g4 |
  a4.( g4.) g4 |
  es4 es8 es4 es8 es4 |
  f8 f4 f8 g g f4 |
  r4 d f g |
  a4.( g) r4 |
  \override NoteHead.style = #'cross
  \times 2/3 {
	bes8 bes bes } \times 2/3 { bes bes bes } \times 2/3 { bes bes bes } \times 2/3 { bes bes bes
  }
  \revert NoteHead.style
  f8 f f g4 g8 f4 |
  r4 d'4 d2 |
  bes8 bes bes bes4 a8 g4 |
  r4 c c bes |
  a4.( bes4.) c4 |
  c4.( bes4.) r4 |
  \times 2/3 {
	es2 es es
  } |
  es4.( d8 ~ d2  ~ |
  d2) r2 |
  r4 bes bes4. g8 |
  bes8 c4 bes4. r4 |
  r4 bes bes4. g8 |
  bes8 c4 bes4. r4 |
  r4 f f f |
  g2. f4 |
  g4( d f2~ |
  f2) r2 |
  R1 |
  r2 r4 c' |
  bes4 r r2 |
  R1 |
  c4 c r c |
  d2 c4 r |
  g'2 f4 r8 f8 |
  g4 f d8( f) r4 |
  r1

  R1 |
  R1 |

  \override NoteHead.style = #'cross
  bes,8 bes r bes bes bes bes bes |
  bes bes bes bes4 bes8 bes4 |
  R1 |
  R1 |
  bes4 bes8 bes4 bes8 bes4 |
  bes8 bes4 bes8 bes bes bes4 |
  \times 2/3 {
	bes8 bes bes } \times 2/3 { bes bes bes } \times 2/3 { bes bes bes } \times 2/3 { bes bes bes |
  }
  bes8 bes bes bes4 bes8 bes4 |
  bes8 bes bes bes bes bes bes bes |
  bes8 bes bes bes4 bes8 bes4 |
  r2 r4 r8 bes8 |
  bes4 bes bes r

  \revert NoteHead.style

  \bar "|."
}

verseWeGo = \lyricmode {
  % Liedtekst volgt hier.
We go to -- ge -- ther, like ra -- ma -- la -- ma -- la -- ma
ka ding -- it -- ty ding -- de -- dong.
Re -- mem -- bered for e -- ver, like shoo -- bob
shoo -- wa -- da --  wa -- da yip -- pi -- ty boom de boom.
Chang chang chang -- i -- ty chang shoo -- bob.
That's the way it should be!

Wha -- ooh yeah! ""

We're one of a kind, like dip -- da -- dip -- da -- dip
do -- wop a -- doo -- bee -- doo.

Our names are signed,
boo -- ge -- dy boo -- ge -- dy boo -- ge -- dy boo -- ge -- dy
shoo -- by doo -- wap shoo -- wap

Chang chang chang -- i -- ty chang shoo -- bob,
we'll al -- ways be like one. Wa -- wa -- wa -- wah!

When we go out at night, and stars are
shi -- ning bright. Up in the skies a -- bove.
Ah -- hah
Ba -- by, it might be lo -- ho -- ho -- ho -- ho -- hove!

Shoo -- bop sha -- wa -- da -- wa -- da yip -- i -- ty boom -- de -- boom
Dip -- da -- dip -- da -- dip doo -- wop a -- doo -- be -- doo.
Boo -- ge -- dy boo -- ge -- dy boo -- ge -- dy boo -- ge -- dy
shoo -- by doo -- wop shoo -- wap
Sha -- na -- na -- na -- na -- na -- na -- na yip -- pi -- ty dip -- de boom!
a -- wop bam boom!
}

soloVoiceSummer = \relative c' {
  \globalSummer
  \dynamicUp

  \compressEmptyMeasures
  R1 |
  R1 |
  r4 fis8^"Boy" d g e r4 |
  a8 fis a a4( g4.) |
  r4 fis8^"Girl" d g e r4 |
  a8 fis a a4( g4.) |
  r4 fis8^"Boy" d g2 |
  \times 2/3 { a4 fis a } b8( ais b4) |
  r4 gis8^"Girl" e a2 |
  gis8 e gis a~a2 |
  r4 d8 ^"Both" a b2 |
  a8 b a fis4. b8( a) |
  g8 r e b' a( b) a d, |
  R1
  R1 * 8 |
  r4 fis8^"Boy" d g e r4 |
  a8 fis a a4( g4.) |
  r4 fis8^"Girl" d g e r4 |
  a8 fis a a4( g4.) |
  r4 fis8^"Boy" d g2 |
  \times 2/3 { a4 fis a } b8( ais b4) |
  r4 gis8^"Girl" e a2 |
  gis8 e gis a~a2 |
  r4 d8^"Both" a b2 |
  a8 b a fis4. b8( a) |
  g8 r e b' a( b) a d, |
  R1 * 7 |
  r4 fis8^"Boy" d g e r4 |
  a8 fis a a4( g4.) |
  r4 fis8^"Girl" d g e r4 |
  a8 fis a a4(