def __init__( self, name: str = None, *, direction: typing.Union[str, enums.VerticalAlignment] = None, tweaks: typing.Union[ typing.List[typing.Tuple], LilyPondTweakManager] = None, ) -> None: if isinstance(name, type(self)): argument = name name = argument.name direction = direction or argument.direction name = str(name) if '\\' in name: direction, name = name.split('\\') direction = direction.strip() name = name.strip() self._name = name direction_ = String.to_tridirectional_ordinal_constant(direction) if direction_ is not None: assert isinstance(direction_, enums.VerticalAlignment), repr(direction_) assert direction_ in (enums.Up, enums.Down, enums.Center), repr(direction_) self._direction = direction_ self._format_slot = 'after' self._tweaks = None LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, written_pitch=None, client=None, is_cautionary=None, is_forced=None, is_parenthesized=None, tweaks=None, ): import abjad self._alternative = None if client is not None: assert isinstance(client, abjad.Leaf) self._client = client self._tweaks = None if isinstance(written_pitch, type(self)): note_head = written_pitch written_pitch = note_head.written_pitch is_cautionary = note_head.is_cautionary is_forced = note_head.is_forced tweaks = note_head.tweaks._get_attribute_pairs() elif written_pitch is None: written_pitch = 0 self.written_pitch = written_pitch self.is_cautionary = is_cautionary self.is_forced = is_forced self.is_parenthesized = is_parenthesized LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, *, tweaks: typing.Union[typing.List[typing.Tuple], LilyPondTweakManager] = None, ) -> None: self._tweaks = None LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, name: typing.Union[str, 'Dynamic'] = 'f', *, command: str = None, direction: enums.VerticalAlignment = None, format_hairpin_stop: bool = None, hide: bool = None, leak: bool = None, name_is_textual: bool = None, ordinal: typing.Union[int, Infinity, NegativeInfinity] = None, sforzando: bool = None, tweaks: typing.Union[typing.List[typing.Tuple], LilyPondTweakManager] = None, ) -> None: if name is not None: assert isinstance(name, (str, type(self))), repr(name) if isinstance(name, type(self)): name_ = name.name elif isinstance(name, str): name_ = name if name_ == 'niente': if name_is_textual not in (None, True): raise Exception('niente dynamic name is always textual.') name_is_textual = True if not name_is_textual: for letter in name_.strip('"'): assert letter in self._lilypond_dynamic_alphabet, repr(name_) self._name = name_ if command is not None: assert isinstance(command, str), repr(command) assert command.startswith('\\'), repr(command) self._command = command if direction is not None: assert direction in (enums.Down, enums.Up), repr(direction) self._direction = direction if format_hairpin_stop is not None: format_hairpin_stop = bool(format_hairpin_stop) self._format_hairpin_stop = format_hairpin_stop if hide is not None: hide = bool(hide) self._hide = hide if leak is not None: leak = bool(leak) self._leak = leak if name_is_textual is not None: name_is_textual = bool(name_is_textual) self._name_is_textual = name_is_textual if ordinal is not None: assert isinstance(ordinal, (int, Infinity, NegativeInfinity)) self._ordinal = ordinal if sforzando is not None: sforzando = bool(sforzando) self._sforzando = sforzando self._tweaks = None LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, command: str = 'fermata', *, tweaks: typing.Union[ typing.List[typing.Tuple], LilyPondTweakManager] = None, ) -> None: assert command in self._allowable_commands, repr(command) self._command = command self._tweaks = None LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, bend_amount: typings.Number = -4, *, tweaks: typing.Union[typing.List[typing.Tuple], LilyPondTweakManager] = None, ) -> None: assert isinstance(bend_amount, (int, float)), repr(bend_amount) self._bend_amount = bend_amount self._tweaks = None LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, number: int = None, *, tweaks: typing.Union[typing.List[typing.Tuple], LilyPondTweakManager] = None, ) -> None: if number is not None: assert mathtools.is_positive_integer(number) self._number = number self._tweaks = None LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, *, number: int = None, markup: Markup = None, tweaks: typing.Union[typing.List[typing.Tuple], LilyPondTweakManager] = None, ) -> None: self._tweaks = None self._markup = markup self._number = number LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, tonic: str = 'c', mode: str = 'major', *, tweaks: typing.Union[typing.List[typing.Tuple], LilyPondTweakManager] = None, ) -> None: self._tonic = NamedPitchClass(tonic) self._mode = Mode(mode) self._tweaks = None LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, *, direction: enums.VerticalAlignment = None, tweaks: typing.Union[typing.List[typing.Tuple], LilyPondTweakManager] = None, ) -> None: if direction is not None: assert direction in (enums.Up, enums.Down, enums.Center) self._direction = direction self._tweaks = None LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, shape='<', *, left_broken: bool = None, tweaks: typing.Union[typing.List[typing.Tuple], LilyPondTweakManager] = None, ) -> None: if left_broken is not None: left_broken = bool(left_broken) self._left_broken = left_broken assert shape in self._known_shapes, repr(shape) self._shape = shape self._tweaks = None LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, *, direction: enums.VerticalAlignment = None, tweaks: typing.Union[ typing.List[typing.Tuple], LilyPondTweakManager] = None, ) -> None: direction_ = String.to_tridirectional_ordinal_constant(direction) if direction_ is not None: assert isinstance(direction_, enums.VerticalAlignment), repr(direction_) directions = (enums.Up, enums.Down, enums.Center, None) assert direction_ in directions, repr(direction_) self._direction = direction_ self._tweaks = None LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, name: str = None, *, direction: typing.Union[str, enums.VerticalAlignment] = None, tweaks: LilyPondTweakManager = None, ) -> None: if isinstance(name, type(self)): argument = name name = argument.name direction = direction or argument.direction name = str(name) if "\\" in name: raise Exception("DEPRECATED?") direction, name = name.split("\\") direction = direction.strip() name = name.strip() self._name = name direction_ = String.to_tridirectional_ordinal_constant(direction) if direction_ is not None: assert isinstance(direction_, enums.VerticalAlignment), repr(direction_) assert direction_ in (enums.Up, enums.Down, enums.Center), repr(direction_) self._direction = direction_ self._format_slot = "after" if tweaks is not None: assert isinstance(tweaks, LilyPondTweakManager), repr(tweaks) self._tweaks = LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, written_pitch=None, client=None, is_cautionary=None, is_forced=None, is_parenthesized=None, tweaks=None, ): import abjad self._alternative = None if client is not None: assert isinstance(client, abjad.Leaf) self._client = client if isinstance(written_pitch, type(self)): note_head = written_pitch written_pitch = note_head.written_pitch is_cautionary = note_head.is_cautionary is_forced = note_head.is_forced tweaks = note_head.tweaks elif written_pitch is None: written_pitch = 0 self.written_pitch = written_pitch self.is_cautionary = is_cautionary self.is_forced = is_forced self.is_parenthesized = is_parenthesized if tweaks is not None: assert isinstance(tweaks, LilyPondTweakManager), repr(tweaks) self._tweaks = LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, *, allow_repeats: bool = None, allow_ties: bool = None, parenthesize_repeats: bool = None, stems: bool = None, style: str = None, tweaks: LilyPondTweakManager = None, zero_padding: bool = None, ) -> None: if allow_repeats is not None: allow_repeats = bool(allow_repeats) self._allow_repeats = allow_repeats if allow_ties is not None: allow_ties = bool(allow_ties) self._allow_ties = allow_ties if parenthesize_repeats is not None: parenthesize_repeats = bool(parenthesize_repeats) self._parenthesize_repeats = parenthesize_repeats if stems is not None: stems = bool(stems) self._stems = stems if style is not None: assert isinstance(style, str), repr(style) self._style = style if tweaks is not None: assert isinstance(tweaks, LilyPondTweakManager), repr(tweaks) self._tweaks = LilyPondTweakManager.set_tweaks(self, tweaks) if zero_padding is not None: zero_padding = bool(zero_padding) self._zero_padding = zero_padding
def __init__( self, name: str = None, *, direction: typing.Union[str, enums.VerticalAlignment] = None, tweaks: LilyPondTweakManager = None, ) -> None: if isinstance(name, type(self)): argument = name name = argument.name direction = direction or argument.direction name = str(name) if "\\" in name: message = "articulation names need no backslash:\n" message += f" {repr(name)}" raise Exception(message) self._name = name direction_ = String.to_tridirectional_ordinal_constant(direction) if direction_ is not None: assert isinstance(direction_, enums.VerticalAlignment), repr(direction_) assert direction_ in (enums.Up, enums.Down, enums.Center), repr(direction_) self._direction = direction_ self._format_slot = "after" if tweaks is not None: assert isinstance(tweaks, LilyPondTweakManager), repr(tweaks) self._tweaks = LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, name: str = None, *, direction: typing.Union[str, enums.VerticalAlignment] = None, tweaks: LilyPondTweakManager = None, ) -> None: if isinstance(name, type(self)): argument = name name = argument.name direction = direction or argument.direction name = str(name) if "\\" in name: raise Exception("DEPRECATED?") direction, name = name.split("\\") direction = direction.strip() name = name.strip() self._name = name direction_ = String.to_tridirectional_ordinal_constant(direction) if direction_ is not None: assert isinstance(direction_, enums.VerticalAlignment), repr( direction_ ) assert direction_ in (enums.Up, enums.Down, enums.Center), repr( direction_ ) self._direction = direction_ self._format_slot = "after" if tweaks is not None: assert isinstance(tweaks, LilyPondTweakManager), repr(tweaks) self._tweaks = LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, name: typing.Union[str, "Dynamic"] = "f", *, command: str = None, direction: enums.VerticalAlignment = None, format_hairpin_stop: bool = None, hide: bool = None, leak: bool = None, name_is_textual: bool = None, ordinal: typing.Union[int, Infinity, NegativeInfinity] = None, sforzando: bool = None, tweaks: LilyPondTweakManager = None, ) -> None: if name is not None: assert isinstance(name, (str, type(self))), repr(name) if isinstance(name, type(self)): name_ = name.name elif isinstance(name, str): name_ = name if name_ == "niente": if name_is_textual not in (None, True): raise Exception("niente dynamic name is always textual.") name_is_textual = True if not name_is_textual: for letter in name_.strip('"'): if letter not in self._lilypond_dynamic_alphabet: message = f"the letter {letter!r} (in {name!r})" message += " is not a dynamic." raise Exception(message) self._name = name_ if command is not None: assert isinstance(command, str), repr(command) assert command.startswith("\\"), repr(command) self._command = command if direction is not None: assert direction in (enums.Down, enums.Up), repr(direction) self._direction = direction if format_hairpin_stop is not None: format_hairpin_stop = bool(format_hairpin_stop) self._format_hairpin_stop = format_hairpin_stop if hide is not None: hide = bool(hide) self._hide = hide if leak is not None: leak = bool(leak) self._leak = leak if name_is_textual is not None: name_is_textual = bool(name_is_textual) self._name_is_textual = name_is_textual if ordinal is not None: assert isinstance(ordinal, (int, Infinity, NegativeInfinity)) self._ordinal = ordinal if sforzando is not None: sforzando = bool(sforzando) self._sforzando = sforzando if tweaks is not None: assert isinstance(tweaks, LilyPondTweakManager), repr(tweaks) self._tweaks = LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, *, command: str = r'\startTextSpan', concat_hspace_left: typings.Number = 0.5, concat_hspace_right: typings.Number = None, direction: enums.VerticalAlignment = None, left_broken_text: typing.Union[bool, LilyPondLiteral, markups.Markup] = None, left_text: typing.Union[LilyPondLiteral, markups.Markup] = None, right_padding: typings.Number = None, right_text: typing.Union[LilyPondLiteral, markups.Markup] = None, style: str = None, tweaks: typing.Union[typing.List[typing.Tuple], LilyPondTweakManager] = None, ) -> None: assert isinstance(command, str), repr(command) assert command.startswith('\\'), repr(command) self._command = command if concat_hspace_left is not None: assert isinstance(concat_hspace_left, (int, float)) self._concat_hspace_left = concat_hspace_left if concat_hspace_right is not None: assert isinstance(concat_hspace_right, (int, float)) self._concat_hspace_right = concat_hspace_right direction_ = String.to_tridirectional_lilypond_symbol(direction) self._direction = direction_ if left_broken_text is not None: assert isinstance(left_broken_text, (bool, markups.Markup)) self._left_broken_text = left_broken_text if left_text is not None: prototype = (LilyPondLiteral, markups.Markup) assert isinstance(left_text, prototype), repr(left_text) self._left_text = left_text if right_padding is not None: assert isinstance(right_padding, (int, float)), repr(right_padding) self._right_padding = right_padding if right_text is not None: prototype = (LilyPondLiteral, markups.Markup) assert isinstance(right_text, prototype), repr(right_text) self._right_text = right_text if style is not None: assert style in self._styles, repr(style) self._style = style self._tweaks = None LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, command: str = "fermata", *, tweaks: LilyPondTweakManager = None ) -> None: assert command in self._allowable_commands, repr(command) self._command = command if tweaks is not None: assert isinstance(tweaks, LilyPondTweakManager), repr(tweaks) self._tweaks = LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, argument: typing.Union[str, typing.List[str]] = '', format_slot: str = 'opening', *, directed: bool = None, tweaks: typing.Union[ typing.List[typing.Tuple], LilyPondTweakManager] = None, ) -> None: self._argument = argument assert format_slot in self._allowable_format_slots, repr(format_slot) self._format_slot = format_slot if directed is not None: directed = bool(directed) self._directed = directed self._tweaks = None LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, *, tweaks: LilyPondTweakManager = None, ) -> None: if tweaks is not None: assert isinstance(tweaks, LilyPondTweakManager), repr(tweaks) self._tweaks = LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, kind: str = None, *, tweaks: LilyPondTweakManager = None ) -> None: if kind is not None: assert kind in ("sustain", "sostenuto", "corda") self._kind = kind if tweaks is not None: assert isinstance(tweaks, LilyPondTweakManager), repr(tweaks) self._tweaks = LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, number: int = None, *, tweaks: LilyPondTweakManager = None ) -> None: if number is not None: assert mathtools.is_positive_integer(number) self._number = number if tweaks is not None: assert isinstance(tweaks, LilyPondTweakManager), repr(tweaks) self._tweaks = LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__(self, command: str = "fermata", *, tweaks: LilyPondTweakManager = None) -> None: assert command in self._allowable_commands, repr(command) self._command = command if tweaks is not None: assert isinstance(tweaks, LilyPondTweakManager), repr(tweaks) self._tweaks = LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__(self, *, direction: int = None, tweaks: LilyPondTweakManager = None) -> None: direction_ = String.to_tridirectional_lilypond_symbol(direction) self._direction = direction_ if tweaks is not None: assert isinstance(tweaks, LilyPondTweakManager), repr(tweaks) self._tweaks = LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__(self, *, direction: int = None, tweaks: LilyPondTweakManager = None) -> None: if direction is not None: assert direction in (enums.Up, enums.Down, enums.Center) self._direction = direction if tweaks is not None: assert isinstance(tweaks, LilyPondTweakManager), repr(tweaks) self._tweaks = LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__(self, kind: str = None, *, tweaks: LilyPondTweakManager = None) -> None: if kind is not None: assert kind in ("sustain", "sostenuto", "corda") self._kind = kind if tweaks is not None: assert isinstance(tweaks, LilyPondTweakManager), repr(tweaks) self._tweaks = LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, *, direction: enums.VerticalAlignment = None, tweaks: LilyPondTweakManager = None, ) -> None: self._direction = direction if tweaks is not None: assert isinstance(tweaks, LilyPondTweakManager), repr(tweaks) self._tweaks = LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, bend_amount: typings.Number = -4, *, tweaks: LilyPondTweakManager = None, ) -> None: assert isinstance(bend_amount, (int, float)), repr(bend_amount) self._bend_amount = bend_amount if tweaks is not None: assert isinstance(tweaks, LilyPondTweakManager), repr(tweaks) self._tweaks = LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, bend_amount: typings.Number = -4, *, tweaks: LilyPondTweakManager = None, ) -> None: assert isinstance(bend_amount, (int, float)), repr(bend_amount) self._bend_amount = bend_amount if tweaks is not None: assert isinstance(tweaks, LilyPondTweakManager), repr(tweaks) self._tweaks = LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, *, direction: enums.VerticalAlignment = None, tweaks: LilyPondTweakManager = None, ) -> None: direction_ = String.to_tridirectional_lilypond_symbol(direction) self._direction = direction_ if tweaks is not None: assert isinstance(tweaks, LilyPondTweakManager), repr(tweaks) self._tweaks = LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, tonic: str = "c", mode: str = "major", *, tweaks: LilyPondTweakManager = None, ) -> None: self._tonic = NamedPitchClass(tonic) self._mode = Mode(mode) if tweaks is not None: assert isinstance(tweaks, LilyPondTweakManager), repr(tweaks) self._tweaks = LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, *, markup: typing.Union[Markup, str] = None, number: int = None, tweaks: LilyPondTweakManager = None, ) -> None: self._tweaks = None self._markup = markup self._number = number if tweaks is not None: assert isinstance(tweaks, LilyPondTweakManager), repr(tweaks) self._tweaks = LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, *, markup: typing.Union[Markup, str] = None, number: int = None, tweaks: LilyPondTweakManager = None, ) -> None: self._tweaks = None self._markup = markup self._number = number if tweaks is not None: assert isinstance(tweaks, LilyPondTweakManager), repr(tweaks) self._tweaks = LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, shape="<", *, direction: enums.VerticalAlignment = None, tweaks: LilyPondTweakManager = None, ) -> None: direction_ = String.to_tridirectional_lilypond_symbol(direction) self._direction = direction_ assert shape in self._known_shapes, repr(shape) self._shape = shape if tweaks is not None: assert isinstance(tweaks, LilyPondTweakManager), repr(tweaks) self._tweaks = LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, *, direction: enums.VerticalAlignment = None, left_broken: bool = None, tweaks: LilyPondTweakManager = None, ) -> None: direction_ = String.to_tridirectional_lilypond_symbol(direction) self._direction = direction_ if left_broken is not None: left_broken = bool(left_broken) self._left_broken = left_broken if tweaks is not None: assert isinstance(tweaks, LilyPondTweakManager), repr(tweaks) self._tweaks = LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, *, interval: typing.Union[str, NamedInterval] = None, pitch: typing.Union[str, NamedPitch] = None, tweaks: LilyPondTweakManager = None, ) -> None: if interval is not None: interval = NamedInterval(interval) self._interval = interval if pitch is not None: pitch = NamedPitch(pitch) self._pitch = pitch if tweaks is not None: assert isinstance(tweaks, LilyPondTweakManager), repr(tweaks) self._tweaks = LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, argument: typing.Union[str, typing.List[str]] = "", format_slot: str = "opening", *, directed: bool = None, tweaks: LilyPondTweakManager = None, ) -> None: self._argument = argument assert format_slot in self._allowable_format_slots, repr(format_slot) self._format_slot = format_slot if directed is not None: directed = bool(directed) self._directed = directed if tweaks is not None: assert isinstance(tweaks, LilyPondTweakManager), repr(tweaks) self._tweaks = LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, *, direction: enums.VerticalAlignment = None, tweaks: LilyPondTweakManager = None, ) -> None: direction_ = String.to_tridirectional_ordinal_constant(direction) if direction_ is not None: assert isinstance(direction_, enums.VerticalAlignment), repr( direction_ ) directions = (enums.Up, enums.Down, enums.Center, None) assert direction_ in directions, repr(direction_) self._direction = direction_ if tweaks is not None: assert isinstance(tweaks, LilyPondTweakManager), repr(tweaks) self._tweaks = LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, *, command: str = r"\startTextSpan", concat_hspace_left: typings.Number = 0.5, concat_hspace_right: typings.Number = None, direction: enums.VerticalAlignment = None, left_broken_text: typing.Union[bool, str, markups.Markup] = None, left_text: typing.Union[str, markups.Markup] = None, right_padding: typings.Number = None, right_text: typing.Union[str, markups.Markup] = None, style: str = None, tweaks: LilyPondTweakManager = None, ) -> None: assert isinstance(command, str), repr(command) assert command.startswith("\\"), repr(command) self._command = command if concat_hspace_left is not None: assert isinstance(concat_hspace_left, (int, float)) self._concat_hspace_left = concat_hspace_left if concat_hspace_right is not None: assert isinstance(concat_hspace_right, (int, float)) self._concat_hspace_right = concat_hspace_right direction_ = String.to_tridirectional_lilypond_symbol(direction) self._direction = direction_ if left_broken_text is not None: assert isinstance(left_broken_text, (bool, markups.Markup)) self._left_broken_text = left_broken_text if left_text is not None: prototype = (str, markups.Markup) assert isinstance(left_text, prototype), repr(left_text) self._left_text = left_text if right_padding is not None: assert isinstance(right_padding, (int, float)), repr(right_padding) self._right_padding = right_padding if right_text is not None: prototype = (str, markups.Markup) assert isinstance(right_text, prototype), repr(right_text) self._right_text = right_text if style is not None: assert style in self._styles, repr(style) self._style = style if tweaks is not None: assert isinstance(tweaks, LilyPondTweakManager), repr(tweaks) self._tweaks = LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, shape="<", *, direction: enums.VerticalAlignment = None, left_broken: bool = None, tweaks: LilyPondTweakManager = None, ) -> None: direction_ = String.to_tridirectional_lilypond_symbol(direction) self._direction = direction_ if left_broken is not None: left_broken = bool(left_broken) self._left_broken = left_broken assert shape in self._known_shapes, repr(shape) self._shape = shape if tweaks is not None: assert isinstance(tweaks, LilyPondTweakManager), repr(tweaks) self._tweaks = LilyPondTweakManager.set_tweaks(self, tweaks)
def __init__( self, *, allow_repeats: bool = None, allow_ties: bool = None, parenthesize_repeats: bool = None, right_broken: bool = None, stems: bool = None, style: str = None, tweaks: LilyPondTweakManager = None, zero_padding: bool = None, ) -> None: if allow_repeats is not None: allow_repeats = bool(allow_repeats) self._allow_repeats = allow_repeats if allow_ties is not None: allow_ties = bool(allow_ties) self._allow_ties = allow_ties if parenthesize_repeats is not None: parenthesize_repeats = bool(parenthesize_repeats) self._parenthesize_repeats = parenthesize_repeats if right_broken is not None: right_broken = bool(right_broken) self._right_broken = right_broken if stems is not None: stems = bool(stems) self._stems = stems if style is not None: assert isinstance(style, str), repr(style) self._style = style if tweaks is not None: assert isinstance(tweaks, LilyPondTweakManager), repr(tweaks) self._tweaks = LilyPondTweakManager.set_tweaks(self, tweaks) if zero_padding is not None: zero_padding = bool(zero_padding) self._zero_padding = zero_padding
def __init__(self, *, tweaks: LilyPondTweakManager = None) -> None: if tweaks is not None: assert isinstance(tweaks, LilyPondTweakManager), repr(tweaks) self._tweaks = LilyPondTweakManager.set_tweaks(self, tweaks)