Jump to content

Creating blank staves: Difference between revisions

From LilyPond wiki
m New category
Improve for documentation
 
Line 2: Line 2:


<lilypond version="2.24" full>
<lilypond version="2.24" full>
#(set-global-staff-size 20)
#(set-global-staff-size 10)  % for the documentation
% #(set-global-staff-size 20) % for letter and A4


\score {
\book {
   {
   \score {
     \repeat unfold 12 { s1 \break }
     { \repeat unfold 12 { s1 \break } }
 
    \layout {
      indent = 0
      \context {
        \Staff
        \remove "Time_signature_engraver"
        \remove "Clef_engraver"
        \remove "Bar_engraver"
      }
      \context {
        \Score
        \remove "Bar_number_engraver"
      }
    }
   }
   }
   \layout {
 
     indent = 0\in
  % for the documentation
    \context {
   \paper {
      \Staff
     #(set-paper-size "a6")
      \remove "Time_signature_engraver"
    ragged-last-bottom = ##f
      \remove "Clef_engraver"
    line-width = 90\mm
      \remove "Bar_engraver"
     left-margin = 7.5\mm
     }
     bottom-margin = 5\mm
     \context {
    top-margin = 5\mm
      \Score
     tagline = ##f
      \remove "Bar_number_engraver"
     }
   }
   }
}


% uncomment these lines for "letter" size
  % uncomment these lines for "letter" size
%{
  %{
\paper {
  \paper {
  #(set-paper-size "letter")
    #(set-paper-size "letter")
  ragged-last-bottom = ##f
    ragged-last-bottom = ##f
  line-width = 7.5\in
    line-width = 7.5\in
  left-margin = 0.5\in
    left-margin = 0.5\in
  bottom-margin = 0.25\in
    bottom-margin = 0.25\in
  top-margin = 0.25\in
    top-margin = 0.25\in
}
    tagline = ##f
%}
  }
  %}


% uncomment these lines for "A4" size
  % uncomment these lines for "A4" size
%{
  %{
\paper {
  \paper {
  #(set-paper-size "a4")
    #(set-paper-size "a4")
  ragged-last-bottom = ##f
    ragged-last-bottom = ##f
  line-width = 180
    line-width = 180\mm
  left-margin = 15
    left-margin = 15\mm
  bottom-margin = 10
    bottom-margin = 10\mm
  top-margin = 10
    top-margin = 10\mm
    tagline = ##f
  }
  %}
}
}
%}
</lilypond>
</lilypond>


[[Category:Staff notation]]
[[Category:Contexts and engravers]]
[[Category:Editorial annotations]]
[[Category:Editorial annotations]]
[[Category:Paper and layout]]
[[Category:Paper and layout]]
[[Category:Contexts and engravers]]
[[Category:Specific notation]]
[[Category:Specific notation]]
[[Category:Staff notation]]
[[Category:Included in the official documentation]]
[[Category:Included in the official documentation]]
[[Category:Snippet]]
[[Category:Snippet]]

Latest revision as of 11:55, 5 December 2025

To create blank staves, generate empty measures then remove the Bar_number_engraver from the Score context, and the Time_signature_engraver, Clef_engraver and Bar_engraver from the Staff context.

\version "2.24"

#(set-global-staff-size 10)   % for the documentation
% #(set-global-staff-size 20) % for letter and A4

\book {
  \score {
    { \repeat unfold 12 { s1 \break } }

    \layout {
      indent = 0
      \context {
        \Staff
        \remove "Time_signature_engraver"
        \remove "Clef_engraver"
        \remove "Bar_engraver"
      }
      \context {
        \Score
        \remove "Bar_number_engraver"
      }
    }
  }

  % for the documentation
  \paper {
    #(set-paper-size "a6")
    ragged-last-bottom = ##f
    line-width = 90\mm
    left-margin = 7.5\mm
    bottom-margin = 5\mm
    top-margin = 5\mm
    tagline = ##f
  }

  % uncomment these lines for "letter" size
  %{
  \paper {
    #(set-paper-size "letter")
    ragged-last-bottom = ##f
    line-width = 7.5\in
    left-margin = 0.5\in
    bottom-margin = 0.25\in
    top-margin = 0.25\in
    tagline = ##f
   }
  %}

  % uncomment these lines for "A4" size
  %{
  \paper {
    #(set-paper-size "a4")
    ragged-last-bottom = ##f
    line-width = 180\mm
    left-margin = 15\mm
    bottom-margin = 10\mm
    top-margin = 10\mm
    tagline = ##f
  }
  %}
}