neoscore.western.metronome_mark
- class neoscore.western.metronome_mark.MetronomeMark[source]
Bases:
PositionedObject
,HasMusicFont
A combined
MusicText
andText
for use in metronome markings- __init__(pos: PointDef, parent: Optional[PositionedObject], music_str: MusicStringDef, text_str: str, music_font: Optional[MusicFont] = None, text_font: Optional[Font] = None, spaces_between_music_chars: bool = True)[source]
- Parameters
pos – Position relative to
parent
parent – If no
music_font
is given, this or one of its ancestors must implementHasMusicFont
.music_str – The
MusicText
string portion of the mark. Glyphs should typically come from the relevant SMuFL range.text_str – The plain-text string portion of the mark. This will typically be of the form “= 123”.
music_font – If provided, this overrides any music font found in the ancestor chain.
text_font – The font for the plain text portion of the mark.
spaces_between_music_chars – Whether to insert spaces between each specified music character. This is needed to correctly space rhythm dots if used.