neoscore.western.tab_number

class neoscore.western.tab_number.TabNumber[source]

Bases: TabStringText

A number placed in a tab staff typically used to indicate frets or fingers

__init__(pos_x: Unit, staff: TabStaff, string: int, number: int, font: Optional[MusicFont] = None, brush: Optional[Union[Brush, str]] = None, pen: Optional[Union[Pen, str]] = None, hide_background=True)[source]
Parameters
  • pos_x – The x position relative to the parent

  • staff – The parent staff

  • string – The 1-indexed string number this should appear on

  • number – The number to display. Must be a non-zero integer.

  • font – The font to use. Defaults to the staff’s font.

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

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

  • hide_background – Whether to paint over the background behind the text. Particularly useful for preventing overlaps with staff lines.