\version "2.12.0" rightTearWidth = #1 rightTearHeight = #8 rightTearLineWidth = #0.1 rightTearSerrations = #5 rightTearPadding = #0 rightTearPS = #(string-append " /linewidth " (number->string rightTearLineWidth) " def /width " (number->string rightTearWidth) " def /height " (number->string rightTearHeight) " def /serrations " (number->string rightTearSerrations) " def /padding " (number->string rightTearPadding) " 2 width mul add def /serrationHeight height serrations div def /y0 height 2 div def /xn width def /yn serrationHeight 2 div neg def /plotAngle { linewidth setlinewidth xn yn rlineto xn neg yn rlineto } def /plotSerrations { serrations { plotAngle } repeat } def %% whiteout: 1 setgray 0 y0 moveto plotSerrations padding 0 rlineto 0 height rlineto padding neg 0 rlineto fill stroke %% draw serrations: newpath 0 setgray 0 y0 moveto plotSerrations stroke") rightTear = { \once \override Staff.BarLine #'stencil = #ly:text-interface::print \once \override Staff.BarLine #'text = \markup \with-dimensions #`(0 . ,rightTearWidth) #'(0 . 0) \whiteout \postscript #rightTearPS \once \override Staff.BarLine #'X-extent = #`(0 . ,(+ rightTearPadding rightTearWidth)) \break } \score { \relative { \repeat unfold 4 { g'4 d' b d } \rightTear \repeat unfold 4 { g,4 d' b d } \rightTear } \layout { ragged-right = ##t } }