pymusicxml package
A simple utility for exporting MusicXML files that represents musical objects more hierarchically.
While it is of course possible to create MusicXML files in Python directly via ElementTree, the format is awkwardly non-hierarchical. For instance, there are no separate objects for chords and tuplets; rather they exist only as special annotations to the note objects themselves. In pymusicxml, chords are represented similarly to notes but with multiple pitches, and tuplets are treated as containers for notes, chords, and rests.
At the moment, this library is intended as a tool for composition, making it easier to construct and export MusicXML scores in Python. In the future, the ability to parse existing MusicXML scores may be added.
Modules:
Module containing all non-spanner subclasses of the |
|
Module containing relevant Enums used throughout pymusicxml. |
|
Module containing all non-spanner notations, such as glisses, bowings, fermatas, etc. |
|
Module containing all of the classes representing the hierarchy of a musical score. |
|
Module containing all spanners (i.e. |
Public-Facing API (result of import *):
|
Generic enumeration. |
|
The <degree> element is used to add, alter, or subtract individual notes in the chord. |
|
Class representing a dynamic that is attached to the staff |
|
Class representing harmonic notation. |
|
Class representing a tempo-specifying metronome mark |
|
Class representing text that is attached to the staff |
|
An enumeration. |
|
An enumeration. |
|
An enumeration. |
|
An enumeration. |
|
An enumeration. |
|
An enumeration. |
|
Chord arpeggiation notation. |
|
Down-bow notation |
|
Fermata notation. |
|
Harmonic notation. |
|
Mordent ornament. |
Chord non-arpeggiate notation. |
|
Open-string notation |
|
|
Abstract class for all ornament notations |
|
Schleifer mark. |
Snap-pizzicato notation |
|
|
Notation to attach to a note that starts a glissando |
|
Multi-gliss notation used for glissing multiple members of a chord |
|
Notation to attach to a note that ends a glissando |
|
End of a multi-gliss notation used for glissing multiple members of a chord. |
|
Stopped notation |
Abstract class for all technical notations |
|
|
Tremolo lines on a note stem. |
|
Trill mark on a single note (without wavy line). |
|
Turn ornament. |
|
Up-bow notation |
|
Class representing a bar rest. |
|
Special duration object used for bar rests. |
|
Represents a group of notes/chords/rests joined under a single beam. |
|
Class representing a chord. |
|
Class representing a musical clef |
|
Abstract base class for musical directions, such as text and metronome marks. |
|
Represents a length that can be written as a single note or rest. |
|
Subclass of |
|
Subclass of |
|
Class representing a measure of music, perhaps with multiple voices. |
|
Abstract base class for MusicXML Notations (glissandi, slurs). |
|
Class representing a single, pitched note. |
|
Class representing a notehead type. |
|
Represents a musical part/staff. |
|
Represents a part group (a group of related parts, possible connected by a bracket) |
|
Class representing a notated musical pitch. |
|
Class representing a notated rest. |
|
Class representing a full musical score |
|
Class representing transposition. |
|
Represents a tuplet; same as a BeamedGroup, but with a particular time ratio associated with it. |
|
Pedal change in the middle of a sustain pedal spanner. |
|
Start of a bracket spanner. |
|
Start of a dashed spanner (e.g. |
|
Notation to attach to a note that starts a hairpin |
|
Start of a sustain pedal spanner. |
|
Notation to attach to a note that starts a slur |
|
Starts a trill spanner with a wavy line. |
|
|
|
End of a dashed spanner (e.g. |
|
Notation to attach to a note that ends a hairpin |
|
Stops a sustain pedal spanner. |
|
Notation to attach to a note that ends a slur |
|
Stops a trill spanner with a wavy line. |