music21.articulations

Classes for representing and processing articulations. Specific articulations are modeled as Articulation subclasses.

A Note object has a articulations attribute. This list can be used to store one or more music21.articulation.Articulation subclasses.

As much as possible, MusicXML names are used for Articulation classes, with xxx-yyy changed to XxxYyy. For instance, “strong-accent” in MusicXML is “StrongAccent” here.

Fingering and other playing marks are found here. Fermatas, trills, etc. are found in music21.expressions.

>>> n1 = note.Note("D#4")
>>> n1.articulations.append(articulations.Tenuto())
>>> n1.show()
>>> c1 = chord.Chord(["C3", "G4", "E-5"])
>>> c1.articulations = [articulations.OrganHeel(), articulations.Accent()]
>>> c1.show()

A longer test showing the utility of the module:

>>> s = stream.Stream()
>>> n1 = note.Note('c#5')
>>> n1.articulations = [articulations.Accent()]
>>> n1.quarterLength = 1.25
>>> s.append(n1)
>>> n2 = note.Note('d5')
>>> n2.articulations = [articulations.StrongAccent()]
>>> n2.quarterLength = 0.75
>>> s.append(n2)
>>> n3 = note.Note('b4')
>>> n3.articulations = [articulations.Staccato()]
>>> n3.quarterLength = 1.25
>>> n3.tie = tie.Tie('start')
>>> s.append(n3)
>>> n4 = note.Note('b4')
>>> n4.articulations = [articulations.Staccatissimo()]
>>> n4.quarterLength = 0.75
>>> s.append(n4)
>>> n5 = note.Note('a4')
>>> n5.articulations = [articulations.Tenuto()]
>>> n5.quarterLength = 1.3333333333333
>>> s.append(n5)
>>> n6 = note.Note('b-4')
>>> n6.articulations = [articulations.Staccatissimo(), articulations.Tenuto()]
>>> n6.quarterLength = 0.6666666666667
>>> s.append(n6)
>>> s.metadata = metadata.Metadata()
>>> s.metadata.title = 'Prova articolazioni' # ital: "Articulation Test"
>>> s.metadata.composer = 'Giuliano Lancioni'
>>> s.show()
../_images/prova_articolazioni.png

Articulation

class music21.articulations.Articulation

Base class for all Articulation sub-classes.

>>> x = articulations.Articulation()
>>> x.placement = 'below'
>>> x.style.absoluteY = 20

Articulation bases

Articulation read-only properties

Articulation.name

returns the name of the articulation, which is generally the class name without the leading letter lowercase.

Subclasses can override this as necessary.

>>> st = articulations.Staccato()
>>> st.name
'staccato'
>>> sp = articulations.SnapPizzicato()
>>> sp.name
'snap pizzicato'

Read-only properties inherited from Music21Object:

Articulation read/write properties

Articulation.volumeShift

Get or set the volumeShift of this Articulation. This value, between -1 and 1, that is used to shift the final Volume of the object it is attached to.

>>> at1 = articulations.StrongAccent()
>>> at1.volumeShift > .1
True

Read/write properties inherited from Music21Object:

Articulation methods

Methods inherited from Music21Object:

Articulation instance variables

Instance variables inherited from Music21Object:

Fingering

class music21.articulations.Fingering(fingerNumber=None)

Fingering is a technical indication that covers the fingering of a note (in a guitar/fret context, this covers the fret finger, see FrettedPluck for that).

Converts the MusicXML – <fingering> object

>>> f = articulations.Fingering(5)
>>> f
<music21.articulations.Fingering 5>
>>> f.fingerNumber
5

.substitution indicates that this fingering indicates a substitute fingering:

>>> f.substitution = True

MusicXML distinguishes between a substitution and an alternate fingering:

>>> f.alternate = True

Fingering bases

Fingering read-only properties

Read-only properties inherited from Articulation:

Read-only properties inherited from Music21Object:

Fingering read/write properties

Read/write properties inherited from Articulation:

Read/write properties inherited from Music21Object:

Fingering methods

Methods inherited from Music21Object:

Fingering instance variables

Instance variables inherited from Music21Object:

Pizzicato

class music21.articulations.Pizzicato

in MusicXML, Pizzicato is an element of every note. Here we represent pizzes along with all bowing marks.

Pizzicato bases

Pizzicato read-only properties

Read-only properties inherited from Articulation:

Read-only properties inherited from Music21Object:

Pizzicato read/write properties

Read/write properties inherited from Articulation:

Read/write properties inherited from Music21Object:

Pizzicato methods

Methods inherited from Music21Object:

Pizzicato instance variables

Instance variables inherited from Music21Object:

Staccatissimo

class music21.articulations.Staccatissimo

A very short note (derived from staccato), usually represented as a wedge.

>>> a = articulations.Staccatissimo()

Staccatissimo bases

Staccatissimo read-only properties

Read-only properties inherited from Articulation:

Read-only properties inherited from Music21Object:

Staccatissimo read/write properties

Read/write properties inherited from Articulation:

Read/write properties inherited from Music21Object:

Staccatissimo methods

Methods inherited from Music21Object:

Staccatissimo instance variables

Instance variables inherited from Music21Object:

TechnicalIndication

class music21.articulations.TechnicalIndication

TechnicalIndications (MusicXML: technical) give performance indications specific to different instrument types, such as harmonics or bowing.

TechnicalIndications can include an optional content.

TechnicalIndication bases

TechnicalIndication read-only properties

Read-only properties inherited from Articulation:

Read-only properties inherited from Music21Object:

TechnicalIndication read/write properties

Read/write properties inherited from Articulation:

Read/write properties inherited from Music21Object:

TechnicalIndication methods

Methods inherited from Music21Object:

TechnicalIndication instance variables

Instance variables inherited from Music21Object: