mutwo.parameters.notation_indicators

Define notation indicators for simple events.

This submodules provides several classes to express notation specifications for mutwo.events.basic.SimpleEvent objects. They mostly derive from traditional Western notation. Unlike indicators of the mutwo.parameters.playing_indicators module, notation indicators shouldn’t have an effect on the played music and are merely specifications of representation. The proper way to handle notation indicators should be via a NotationIndicatorCollection object that should be attached to the respective SimpleEvent. The collection contains all possible notation indicators which are defined in this module. mutwo.events.music.NoteLike contain by default a notation indicator collection.

Notation indicators have one or more arguments. Their is_active attribute can’t be set by the user and get automatically initialised depending on if all necessary attributes are defined (then active) or if any of the necessary attributes is set to None (then not active).

Example:

Set notation indicators of NoteLike:

>>> from mutwo.events import music
>>> my_note = music.NoteLike('c', 1 / 4, 'mf')
>>> my_note.notation_indicators.margin_markup.content = "Violin"

Classes:

BarLine([abbreviation])

Clef([name])

MarginMarkup([content, context])

Markup([content, direction])

NotationIndicatorCollection(*args, **kwds)

Ottava([n_octaves])

RehearsalMark([markup])

class BarLine(abbreviation: Union[str, NoneType] = None)[source]

Bases: mutwo.parameters.abc.NotationIndicator

Methods:

get_arguments_dict()

Attributes:

abbreviation

is_active

Parameters

abbreviation (Optional[str]) –

Return type

None

get_arguments_dict()
Return type

Dict[str, Any]

abbreviation: Optional[str] = None
property is_active: bool
class Clef(name: Union[str, NoneType] = None)[source]

Bases: mutwo.parameters.abc.NotationIndicator

Methods:

get_arguments_dict()

Attributes:

is_active

name

Parameters

name (Optional[str]) –

Return type

None

get_arguments_dict()
Return type

Dict[str, Any]

property is_active: bool
name: Optional[str] = None
class MarginMarkup(content: Union[str, NoneType] = None, context: Union[str, NoneType] = 'Staff')[source]

Bases: mutwo.parameters.abc.NotationIndicator

Methods:

get_arguments_dict()

Attributes:

content

context

is_active

Parameters
  • content (Optional[str]) –

  • context (Optional[str]) –

Return type

None

get_arguments_dict()
Return type

Dict[str, Any]

content: Optional[str] = None
context: Optional[str] = 'Staff'
property is_active: bool
class Markup(content: Union[str, NoneType] = None, direction: Union[str, NoneType] = None)[source]

Bases: mutwo.parameters.abc.NotationIndicator

Methods:

get_arguments_dict()

Attributes:

content

direction

is_active

Parameters
  • content (Optional[str]) –

  • direction (Optional[str]) –

Return type

None

get_arguments_dict()
Return type

Dict[str, Any]

content: Optional[str] = None
direction: Optional[str] = None
property is_active: bool
class NotationIndicatorCollection(*args, **kwds)[source]

Bases: mutwo.parameters.abc.IndicatorCollection[mutwo.parameters.abc.NotationIndicator]

Methods:

get_all_indicator()

get_indicator_dict()

Attributes:

bar_line

clef

margin_markup

markup

ottava

rehearsal_mark

get_all_indicator()
Return type

Tuple[mutwo.parameters.abc.T, …]

get_indicator_dict()
Return type

Dict[str, mutwo.parameters.abc.Indicator]

bar_line: mutwo.parameters.notation_indicators.BarLine
clef: mutwo.parameters.notation_indicators.Clef
margin_markup: mutwo.parameters.notation_indicators.MarginMarkup
markup: mutwo.parameters.notation_indicators.Markup
ottava: mutwo.parameters.notation_indicators.Ottava
rehearsal_mark: mutwo.parameters.notation_indicators.RehearsalMark
class Ottava(n_octaves: Union[int, NoneType] = 0)[source]

Bases: mutwo.parameters.abc.NotationIndicator

Methods:

get_arguments_dict()

Attributes:

is_active

n_octaves

Parameters

n_octaves (Optional[int]) –

Return type

None

get_arguments_dict()
Return type

Dict[str, Any]

property is_active: bool
n_octaves: Optional[int] = 0
class RehearsalMark(markup: Union[str, NoneType] = None)[source]

Bases: mutwo.parameters.abc.NotationIndicator

Methods:

get_arguments_dict()

Attributes:

is_active

markup

Parameters

markup (Optional[str]) –

Return type

None

get_arguments_dict()
Return type

Dict[str, Any]

property is_active: bool
markup: Optional[str] = None