lilypond-user
[Top][All Lists]
Advanced

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

Re: Incipit alignment


From: Adam Griggs
Subject: Re: Incipit alignment
Date: Wed, 20 Apr 2022 00:12:36 +0900
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

Came back for another go.

This time I've defined a variable called instrumentNameFieldWidth and used \markup \overlay to create a custom-width field just for the part names. It's a bit of a manual hack and isn't the elegant auto-solution you wanted, but it works.

Disregard my earlier attachment. This is a refinement.


On 19/4/22 11:34 pm, Adam Griggs wrote:
Use that \incipit command, and move as much as you can to the \layout block to simplify the \score.

See the attached file for how I do it. One catch though: you said you'd like the part names to be left-aligned. Sorry, I don't have time to set that up right now.

Out of curiosity, what piece is that you are engraving there?


On 19/4/22 10:50 pm, Martin Baker wrote:
Thanks, David, that’s very helpful and certainly an improvement. I’ll keep working along the lines you suggest. M

On 19 Apr 2022, at 14:41, David Kastrup <dak@gnu.org> wrote:

Martin Baker <martinbaker32@mac.com> writes:

Ah, I thought I’d deleted everything unnecessary, but missed the
“system-spacing = “ line. Code re-pasted below.
Well, I outcommented it.  You could try doing it in this manner:

\version "2.22.2"
\language "english"

incipitwidth = 5

global =
    {
    \key g \major
    }

SopranoOne =
    \relative c''
    {
    e1 |
    }

AltoOne =
    \relative c''
    {
    R1 |
    }

TenorOne =
    \relative c'
    {
    R1 |
    }

BassOne =
    \relative c'
    {
    R1 |
    }

incipitCantus = \markup {
    \score
        {
            {
            \set Staff.instrumentName = "Cantus"
            \override NoteHead.style = #'neomensural
            \override Rest.style = #'neomensural
            \override Staff.TimeSignature.style = #'neomensural
            \clef "petrucci-c1"
            \key f \major
            \time 4/4
            d''1
            }
        \layout {
        line-width=\incipitwidth
        indent = 0
                }
            }
        }

incipitAltus = \markup {
    \score
        {
            {
            \set Staff.instrumentName = "Altus"
            \override NoteHead.style = #'neomensural
            \override Rest.style = #'neomensural
            \override Staff.TimeSignature.style = #'neomensural
            \clef "petrucci-c3"
            \key f \major
            \time 4/4
            g'1
            }
        \layout {
        line-width=\incipitwidth
        indent = 0
                }
            }
        }

incipitTenor = \markup {
    \score
        {
            {
            \set Staff.instrumentName = "Tenor"
            \override NoteHead.style = #'neomensural
            \override Rest.style = #'neomensural
            \override Staff.TimeSignature.style = #'neomensural
            \clef "petrucci-c4"
            \key f \major
            \time 4/4
            d'1
            }
        \layout {
        line-width=\incipitwidth
        indent = 0
                }
            }
        }

incipitBassus = \markup {
    \score
        {
            {
            \set Staff.instrumentName = "Bassus"
            \override NoteHead.style = #'neomensural
            \override Rest.style = #'neomensural
            \override Staff.TimeSignature.style = #'neomensural
            \clef "petrucci-f4"
            \key f \major
            \time 4/4
            g1
            }
        \layout {
        line-width=\incipitwidth
        indent = 0
                }
            }
        }

incipitWith = \with
{
  \override InstrumentName.self-alignment-X = #RIGHT
  \override InstrumentName.self-alignment-Y = ##f
}

\score {
<<
\new ChoirStaff
<<
    \new Staff \with \incipitWith <<
    \global
    \set Staff.instrumentName = \incipitCantus
    \clef "G"
    \new Voice="v1" {
    \SopranoOne
        }
        >>

    \new Staff \with \incipitWith <<
    \global
    \set Staff.instrumentName = \incipitAltus
    \clef "G"
    \new Voice="v2" {
    \AltoOne
        }
        >>

    \new Staff \with \incipitWith <<
    \global
    \set Staff.instrumentName = \incipitTenor
    \clef "G_8"
    \new Voice="v3" {
    \TenorOne
        }
        >>

    \new Staff \with \incipitWith <<
    \global
    \set Staff.instrumentName = \incipitBassus
    \clef "F"
    \new Voice="v4" {
    \BassOne
        }
        >>
}


\paper{
    indent = 3.5\cm
%    system-system-spacing =
}

Not fond of that indentation but not willing to invest time fixing it,
either.

I think there is an \incipit command that can help with the task but I
am too lazy to read up on it right now.  But it should be documented
somewhere.  At any rate, your code just needs working with the
self-alignment-X and self-alignment-Y settings of the outer
InstrumentName .

--
David Kastrup



Attachment: incipitExampleRev.ly
Description: Text Data


reply via email to

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