lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Box around MeasureCounter


From: Carl Sorensen
Subject: Re: Box around MeasureCounter
Date: Mon, 22 Nov 2021 20:12:31 +0000
User-agent: Microsoft-MacOutlook/10.10.1b.201012

 

 

From: lilypond-user <lilypond-user-bounces+carl.d.sorensen=gmail.com@gnu.org> on behalf of Rajesh Baskar <rajeshbv@hotmail.com>
Date: Monday, November 22, 2021 at 12:45 PM
To: Aaron Hill <lilypond@hillvisions.com>
Cc: "lilypond-user@gnu.org" <lilypond-user@gnu.org>
Subject: Re: Box around MeasureCounter

 

Aaron,

I had another question. The MeasureCounter boxify function does not work if we change the staff to Rhythmic staff.

 

It works perfectly if you add the Meeasure_counter_engraver  and \boxify MeasureCounter for the RhythmicStaff

%%%%

\version "2.22.0"

 

boxify =

#(define-music-function

  (grob-path) (key-list?)

  (define proc (grob-transformer 'stencil

   (lambda (grob orig) (grob-interpret-markup grob #{

    \markup \override #'(box-padding . 0.25)

            \override #'(thickness . 2)

            \box \stencil #orig #}))))

  #{ \override $grob-path . stencil = #proc #})

\include "english.ly" \header {tagline = "" }

\score {\new RhythmicStaff {

  \override Score.SpacingSpanner.strict-note-spacing = ##t

  \set Score.proportionalNotationDuration = #(ly:make-moment 1/4)

  \set Staff.midiInstrument = #"Grand Piano"

  \key c \major \numericTimeSignature

  \time 4/4

  \clef treble

  \startMeasureCount

  \hideNotes b2 c

  \unHideNotes a c'4 g

   \stopMeasureCount

  \bar "||"}

        \layout {

              \context {

                     \RhythmicStaff  %%%% Here is the change

                     \consists Measure_counter_engraver

                    \boxify MeasureCounter

                        }

                }

        \midi { \tempo 4 =92}

}


reply via email to

[Prev in Thread] Current Thread [Next in Thread]