Jump to content

Beat hints for rhythm: Difference between revisions

From LilyPond wiki
m New category
Tags: Mobile edit Mobile web edit
mNo edit summary
 
Line 1: Line 1:
This snippet shows how to print beat hints above a rhytmic staff.
This snippet shows how to print beat hints above a rhythmic staff.


<lilypond version="2.24" full>
<lilypond version="2.24">
%% http://lsr.di.unimi.it/LSR/Item?id=901
% LSR http://lilypond.1069038.n5.nabble.com/Add-beat-hints-for-rhytm-reading-tt159876.html
 
% LSR by P.P.Schneider
%=> http://lilypond.1069038.n5.nabble.com/Add-beat-hints-for-rhytm-reading-tt159876.html
% by P.P.Schneider
 
\paper { tagline = ##f }


myBreak = {
myBreak = {
Line 17: Line 13:
\score {
\score {
   <<
   <<
     \new RhythmicStaff  
     \new RhythmicStaff \with {
    \with {
       \override VerticalAxisGroup.default-staff-staff-spacing = #'()
       \override VerticalAxisGroup.default-staff-staff-spacing = #'()
     } {
     }
    {
       \repeat unfold 4 { s4^1 s^2 s^3 s^4 }
       \repeat unfold 4 { s4^1 s^2 s^3 s^4 }
       \repeat unfold 4 { s8^1 s^"+" s^2 s^"+" s^3 s^"+" s^4 s^"+" }
       \repeat unfold 4 { s8^1 s^"+" s^2 s^"+" s^3 s^"+" s^4 s^"+" }
     }
     }
   
 
     \new Staff
     \new Staff \with {
    \with {  
       \consists "Pitch_squash_engraver"
       \consists "Pitch_squash_engraver"
       squashedPosition = #0
       squashedPosition = #0
     }
     } \relative c' {
    \relative c' {  
       \numericTimeSignature
       \numericTimeSignature
       \clef percussion
       \clef percussion
Line 47: Line 39:
     }
     }
   >>
   >>
   \layout {
   \layout {
    indent = 0
     \context {
     \context {
       \RhythmicStaff
       \RhythmicStaff
Line 71: Line 63:
</lilypond>
</lilypond>


[[Category:Editorial annotations]]
[[Category:Percussion]]
[[Category:Rhythms]]
[[Category:Rhythms]]
[[Category:Percussion]]
[[Category:Editorial annotations]]
[[Category:Staff notation]]
[[Category:Staff notation]]
[[Category:Template]]
[[Category:Template]]
[[Category:Snippet]]
[[Category:Snippet]]

Latest revision as of 09:52, 4 January 2026

This snippet shows how to print beat hints above a rhythmic staff.

\version "2.24"

% LSR http://lilypond.1069038.n5.nabble.com/Add-beat-hints-for-rhytm-reading-tt159876.html
% LSR by P.P.Schneider

myBreak = {
  \break
  \once\override Score.BarNumber.X-offset = #4
  \once\override Score.Clef.space-alist.first-note = #'(minimum-fixed-space . 11.0)
}

\score {
  <<
    \new RhythmicStaff \with {
      \override VerticalAxisGroup.default-staff-staff-spacing = #'()
    } {
      \repeat unfold 4 { s4^1 s^2 s^3 s^4 }
      \repeat unfold 4 { s8^1 s^"+" s^2 s^"+" s^3 s^"+" s^4 s^"+" }
    }

    \new Staff \with {
      \consists "Pitch_squash_engraver"
      squashedPosition = #0
    } \relative c' {
      \numericTimeSignature
      \clef percussion
      \set Score.proportionalNotationDuration = #(ly:make-moment 1/4)
      c4 r r2
      r4 c r2
      r2 c4 r
      r2 r4 c
      \myBreak
      \set Score.proportionalNotationDuration = #(ly:make-moment 1/8)
      r8 c r4 r2
      r4 r8 c r2
      r2 r8 c r4
      r2 r4 r8 c
    }
  >>

  \layout {
    \context {
      \RhythmicStaff
      \remove "Time_signature_engraver"
      \remove "Clef_engraver"
      \override BarLine.transparent = ##t
      \override StaffSymbol.line-count = #0
    }
    \context {
      \Staff
      \override NoteHead.style = #'slash
      \override NoteHead.font-size = #-2
    }
    \context {
      \Score
      \override BarNumber.break-visibility = #end-of-line-invisible
      \override BarNumber.self-alignment-X = #LEFT
      \override BarNumber.direction = #DOWN
    }
  }
}