neoscore.western.notehead
- class neoscore.western.notehead.Notehead[source]
Bases:
MusicText
,StaffObject
A 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 onpitch
and contextual information inself.staff
.parent – Must be a
Staff
or a descendant of one.pitch – The pitch used to vertically place the notehead. See
Pitch
andPitchDef
duration – 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
duration
fromtable
.
- property table: NoteheadTable
- property glyph_override: Optional[str]
- staff_pos
The y-axis position in the staff.
This is derived from the
pitch
and the staff’s active clef at this object’s position.