Jump to content

Custom clef and incipit spacing for Gregorian chant: Difference between revisions

From LilyPond wiki
I created this new page.
 
mNo edit summary
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
In LilyPond 2.24.4, you may want to reduce the horizontal space after <nowiki>[https://lilypond.org/doc/v2.24/Documentation/notation/typesetting-gregorian-chant#gregorian-clefs a Gregorian clef]</nowiki>. You can do this with <nowiki><code></nowiki>'''\override Staff.Clef.space-alist.first-note''' = #'(minimum-fixed-space . [''insert your preferred spacing''])<nowiki></code></nowiki>. Note: LilyPond 2.25 <nowiki>[https://lilypond.org/doc/v2.25/Documentation/changes/major-changes-in-lilypond features improved spacing for extra-slim clefs]</nowiki>.
In LilyPond 2.24.4, you may want to reduce the horizontal space after [https://lilypond.org/doc/v2.24/Documentation/notation/typesetting-gregorian-chant#gregorian-clefs a Gregorian clef]. You can do this with <code>'''\override Staff.Clef.space-alist.first-note''' = #'(minimum-fixed-space . [''insert your preferred spacing''])</code>. Note: LilyPond 2.25 [https://lilypond.org/doc/v2.25/Documentation/changes/major-changes-in-lilypond features improved spacing for extra-slim clefs].


And if your incipit has four lines, but your music uses a modern five-line staff, you may want to add some white space between the incipit and the modern staff. You can do this with <nowiki><code></nowiki>'''\stopStaff'''<nowiki></code></nowiki> and <nowiki><code></nowiki>'''\hideNotes'''<nowiki></code></nowiki>.
And if your incipit has a four-line staff, but your music uses a modern five-line staff, you may want to add some white space between the incipit and the modern staff. You can do this with <code>'''\stopStaff'''</code> and <code>'''\hideNotes'''</code>.
 
<nowiki><lilypond version="2.24.4"></nowiki>


<lilypond version="2.24.4">
incipitMusic = \relative c {
incipitMusic = \relative c {
  \override Staff.StaffSymbol.line-count = #4
  \clef "vaticana-do3"
  \override NoteHead.style = #'vaticana.punctum
  c1


\sourcefileline 1783
  % The following line helps with spacing between the first two neumes:
 
  \hideNotes c \unHideNotes
  \override Staff.StaffSymbol.line-count = #4
 
  \clef "vaticana-do3"
 
  \override NoteHead.style = #'vaticana.punctum
 
  c1
 
 
 
  % The following line helps with spacing between the first two neumes:  
 
  \hideNotes c \unHideNotes  
 
 
 
  e
 
 
 
  % The following line helps with spacing between the second neume and the end of the visible four-line staff:
 
  \hideNotes e \unHideNotes
 
 


  % The following line effectively prints white space between the incipit and the modern five-line staff:
  e


  \stopStaff \hideNotes g a
  % The following line helps with spacing between the second neume
  % and the end of the visible four-line staff:
  \hideNotes e \unHideNotes


  % The following line effectively prints white space between
  % the incipit and the modern five-line staff:
  \stopStaff \hideNotes g a
}
}


Line 44: Line 27:


chant = \relative c' {
chant = \relative c' {
 
  \cadenzaOn
  \cadenzaOn  
  c4 e g\ictus a g2
 
  c4 e g\ictus a g2  
 
}
}


verba = \lyricmode {
verba = \lyricmode {
 
  Sál -- ve, Re -- gí -- na,
  Sál -- ve, Re -- gí --  na,  
 
}
}


\score {
\score {
  \new Staff \with {
    \incipit \incipitMusic
    instrumentName = ""
  } <<
    \new Voice = "melody" \chant
    \new Lyrics = "text" \lyricsto melody \verba
  >>


  \new Staff \with {
  \layout {
 
    \context {
    \incipit
      \MensuralStaff
 
      \remove Time_signature_engraver
      \incipitMusic instrumentName = ""
     
 
      % The following line reduces the horizontal space between
  }
      % the "vaticana-do3" clef and the first neume (c1):
 
      \override Clef.space-alist.first-note
  <<
        = #'(minimum-fixed-space . 1.0)
 
    }
    \new Voice = "melody" \chant
    \context {
 
      \Staff
    \new Lyrics = "text" \lyricsto melody \verba
      \remove Time_signature_engraver
 
    }
  >>
    \context {
 
      \Voice
  \layout {
      \remove Stem_engraver
 
    }
    \context {
  }
 
      \MensuralStaff
 
      \remove Time_signature_engraver
 
     
 
      % The following line reduces the horizontal space between the "vaticana-do3" clef and the first neume (c1):  
 
      \override Clef.space-alist.first-note = #'(minimum-fixed-space . 1.0)  
 
    }
 
    \context {
 
      \Staff
 
      \remove Time_signature_engraver
 
    }
 
    \context {
 
      \Voice
 
      \remove Stem_engraver
 
    }
 
  }
 
}
}
</lilypond>


<nowiki></lilypond></nowiki>
[[Category:Ancient notation]]
[[Category:Spacing]]
[[Category:Staff notation]]
[[Category:Tweaks and overrides]]
[[Category:Workaround]]
[[Category:Vocal music]]
[[Category:Real music]]

Latest revision as of 17:15, 7 November 2025

In LilyPond 2.24.4, you may want to reduce the horizontal space after a Gregorian clef. You can do this with \override Staff.Clef.space-alist.first-note = #'(minimum-fixed-space . [insert your preferred spacing]). Note: LilyPond 2.25 features improved spacing for extra-slim clefs.

And if your incipit has a four-line staff, but your music uses a modern five-line staff, you may want to add some white space between the incipit and the modern staff. You can do this with \stopStaff and \hideNotes.

\version "2.24.4"

incipitMusic = \relative c {
  \override Staff.StaffSymbol.line-count = #4
  \clef "vaticana-do3"
  \override NoteHead.style = #'vaticana.punctum
  c1

  % The following line helps with spacing between the first two neumes:
  \hideNotes c \unHideNotes

  e

  % The following line helps with spacing between the second neume
  % and the end of the visible four-line staff:
  \hideNotes e \unHideNotes

  % The following line effectively prints white space between
  % the incipit and the modern five-line staff:
  \stopStaff \hideNotes g a
}

ictus = #(make-articulation 'ictus)

chant = \relative c' {
  \cadenzaOn
  c4 e g\ictus a g2
}

verba = \lyricmode {
  Sál -- ve, Re -- gí --  na,
}

\score {
  \new Staff \with {
    \incipit \incipitMusic
    instrumentName = ""
  } <<
    \new Voice = "melody" \chant
    \new Lyrics = "text" \lyricsto melody \verba
  >>

  \layout {
    \context {
      \MensuralStaff
      \remove Time_signature_engraver
      
      % The following line reduces the horizontal space between
      % the "vaticana-do3" clef and the first neume (c1):
      \override Clef.space-alist.first-note
        = #'(minimum-fixed-space . 1.0)
    }
    \context {
      \Staff
      \remove Time_signature_engraver
    }
    \context {
      \Voice
      \remove Stem_engraver
    }
  }
}