lilypond-user
[Top][All Lists]
Advanced

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

updating "display multi measure rest span"


From: Calvin Ransom
Subject: updating "display multi measure rest span"
Date: Mon, 29 Mar 2021 00:30:44 -0700

I found this code for creating ranges of multimeasure rests.
I ran convert.ly and it did not work correctly.
Here is the code after running it through convert.ly:
\version "2.22.0"
\layout {
  \override Score.BarNumber.break-visibility = ##(#t #t #t)
}

fancyMultiMeasureRestNumber = {
  \applyOutput Voice.MultiMeasureRestNumber
  #(lambda (g c p)
     (let* ((currentBarNumber (ly:context-property c 'currentBarNumber))
            (mmr-length
             (ly:moment-main
              (ly:prob-property (ly:grob-property g 'cause) 'length))))
       (ly:grob-set-property! g 'text
         #{
           \markup
           \center-column {
             #(number->string mmr-length)
             %% value found by try and error
             \translate #'(0 . -7.5)
             \with-dimensions #empty-interval #empty-interval
             \halign #CENTER
             \line
             #(list (number->string currentBarNumber)
                " - "
                (number->string (1- (+ currentBarNumber mmr-length))))
           }
         #})))
  \compressEmptyMeasures
}

{
  c'1
  \fancyMultiMeasureRestNumber R1*14
  c'1
}

%{
convert-ly (GNU LilyPond) 2.22.0  convert-ly: Processing `'...
Applying conversion: 2.19.46, 2.19.49, 2.20.0, 2.21.0, 2.21.2, 2.22.0
%}
%%%%%%%%%%%%%%%%%%%%%%%%%%%

When I try to engrave it I get the following error:

Processing `C:/Users/calvi/AppData/Local/Temp/frescobaldi-1mq0e1iz/tmp1w3mgm6e/document.ly'

Parsing...

Interpreting music...C:/Users/calvi/AppData/Local/Temp/frescobaldi-1mq0e1iz/tmp1w3mgm6e/document.ly:12:15: In _expression_ (ly:Prob-property (ly:grob-property g #) (quote length)):

C:/Users/calvi/AppData/Local/Temp/frescobaldi-1mq0e1iz/tmp1w3mgm6e/document.ly:12:15: Unbound variable: ly:Prob-property

Exited with return code 1.


I don't really know where to start in fixing this


Regards,


Calvin Ransom


reply via email to

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