pymusicxml.music_xml_objects

Module containing all of the classes representing musical objects.

Classes

BarRest(bar_length, …)

Class representing a bar rest.

BarRestDuration(length)

Special duration object used for bar rests.

BeamedGroup(*args, **kwds)

Represents a group of notes/chords/rests joined under a single beam.

Chord(pitches, str]], duration, str, float], …)

Class representing a chord.

Clef(sign, line, octaves_transposition)

Class representing a musical clef

Direction()

Abstract base class for musical directions, such as text and metronome marks.

Duration(note_type, num_dots, tuplet_ratio)

Represents a length that can be written as a single note or rest.

DurationalObject()

Abstract base class for all objects that have duration within a measure.

EndDashedLine([id_number, voice, staff])

Class used to mark the end of a dashed line starting from a TextAnnotation.

GraceChord(pitches, str]], duration, str, …)

Subclass of Chord representing a durationless grace chord.

GraceNote(pitch, str], duration, str, …[, …])

Subclass of Note representing a durationless grace note.

Measure(*args, **kwds)

Class representing a measure of music, perhaps with multiple voices.

MetronomeMark(beat_length, bpm, voice, …)

Class representing a tempo-specifying metronome mark

MusicXMLComponent()

Abstract base class of all musical objects, providing functionality for rendering and exporting to a file.

MusicXMLContainer(*args, **kwds)

Base class for all musical objects that contain other musical objects, such as Part, Measure, and Tuplet.

Notation()

Abstract base class for MusicXML Notations (glissandi, slurs).

Note(pitch, str], duration, str, float], ties)

Class representing a single, pitched note.

Notehead(notehead_name, filled)

Class representing a notehead type.

Part(*args, **kwds)

Represents a musical part/staff.

PartGroup(*args, **kwds)

Represents a part group (a group of related parts, possible connected by a bracket)

Pitch(step, octave, alteration)

Class representing a notated musical pitch.

Rest(duration, str, float], notations, str, …)

Class representing a notated rest.

Score(*args, **kwds)

Class representing a full musical score

StartGliss(number)

Notation to attach to a note that starts a glissando

StartMultiGliss(numbers)

Multi-gliss notation used for glissing multiple members of a chord

StartSlur([slur_id])

Notation to attach to a note that starts a slur

StopGliss(number)

Notation to attach to a note that ends a glissando

StopMultiGliss(numbers)

End of a multi-gliss notation used for glissing multiple members of a chord.

StopSlur([slur_id])

Notation to attach to a note that ends a slur

TextAnnotation(text, placement, font_size, …)

Class representing text that is attached to the staff

Tuplet(*args, **kwds)

Represents a tuplet; same as a BeamedGroup, but with a particular time ratio associated with it.

Functions

pad_with_rests(components, desired_length)

Appends rests to a list of components to fill out the desired length