neoscore.western.arpeggio_line

class neoscore.western.arpeggio_line.ArpeggioLine[source]

Bases: RepeatingMusicTextLine

An arpeggio roll line, optionally with an arrow.

This is a thin convenience wrapper around RepeatingMusicTextLine.

__init__(start: PointDef, start_parent: Optional[PositionedObject], end_pos: PointDef, end_parent: Optional[PositionedObject], include_arrow: bool = False, font: Optional[MusicFont] = None, brush: Optional[BrushDef] = None, pen: Optional[PenDef] = None, background_brush: Optional[BrushDef] = None)[source]
Parameters
  • start – The starting point.

  • start_parent – If no font is given, this or one of its ancestors must implement HasMusicFont.

  • end_pos – The stopping point.

  • end_parent – The parent for the ending position. If None, defaults to self.

  • include_arrow – Whether to end the line with an arrow. This will be attached to the end position pointing away from the starting position.

  • font – If provided, this overrides any font found in the ancestor chain.

  • brush – The brush to fill in text shapes with.

  • pen – The pen to trace text outlines with. This defaults to no pen.

  • background_brush – Optional brush used to paint the text’s bounding rect behind it.

classmethod for_chord(chordrest: Chordrest, arrow_direction: Optional[DirectionY] = None, font: Optional[MusicFont] = None, brush: Optional[BrushDef] = None, pen: Optional[PenDef] = None, background_brush: Optional[BrushDef] = None) ArpeggioLine[source]

Convenience constructor for an arpeggio line attached to a chord.

Parameters
  • chordrest – The chord to attach the line to. This must not be a rest.

  • arrow_direction – If provided, cap the line with an arrow pointing this way.

  • font – A font override. If omitted, the chord’s font is used.

  • brush – The brush to fill in text shapes with.

  • pen – The pen to trace text outlines with. This defaults to no pen.

  • background_brush – Optional brush used to paint the text’s bounding rect behind it.