lilypond-user
[Top][All Lists]
Advanced

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

Re: Vocal Lyric Placement?


From: Gianluca D.
Subject: Re: Vocal Lyric Placement?
Date: Sat, 3 Dec 2005 00:00:42 +0100
User-agent: KMail/1.9

Alle 23:06, venerdì 2 dicembre 2005, Ian Hawthorn ha scritto:

> I can tell you that what you are asking is a hard problem, so don't get
> your hopes up that there is an easy answer. 

The answer is quite easy, once you have learned to use the wonderful ability 
of Lilypond to merge different music expressions into one context.
I've written this little bit of code which shows how to put different words 
without using a lot of blank spaces and without any problems in vertical 
alignment.
I'd like to explain how it works, but my english is not good at all, so I hope 
you could understand it by reading it.
The key to is in two things:
a) using the \context command to give different names to the different 
sections of the part and, consequently, of the lyrics;
b) using the same lyrics-context to have lyrics vertically aligned *even if* 
these lyrics are not associated with the same voice.


\version "2.6.4"

%% Here there are two definitions to make notes invisible in a comfortable way
blanknotes = {
  \override NoteHead #'transparent = ##t
  \override Stem #'transparent = ##t
  \override Beam #'transparent = ##t
  \override Tie #'transparent = ##t
}

noblanknotes = {
  \revert NoteHead #'transparent
  \revert Stem #'transparent
  \revert Beam #'transparent
  \revert Tie #'transparent
}

% Here there's the sopranos' part. The secret is to give a name to each voice, 
so that you can put the right lyrics
% in every place you need to without using a lot of rests or empty spaces.
soprani = \context Voice = soprani 
  \relative c' {
      c2 d4 e 
    | f 
    % here the different lyrics start
      << 
      \context Voice = equal 
      { f g b, }
      \\
      \context Voice = different
      { \blanknotes
        f' g b, 
        \noblanknotes }
      >>
  | c1
  }
  
\score {
  <<
    \context Lyrics = soprani {s1} % different lyrics will be at the top
    \new Staff \soprani
    \context Lyrics = sopranitwo \lyricsto soprani \lyricmode { This is not so 
right? }
    % Since "difficult" must be aligned with the normal lyrics, you should use 
the same lyrics context
    \context Lyrics = sopranitwo \lyricsto equal \lyricmode { dif -- fi -- 
cult, }
    
    % Here we put the "different" lyrics    
    \context Lyrics = soprani \lyricsto different \lyricmode { real -- ly 
hard, }
  >>
}




reply via email to

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