Repeat¶
-
class
abjad.indicators.Repeat.
Repeat
(*, repeat_count=2, repeat_type='volta')¶ Repeat.
Volta repeat:
>>> container = abjad.Container("c'4 d'4 e'4 f'4") >>> repeat = abjad.Repeat() >>> abjad.attach(repeat, container) >>> staff = abjad.Staff([container]) >>> score = abjad.Score([staff]) >>> abjad.show(score)
Unfold repeat:
>>> container = abjad.Container("c'4 d'4 e'4 f'4") >>> repeat = abjad.Repeat(repeat_type='unfold') >>> abjad.attach(repeat, container) >>> staff = abjad.Staff([container]) >>> score = abjad.Score([staff]) >>> abjad.show(score)
Attributes Summary
__str__
Gets string representation of repeat. context
Gets (historically conventional) context. repeat_count
Gets repeat count of repeat. repeat_type
Gets repeat type of repeat. tweaks
Are not implemented on repeat. Special methods
-
(
AbjadValueObject
).__copy__
(*arguments)¶ Copies Abjad value object.
Returns new Abjad value object.
-
(
AbjadValueObject
).__eq__
(argument)¶ Is true when all initialization values of Abjad value object equal the initialization values of
argument
.Returns true or false.
-
(
AbjadObject
).__format__
(format_specification='')¶ Formats Abjad object.
Set
format_specification
to''
or'storage'
. Interprets''
equal to'storage'
.Returns string.
-
(
AbjadValueObject
).__hash__
()¶ Hashes Abjad value object.
Returns integer.
-
(
AbjadObject
).__repr__
()¶ Gets interpreter representation of Abjad object.
Returns string.
-
__str__
()¶ Gets string representation of repeat.
Volta repeat:
>>> str(abjad.Repeat()) '\\repeat volta 2'
Unfold repeat:
>>> str(abjad.Repeat(repeat_type='unfold')) '\\repeat unfold 2'
Return type: str
Read-only properties
-
context
¶ Gets (historically conventional) context.
Volta repeat:
>>> repeat = abjad.Repeat() >>> repeat.context 'Score'
Unfold repeat:
>>> repeat = abjad.Repeat(repeat_type='unfold') >>> repeat.context 'Score'
Override with
abjad.attach(..., context='...')
.
-
repeat_count
¶ Gets repeat count of repeat.
Volta repeat:
>>> repeat = abjad.Repeat() >>> repeat.repeat_count 2
Unfold repeat:
>>> repeat = abjad.Repeat(repeat_type='unfold') >>> repeat.repeat_count 2
Return type: int
-
repeat_type
¶ Gets repeat type of repeat.
Volta repeat:
>>> repeat = abjad.Repeat() >>> repeat.repeat_type 'volta'
Unfold repeat:
>>> repeat = abjad.Repeat(repeat_type='unfold') >>> repeat.repeat_type 'unfold'
Return type: str
-
tweaks
¶ Are not implemented on repeat.
The LilyPond
\repeat
command refuses tweaks.Override the LilyPond
BarLine
grob instead.Return type: None
-