lilypond-user
[Top][All Lists]
Advanced

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

font size for numbers on easyHeadOn with number


From: MING TSANG
Subject: font size for numbers on easyHeadOn with number
Date: Mon, 27 Sep 2010 07:06:33 -0700 (PDT)

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).
One other thing, I lost the tagline for lilypond PR.

(1)     \override Voice.NoteHead #'font-size = #-0.25
(2)     \override Voice.NoteHead #'font-size = #+2

Thank you in advance,
Ming


<><><><> the short .ly
\version "2.13.34"
\header {
  title = "主阿我要更愛你:More Love To Thee"
}
ignoreMelisma =    \set ignoreMelismata = ##t
ignoreMelismaOff = \unset ignoreMelismata
#(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.25
        }

\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

   print-first-page-number = ##t
   oddFooterMarkup = \markup {
     \column {
       \fill-line {
         \line { }
         \line {
           Page
           \on-the-fly #print-page-number-check-first
           \fromproperty #'page:page-number-string
           of \concat {\page-ref #'lastPage "0" "?"}
         }
       }
     }
   }
   evenFooterMarkup = \markup {
     \column {
       \fill-line {
         \line { }
         \line {
           Page
           \on-the-fly #print-page-number-check-first
           \fromproperty #'page:page-number-string
           of \concat {\page-ref #'lastPage "0" "?"}
         }
       }
     }
   }
}
 
\include "english.ly"
TimeKey = { \time 4/4  \key bf  \major  }  
SopMusic   = \relative c' {
    \easyHeadsOn
        d'4. d8 ef8 d8 c8 bf8 |                            %bar 17
        bf2 a2 |                                %bar 18
        \label #'lastPage
              }
AltoMusic  = \relative c' {
    \easyHeadsOn
    \override NoteHead #'color = #blue
    f4. f8 g8 f8 ef8 d8 |                            %bar 17
    f2 ef2 |                                %bar 18
    }
TenorMusic = \relative c  {
    \easyHeadsOn
    bf'4. bf8 bf bf bf bf | bf2 c2 |                    %bar 17-18
    }   
BassMusic  = \relative c  {
    \easyHeadsOn
%    \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
                         }
                        
VerseOne   = \lyricmode {
懇 求 聖 靈 充 滿 | 心 內 |
                        }

\score {
  \new GrandStaff = "GrandStaff_score" <<   
    \new ChoirStaff <<
      \tempo 4 =  90
      \set Score.markFormatter = #format-mark-box-numbers
      \set fontSize = #5.5
      \new Staff <<
        \override Score.BarNumber #'break-visibility = #'#(#t #t #t)
        \clef "treble"
        \EzNum
        \new Voice = "Sop"  { \voiceOne  \TimeKey \SopMusic  }
        \new Voice = "Alto" { \voiceTwo  \TimeKey \AltoMusic }
         \new Lyrics \lyricsto "Sop" { \VerseOne   }
      >>
      \new Staff <<
        \clef "bass"
        \EzNum
        \new Voice = "Tenor" { \voiceOne \TimeKey \TenorMusic }
        \new Voice = "Bass"  { \voiceTwo \BassMusic  }
      >>
    >>
    \new PianoStaff <<
      \new Staff = "RH" { \TimeKey  \PianoRHand  }
      \new Staff = "LH" { \TimeKey \clef bass \PianoLHand }
    >>
  >>

  \layout {
    \context {
    \RemoveEmptyStaffContext
    \override VerticalAxisGroup #'remove-first = ##t
     \consists \Ez_numbers_engraver
    }
  }
  \midi { }
}


From: Carl Sorensen <address@hidden>
To: MING TSANG <address@hidden>; Ian Hulin <address@hidden>
Cc: "address@hidden" <address@hidden>
Sent: Sun, September 26, 2010 7:36:28 PM
Subject: Re: Help needed - missing .pdf file after running lilypond sucessfully.

On 9/26/10 12:18 PM, "MING TSANG" <address@hidden> wrote:

> Carl,
>
> I mess up Mark Polesky and Carl Sorensen as Mark Sorensen.  Sorry!

No problem!  I knew what you meant, and I'm not offended.  Now Mark might be
offended by having his name associated with mine... (Just kidding).

> What does it mean "top post in lilypond"?

It means putting your answers at the top of the email to which you are
replying, rather that putting the answers inside the original email, as I am
doing now.

>
> The following code produce large numbers when using noteHeadOn with number.
> When I copy the same Ez_numbers_engraver and EzNum onto my other .ly file I
> did not get the larger number effect. I have no idea what's wrong.

OK, so the thing to do is to make a simple file to get help.

Make a file with one bar of soprano notes.  Copy Ez_numbers_engraver and
EzNum into that file. See if it gives you large or small note numbers.

If you get small note numbers, then you can send the simple file and ask why
it doesn't work.

If you get large note numbers in the sample file, then you should go back to
the file that isn't working.  Copy that file, then eliminate all but the the
first measure of each voice.  Test again, and make sure that it's not
working.  Then, send us a simple file that doesn't work.  At that point it
will be easy for us to give you help.

The longer the file you send to the list, the less likely you are to get
help on it, because it's hard for us to work through a long file.

Thanks,

Carl


reply via email to

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