neoscore.western.barline

class neoscore.western.barline.Barline[source]

Bases: PositionedObject, MultiStaffObject, HasMusicFont

A barline spanning any number of staves.

In addition to a default plain barline, this supports many common barline styles out of the box, and beyond those you can easily define custom barline styles.

A BreakHint is automatically attached to the end of the barline so Flowable containers will treat barlines as potential line break points.

__init__(pos_x: Unit, staves: Union[StaffGroup, List[AbstractStaff]], styles: Union[BarlineStyle, Iterable[BarlineStyle]] = barline_style.SINGLE, connected: Optional[bool] = True, font: Optional[MusicFont] = None)[source]
Parameters
  • pos_x – The barline X position relative to the highest staff. Specifies right edge of the barline group and offsets ‘thickness’.

  • staves – The staves spanned. If a raw list of staves is given, it must be in descending order.

  • styles – This accepts any of the pre-made styles provided in barline_style, in addition to custom styles defined in a list of BarlineStyles (one for each sub-barline).

  • connected – Whether to connect the barline between staves.

  • font – If provided, this overrides the font in the parent (top) staff.

property music_font: MusicFont

The music font used by this object.