Table Of Contents

Previous topic

music21.duration

Next topic

music21.editorial

This Page

music21.dynamics

music21.dynamics.unitIntervalToName(n)
Given a unit interval value, map to a dynamic name.

Dynamic

class music21.dynamics.Dynamic(value=None)

Object representation of Dyanmics.

inherits from: Music21Object

Dynamic attributes

Attributes without Documentation: posPlacement, value, posRelativeY, posDefaultX, posDefaultY, longName, posRelativeX, englishName

Attributes inherited from Music21Object: id, groups

Dynamic properties

musicxml
Provide a complete MusicXML representation.
mx

returns a musicxml.Direction object

>>> a = Dynamic('ppp')
>>> a.posRelativeY = -10
>>> b = a.mx
>>> b[0][0][0].get('tag')
'ppp'
>>> b.get('placement')
'below'

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

Dynamic methods

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

Wedge

class music21.dynamics.Wedge(value=None)

Object model of crescendeo/decrescendo wedges.

inherits from: Music21Object

Wedge attributes

Attributes without Documentation: posPlacement, spread, type

Attributes inherited from Music21Object: id, groups

Wedge properties

mx

returns a musicxml.Direction object

>>> a = Wedge()
>>> a.type = 'crescendo'
>>> mxDirection = a.mx
>>> mxWedge = mxDirection.getWedge()
>>> mxWedge.get('type')
'crescendo'

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

Wedge methods

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