spannertools.fracture_crossing

abjad.tools.spannertools.fracture_crossing(components)

Fracture to the left of the leftmost component. Fracture to the right of the rightmost component. Do not fracture spanners of any components at higher levels of score. Do not fracture spanners of any components at lower levels of score. Return components.

Components must be thread-contiguous. Some spanners may copy during fracture. This helper is public-safe.

Example:

t = Staff(Container(construct.run(2)) * 3)
pitchtools.diatonicize(t)
Crescendo(t)
Beam(t[:])
Trill(t.leaves)

\new Staff {
   {
      c'8 [ \< \startTrillSpan
      d'8
   }
   {
      e'8
      f'8
   }
   {
      g'8
      a'8 ] \! \stopTrillSpan
   }   }

spannertools.fracture_crossing(t[1:2])

\new Staff {
   {
      c'8 [ \< \startTrillSpan
      d'8 ]
   }
   {
      e'8 [
      f'8 ]
   }
   {
      g'8 [
      a'8 ] \! \stopTrillSpan
   }
}

Previous topic

spannertools.find_index_at_score_offset

Next topic

spannertools.get_attached

This Page