Text

class maelzel.core.symbols.Text(text, placement='above', fontsize=None, italic=False, weight='normal', box='', color='', fontfamily='')[source]

Bases: EventSymbol

A note attached text expression

Parameters:
  • text (str) – the text

  • placement – ‘above’, ‘below’ or None to leave it undetermined

  • fontsize (Optional[float]) – the size of the text. The actual resulting size will depend on the backend used

  • weight – one of ‘normal’, ‘bold’

  • italic – should this text be italic?

  • color – a valid css color

  • box – one of ‘square’, ‘rectangle’, ‘circle’ or ‘’ to disable

Attributes Summary

Methods Summary

applyToNotation(n, parent)

Apply this symbol to the given notation, inplace

Attributes Documentation

appliesToRests = True
exclusive = False

Methods Documentation

applyToNotation(n, parent)[source]

Apply this symbol to the given notation, inplace

Return type:

None