Table Of Contents

Previous topic

music21.serial

Next topic

music21.tinyNotation

This Page

music21.tempo

This module defines objects for describing tempo and changes in tempo.

TempoMark

Inherits from: Music21Object

class music21.tempo.TempoMark(value=None)
>>> tm = TempoMark("adagio")
>>> tm.value
'adagio'

TempoMark attributes

classSortOrder

Property which returns an number (int or otherwise) depending on the class of the Music21Object that represents a priority for an object based on its class alone – used as a tie for stream sorting in case two objects have the same offset and priority. Lower numbers are sorted to the left of higher numbers. For instance, Clef, KeySignature, TimeSignature all come (in that order) before Note. All undefined classes have classSortOrder of 20 – same as note.Note

>>> from music21 import *
>>> tc = clef.TrebleClef()
>>> tc.classSortOrder
0
>>> ks = key.KeySignature(3)
>>> ks.classSortOrder
1
New classes can define their own default classSortOrder
>>> class ExampleClass(base.Music21Object):
...     classSortOrderDefault = 5
...
>>> ec1 = ExampleClass()
>>> ec1.classSortOrder
5

Attributes without Documentation: value

Attributes inherited from Music21Object: id, groups

TempoMark properties

Properties inherited from Music21Object: classes, duration, offset, parent, priority

TempoMark methods

Methods inherited from Music21Object: searchParentByAttr(), getContextAttr(), setContextAttr(), addContext(), addLocation(), addLocationAndParent(), freezeIds(), getContextByClass(), getOffsetBySite(), getSiteIds(), getSites(), hasContext(), isClass(), purgeLocations(), removeLocationBySite(), removeLocationBySiteId(), setOffsetBySite(), show(), unfreezeIds(), unwrapWeakref(), wrapWeakref(), write()

MetronomeMark

Inherits from: TempoMark, Music21Object

class music21.tempo.MetronomeMark(number=60, referent=None)
>>> a = MetronomeMark(40)
>>> a.number
40

MetronomeMark attributes

Attributes without Documentation: number, referent

Attributes inherited from TempoMark: classSortOrder, value

Attributes inherited from Music21Object: id, groups

MetronomeMark properties

Properties inherited from Music21Object: classes, duration, offset, parent, priority

MetronomeMark methods

Methods inherited from Music21Object: searchParentByAttr(), getContextAttr(), setContextAttr(), addContext(), addLocation(), addLocationAndParent(), freezeIds(), getContextByClass(), getOffsetBySite(), getSiteIds(), getSites(), hasContext(), isClass(), purgeLocations(), removeLocationBySite(), removeLocationBySiteId(), setOffsetBySite(), show(), unfreezeIds(), unwrapWeakref(), wrapWeakref(), write()