class neoscore.western.octave_line.OctaveLine[source]

Bases: Spanner, PositionedObject, HasMusicFont

An octave indication with a dashed line.

This octave line is purely cosmetic, and does not result in any automatic transpositions.

At the starting position the octave is written in text, followed by a dashed line ending in a small vertical hook pointing toward the staff. If the spanner goes across line breaks, the octave text is repeated in parentheses at the line beginning.

__init__(start: PointDef, start_parent: PositionedObject, end_x: Unit, end_parent: Optional[PositionedObject] = None, indication: str = '8va', direction: DirectionY = DirectionY.DOWN, font: Optional[MusicFont] = None)[source]
  • start – The starting point.

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

  • end_x – The spanner end x position. The y position will be automatically calculated to be horizontal.

  • end_parent – An object either in a Staff or a staff itself. The root staff of this must be the same as the root staff of start_parent. If omitted, the stop point is relative to the start point.

  • indication

    A valid octave indication. currently supported indications are:

    • ’15ma’ (two octaves higher)

    • ’8va’ (one octave higher)

    • ’8vb’ (one octave lower)

    • ’15mb’ (two octaves lower)

  • direction – The direction the line’s ending hook points. For lines above staves, this should be down, and vice versa for below.

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

property music_font: MusicFont

The music font used by this object.