Jump to content

Spacing notes using an invisible staff: Difference between revisions

From LilyPond wiki
Import snippet from LSR
 
m New category
Tags: Mobile edit Mobile web edit
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
When entering partially typeset music (i.e. for students to be completed by hand), you may need the spacing that correspond to the timing of notes: all measures have same length, etc. It can be implemented by adding an invisible staff with a lot of fast notes.
When entering partially typeset music (i.e. for students to be completed by hand), you may need the spacing that correspond to the timing of notes: all measures have same length, etc. It can be implemented by adding an invisible staff with a lot of fast notes.


<lilypond version="2.24.0">
<lilypond version="2.24">
%% http://lsr.di.unimi.it/LSR/Item?id=126
%% http://lsr.di.unimi.it/LSR/Item?id=126


Line 37: Line 37:
[[Category:Editorial annotations]]
[[Category:Editorial annotations]]
[[Category:Staff notation]]
[[Category:Staff notation]]
[[Category:Snippet]]

Latest revision as of 23:26, 21 November 2025

When entering partially typeset music (i.e. for students to be completed by hand), you may need the spacing that correspond to the timing of notes: all measures have same length, etc. It can be implemented by adding an invisible staff with a lot of fast notes.

\version "2.24"

%% http://lsr.di.unimi.it/LSR/Item?id=126

%LSR modified by P.P.Schneider on Feb.2014

quickmeasure =  {
  \hideNotes
  \repeat unfold 64 c''16
}

mel =  \relative c' { 
  c16 d16 e8 a4 g2 
  e8 d c2. 
  g'1 
  e4 d c2 
}

\score {
  \context PianoStaff  <<
    \new Staff <<
      \clef G
      \new Voice { \mel }
      \new Voice { \quickmeasure }
    >>
    \new Staff  { 
      \clef F 
      s1*4 
    }
  >>
  \layout {}
}