Piero,

I've cooked up a way of "tearing" the right side of
the staff, which you can take a look at. Presumably
tearing the left side of the staff shouldn't be too
much harder, but I don't have time to look at it 
right now. I've included a lilypond file for you to
experiment with. Play around with the values at the 
top to suit your needs:

rightTearWidth = #1
rightTearHeight = #8
rightTearLineWidth = #0.1
rightTearSerrations = #5
rightTearPadding = #0

And notice the usage at the end of the file:

\score {
  \relative {
    \repeat unfold 4 { g'4 d' b d } \rightTear
    \repeat unfold 4 { g,4 d' b d } \rightTear
  }
  \layout {
    ragged-right = ##t
  }
}

Otherwise, is this about what you're looking for?
Let me know if you have questions or need anything
explained. Happy to help.

- Mark



      
\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
  }
}

<<attachment: torn-staves.png>>

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to