lilypond-user
[Top][All Lists]
Advanced

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

bar lines shift when using proportional notation


From: Adrian Kleinlosen
Subject: bar lines shift when using proportional notation
Date: Mon, 5 Feb 2024 15:13:05 +0100

Hi LilyPonders,


I would like to notate a piece proportionally. To do this, I have created (with a little help) a markup command that I can use to place time signatures above the bar lines. But as soon as I do this, they move to the left, whereas the bar lines are in the right place if I don't use the markup. (See the code below.) Can anyone tell me why this is and how I can counteract it?


Cheers, 

Adrian




\version "2.25.2"


#(define-markup-command (timesig layout props num den) (number? number?)

   (interpret-markup

    layout props

    #{

      \markup {

       \override #'(baseline-skip . 2.5)

       \override #'(font-size . 4.5)

       \override #'(font-name . "Bodoni72 Book")

       \override #'(whiteout-style . outline)

       \override #'(whiteout . 1)

       \override #'(extra-offset . -2)

       \column {

         \raise #0.5   \center-align \scale #'(0.8 . 0.8) #(number->string num) 

         \raise #-0.5  \center-align \scale #'(0.8 . 0.8) #(number->string den) 

       }

      }

    #}))


\paper {

  indent = 0\mm

  short-indent = 0\mm

}



\score {

{

%%%%%%%%%%% Bar line and time signature move to the left  %%%%%%%%%%%

\time 29/64

\mark \markup { \timesig #29 #64 }

c'16[ 16 16 16 16 16 16] c'256 256 256 256 |

\time 2/8

\mark \markup { \timesig #2 #8 }

c'8[ c'8] \break


%%%%%%%%%%% Bar line and time signature in the right place %%%%%%%%%%%

\time 29/64

c'16[ 16 16 16 16 16 16] c'256[ 256 256 256] |

\time 2/8

c'8[ c'8] |

}


\layout { 

  \context { 

    \Score

        measureBarType = #"'"

        proportionalNotationDuration = #(ly:make-moment 1 64)

        \override SpacingSpanner.uniform-stretching = ##t

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

        \override Stem.details.beamed-lengths = #'(7)

        \override Stem.details.lengths = #'(7) }

  \context { 

    \Staff 

        \remove Time_signature_engraver }

   }

}



Attachment: Example.ly
Description: Binary data

Attachment: Example.pdf
Description: Adobe PDF document


reply via email to

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