lilypond-user
[Top][All Lists]
Advanced

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

Re: New score, middle of the line?


From: Mats Bengtsson
Subject: Re: New score, middle of the line?
Date: Mon, 01 Aug 2005 16:08:06 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511

Actually, there is a solution available. Since it's possible to
include a full score in a Text Markup, I figured it should be
possible to let the .ly file contain a single Text markup, which
in turn contains a line with the two scores. This is what I came
up with, starting from your example:

\version "2.6.0"
\include "english.ly"

firstsoprano = {
        \clef treble
        \key g \minor
        \time 4/4
        g'4 fs'4 g'2\fermata \bar "|."
}

firstbass = {
        \clef bass
        \key g \minor
        \time 4/4
        c8 a,8 d4 g,2\fermata \bar "|."
}

figs = \figuremode {
        <5 6>4 <_+>4 <_>2 |
}

secondsoprano = {
        \clef treble
        \key bf \major
        \time 4/4
        \override Score.RehearsalMark #'self-alignment-X = #-1
        \mark \markup \bold \fontsize #2 {Wo ist mein Schäflein, das ich liebe}
        r4 bf'4 c''4 d''4 | %1
        ef''4 g'4 c''4 bf'4 | %2
        af'2 g'4 \bar ":" \noBreak ef''8( f''16 g''16) | %3
}

secondbass = {
        \clef bass
        \key bf \major
        \time 4/4
        r4 ef4 af4 g8 f8 | %1
        g4 c'8( bf8) af4 ef4 | %2
        f4 bf,4 ef4 \bar ":" \noBreak c4 | %3
}

\markup{
        \score{\new PianoStaff  <<
                        \new Staff \firstsoprano
                        \new Staff \firstbass
                >>
                \layout{raggedright=##t}}
        \score{ \new PianoStaff  <<
                        \new Staff \secondsoprano
                        \new Staff \secondbass
                >>
                \layout{raggedright=##t}}
}


Note that this solution only will work when both
pieces are short enough so the both fit onto a single line, I'm
not sure if that's the case for you. If you have several such
short examples, it may be possible to use the \justify text
markup command that has just been introduced in version 2.7.

Note also that I fixed a couple of other things. For example typesetting
the title using \mark with left alignment, see "8.1.3 Text marks"
in the manual.

  /Mats

Trevor Baca wrote:
On 8/1/05, Han-Wen Nienhuys <address@hidden> wrote:

Trevor Baca wrote:

What's the right way to start a new score in the middle of a line?


There isn't right now. The proper solution would be insert a routine
before the page-breaking that tries to fold together fragments that fit
together on a single line.  I can consider it for your sponsored feature
list as well, if you like.


Thanks for the response. I think I'll stick with Lily's defaults for
now as the attempts to get the chorales working were just to push
Lily's page layout capabilities (and printing each new small chorale
score to a separate line is an acceptable work-around!).

Trevor.




reply via email to

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