gnu-music-discuss
[Top][All Lists]
Advanced

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

Re: Q: Typesetting 4 parts with a 2 staff reduction


From: Mats Bengtsson
Subject: Re: Q: Typesetting 4 parts with a 2 staff reduction
Date: Mon, 02 Apr 2001 12:46:49 +0200

> Hi everyone.  I'm entering a four-part fugue into lilypond, and usual,
> there are a few things I don't know how to do.  I'm using lily 1.3.145
> (compiled just now).
> 
> I want to typeset four staves for the soprano, alto, tenor, and bass
> parts.  Directly underneath these staves, I want to have a "piano
> reduction" (two staves, treble and bass clef).
> 
> These are the complications:
> 
> - I want both sections to be generated from the same musical "source
>   code".  (I don't want to have to enter notes twice.)
> 
>   This seems difficult, because ordinarily when I typeset something
>   for one version, I need to make a lot of adjustments that are
>   irrelevant to the other version.  For the piano version, I need to:
>   (1) make horizontal and vertical shifts to prevent collisions;

As long as you have only two voices per staff, the automatic
collision handling should work well enough. Take a look at
input/regression/collisions.ly. Don't forget to name each 
Voice context separately.

>   (2) set the stems of the soprano and tenor parts pointed up, and the
>   alto and bass parts pointed down; > (3) set the slur directions for
>   the voices similarly; 

<
  \context Voice=soprano{\stemUp \slurUp \soprano}
  \context Voice=alto{\stemDown \slurDown \alto}
>
There are also macros \voiceOne \voiceTwo that set the direction
of both stems, slurs and ties to point up and down, respectively. 
See ly/property.ly

(4) change voices from one staff to another
>   when they go out of the treble or bass clef ranges.

Take a look at input/regression/auto-change.ly

>   For the four
>   staff version, since this is a choral fugue, I need to use slurs to
>   indicate melismas, but I want no slurs on the piano version, unless
>   of course I'm extending a note past a bar.

Try:

melody=\notes\relative c'{c4 d e f g a b c}
slurs=\notes{ s4 ( s ) s2 ( s2. ) s4}

\score{
  \context Voice <\melody \slurs>
}

>   Maybe I can define commands for the above adjustments with a
>   conditional, so that it's active depending on whether it's in the 4
>   staff or piano staff version.

No, the trick is to define voices and slurs separately and 
combine them differently in the different \score{} sections.

> Minor gripes:
> 
> - The bar number collides with the staff group symbol.

\score{
  ...
  \paper{
  ...
    \translator{\ScoreContext
      BarNumber \override #'padding = #2.0
    }
  }
}

>   Also, is there
>   a way to move the bar numbers down to the piano reduction staves
>   instead of at the top of all the staves?  (I'm trying to copy the
>   Dover Art of Fugue style.)

Try (untested)

\score{
  ...
  \paper{
  ...
    \translator{\ScoreContext
      \remove "Bar_number_engraver";
    }
    \translator{\PianoStaffContext
      \consists "Bar_number_engraver";
    }      
  }
}

     /Mats





reply via email to

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