Hi,
I'm trying to achieve displaying the measure counter on top of the each
measure on a rhythmic staff. The below script working fine if you
change the \new RhythmicStaff to \new Staff.
How do I make this script work for rhythmicStaff.
Thanks for the help-
Raj
\version "2.22.0"
\language english
\header {tagline = "" }
boxify =
#(define-music-function (grob-path) (key-list?)
(define proc
(grob-transformer
'stencil
(lambda (grob orig)
(grob-interpret-markup
grob
#{
\markup \override #'(box-padding . 1.25)
\override #'(thickness . 1)
\box \stencil #orig
#}))))
#{ \override $grob-path . stencil = #proc #})
\score {\new RhythmicStaff {\override
Score.SpacingSpanner.strict-note-spacing = ##t
\set Score.proportionalNotationDuration = #(ly:make-moment 1/8)
\override Staff.MeasureCounter.staff-padding = #4.5
\set Staff.midiInstrument = #"acoustic grand" \key c \major
\numericTimeSignature
\time 4/4 \startMeasureCount c'2 2 4 4 2 \stopMeasureCount \bar
"||"}
\layout { \context { \Staff \consists Measure_counter_engraver
\boxify MeasureCounter } }
\midi { \tempo 4 =92}}