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: MING TSANG
Subject: Re: font size for numbers on easyHeadOn with number
Date: Wed, 29 Sep 2010 08:42:49 -0700 (PDT)

Carl,

I took your code and added multi midi output for voice parts.  Everything seems working perfectly.  However I applied the template to my .ly code I cannot produce desire result.

I run my .ly file three times

%(1)             easyHeadOn in EzNum only produce large number in note head

%(2)             same as (1) and added code to create multi midi voice part but I got lilypond execure error.
%(-2)             " LilyPond has encountered a problem and needs to close.  We are sorry for the inconvenience. "

%(3)             easyHeadOn in voices (SopMusic, AltoMusic, TenorMusic and BassMusic with
%(-3)                added multi midi output code for voice part. Midi voice part produced but cannot produce
%(-3)                large numbers on note head.

I don't know what to do now and stuck.  Also I cannot code \voice and \RemoveEmptyStaffContext   inside  \context { }. I need to remove \RemoveEmptyStaffContext in order to run .ly successfully.


<><><><><> .ly  : I use two bars because there is a cross bar phrase.
\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 = {
     \easyHeadsOn
        \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
        \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' {
%    \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
    \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 \TimeKey \BassMusic  }
      >>
    >>
    \new PianoStaff <<
      \new Staff = "RH" { \TimeKey  \PianoRHand  }
      \new Staff = "LH" { \TimeKey \clef bass \PianoLHand }
    >>
  >>

  \layout {
    \context {
            \Voice
    \consists \Ez_numbers_engraver
    }
  }
}
\score {
    \SopMusic
    \midi { }
}
\score {
    \AltoMusic
    \midi { }
}
\score {
    \TenorMusic
    \midi { }
}
\score {
    \BassMusic
    \midi { }
}


From: Carl Sorensen <address@hidden>
To: MING TSANG <address@hidden>
Cc: "address@hidden" <address@hidden>
Sent: Mon, September 27, 2010 12:28:52 PM
Subject: Re: font size for numbers on easyHeadOn with number

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




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]