neoscore.western.tremolo

class neoscore.western.tremolo.Tremolo[source]

Bases: MusicText

A tremolo marking over a single Chordrest.

The tremolo indicator accepts either an integer for declaring the number of strokes of a combining (common) tremolo, or a SMuFL glyphname e.g. “pendereckiTremolo”.

If a bridging tremolo is required between two chordrests, this class may not be suitable; instead consider manually building such tremolos using Beam objects.

__init__(pos: PointDef, parent: PositionedObject, indication: Union[int, str], font: Optional[MusicFont] = None, brush: Optional[BrushDef] = None, pen: Optional[PenDef] = None)[source]
Parameters
  • pos – The starting position

  • parent – The parent for the starting position. If no font is given, this or one of its ancestors must implement HasMusicFont.

  • indication – The type of tremolo to draw, either a stroke count for conventional tremolos (1-5) or an arbitrary SMuFL glyphname.

  • font – If provided, this overrides any font found in the ancestor chain.

  • brush – The brush to fill shapes with.

  • pen – The pen to draw outlines with.

classmethod for_chordrest(chordrest: Chordrest, indication: Union[int, str], font: Optional[MusicFont] = None, brush: Optional[BrushDef] = None, pen: Optional[PenDef] = None) Tremolo[source]

Convenience constructor for a tremolo attached to a chord

Parameters
  • chordrest – The chord to attach the tremolo to.

  • indication – The type of tremolo to draw, either a stroke count for conventional tremolos (1-5) or an arbitrary SMuFL glyphname.

  • font – If provided, this overrides any font found in the ancestor chain.

  • brush – The brush to fill shapes with.

  • pen – The pen to draw outlines with.