neoscore.western.notehead
- class neoscore.western.notehead.Notehead[source]
Bases:
MusicText,StaffObjectA simple notehead automatically selected and vertically positioned.
- __init__(pos_x: Unit, parent: PositionedObject, pitch: PitchDef, duration: DurationDef, font: Optional[MusicFont] = None, table: NoteheadTable = notehead_tables.STANDARD, glyph_override: Optional[str] = None)[source]
- Parameters
pos_x – The x-axis position relative to
parent. The y-axis position is calculated automatically based onpitchand contextual information inself.staff.parent – Must be a
Staffor a descendant of one.pitch – The pitch used to vertically place the notehead. See
PitchandPitchDefduration – The logical duration of the notehead. This is used to determine the glyph style.
font – If provided, this overrides any font found in the ancestor chain.
table – The set of noteheads to use according to
duration. Seenotehead_tables.glyph_override – A SMuFL glyph name. If given, this overrides the glyph normally looked up with
durationfromtable.
- property table: NoteheadTable
- property glyph_override: Optional[str]
- staff_pos
The y-axis position in the staff.
This is derived from the
pitchand the staff’s active clef at this object’s position.