Here's one example of a solution, which contains one score with
and one without the melody. Note that when you explicitly specify
the duration of each lyrics syllable, then for melismas it should
be the total duration of the melisma (which also specifies the
duration of the -- ).
As far as I know, the associatedVoice property only works when you
actually have a Voice context in your score, so there's no use to
set it in the second score. Also, note that the value should be the
name of the Voice context, nothing else.

   /Mats

\version "2.4.0"

harmonies = \chordmode {
  \partial 2
  \times 2/3 { a4 a:2sus a } |
  d8./a a16~ a2.
}

melody = \relative c' {
  \clef treble
  \key a \major
  \partial 2
  \times 2/3 { cis4( d) e } |
  fis8.( e16) e2 r4
}

text = \lyricmode {
  \partial 2
  Al2*2/3 -- le4*2/3 -- | lu4 -- ia2
}

\score {
  <<
  \new ChordNames {
    \set chordChanges = ##t
    \harmonies
    }
  \context Voice = "one" { \melody }
  \new Lyrics {\set associatedVoice = #"one" \text }
  >>
  \layout { }
}

\score {
  <<
  \new ChordNames {
    \set chordChanges = ##t
    \harmonies
    }
  \new Lyrics \text
  >>
  \layout { }
}


James Classen wrote:
I'm sure this is possible, and that I just haven't
figured it out yet.  I would like to be able to have
two output formats, one with the staff and one
without.  Some guitar players find the notes
distracting, and only want to see the chords and words
to a song (for example, my brother).  I've been unable
to get the chords and words to line up properly
without the staff, however.  The examples here
(http://lilypond.org/doc/v2.4/Documentation/user/out-www/lilypond/The-Lyrics-context.html)
gave me an idea, to put durations after the words, but
the text would not line up properly.

If you'd like to look at the code to my attempts, I
have attached the files.  The first file, 'test.ly',
is nearly a copy of the first measure-and-a-half of
the original.  The next two are attempts to get the
chords to line up without the notes.  The staff still
appears, probably because of the 'Voice' context, but
below it are the chords and words, not lining up as I
would like them to.  'test2.ly' is the closest I was
able to come, but it wouldn't let me put a hyphen
between 'le' and 'lu', nor a duration for the hyphen
after 'lu'.  Any help on this would be appreciated!

James Classen

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com



------------------------------------------------------------------------

harmonies = \chordmode {
  \times 2/3 { a4 a:2sus a } |
  d8./a a16~ a2.
}

melody = \relative c' {
  \clef treble
  \key a \major
  \partial 2
  \times 2/3 { cis4( d) e } |
  fis8.( e16) e2 r4
}

text = \lyricmode {
  Al -- le -- lu -- ia
}

\score {
  <<
  \context ChordNames {
    \set chordChanges = ##t
    \harmonies
    }
  \context Voice = one { \melody }
  \lyricsto "one" \new Lyrics \text
  >>
  \layout { }
}


------------------------------------------------------------------------

harmonies = \chordmode {
  \times 2/3 { a4 a:2sus a } |
  d8./a a16~ a2.
}

\context Voice = melody \relative c' {
  \clef treble
  \key a \major
  \partial 2
  \times 2/3 { cis4( d) e } |
  fis8.( e16) e2 r4
}

\score {
  <<
  \context ChordNames {
    \set chordChanges = ##t
    \harmonies
    }
  \new Lyrics \lyricmode {
    \set associatedVoice = #"melody"
    Al -- le -- lu -- ia
  }
  >>
  \layout { }
}


------------------------------------------------------------------------

harmonies = \chordmode {
  \times 2/3 { a4 a:2sus a } |
  d8./a a16~ a2.
}

\context Voice = melody \relative c' {
  \clef treble
  \key a \major
  \partial 2
  \times 2/3 { cis4( d) e } |
  fis8.( e16) e2 r4
}

\score {
  <<
  \context ChordNames {
    \set chordChanges = ##t
    \harmonies
    }
  \new Lyrics \lyricmode {
    \set associatedVoice = #"melody"
    \times 2/3 { Al4 -- le }
    lu8. -- ia
  }
  >>
  \layout { }
}


------------------------------------------------------------------------

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
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: [EMAIL PROTECTED] WWW: http://www.s3.kth.se/~mabe =============================================


_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to