Previous topic

music21.musicxml.m21ToString

Next topic

music21.musicxml.toMxObjects

Table Of Contents

Table Of Contents

This Page

music21.musicxml.mxObjects

This module defines an object representation of MusicXML, used for converting to and from MusicXML and music21.

Functions

music21.musicxml.mxObjects.booleanToYesNo(value)
music21.musicxml.mxObjects.yesNoToBoolean(value)

Accidental

class music21.musicxml.mxObjects.Accidental

Accidental bases

Accidental read/write properties

Read/write properties inherited from XMLNode:

  • tag

Accidental methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

AccidentalMark

class music21.musicxml.mxObjects.AccidentalMark(type=None)

Used inside an ornament definition; chardata holds the accidental type

AccidentalMark bases

AccidentalMark read/write properties

Read/write properties inherited from XMLNode:

  • tag

AccidentalMark methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

ArticulationMark

class music21.musicxml.mxObjects.ArticulationMark(tag)

This is not an XML object, but a container for all XML articulation tags.

ArticulationMark bases

ArticulationMark read/write properties

Read/write properties inherited from XMLNode:

  • tag

ArticulationMark methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Articulations

class music21.musicxml.mxObjects.Articulations(type=None)

Articulations bases

Articulations read/write properties

Read/write properties inherited from XMLNode:

  • tag

Articulations methods

Methods inherited from MusicXMLElementList:

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Attributes

class music21.musicxml.mxObjects.Attributes

Attributes bases

Attributes read/write properties

Read/write properties inherited from XMLNode:

  • tag

Attributes methods

Attributes.setDefaultDivisions()

Utility to just set the divisions parameters

Attributes.setDefaults()

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • toxml()
  • xmlStr()

Backup

class music21.musicxml.mxObjects.Backup(type=None)

Backup bases

Backup read/write properties

Read/write properties inherited from XMLNode:

  • tag

Backup methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Barline

class music21.musicxml.mxObjects.Barline

Barline bases

Barline read/write properties

Read/write properties inherited from XMLNode:

  • tag

Barline methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Bass

class music21.musicxml.mxObjects.Bass

A root defines a pitch, with a step and an alter

Bass bases

Bass read/write properties

Read/write properties inherited from XMLNode:

  • tag

Bass methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Beam

class music21.musicxml.mxObjects.Beam

Beams are specified is individual objects for each beam, in order, where the beam number refers to its duration representation (8th, 16th, etc) and its character data specifies whether it is begin/continue/end (for normal beams) or backward hook/forward wook (for beams that do not continue are attached only to the staff). These character data values can be mixed: one beam can continue while another can hook or end.

1 = 8th 2 = 16th 3 = 32th 4 = 64th 5 = 128th 6 = 256th

From musicxml.xsd:

Beam values include begin, continue, end, forward hook, and backward hook. Up to six concurrent beam levels are available to cover up to 256th notes. The repeater attribute, used for tremolos, needs to be specified with a “yes” value for each beam using it. Beams that have a begin value can also have a fan attribute to indicate accelerandos and ritardandos using fanned beams. The fan attribute may also be used with a continue value if the fanning direction changes on that note. The value is “none” if not specified.

Note that the beam number does not distinguish sets of beams that overlap, as it does for slur and other elements. Beaming groups are distinguished by being in different voices and/or the presence or absence of grace and cue

Beam bases

Beam read/write properties

Read/write properties inherited from XMLNode:

  • tag

Beam methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

BeatType

class music21.musicxml.mxObjects.BeatType(charData=None)

BeatType bases

BeatType read/write properties

Read/write properties inherited from XMLNode:

  • tag

BeatType methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

BeatUnit

class music21.musicxml.mxObjects.BeatUnit(charData=None)

Part of <metronome> tags

BeatUnit bases

BeatUnit read/write properties

Read/write properties inherited from XMLNode:

  • tag

BeatUnit methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

BeatUnitDot

class music21.musicxml.mxObjects.BeatUnitDot

Part of <metronome> tags

BeatUnitDot bases

BeatUnitDot read/write properties

Read/write properties inherited from XMLNode:

  • tag

BeatUnitDot methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Beats

class music21.musicxml.mxObjects.Beats(charData=None)

Beats bases

Beats read/write properties

Read/write properties inherited from XMLNode:

  • tag

Beats methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Bracket

class music21.musicxml.mxObjects.Bracket(type=None)
>>> b = musicxml.mxObjects.Bracket()
>>> b.tag
'bracket'

Bracket bases

Bracket read/write properties

Read/write properties inherited from XMLNode:

  • tag

Bracket methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Clef

class music21.musicxml.mxObjects.Clef

Clef bases

Clef read/write properties

Read/write properties inherited from XMLNode:

  • tag

Clef methods

Clef.setDefaults()

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • toxml()
  • xmlStr()

Coda

class music21.musicxml.mxObjects.Coda(type=None)

Coda bases

Coda read/write properties

Read/write properties inherited from XMLNode:

  • tag

Coda methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Creator

class music21.musicxml.mxObjects.Creator

Creator bases

Creator read/write properties

Read/write properties inherited from XMLNode:

  • tag

Creator methods

Creator.setDefaults()

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • toxml()
  • xmlStr()

Credit

class music21.musicxml.mxObjects.Credit

The credit tag stores on or more credit-words tags, defining text positioned on a page.

Credit bases

Credit read/write properties

Read/write properties inherited from XMLNode:

  • tag

Credit methods

Credit.setDefaults()

Methods inherited from MusicXMLElementList:

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • toxml()
  • xmlStr()

CreditWords

class music21.musicxml.mxObjects.CreditWords(charData=None)

CreditWords bases

CreditWords read/write properties

Read/write properties inherited from XMLNode:

  • tag

CreditWords methods

CreditWords.setDefaults()

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • toxml()
  • xmlStr()

Dashes

class music21.musicxml.mxObjects.Dashes(type=None)
>>> d = musicxml.mxObjects.Dashes()
>>> d.tag
'dashes'

Dashes bases

Dashes read/write properties

Read/write properties inherited from XMLNode:

  • tag

Dashes methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Defaults

class music21.musicxml.mxObjects.Defaults

Defaults bases

Defaults read/write properties

Read/write properties inherited from XMLNode:

  • tag

Defaults methods

Methods inherited from MusicXMLElementList:

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Degree

class music21.musicxml.mxObjects.Degree

The degree type is used to add, alter, or subtract individual notes in the chord.

Degree bases

Degree read/write properties

Read/write properties inherited from XMLNode:

  • tag

Degree methods

Methods inherited from MusicXMLElementList:

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

DegreeAlter

class music21.musicxml.mxObjects.DegreeAlter

Chromatic alteration of current degree

DegreeAlter bases

DegreeAlter read/write properties

Read/write properties inherited from XMLNode:

  • tag

DegreeAlter methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

DegreeType

class music21.musicxml.mxObjects.DegreeType

addition, alteration, subtraction relative to the kind of current chord

DegreeType bases

DegreeType read/write properties

Read/write properties inherited from XMLNode:

  • tag

DegreeType methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

DegreeValue

class music21.musicxml.mxObjects.DegreeValue

Stores 1 for root, 3 for third, etc

DegreeValue bases

DegreeValue read/write properties

Read/write properties inherited from XMLNode:

  • tag

DegreeValue methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

DelayedTurn

class music21.musicxml.mxObjects.DelayedTurn(type=None)

DelayedTurn bases

DelayedTurn read/write properties

Read/write properties inherited from XMLNode:

  • tag

DelayedTurn methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Direction

class music21.musicxml.mxObjects.Direction

One or more Direction objects are found in measures, after an attributes object. Within the Direction object may be a number of objects, including DirectionType, Sound.

Direction bases

Direction read/write properties

Read/write properties inherited from XMLNode:

  • tag

Direction methods

Direction.getBracket()

Search this direction and determine if it contains a segno mark.

>>> a = musicxml.mxObjects.Direction()
>>> b = musicxml.mxObjects.DirectionType()
>>> c = musicxml.mxObjects.Bracket()
>>> b.append(c)
>>> a.append(b)
>>> a.getBracket() is not None
True
Direction.getCoda()

Search this direction and determine if it contains a coda mark.

>>> a = musicxml.mxObjects.Direction()
>>> b = musicxml.mxObjects.DirectionType()
>>> c = musicxml.mxObjects.Coda()
>>> b.append(c)
>>> a.append(b)
>>> a.getCoda() is not None
True
Direction.getDashes()

Search this direction and determine if it contains a segno mark.

>>> a = musicxml.mxObjects.Direction()
>>> b = musicxml.mxObjects.DirectionType()
>>> c = musicxml.mxObjects.Dashes()
>>> b.append(c)
>>> a.append(b)
>>> a.getDashes() is not None
True
Direction.getDynamicMark()

Search this direction and determine if it contains a dynamic mark, return, otherwise, return None

>>> a = musicxml.mxObjects.Direction()
>>> b = musicxml.mxObjects.DirectionType()
>>> c = musicxml.mxObjects.Dynamics()
>>> d = musicxml.mxObjects.DynamicMark('f')
>>> c.append(d)
>>> b.append(c)
>>> a.append(b)
>>> a.getDynamicMark() is not None
True
Direction.getMetronome()

Search this direction and determine if it contains a dynamic mark.

>>> a = musicxml.mxObjects.Direction()
>>> b = musicxml.mxObjects.DirectionType()
>>> c = musicxml.mxObjects.Metronome()
>>> b.append(c)
>>> a.append(b)
>>> a.getMetronome() is not None
True
Direction.getSegno()

Search this direction and determine if it contains a segno mark.

>>> a = musicxml.mxObjects.Direction()
>>> b = musicxml.mxObjects.DirectionType()
>>> c = musicxml.mxObjects.Segno()
>>> b.append(c)
>>> a.append(b)
>>> a.getSegno() is not None
True
Direction.getWedge()

Search this direction and determine if it contains a dynamic mark.

>>> a = musicxml.mxObjects.Direction()
>>> b = musicxml.mxObjects.DirectionType()
>>> c = musicxml.mxObjects.Wedge('crescendo')
>>> b.append(c)
>>> a.append(b)
>>> a.getWedge() is not None
True
Direction.getWords()

Search this direction and determine if it contains a Words entity.

>>> a = musicxml.mxObjects.Direction()
>>> b = musicxml.mxObjects.DirectionType()
>>> c = musicxml.mxObjects.Words('crescendo')
>>> b.append(c)
>>> a.append(b)
>>> a.getWords() == [c]
True
>>> a.getWords()[0].charData
'crescendo'

Methods inherited from MusicXMLElementList:

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

DirectionType

class music21.musicxml.mxObjects.DirectionType

DirectionType stores objects like Pedal, dynamics, wedge, and words

DirectionType bases

DirectionType read/write properties

Read/write properties inherited from XMLNode:

  • tag

DirectionType methods

Methods inherited from MusicXMLElementList:

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

DisplayOctave

class music21.musicxml.mxObjects.DisplayOctave(type=None)

DisplayOctave bases

DisplayOctave read/write properties

Read/write properties inherited from XMLNode:

  • tag

DisplayOctave methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

DisplayStep

class music21.musicxml.mxObjects.DisplayStep(type=None)

DisplayStep bases

DisplayStep read/write properties

Read/write properties inherited from XMLNode:

  • tag

DisplayStep methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Dot

class music21.musicxml.mxObjects.Dot(type=None)

Dot bases

Dot read/write properties

Read/write properties inherited from XMLNode:

  • tag

Dot methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

DynamicMark

class music21.musicxml.mxObjects.DynamicMark(tag)

This is not an XML object in the normal sense, but a container for all XML dynamic tags. Dynamic tags have no attributes or elements. Tags inlcude common marks such as p, pp, ff, etc.

DynamicMark bases

DynamicMark read/write properties

Read/write properties inherited from XMLNode:

  • tag

DynamicMark methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Dynamics

class music21.musicxml.mxObjects.Dynamics(type=None)

Dynamics bases

Dynamics read/write properties

Read/write properties inherited from XMLNode:

  • tag

Dynamics methods

Methods inherited from MusicXMLElementList:

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Encoding

class music21.musicxml.mxObjects.Encoding

Encoding bases

Encoding read/write properties

Read/write properties inherited from XMLNode:

  • tag

Encoding methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Ending

class music21.musicxml.mxObjects.Ending

Ending tags are stored in Barline tags to indicate the start ane end of a repeat bracket, used to designate an alternate repeat.

Ending bases

Ending read/write properties

Read/write properties inherited from XMLNode:

  • tag

Ending methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Fermata

class music21.musicxml.mxObjects.Fermata(type=None)

Fermata bases

Fermata read/write properties

Read/write properties inherited from XMLNode:

  • tag

Fermata methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Forward

class music21.musicxml.mxObjects.Forward(type=None)

Forward bases

Forward read/write properties

Read/write properties inherited from XMLNode:

  • tag

Forward methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Glissando

class music21.musicxml.mxObjects.Glissando(type=None)
>>> g = musicxml.mxObjects.Glissando()
>>> g.tag
'glissando'

Glissando bases

Glissando read/write properties

Read/write properties inherited from XMLNode:

  • tag

Glissando methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Grace

class music21.musicxml.mxObjects.Grace(type=None)

Grace bases

Grace read/write properties

Read/write properties inherited from XMLNode:

  • tag

Grace methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Harmony

class music21.musicxml.mxObjects.Harmony

A harmony tag stores a root, kind – eventually becomes converted to a music21 ChordSymbol object (not Harmony; though ChordSymbol is a subclass of the music21 object called Harmony, which also deals with Figured bass and Roman Numerals.

Harmony bases

Harmony read/write properties

Read/write properties inherited from XMLNode:

  • tag

Harmony methods

Methods inherited from MusicXMLElementList:

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Identification

class music21.musicxml.mxObjects.Identification

Identification bases

Identification read/write properties

Read/write properties inherited from XMLNode:

  • tag

Identification methods

Identification.setDefaults()

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • toxml()
  • xmlStr()

InvertedMordent

class music21.musicxml.mxObjects.InvertedMordent(type=None)

InvertedMordent bases

InvertedMordent read/write properties

Read/write properties inherited from XMLNode:

  • tag

InvertedMordent methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

InvertedTurn

class music21.musicxml.mxObjects.InvertedTurn(type=None)

InvertedTurn bases

InvertedTurn read/write properties

Read/write properties inherited from XMLNode:

  • tag

InvertedTurn methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Key

class music21.musicxml.mxObjects.Key

Key bases

Key read/write properties

Read/write properties inherited from XMLNode:

  • tag

Key methods

Key.setDefaults()

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • toxml()
  • xmlStr()

KeyAlter

class music21.musicxml.mxObjects.KeyAlter

KeyAlter bases

KeyAlter read/write properties

Read/write properties inherited from XMLNode:

  • tag

KeyAlter methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

KeyOctave

class music21.musicxml.mxObjects.KeyOctave

KeyOctave bases

KeyOctave read/write properties

Read/write properties inherited from XMLNode:

  • tag

KeyOctave methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

KeyStep

class music21.musicxml.mxObjects.KeyStep

KeyStep bases

KeyStep read/write properties

Read/write properties inherited from XMLNode:

  • tag

KeyStep methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Kind

class music21.musicxml.mxObjects.Kind

A harmony tag stores a root, kind

Kind bases

Kind read/write properties

Read/write properties inherited from XMLNode:

  • tag

Kind methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Lyric

class music21.musicxml.mxObjects.Lyric(number=None)

Multiple Lyric objects can be defined within a single Note.

Lyric bases

Lyric read/write properties

Read/write properties inherited from XMLNode:

  • tag

Lyric methods

Lyric.filterLyric(text)

Remove and fix character strings that cause problems in MusicXML

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

MIDIInstrument

class music21.musicxml.mxObjects.MIDIInstrument

MIDIInstrument bases

MIDIInstrument read/write properties

Read/write properties inherited from XMLNode:

  • tag

MIDIInstrument methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Measure

class music21.musicxml.mxObjects.Measure

Measure bases

Measure read/write properties

Read/write properties inherited from XMLNode:

  • tag

Measure methods

Measure.getVoiceCount()

Return the number of voices defined in this Measure; this must be called after update().

Measure.getVoiceIndices()

Return a list of unique sorted voice ids.

Measure.setDefaults()
Measure.update()

This method looks at all note, forward, and backup objects and updates divisons and attributes references

Methods inherited from MusicXMLElementList:

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • toxml()
  • xmlStr()

MeasureStyle

class music21.musicxml.mxObjects.MeasureStyle

MeasureStyle bases

MeasureStyle read/write properties

Read/write properties inherited from XMLNode:

  • tag

MeasureStyle methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Metronome

class music21.musicxml.mxObjects.Metronome(charData=None)

A direction type used to store tempo indications, consisting of a <beat-unit> tag (a duration) as well as a <per-unit> tag (a number). Also used to store metric modulations.

>>> m = musicxml.mxObjects.Metronome()
>>> bu1 = musicxml.mxObjects.BeatUnit('half')
>>> m.append(bu1)
>>> m.isMetricModulation()
False

Metronome bases

Metronome read/write properties

Read/write properties inherited from XMLNode:

  • tag

Metronome methods

Metronome.isMetricModulation()

Return True if this Metronome defines a metric modulation. If there are more than on <beat-unit> tag, than this is True

>>> m = musicxml.mxObjects.Metronome()
>>> bu1 = musicxml.mxObjects.BeatUnit('half')
>>> bu2 = musicxml.mxObjects.BeatUnit('quarter')
>>> m.append(bu1)
>>> m.append(bu2)
>>> m.isMetricModulation()
True

Methods inherited from MusicXMLElementList:

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Mordent

class music21.musicxml.mxObjects.Mordent(type=None)

Mordent bases

Mordent read/write properties

Read/write properties inherited from XMLNode:

  • tag

Mordent methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

MusicXMLElement

class music21.musicxml.mxObjects.MusicXMLElement

MusicXML elements are an abstraction of MusicXML into an object oriented framework. Some, not all, of MusicXML elements are represented as objects. Some sub-elements are much more simply placed as attributes of parent objects. These simple elements have only a tag and character data. Elements that have attributes and/or sub-elements, however, must be represented as objects.

MusicXMLElement bases

  • XMLNode

MusicXMLElement read/write properties

Read/write properties inherited from XMLNode:

  • tag

MusicXMLElement methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

MusicXMLElementList

class music21.musicxml.mxObjects.MusicXMLElementList
MusicXML that is designed to function as a list. In general,
this is an element this only used to contain other Elements. List operations permit easy access and manipuation.

Note that design here mirrors that of node.py NodeList, but this needs to be a subclass of of MusicXMLElement

MusicXMLElementList bases

MusicXMLElementList read/write properties

Read/write properties inherited from XMLNode:

  • tag

MusicXMLElementList methods

MusicXMLElementList.append(item)
MusicXMLElementList.insert(position, item)

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Notations

class music21.musicxml.mxObjects.Notations(type=None)

Notations contains many elements, including Ornaments. Most of these are stored in the .componentList

Notations bases

Notations read/write properties

Read/write properties inherited from XMLNode:

  • tag

Notations methods

Notations.getArticulations()

A quick way to get all articulations objects; there may be more than one.

Returns a list of ArticulationMark objects

Notations.getFermatas()

Get all Fermatas from the componentList as a list

Notations.getGlissandi()

Get all glissandi objects stored on components. There can be more than one.

>>> g1 = musicxml.mxObjects.Glissando()
>>> g2 = musicxml.mxObjects.Glissando()
>>> n = musicxml.mxObjects.Notations()
>>> n.append(g1)
>>> n.append(g2)
>>> n.getGlissandi()
[<glissando >, <glissando >]
Notations.getOrnaments()

Get all ornament objects stored on componentList. There can be more than one.

Notations.getSlurs()

Get all Slurs from the componentList as a list

Notations.getTechnical()

A quick way to get all technical objects; there may be more than one.

Returns a list of TechnicalMark objects

Notations.getTieds()

A quick way to get all tied objects; there is likely only one, but we return a list anyhow.

Notations.getTremolos()

Get one or more tremolo line objects Stored in Ornaments

>>> t = musicxml.mxObjects.Tremolo()
>>> o = musicxml.mxObjects.Ornaments()
>>> n = musicxml.mxObjects.Notations()
>>> o.append(t)
>>> n.append(o)
>>> n.getTremolos()
[<tremolo >]
Notations.getTuplets()

A quick way to get all tuplets; there is likely only one, but we return a list anyhow.

Notations.getWavyLines()

Get one or more wavy line objects Stored in Ornaments

>>> wl = musicxml.mxObjects.WavyLine()
>>> o = musicxml.mxObjects.Ornaments()
>>> n = musicxml.mxObjects.Notations()
>>> o.append(wl)
>>> n.append(o)
>>> n.getWavyLines()
[<wavy-line >]

Methods inherited from MusicXMLElementList:

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Note

class music21.musicxml.mxObjects.Note

Note bases

Note read/write properties

Read/write properties inherited from XMLNode:

  • tag

Note methods

Note.setDefaults()

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • toxml()
  • xmlStr()

Notehead

class music21.musicxml.mxObjects.Notehead(type=None)

Notehead bases

Notehead read/write properties

Read/write properties inherited from XMLNode:

  • tag

Notehead methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

OctaveShift

class music21.musicxml.mxObjects.OctaveShift(type=None)
>>> os = musicxml.mxObjects.OctaveShift()
>>> os.tag
'octave-shift'

OctaveShift bases

OctaveShift read/write properties

Read/write properties inherited from XMLNode:

  • tag

OctaveShift methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Offset

class music21.musicxml.mxObjects.Offset(charData=None)

A musicxml <offset> element can be found defined in the <direction> element. the charData stores a number that is the shift in divisions from the location of the tag.

Offset bases

Offset read/write properties

Read/write properties inherited from XMLNode:

  • tag

Offset methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Ornaments

class music21.musicxml.mxObjects.Ornaments(type=None)

The Ornaments tag wraps the following musicxml entities: trill-mark, turn, delayed-turn, inverted-turn, shake, wavy-line, mordent, inverted mordent, schleifer, tremolo, other-ornament.

Ornaments are stored on the notations object.

Ornaments bases

Ornaments read/write properties

Read/write properties inherited from XMLNode:

  • tag

Ornaments methods

Methods inherited from MusicXMLElementList:

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

PageLayout

class music21.musicxml.mxObjects.PageLayout

PageLayout bases

PageLayout read/write properties

Read/write properties inherited from XMLNode:

  • tag

PageLayout methods

Methods inherited from MusicXMLElementList:

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

PageMargins

class music21.musicxml.mxObjects.PageMargins

PageMargins bases

PageMargins read/write properties

Read/write properties inherited from XMLNode:

  • tag

PageMargins methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Part

class music21.musicxml.mxObjects.Part

This assumes a part-wise part

Part bases

Part read/write properties

Read/write properties inherited from XMLNode:

  • tag

Part methods

Part.getStavesCount()

Look ahead into the measure Attributes and return the highest number of staves used in this part.

Part.setDefaults()

Methods inherited from MusicXMLElementList:

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • toxml()
  • xmlStr()

PartGroup

class music21.musicxml.mxObjects.PartGroup

The PartGroup tag is stored in the PartList, intermingled with ScorePart tags and other definitions.

PartGroup bases

PartGroup read/write properties

Read/write properties inherited from XMLNode:

  • tag

PartGroup methods

PartGroup.setDefaults()

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • toxml()
  • xmlStr()

PartList

class music21.musicxml.mxObjects.PartList

The PartList defines the parts, as well as their names and abbreviations.

It stores the parts in its .componentList list in order.

Additionally, the order of this list is used as a way specifying arrangements of brackets and/or braces that group parts in partGroup objects.

The order of this list thus matters.

The PartList for a score is usually accessed from the Score (musicxml.Score) object’s .partListObj parameter.

PartList bases

PartList read/write properties

Read/write properties inherited from XMLNode:

  • tag

PartList methods

Methods inherited from MusicXMLElementList:

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

PerMinute

class music21.musicxml.mxObjects.PerMinute(charData=None)

Part of <metronome> tags

PerMinute bases

PerMinute read/write properties

Read/write properties inherited from XMLNode:

  • tag

PerMinute methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Pitch

class music21.musicxml.mxObjects.Pitch

Pitch bases

Pitch read/write properties

Read/write properties inherited from XMLNode:

  • tag

Pitch methods

Pitch.setDefaults()

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • toxml()
  • xmlStr()

Print

class music21.musicxml.mxObjects.Print

Print bases

Print read/write properties

Read/write properties inherited from XMLNode:

  • tag

Print methods

Methods inherited from MusicXMLElementList:

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Repeat

class music21.musicxml.mxObjects.Repeat

Repeat bases

Repeat read/write properties

Read/write properties inherited from XMLNode:

  • tag

Repeat methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Rest

class music21.musicxml.mxObjects.Rest(type=None)

Rest bases

Rest read/write properties

Read/write properties inherited from XMLNode:

  • tag

Rest methods

Rest.setDefaults()

Methods inherited from MusicXMLElementList:

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • toxml()
  • xmlStr()

Root

class music21.musicxml.mxObjects.Root

A root defines a pitch, with a step and an alter

Root bases

Root read/write properties

Read/write properties inherited from XMLNode:

  • tag

Root methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Scaling

class music21.musicxml.mxObjects.Scaling

Scaling bases

Scaling read/write properties

Read/write properties inherited from XMLNode:

  • tag

Scaling methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Schleifer

class music21.musicxml.mxObjects.Schleifer(type=None)

Schleifer bases

Schleifer read/write properties

Read/write properties inherited from XMLNode:

  • tag

Schleifer methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Score

class music21.musicxml.mxObjects.Score(m21Version=None)

Score is used to collect score header elements and, if available, all other MusicXML data. Score can be used for partwise or timewise scores. This object includes all MusicXML score information.

Score bases

Score read/write properties

Read/write properties inherited from XMLNode:

  • tag

Score methods

Score.getPart(partId)

Get a part, given an id.

>>> from music21.musicxml import testPrimitive
>>> from music21.musicxml import xmlHandler
>>> b = xmlHandler.Document()
>>> b.read(testPrimitive.ALL[0])
>>> spIdList = sorted(list(b.score.partIdToNameDict().keys()))
>>> c = b.score.getPart(spIdList[0])
>>> c
<part id=P1 <measure number=1 width=983 <print <system-layout...
>>> isinstance(c, musicxml.mxObjects.Part)
True
>>> isinstance(c, stream.Part)
False
Score.getPartGroupData()

Get part groups organized by part id in dictionaries.

Returns a list of dictionaries, each dictionary containing number, a list of part ids, and a mx PartGroup object.

Score.getPartIds()

A quick way to get all valid part ids in the componentList

Score.getPartIdsFromPartListObj()

A quick way to get all valid part ids in the partListObj for each one that is a ScorePart

Score.getScorePart(partId)

Get an instrument, as defined in a ScorePart object, from a Score.

>>> a = musicxml.mxObjects.Score()
>>> a.setDefaults()
>>> a.getScorePart('P3') == None
True
>>> from music21.musicxml import testPrimitive
>>> from music21.musicxml import xmlHandler
>>> b = xmlHandler.Document()
>>> b.read(testPrimitive.pitches01a)
>>> spIdList = sorted(list(b.score.partIdToNameDict().keys()))
>>> b.score.getScorePart(spIdList[0])
<score-part id=P1 part-name=MusicXML Part>
Score.partIdToNameDict()

A quick way to get a mapping of valid part ids to the part names from a Score (musicxml.Score) object in the .partListObj property.

Returns a dictionary mapping part id to part-name for each ScorePart in .partListObj.

Note that dictionaries are not sorted, so the order of .partListObj still needs to be used.

Score.setDefaults()

Methods inherited from MusicXMLElementList:

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • toxml()
  • xmlStr()

ScoreInstrument

class music21.musicxml.mxObjects.ScoreInstrument

ScoreInstrument bases

ScoreInstrument read/write properties

Read/write properties inherited from XMLNode:

  • tag

ScoreInstrument methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

ScorePart

class music21.musicxml.mxObjects.ScorePart

Lives in a PartList

ScorePart bases

ScorePart read/write properties

Read/write properties inherited from XMLNode:

  • tag

ScorePart methods

ScorePart.setDefaults()

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • toxml()
  • xmlStr()

Segno

class music21.musicxml.mxObjects.Segno(type=None)

Segno bases

Segno read/write properties

Read/write properties inherited from XMLNode:

  • tag

Segno methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Shake

class music21.musicxml.mxObjects.Shake(type=None)

Shake bases

Shake read/write properties

Read/write properties inherited from XMLNode:

  • tag

Shake methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Slur

class music21.musicxml.mxObjects.Slur

Slur bases

Slur read/write properties

Read/write properties inherited from XMLNode:

  • tag

Slur methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Software

class music21.musicxml.mxObjects.Software

Defines the Software that created this MusicXML document.

Software bases

Software read/write properties

Read/write properties inherited from XMLNode:

  • tag

Software methods

Software.setDefaults()

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • toxml()
  • xmlStr()

Sound

class music21.musicxml.mxObjects.Sound(charData=None)

A direction type used to store a large variety of performance indications.

These tags seem to be found most often in <direction> tags, usually following a symbolic definition. For example, MetronomeMark definitions are often followed by a <sound> definition.

Other <sound> tags are found after the <attributes> tag in a measure, often defining tempo.

Sound bases

Sound read/write properties

Read/write properties inherited from XMLNode:

  • tag

Sound methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

StaffDetails

class music21.musicxml.mxObjects.StaffDetails

StaffDetails bases

StaffDetails read/write properties

Read/write properties inherited from XMLNode:

  • tag

StaffDetails methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

StaffLayout

class music21.musicxml.mxObjects.StaffLayout

StaffLayout bases

StaffLayout read/write properties

Read/write properties inherited from XMLNode:

  • tag

StaffLayout methods

Methods inherited from MusicXMLElementList:

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Supports

class music21.musicxml.mxObjects.Supports

Defines what sorts of notation this encoding supports

Supports bases

Supports read/write properties

Read/write properties inherited from XMLNode:

  • tag

Supports methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

SystemLayout

class music21.musicxml.mxObjects.SystemLayout

SystemLayout bases

SystemLayout read/write properties

Read/write properties inherited from XMLNode:

  • tag

SystemLayout methods

Methods inherited from MusicXMLElementList:

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

SystemMargins

class music21.musicxml.mxObjects.SystemMargins

SystemMargins bases

SystemMargins read/write properties

Read/write properties inherited from XMLNode:

  • tag

SystemMargins methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Tag

class music21.musicxml.mxObjects.Tag(tag, cdFlag=False, className=None)

Object to store tags as encountered by SAX. Tags can be open or closed based on the status attribute. Tags can store character data collected between their defined tags.

These objects are used only for finding and collecting tag attributes and elements. As we do not need character data for all tags, tags have an optional flag to select if the are to collect character data.

Tag methods

Tag.clear()
Tag.end()
Tag.start()

TagLib

class music21.musicxml.mxObjects.TagLib

An object to store all MusicXML tags as Tag objects. Tag objects are used just to identify tags, store element contents and status in SAX parsing.

With this design some tags (called simple elements) can be used simply in SAX parsing as structural monitors, but not be instantiated as objects for content delivery.

TagLib methods

TagLib.audit()

A way to check for errors in SAX parsing. Assumes that all start() calls have been paired with an end() call, and that all element data has been cleared.

TagLib.getClassName(key)

Get the class or name, or None if none defined.

>>> tl = musicxml.mxObjects.TagLib()
>>> tl.getClassName('voice')
TagLib.keys()
TagLib.statClear()
TagLib.statRun()

Technical

class music21.musicxml.mxObjects.Technical(type=None)

Class for the <technical> musicxml mark which contains things like <up-bow> etc. objects

Technical bases

Technical read/write properties

Read/write properties inherited from XMLNode:

  • tag

Technical methods

Methods inherited from MusicXMLElementList:

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

TechnicalMark

class music21.musicxml.mxObjects.TechnicalMark(tag)

This is not an XML object, but a container for all XML technical tags.

TechnicalMark bases

TechnicalMark read/write properties

Read/write properties inherited from XMLNode:

  • tag

TechnicalMark methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Tie

class music21.musicxml.mxObjects.Tie(type=None)

Tie bases

Tie read/write properties

Read/write properties inherited from XMLNode:

  • tag

Tie methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Tied

class music21.musicxml.mxObjects.Tied

Tied bases

Tied read/write properties

Read/write properties inherited from XMLNode:

  • tag

Tied methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Time

class music21.musicxml.mxObjects.Time

Time bases

Time read/write properties

Read/write properties inherited from XMLNode:

  • tag

Time methods

Time.setDefaults()

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • toxml()
  • xmlStr()

TimeModification

class music21.musicxml.mxObjects.TimeModification

TimeModification bases

TimeModification read/write properties

Read/write properties inherited from XMLNode:

  • tag

TimeModification methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Transpose

class music21.musicxml.mxObjects.Transpose

Transpose bases

Transpose read/write properties

Read/write properties inherited from XMLNode:

  • tag

Transpose methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Tremolo

class music21.musicxml.mxObjects.Tremolo(type=None)

Tremolo may or may not extend over multiple notes. Char data may store integer number.

Tremolo bases

Tremolo read/write properties

Read/write properties inherited from XMLNode:

  • tag

Tremolo methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

TrillMark

class music21.musicxml.mxObjects.TrillMark(type=None)

TrillMark bases

TrillMark read/write properties

Read/write properties inherited from XMLNode:

  • tag

TrillMark methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Tuplet

class music21.musicxml.mxObjects.Tuplet

Stored in notations object and governs presentation and bracket.

Tuplet bases

Tuplet read/write properties

Read/write properties inherited from XMLNode:

  • tag

Tuplet methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Turn

class music21.musicxml.mxObjects.Turn(type=None)

Turn bases

Turn read/write properties

Read/write properties inherited from XMLNode:

  • tag

Turn methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

WavyLine

class music21.musicxml.mxObjects.WavyLine(type=None)

A wavy line that extends across many notes or measures.

>>> wl = musicxml.mxObjects.WavyLine()
>>> wl.tag
'wavy-line'

WavyLine bases

WavyLine read/write properties

Read/write properties inherited from XMLNode:

  • tag

WavyLine methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Wedge

class music21.musicxml.mxObjects.Wedge(type=None)
>>> w = musicxml.mxObjects.Wedge()
>>> w.tag
'wedge'

Wedge bases

Wedge read/write properties

Read/write properties inherited from XMLNode:

  • tag

Wedge methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Words

class music21.musicxml.mxObjects.Words(charData=None)

A direction type that can be used for arbitrary text expressions, and font formatting

Words bases

Words read/write properties

Read/write properties inherited from XMLNode:

  • tag

Words methods

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • setDefaults()
  • toxml()
  • xmlStr()

Work

class music21.musicxml.mxObjects.Work

Work bases

Work read/write properties

Read/write properties inherited from XMLNode:

  • tag

Work methods

Work.setDefaults()

Methods inherited from XMLNode:

  • get()
  • getNewDoc()
  • hasAttrs()
  • loadAttrs()
  • merge()
  • set()
  • toxml()
  • xmlStr()