lilypond-user
[Top][All Lists]
Advanced

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

Re: Why do chords print below staff?


From: Peter F Whyte
Subject: Re: Why do chords print below staff?
Date: Wed, 18 May 2005 12:14:36 +0100

I've attached a couple of stripped down files that don't seem to work.  (I 
had parts for other instruments in the original, but the problem still 
happens when I removed them.)  I appreciate you taking the time to 
examine my problem.  Hoping you can spot my mistake.

On 18 May 2005 at 12:49, Mats Bengtsson wrote:

> Please send a small but complete example file that illustrates the
> problem. I tried to just make up some values for all the identifiers
> that you hadn't specified below and the chords are printed nicely on
> top of the stave, so there's nothing wrong with the part of the code
> that you sent.
> 
>     /Mats
> 
> Peter F Whyte wrote:
> > I used to get chordnames printing above the staff, but now they
> > always, always print below.  Nothing I try to change seems to have
> > any effect on the position whatsover. I've searched the entire
> > archive, but all to no avail.  Hoping desperately someone can help. 
> > This is the third time I've tried to solve the problem, and it's
> > taken 3 hours of absolute frustration.
> > 
> > I'm using Win XP Pro SP2 with lilypond 2.4.2 (can't bear to change
> > the version again as it took ages last time to get things sorted,
> > and it works ok, except for this problem).
> > 
> > I've parts all in a separate file and an include line which works
> > fine.  Here's my score section.  I'm looking for chords on top,
> > melody line next, lyrics below this, and piano staff at the bottom.
> > It all works fine until I add the chords - they always go to the
> > bottom, never the top.
> > 
> > 
> > \score {
> > 
> >   <<
> >       \context ChordNames {
> >             \set chordChanges = ##t
> >             \guitar
> >       }
> >     \context Voice = mel { 
> >             \set Staff.instrument = #"Melody"
> >             \set Staff.instr = #"Mel"
> >             \global \Key \melody  
> >     }
> >     \lyricsto "mel" \new Lyrics \text 
> > 
> > 
> >     \context PianoStaff = "piano" \piano
> >     
> >   >>
> >     
> > % ------ common to all scores ------
> >   \layout { 
> >     \context { \RemoveEmptyStaffContext }
> >     linewidth = 180.0\mm
> >     \context {
> >       \Voice
> >       \consists Ambitus_engraver
> >     }
> >   }
> >   \midi { \tempo 4=110 }  
> > }
> > 
> > 
> > --
> > Peter F Whyte
> > Belfast (N Ireland)
> > 
> > 
> > 
> > _______________________________________________
> > lilypond-user mailing list
> > address@hidden
> > http://lists.gnu.org/mailman/listinfo/lilypond-user
> 
> -- 
> =============================================
>  Mats Bengtsson
>  Signal Processing
>  Signals, Sensors and Systems
>  Royal Institute of Technology
>  SE-100 44  STOCKHOLM
>  Sweden
>  Phone: (+46) 8 790 8463                              
>          Fax:   (+46) 8 790 7260
>  Email: address@hidden
>  WWW: http://www.s3.kth.se/~mabe
> =============================================
> 


Best regards

Peter

===============================
Reply to address@hidden


\version "2.4.0"

\include "english.ly"
% following file contains header and all parts
\include "OnlyABoyCalledDavid_parts.ly"

%%% SCORES %%%

% ------ Piano ------
\score {

  <<
  \context ChordNames {
        \set chordChanges = ##t
        \guitar
  }

  \context Voice = mel { 
                \set Staff.instrument = #"Melody"
                \set Staff.instr = #"Mel"
                \global \Key \melody  
        }
        \lyricsto "mel" \new Lyrics \text 


        \context PianoStaff = "piano" \piano
        
  >>
        
% ------ common to all scores ------
  \layout { 
    \context { \RemoveEmptyStaffContext }
    linewidth = 180.0\mm
        \context {
          \Voice
          \consists Ambitus_engraver
        }
  }
  \midi { \tempo 4=140 }  
}
\version "2.4.0"

\header {
  texidoc ="Classical song format: one staff with melody and lyrics,
and piano accompaniment."
  title = "Only a boy called David" 
  subtitle = ""
  composer = ""
  arranger = "arr. Peter F. Whyte"
  poet = ""
  meter = ""
  copyright = "(c) 1946, Cliff College"
  tagline = \markup { \column < "Sources: Junior Praise, No 190"
    "Engraved by Lilypond version 2.4.0" > }
  head = ""
}

\include "english.ly" 

% fit onto one page
#(set-global-staff-size 16)

global =  {
  \time 4/4
}

Key =  { \key ef \major }

%%% MUSIC %%%

%%% Voice fragments %%%

musicFrgA =  \relative c' {
  f4 f8 f g4 g |
}

musicFrgB =  \relative c' {
  f4 c'2. |
}

%%% Voice parts %%%

melody =        \transpose f ef {
 \relative c' {
  \musicFrgA
  \musicFrgB
  \musicFrgA
  a'1 |
  
  \musicFrgA
  \musicFrgB
  a4 a8 a g4 g |
  f2 f |
  
  bf4 bf8 bf bf4 bf |
  bf d d d8 d |
  d4 c c a |
  c1 |
  
  g4 g8 g g4 g |
  g a bf a8 bf |
  c4 bf a g |
  a1 |
  
  a4. a8 f4. f8 |
  a4. a8 f4. f8 |
  a4 a bf c |
  d1 |
  
  c4 c8 c c4 c |
  c c c c8 c |
  c c bf4 a g |
  f1 |
}
}

alto =  \transpose f ef {
 \relative c' {
  f4 f8 f e4 e |
  f f2. |
  f4 f8 f e4 e |
  f1 |
  
  f4 f8 f e4 e |
  f4 f2. |
  f4 f8 f e4 e |
  f2 ef |
  
  d4 d8 d d4 d |
  d f f f8 f |
  f4 f f f |
  f1 |
  
  e4 e8 e e4 e |
  d f g f8 g |
  a4 g f e |
  f1 |
  
  f4. f8 f4. f8 |
  f4. f8 f4. f8 |
  f4 f f f |
  f1 |
  
  f4 f8 f f4 f |
  f e f a8 a |
  a a g4 f e |
  f1
}
}

tenor =         \transpose f ef {
 \relative c' {
  a4 a8 a c4 c |
  c a2. |
  a4 a8 a c4 c |
  c1 |
  
  a4 a8 a c4 c |
  c a2. |
  c4 c8 c bf4 bf | 
  a2 a |
  
  bf4 bf 8 bf bf4 bf |
  bf bf bf bf8 bf |
  bf4 a a c |
  a1 |
  
  c4 c8 c c4 c |
  c c c c8 c |
  c4 c c c |
  c1 |
  
  c4. c8 a4. a8 |
  c4. c8 a4. a8 |
  c4 c c c |
  bf1 |
  
  a4 a8a a4 a |
  a bf c c8 c |
  d d d4 c bf |
  a1 |
}
}


bass =  \transpose f ef {
 \relative c {
  f4 f8 f c4 c |
  f4 f2. |
  f4 f8 f c4 c |
  f1 |
  
  f4 f8 f c4 c |
  f4 f2. |
  c4 c8 c c4 c |
  f2 f |
  
  bf,4 bf8 bf bf4 bf |
  bf bf bf bf8 bf |
  f'4 f f f |
  f1 |
  
  c4 c8 c c4 c |
  c c c c8 c |
  c4 c c c |
  f1 |
  
  f4. f8 f4. f8 |
  f4. f8 f4. f8 |
  f4 f g a |
  bf1 |
  
  f4 f8 f f4 f |
  f g a a8 a |
  bf bf bf,4 c c |
  f1
}
}


text = \lyricmode {
  On -- ly a boy called Da -- vid,
  On -- ly a rip -- pling brook;
  On -- ly a boy called Da -- vid,
  Five lit -- tle stones he took.
  Then, one lit -- tle stone went in the sling,
  And the slign went round and round,
  One lit -- tle stone went in the sling,
  And the slign went round and round,
  Round and round, and round and round,
  And round and round and round;
  One lit -- tle stone went up, up up!
  And the gi -- ant came tumb -- ling down.
}


%%% INSTRUMENTS %%%

%%% GUITAR %%%

gtrChords =     \transpose f ef {
  \chords {
  \small
  f2 c |
  f1 |
  f2 c2 |
  f1 |
  
  f2 c |
  f1 |
  f2 c2 |
  f2 f:7 |
  
  bf1 |
  bf1 |
  f1 |
  f1 |

  c1 |
  c1 |
  c1 |
  f1 |
  
  f1 |
  f |
  f |
  bf |
  
  f |
  f |
  bf2 c |
  f1 |
}
}

guitar = {
        \set chordChanges = ##f
        \set midiInstrument = "acoustic guitar (nylon)"
        \set minimumVerticalExtent = #'(-0.5 . 0.0)
        \global
        \gtrChords
}       


%%% PIANO %%% 

rhUpper =  \relative c'' {
        \voiceOne
        \Key 
        \melody
        \bar "|."
}

rhLower =  \relative c' {
        \voiceTwo
        \Key
        \alto
        \bar "|."
}

lhUpper =  \relative c' {
        \voiceOne
        \Key
        \tenor
        \bar "|."
}

lhLower =  \relative c' {
        \voiceTwo
        \Key
        \bass
        \bar "|."
}


PianoRH = {
        \clef treble
        \global
        \set Staff.midiInstrument = "acoustic grand"
        \context Staff <<
                \context Voice = "one" \rhUpper
                \context Voice = "two" \rhLower
   >>
}

PianoLH = {
        \clef bass
        \global
        \set Staff.midiInstrument = "acoustic grand"
        \context Staff <<
                \context Voice = "one" \lhUpper
                \context Voice = "two" \lhLower
        >>
}

piano = {
        \context PianoStaff <<
                \set PianoStaff.instrument = #"Piano"
                \set PianoStaff.minimumVerticalExtent = #'(-2 . 2)
                #(set-accidental-style 'piano-cautionary)
                \context Staff = "upper" \PianoRH
                \context Staff = "lower" \PianoLH
        >> 
}


reply via email to

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