lilypond-user
[Top][All Lists]
Advanced

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

Re: font size for numbers on easyHeadOn with number


From: Carl Sorensen
Subject: Re: font size for numbers on easyHeadOn with number
Date: Mon, 27 Sep 2010 10:28:52 -0600

On 9/27/10 8:06 AM, "MING TSANG" <address@hidden> wrote:

> Carl,
> 
> The following is minimum lilypond code.  I ran the .ly twice : one with (1)
> and the other with (2).  The number font size stays the same (small).
> (1)     \override Voice.NoteHead #'font-size = #-0.25
> (2)     \override Voice.NoteHead #'font-size = #+2


The code you included as "minimum" wasn't yet minumum.  There were lots of
things added that didn't need to be (midi, RemoveEmptyStaves, different odd
and even footers, and maybe more; I can't remember).

Here's your code with all the extra stuff removed and the problem fixed.

It would have been even better if you had limited the code to measure 17,
instead of having both 17 and 18.

The problem was that you were calling \easyHeadsOn twice -- once in each
staff, and once in \EzNum.  I got rid of the first call.

Also, you were calling \EzNum in a Staff context, when the NoteHead override
in EzNum applies to a Voice context.



version "2.13.34"
\header {
  title = "主阿我要更愛你:More Love To Thee"
}
#(define Ez_numbers_engraver
   (list
    (cons 'acknowledgers
          (list
           (cons 'note-head-interface
                 (lambda (engraver grob source-engraver)
                   (let* ((context (ly:translator-context engraver))
                          (tonic-pitch (ly:context-property context 'tonic))
                          (tonic-name (ly:pitch-notename tonic-pitch))
                          (grob-pitch
                           (ly:event-property (event-cause grob) 'pitch))
                          (grob-name (ly:pitch-notename grob-pitch))
                          (delta (modulo (- grob-name tonic-name) 7))
                          (note-names
                           (make-vector 7 (number->string (1+ delta)))))
                     (ly:grob-set-property! grob 'note-names
note-names))))))))
#(set-global-staff-size 18)
EzNum = {
         \override Staff.StaffSymbol #'staff-space = #2.25
         \override Staff.StaffSymbol #'line-thickness = #1.25
         \override Staff.NoteHead #'font-size = #+2.75
         \override Staff.Clef #'font-size = #+2.25
         \override Staff.TimeSignature #'font-size = #+2.25
         \override Staff.Accidental #'font-size = #+2.25
         \easyHeadsOn
         \override Voice.NoteHead #'font-size = #0
        }

\paper  {
                %#(set-global-staff-size (* 5.8 mm))
  indent = #(* mm 0)
  line-width = #(* mm 180)
  interscoreline = 2.\mm
  between-system-space = 36\mm
  ragged-bottom = ##t

}

\include "english.ly"
TimeKey = { \time 4/4  \key bf  \major  }
SopMusic   = \relative c' {
        d'4. d8 ef8 d8 c8 bf8 |                            %bar 17
        bf2 a2 |                                %bar 18
        \label #'lastPage
              }
AltoMusic  = \relative c' {
    \override NoteHead #'color = #blue
    f4. f8 g8 f8 ef8 d8 |                            %bar 17
    f2 ef2 |                                %bar 18
    }
TenorMusic = \relative c  {
    bf'4. bf8 bf bf bf bf | bf2 c2 |                    %bar 17-18
    }
BassMusic  = \relative c  {
%    \set fontSize = #5.5
    \override NoteHead #'color = #red
    bf4. bf8 bf bf bf bf | d2 f2 |                        %bar 17-18
                 }

PianoRHand = \relative c' {
        <f bf d>4.^( <f bf d>8 <g bf ef>8 <f bf d>8 <ef c'>8 <d bf'>8 |
%bar 17
        <bf f' bf>2 <ef f a>2) |                        %bar 18
                         }
PianoLHand = \relative c {
    <bf, bf'>8 d'8_\markup{con Ped} f bf f bf f bf |            %bar 17
    <bf,, d'>8 f'' bf f <ef, f'> a' c a |                    %bar 18
                         }

\score {
  \new GrandStaff = "GrandStaff_score" <<
    \new ChoirStaff <<
      \new Staff <<
        \override Score.BarNumber #'break-visibility = #'#(#t #t #t)
        \clef "treble"
        \new Voice = "Sop"  { \EzNum \voiceOne  \TimeKey \SopMusic  }
        \new Voice = "Alto" { \EzNum \voiceTwo  \TimeKey \AltoMusic }
      >>
      \new Staff <<
        \clef "bass"
        \new Voice = "Tenor" { \EzNum \voiceOne \TimeKey \TenorMusic }
        \new Voice = "Bass"  { \EzNum \voiceTwo \BassMusic  }
      >>
    >>
    \new PianoStaff <<
      \new Staff = "RH" { \TimeKey  \PianoRHand  }
      \new Staff = "LH" { \TimeKey \clef bass \PianoLHand }
    >>
  >>

  \layout {
    \context {
     \consists \Ez_numbers_engraver
    }
  }
}


> One other thing, I lost the tagline for lilypond PR.
> 

Please make this a separate request.  The file above has a tagline.

Thanks,

Carl


P.S. You top posted again.  There are some very good LilyPond helpers who
ignore all top-posted emails, so you really should get out of the habit of
top-posting on lilypond-user.


reply via email to

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