class neoscore.western.pedal_line.PedalLine[source]

Bases: Spanner, MusicPath

A line-style pedal marking with optional half-lift (^) marks.

The mark begins with an upward crook, continues as a horizontal line interrupted with optional half-lift upward triangular marks, and terminates with another upward crook.

The object’s position is that of the top of the opening crook; this y-axis position is also the height two which the half-lift marks extend. The main line of the path is drawn 1 staff unit below this position.

A list of half-lift x-axis positions may be provided as either simple x-axis Unit values (relative to the line’s start position) or as 2-tuples of x-axis positions and position parents:

>>> PedalLine(start=(Mm(10), staff.unit(8)), start_parent=staff,
...           end_x=Mm(200), end_parent=None,
...           half_lift_positions=[
...               Mm(20),               # Relative to start_parent
...               Mm(40),               # Relative to start_parent
...               (Mm(1), some_chord)]  # 1 mm right of some_chord
...          ) 

While this is a path, it requires a music font from which to derive its appearance.

__init__(start: PointDef, start_parent: PositionedObject, end_x: Unit, end_parent: Optional[PositionedObject] = None, half_lift_positions: List[Unit | Tuple[Unit, PositionedObject]] = None, font: Optional[MusicFont] = None)[source]
  • start – The starting position of the pedal line.

  • start_parent – The parent for the starting position. If no font is given, this or one of its ancestors must implement HasMusicFont.

  • end_x – x position of the end point relative to end_parent

  • end_parent – parent for end_x

  • half_lift_positions – A list of x-axis positions along the line where half lift notches should be drawn.

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