* Han-Wen Nienhuys

> > -> So dou you know how to get the information whether there's
> > a lyrics-staff *below* the current staff (at the time when a dynamic
> > symbol is prepared e.g. in Dynamic_engraver::do_process_requests()) ?
> 
> That would be difficult.

Coming to think of it, it shouldn't be.

We'd need to attach lyric staffs (or lyrics) to the approperiate staff
of music, so instead of saying

    $vocal_staff = \type Staff = vocal<
            \global
            \$vocals
    >
    % ...
    \score{
            <
                    \$vocal_staff
                    \$lyric_staff
                    \$grand_staff
            >

we'd say

    $vocal_staff = \type Staff = vocal<
            \global
            \$vocals
            \$lyric_staff % or perhaps the lyrics themselves?
    >
    % ...
    \score{
            <
                    \$vocal_staff
                    \$grand_staff
            >


This would allow us to move the dynamics up automatically (or at least
setting the default dynamicdir to "up" for vocal music).  Later, it
could allow automatic placement of beams to follow the rythm of the
lyrics, e.g. if I enter

    voice = \melodic                   { d8     e    f      g16 f   e4 }
    textst = \type Lyric_staff = \lyric{ ro~--8 ligt var~-- je      dag.4 }
    voicest = \type Staff < \voice \textst >

the notes could be correctly typeset as

    d8     e    f      [g16 f] e4 

This is most interesting, of course, if there are multiple verses with
a slightly differing rythm in the vocals, but with the same tune.  Or,
if one wants to typeset versions of a song in different languages --
this, too, often leads to the syllables being distributed somewhat
differently.

(For those uninitiated in vocal music, the «rules» governing beam
placement and use are quite different from those used in instrumental
music.  In addition to showing the rythm, the use and non-use of beams
tells a singer where the syllables are.  In the above example, none of
the 8th notes should be beam-connected, because they are on different
syllables of text.  The two 16th notes should have a beam, however,
because they are sung on the same syllable.  The rules are more
complicated than this, of course, and I'm afraid I don't know them
extensively.)


Another way of accomplishing the same thing would be to make a special
kind of staff for vocal music, somewhat like this:

    Vocal_staff = \translator {
        \type "Engraver_group_engraver";
        defaultclef = "g";
        dynamicdir = 1 ; % or "up", for readability?

        \consists "Bar_engraver";
        \consists "Clef_engraver";
        \consists "Key_engraver";
        \consists "Local_key_engraver";
        \consists "Staff_sym_engraver";
        \consists "Collision_engraver";
        \consists "Rest_collision_engraver";
        \consists "Staff_margin_engraver";
        \consists "Separating_line_group_engraver";
        \consists "Vertical_align_engraver";  % do we need this?
        \consists "Line_group_engraver";      % or this?

        % \consists "Vocal_beam_engraver";    % Some day the beams
                                              % may follow the lyrics
                                              % automagically.
        \accepts "Voice";
        \accepts "Lyrics";
    }


The above example would then be entered as:

    voice = \melodic { d8     e    f      g16 f   e4 }
    textst = \lyric  { ro~--8 ligt var~-- je      dag.4 }
    voicest = \type Vocal_staff < \voice \textst >


Both ways, Lilypond would know she's dealing with vocal music, and she
could be told to act accordingly in numerous ways[1].  I guess the
second form is way cleaner, but that's my guess.


[1] karaoke output, anyone? ;-)
-- 

Arvid

Reply via email to