pymusicxml.score_components

Module containing all of the classes representing the hierarchy of a musical score.

Classes

BarRest(bar_length[, directions])

Class representing a bar rest.

BarRestDuration(length)

Special duration object used for bar rests.

BeamedGroup([contents])

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

Chord(pitches, duration[, ties, notations, ...])

Class representing a chord.

Clef(sign, line[, octaves_transposition])

Class representing a musical clef

Direction([placement, voice, staff])

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.

GraceChord(pitches, duration[, ties, ...])

Subclass of Chord representing a durationless grace chord.

GraceNote(pitch, duration[, ties, ...])

Subclass of Note representing a durationless grace note.

KeySignature()

Abstract base class for traditional and non-traditional key signatures.

Measure([contents, time_signature, key, ...])

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

MidNumberedSpanner([label])

Abstract base class for the middle of a Direction or Notation that spans multiple time-points.

MultiGliss([numbers])

Abstract base class for start and stop multi glisses

MusicXMLComponent()

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

MusicXMLContainer(contents, allowed_types)

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

NonTraditionalKeySignature(...)

Notation()

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

Note(pitch, duration[, ties, notations, ...])

Class representing a single, pitched note.

Notehead(notehead_name[, filled])

Class representing a notehead type.

NumberedSpanner([label])

Abstract base class for part of a Direction or Notation that spans multiple time-points.

Part(part_name[, measures, part_id, ...])

Represents a musical part/staff.

PartGroup([parts, has_bracket, ...])

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[, notations, directions])

Class representing a notated rest.

Score([contents, title, composer])

Class representing a full musical score

StartNumberedSpanner([label])

Abstract base class for the start of a Direction or Notation that spans multiple time-points.

StopNumberedSpanner([label])

Abstract base class for the end of a Direction or Notation that spans multiple time-points.

TraditionalKeySignature(fifths[, mode, cancel])

A traditional key signature.

Transpose(chromatic[, diatonic, octave])

Class representing transposition.

Tuplet(contents, ratio)

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