Table Of Contents

Previous topic

music21.romanText.translate

Next topic

music21.scala.base

music21.repeat

This module provides the base class for all RepeatMark objects: entities that denote repeats. Some RepeatMark objects are Expression objecs; others are Bar objects.

AlSegno

Inherits from: RepeatExpressionCommand, RepeatExpression, RepeatMark, Expression, Music21Object, JSONSerializer

class music21.repeat.AlSegno(text=None)

Jump to the sign. Presumably a forward jump, not a repeat.

>>> from music21 import *
>>> rm = repeat.DaCapoAlFine()

Coda

Inherits from: RepeatExpressionMarker, RepeatExpression, RepeatMark, Expression, Music21Object, JSONSerializer

class music21.repeat.Coda(text=None)

The coda symbol, or the word coda, as placed in a score.

>>> from music21 import *
>>> rm = repeat.Coda()

DaCapo

Inherits from: RepeatExpressionCommand, RepeatExpression, RepeatMark, Expression, Music21Object, JSONSerializer

class music21.repeat.DaCapo(text=None)
The Da Capo command, indicating a return to the beginning and a continuation to the end. By default, repeatAfterJump is False, indicating that any repeats encountered on the Da Capo repeat not be repeated.

DaCapoAlCoda

Inherits from: RepeatExpressionCommand, RepeatExpression, RepeatMark, Expression, Music21Object, JSONSerializer

class music21.repeat.DaCapoAlCoda(text=None)

The Da Capo al Coda command, indicating a return to the beginning and a continuation to the Coda object. The music resumes at a second Coda object. By default, repeatAfterJump is False, indicating that any repeats encountered on the Da Capo repeat not be repeated.

>>> from music21 import *
>>> rm = repeat.DaCapoAlCoda()

DaCapoAlFine

Inherits from: RepeatExpressionCommand, RepeatExpression, RepeatMark, Expression, Music21Object, JSONSerializer

class music21.repeat.DaCapoAlFine(text=None)

The Da Capo al Fine command, indicating a return to the beginning and a continuation to the Fine object. By default, repeatAfterJump is False, indicating that any repeats encountered on the Da Capo repeat not be repeated.

>>> from music21 import *
>>> rm = repeat.DaCapoAlFine()

DalSegno

Inherits from: RepeatExpressionCommand, RepeatExpression, RepeatMark, Expression, Music21Object, JSONSerializer

class music21.repeat.DalSegno(text=None)

The Dal Segno command, indicating a return to the segno and a continuation to the end. By default, repeatAfterJump is False, indicating that any repeats encountered on the Da Capo repeat not be repeated.

>>> from music21 import *
>>> rm = repeat.DaCapoAlFine()

DalSegnoAlCoda

Inherits from: RepeatExpressionCommand, RepeatExpression, RepeatMark, Expression, Music21Object, JSONSerializer

class music21.repeat.DalSegnoAlCoda(text=None)

The Dal Segno al Coda command, indicating a return to the beginning and a continuation to the Coda object. The music resumes at a second Coda object. By default, repeatAfterJump is False, indicating that any repeats encountered on the Da Segno repeat not be repeated.

>>> from music21 import *
>>> rm = repeat.DaCapoAlCoda()

DalSegnoAlFine

Inherits from: RepeatExpressionCommand, RepeatExpression, RepeatMark, Expression, Music21Object, JSONSerializer

class music21.repeat.DalSegnoAlFine(text=None)

The Dal Segno al Fine command, indicating a return to the segno and a continuation to the Fine object. By default, repeatAfterJump is False, indicating that any repeats encountered on the Dal Segno repeat not be repeated.

>>> from music21 import *
>>> rm = repeat.DaCapoAlFine()

Expander

class music21.repeat.Expander(streamObj)

Expand a single Part or Part-like stream with repeats.

Expander methods

isExpandable()
Return True or False if this Stream is expandable, that is, if it has balanced repeats or sensible da copo or dal segno indications.
process()
Process all repeats. Note that this processing only happens for Measures contained in the given Stream. Other objects in that Stream are neither processed nor copied.

Fine

Inherits from: RepeatExpressionMarker, RepeatExpression, RepeatMark, Expression, Music21Object, JSONSerializer

class music21.repeat.Fine

The fine word as placed in a score.

>>> from music21 import *
>>> rm = repeat.Fine()

RepeatExpression

Inherits from: RepeatMark, Expression, Music21Object, JSONSerializer

class music21.repeat.RepeatExpression

This class models any mark added to a Score to mark repeat start and end points that are designated by text expressions or symbols. Repeat(Barlin) objects are not RepeatExpression objects, but both are RepeatMark subclasses. This class stores internally a TextExpression. This object is used for rendering text output in translation. A properly configured TextExpression object can also be used to create an instance of a RepeatExpressions.

RepeatExpression attributes

Attributes without Documentation: useSymbol

Attributes inherited from Music21Object: classSortOrder, hideObjectOnPrint, id, groups

RepeatExpression properties

Properties inherited from Music21Object: activeSite, beat, beatDuration, beatStr, beatStrength, classes, derivationHierarchy, duration, measureNumber, offset, priority

Properties inherited from JSONSerializer: json

RepeatExpression methods

applyTextFormatting(te=None)
Apply the default text formatting to the text expression version of of this repeat
getText()
Get the text used for this expression.
getTextExpression()
Return a copy of the TextExpression stored in this object.
isValidText(value)
Return True or False if the supplied text could be used for this RepeatExpression.
setText(value)
Set the text of this repeat expression. This is also the primary way that the stored TextExpression object is created.
setTextExpression(value)
Directly set a TextExpression object.

Methods inherited from Music21Object: searchParentByAttr(), getContextAttr(), setContextAttr(), addContext(), addLocation(), addLocationAndActiveSite(), freezeIds(), getAllContextsByClass(), getCommonSiteIds(), getCommonSites(), getContextByClass(), getOffsetBySite(), getSiteIds(), getSites(), getSpannerSites(), hasContext(), mergeAttributes(), purgeLocations(), removeLocationBySite(), removeLocationBySiteId(), setOffsetBySite(), show(), splitAtDurations(), splitAtQuarterLength(), splitByQuarterLengths(), unfreezeIds(), unwrapWeakref(), wrapWeakref(), write()

Methods inherited from JSONSerializer: jsonAttributes(), jsonComponentFactory(), jsonPrint(), jsonRead(), jsonWrite()

RepeatExpressionCommand

Inherits from: RepeatExpression, RepeatMark, Expression, Music21Object, JSONSerializer

class music21.repeat.RepeatExpressionCommand

Some repeat expressions are commands, instructing the reader to go somewhere else. DaCapo and related are examples.

RepeatExpressionCommand attributes

Attributes without Documentation: repeatAfterJump

Attributes inherited from RepeatExpression: useSymbol

Attributes inherited from Music21Object: classSortOrder, hideObjectOnPrint, id, groups

RepeatExpressionCommand properties

Properties inherited from Music21Object: activeSite, beat, beatDuration, beatStr, beatStrength, classes, derivationHierarchy, duration, measureNumber, offset, priority

Properties inherited from JSONSerializer: json

RepeatExpressionCommand methods

Methods inherited from RepeatExpression: applyTextFormatting(), getText(), getTextExpression(), isValidText(), setText(), setTextExpression()

Methods inherited from Music21Object: searchParentByAttr(), getContextAttr(), setContextAttr(), addContext(), addLocation(), addLocationAndActiveSite(), freezeIds(), getAllContextsByClass(), getCommonSiteIds(), getCommonSites(), getContextByClass(), getOffsetBySite(), getSiteIds(), getSites(), getSpannerSites(), hasContext(), mergeAttributes(), purgeLocations(), removeLocationBySite(), removeLocationBySiteId(), setOffsetBySite(), show(), splitAtDurations(), splitAtQuarterLength(), splitByQuarterLengths(), unfreezeIds(), unwrapWeakref(), wrapWeakref(), write()

Methods inherited from JSONSerializer: jsonAttributes(), jsonComponentFactory(), jsonPrint(), jsonRead(), jsonWrite()

RepeatExpressionMarker

Inherits from: RepeatExpression, RepeatMark, Expression, Music21Object, JSONSerializer

class music21.repeat.RepeatExpressionMarker
Some repeat expressions are markers of positions in the score; these classes model those makers, such as Coda, Segno, and Fine.

RepeatMark

class music21.repeat.RepeatMark
Base class of all repeat objects, including RepeatExpression objects and Repeat (Barline) objects. This object is used to for multiple-inheritance of such objects and to filter by class.

Segno

Inherits from: RepeatExpressionMarker, RepeatExpression, RepeatMark, Expression, Music21Object, JSONSerializer

class music21.repeat.Segno

The fine word as placed in a score.

>>> from music21 import *
>>> rm = repeat.Segno()