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:
|
|
|
|
|
|
|
|
|
|
|
|
|
- class BarLine(abbreviation: Union[str, NoneType] = None)[source]¶
Bases:
mutwo.parameters.abc.NotationIndicatorMethods:
Attributes:
- 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.NotationIndicatorMethods:
Attributes:
- 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.NotationIndicatorMethods:
Attributes:
- 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.NotationIndicatorMethods:
Attributes:
- 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:
Attributes:
- get_all_indicator()¶
- Return type
Tuple[mutwo.parameters.abc.T, …]
- get_indicator_dict()¶
- Return type
Dict[str, mutwo.parameters.abc.Indicator]
- margin_markup: mutwo.parameters.notation_indicators.MarginMarkup¶
- rehearsal_mark: mutwo.parameters.notation_indicators.RehearsalMark¶
- class Ottava(n_octaves: Union[int, NoneType] = 0)[source]¶
Bases:
mutwo.parameters.abc.NotationIndicatorMethods:
Attributes:
- 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¶