======================================================================
=== FILE: pymusicxml/pymusicxml.directions.Degree.txt
======================================================================
pymusicxml.directions.Degree
****************************
class pymusicxml.directions.Degree(value: int, alter: int, degree_type: str = 'alter', print_object: bool = True)
Bases: "object"
The <degree> element is used to add, alter, or subtract individual
notes in the chord.
Parameters:
* **value** -- The number of the degree, a positive integer.
* **alter** -- An integer meaning alteration by semitones.
* **degree_type** -- Type of alteration. A positive alter +
'subtract' = semitone down.
* **print_object** -- Whether to print the degree or not.
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this degree to a tuple containing a single <degree> ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "DEGREE_TY | |
| PES" | |
+------------+--------------------------------------------------------------------------------------------+
DEGREE_TYPES = ('add', 'alter', 'subtract')
render() -> Sequence[Element]
Renders this degree to a tuple containing a single <degree>
ElementTree.Element.
======================================================================
=== FILE: pymusicxml/pymusicxml.directions.Dynamic.txt
======================================================================
pymusicxml.directions.Dynamic
*****************************
class pymusicxml.directions.Dynamic(dynamic_text: str, placement: str | StaffPlacement = 'below', voice: int = 1, staff: int = None)
Bases: "Direction"
Class representing a dynamic that is attached to the staff
Parameters:
* **dynamic_text** -- the text of the dynamic, e.g. "mf"
* **voice** -- Which voice to attach to
* **staff** -- Which staff to attach to if the part has multiple
staves
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render_di | Renders the <direction-type> element that constitutes the main substance of a <direction> |
| rection_ty | element. |
| pe"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "STANDARD_ | |
| TYPES" | |
+------------+--------------------------------------------------------------------------------------------+
STANDARD_TYPES = ('f', 'ff', 'fff', 'ffff', 'fffff', 'ffffff', 'fp', 'fz', 'mf', 'mp', 'p', 'pp', 'ppp', 'pppp', 'ppppp', 'pppppp', 'rf', 'rfz', 'sf', 'sffz', 'sfp', 'sfpp', 'sfz')
render_direction_type() -> Sequence[Element]
Renders the <direction-type> element that constitutes the main
substance of a <direction> element.
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.directions.Harmony.txt
======================================================================
pymusicxml.directions.Harmony
*****************************
class pymusicxml.directions.Harmony(root_letter: str, root_alter: int, kind: str, use_symbols: bool = False, degrees: Sequence[Degree] = (), placement: str | StaffPlacement = 'above')
Bases: "Direction"
Class representing harmonic notation.
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "render_di | Renders the <direction-type> element that constitutes the main substance of a <direction> |
| rection_ty | element. |
| pe"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "KINDS" | |
+------------+--------------------------------------------------------------------------------------------+
KINDS = ('augmented', 'augmented-seventh', 'diminished', 'diminished-seventh', 'dominant', 'dominant-11th', 'dominant-13th', 'dominant-ninth', 'French', 'German', 'half-diminished', 'Italian', 'major', 'major-11th', 'major-13th', 'major-minor', 'major-ninth', 'major-seventh', 'major-sixth', 'minor', 'minor-11th', 'minor-13th', 'minor-ninth', 'minor-seventh', 'minor-sixth', 'Neapolitan', 'none', 'other', 'pedal', 'power', 'suspended-fourth', 'suspended-second', 'Tristan')
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
render_direction_type() -> Sequence[Element]
Renders the <direction-type> element that constitutes the main
substance of a <direction> element.
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.directions.MetronomeMark.txt
======================================================================
pymusicxml.directions.MetronomeMark
***********************************
class pymusicxml.directions.MetronomeMark(beat_length: float, bpm: float, placement: str | StaffPlacement = 'above', voice: int = 1, staff: int = None, **other_attributes)
Bases: "Direction"
Class representing a tempo-specifying metronome mark
Parameters:
* **beat_length** -- length, in quarters, of the note that takes
the beat
* **bpm** -- beats per minute
* **voice** -- Which voice to attach to
* **staff** -- Which staff to attach to if the part has multiple
staves
* **placement** -- Where to place the direction in relation to
the staff ("above" or "below")
* **other_attributes** -- any other attributes to assign to the
metronome mark, e.g. parentheses="yes" or font_size="5"
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render_di | Renders the <direction-type> element that constitutes the main substance of a <direction> |
| rection_ty | element. |
| pe"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
render_direction_type() -> Sequence[Element]
Renders the <direction-type> element that constitutes the main
substance of a <direction> element.
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.directions.TextAnnotation.txt
======================================================================
pymusicxml.directions.TextAnnotation
************************************
class pymusicxml.directions.TextAnnotation(text: str, font_size: float = None, italic: bool = False, bold: bool = False, placement: str | StaffPlacement = 'above', voice: int = 1, staff: int = None, **kwargs)
Bases: "Direction"
Class representing text that is attached to the staff
Parameters:
* **text** -- the text of the annotation
* **font_size** -- the font size of the text
* **italic** -- whether or not the text is italicized
* **placement** -- Where to place the direction in relation to
the staff ("above" or "below")
* **voice** -- Which voice to attach to
* **staff** -- Which staff to attach to if the part has multiple
staves
* **kwargs** -- any extra properties of the musicXML "words" tag
aside from font-size and italics can be passed to kwargs
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render_di | Renders the <direction-type> element that constitutes the main substance of a <direction> |
| rection_ty | element. |
| pe"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
render_direction_type() -> Sequence[Element]
Renders the <direction-type> element that constitutes the main
substance of a <direction> element.
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.directions.txt
======================================================================
pymusicxml.directions
*********************
Module containing all non-spanner subclasses of the "Direction" type.
-[ Classes ]-
+------------+--------------------------------------------------------------------------------------------+
| "Degree"(v | The <degree> element is used to add, alter, or subtract individual notes in the chord. |
| alue, | |
| alter[, de | |
| gree_type, | |
| print_obje | |
| ct]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Dynamic"( | Class representing a dynamic that is attached to the staff |
| dynamic_te | |
| xt[, | |
| placement, | |
| voice, | |
| staff]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Harmony"( | Class representing harmonic notation. |
| root_lette | |
| r, root_al | |
| ter, | |
| kind[, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Metronome | Class representing a tempo-specifying metronome mark |
| Mark"(beat | |
| _length, | |
| bpm[, | |
| placement, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "TextAnnot | Class representing text that is attached to the staff |
| ation"(tex | |
| t[, | |
| font_size, | |
| italic, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
* pymusicxml.directions.Degree
* "Degree"
* "Degree.DEGREE_TYPES"
* "Degree.render()"
* pymusicxml.directions.Dynamic
* "Dynamic"
* "Dynamic.STANDARD_TYPES"
* "Dynamic.render_direction_type()"
* "Dynamic.export_to_file()"
* "Dynamic.render()"
* "Dynamic.to_xml()"
* "Dynamic.view_in_software()"
* "Dynamic.wrap_as_score()"
* pymusicxml.directions.Harmony
* "Harmony"
* "Harmony.KINDS"
* "Harmony.render()"
* "Harmony.render_direction_type()"
* "Harmony.export_to_file()"
* "Harmony.to_xml()"
* "Harmony.view_in_software()"
* "Harmony.wrap_as_score()"
* pymusicxml.directions.MetronomeMark
* "MetronomeMark"
* "MetronomeMark.render_direction_type()"
* "MetronomeMark.export_to_file()"
* "MetronomeMark.render()"
* "MetronomeMark.to_xml()"
* "MetronomeMark.view_in_software()"
* "MetronomeMark.wrap_as_score()"
* pymusicxml.directions.TextAnnotation
* "TextAnnotation"
* "TextAnnotation.render_direction_type()"
* "TextAnnotation.export_to_file()"
* "TextAnnotation.render()"
* "TextAnnotation.to_xml()"
* "TextAnnotation.view_in_software()"
* "TextAnnotation.wrap_as_score()"
======================================================================
=== FILE: pymusicxml/pymusicxml.enums.AccidentalType.txt
======================================================================
pymusicxml.enums.AccidentalType
*******************************
class pymusicxml.enums.AccidentalType(*values)
Bases: "Enum"
An accidental, as used in a "NonTraditionalKeySignature". Note that
*flat_flat* and *double_flat* are two names for the same MusicXML
value.
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "flat_flat | |
| " | |
+------------+--------------------------------------------------------------------------------------------+
| "double_fl | |
| at" | |
+------------+--------------------------------------------------------------------------------------------+
| "flat" | |
+------------+--------------------------------------------------------------------------------------------+
| "natural" | |
+------------+--------------------------------------------------------------------------------------------+
| "sharp" | |
+------------+--------------------------------------------------------------------------------------------+
| "double_sh | |
| arp" | |
+------------+--------------------------------------------------------------------------------------------+
flat_flat = 'flat-flat'
double_flat = 'flat-flat'
flat = 'flat'
natural = 'natural'
sharp = 'sharp'
double_sharp = 'double-sharp'
======================================================================
=== FILE: pymusicxml/pymusicxml.enums.ArpeggiationDirection.txt
======================================================================
pymusicxml.enums.ArpeggiationDirection
**************************************
class pymusicxml.enums.ArpeggiationDirection(*values)
Bases: "Enum"
The direction in which an arpeggiated chord is rolled.
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "up" | |
+------------+--------------------------------------------------------------------------------------------+
| "down" | |
+------------+--------------------------------------------------------------------------------------------+
up = 'up'
down = 'down'
======================================================================
=== FILE: pymusicxml/pymusicxml.enums.HairpinType.txt
======================================================================
pymusicxml.enums.HairpinType
****************************
class pymusicxml.enums.HairpinType(*values)
Bases: "Enum"
Whether a hairpin spanner opens outward (crescendo) or closes
inward (diminuendo).
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "crescendo | |
| " | |
+------------+--------------------------------------------------------------------------------------------+
| "diminuend | |
| o" | |
+------------+--------------------------------------------------------------------------------------------+
crescendo = 'crescendo'
diminuendo = 'diminuendo'
======================================================================
=== FILE: pymusicxml/pymusicxml.enums.LineEnd.txt
======================================================================
pymusicxml.enums.LineEnd
************************
class pymusicxml.enums.LineEnd(*values)
Bases: "Enum"
The hook drawn at the end of a bracket or dashed line spanner: a
vertical hook pointing up or down, hooks at both ends, an
arrowhead, or no hook at all.
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "up" | |
+------------+--------------------------------------------------------------------------------------------+
| "down" | |
+------------+--------------------------------------------------------------------------------------------+
| "both" | |
+------------+--------------------------------------------------------------------------------------------+
| "arrow" | |
+------------+--------------------------------------------------------------------------------------------+
| "none" | |
+------------+--------------------------------------------------------------------------------------------+
up = 'up'
down = 'down'
both = 'both'
arrow = 'arrow'
none = 'none'
======================================================================
=== FILE: pymusicxml/pymusicxml.enums.LineType.txt
======================================================================
pymusicxml.enums.LineType
*************************
class pymusicxml.enums.LineType(*values)
Bases: "Enum"
The style of line drawn by a spanner, such as a bracket or a dashed
line.
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "solid" | |
+------------+--------------------------------------------------------------------------------------------+
| "dashed" | |
+------------+--------------------------------------------------------------------------------------------+
| "dotted" | |
+------------+--------------------------------------------------------------------------------------------+
| "wavy" | |
+------------+--------------------------------------------------------------------------------------------+
solid = 'solid'
dashed = 'dashed'
dotted = 'dotted'
wavy = 'wavy'
======================================================================
=== FILE: pymusicxml/pymusicxml.enums.StaffPlacement.txt
======================================================================
pymusicxml.enums.StaffPlacement
*******************************
class pymusicxml.enums.StaffPlacement(*values)
Bases: "Enum"
Whether a direction or notation is placed above or below the staff.
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "above" | |
+------------+--------------------------------------------------------------------------------------------+
| "below" | |
+------------+--------------------------------------------------------------------------------------------+
above = 'above'
below = 'below'
======================================================================
=== FILE: pymusicxml/pymusicxml.enums.txt
======================================================================
pymusicxml.enums
****************
Module containing relevant Enums used throughout pymusicxml.
-[ Classes ]-
+------------+--------------------------------------------------------------------------------------------+
| "Accidenta | An accidental, as used in a "NonTraditionalKeySignature". |
| lType"(*va | |
| lues) | |
+------------+--------------------------------------------------------------------------------------------+
| "Arpeggiat | The direction in which an arpeggiated chord is rolled. |
| ionDirecti | |
| on"(*value | |
| s) | |
+------------+--------------------------------------------------------------------------------------------+
| "HairpinTy | Whether a hairpin spanner opens outward (crescendo) or closes inward (diminuendo). |
| pe"(*value | |
| s) | |
+------------+--------------------------------------------------------------------------------------------+
| "LineEnd"( | The hook drawn at the end of a bracket or dashed line spanner: a vertical hook pointing up |
| *values) | or down, hooks at both ends, an arrowhead, or no hook at all. |
+------------+--------------------------------------------------------------------------------------------+
| "LineType" | The style of line drawn by a spanner, such as a bracket or a dashed line. |
| (*values) | |
+------------+--------------------------------------------------------------------------------------------+
| "StaffPlac | Whether a direction or notation is placed above or below the staff. |
| ement"(*va | |
| lues) | |
+------------+--------------------------------------------------------------------------------------------+
* pymusicxml.enums.AccidentalType
* "AccidentalType"
* "AccidentalType.flat_flat"
* "AccidentalType.double_flat"
* "AccidentalType.flat"
* "AccidentalType.natural"
* "AccidentalType.sharp"
* "AccidentalType.double_sharp"
* pymusicxml.enums.ArpeggiationDirection
* "ArpeggiationDirection"
* "ArpeggiationDirection.up"
* "ArpeggiationDirection.down"
* pymusicxml.enums.HairpinType
* "HairpinType"
* "HairpinType.crescendo"
* "HairpinType.diminuendo"
* pymusicxml.enums.LineEnd
* "LineEnd"
* "LineEnd.up"
* "LineEnd.down"
* "LineEnd.both"
* "LineEnd.arrow"
* "LineEnd.none"
* pymusicxml.enums.LineType
* "LineType"
* "LineType.solid"
* "LineType.dashed"
* "LineType.dotted"
* "LineType.wavy"
* pymusicxml.enums.StaffPlacement
* "StaffPlacement"
* "StaffPlacement.above"
* "StaffPlacement.below"
======================================================================
=== FILE: pymusicxml/pymusicxml.notations.Arpeggiate.txt
======================================================================
pymusicxml.notations.Arpeggiate
*******************************
class pymusicxml.notations.Arpeggiate(direction: str | ArpeggiationDirection = None)
Bases: "Notation"
Chord arpeggiation notation.
Parameters:
**direction** -- "up" or "down"
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.notations.DownBow.txt
======================================================================
pymusicxml.notations.DownBow
****************************
class pymusicxml.notations.DownBow
Bases: "Technical"
Down-bow notation
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render_te | Renders the contents of the technicalelement. |
| chnical"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
render_technical() -> Sequence[Element]
Renders the contents of the technicalelement.
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.notations.Fermata.txt
======================================================================
pymusicxml.notations.Fermata
****************************
class pymusicxml.notations.Fermata(inverted: bool = False)
Bases: "Notation"
Fermata notation.
Parameters:
**inverted** -- if true, an inverted fermata
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.notations.Harmonic.txt
======================================================================
pymusicxml.notations.Harmonic
*****************************
class pymusicxml.notations.Harmonic
Bases: "Technical"
Harmonic notation.
Note: This is not the <harmony/> notation used for chord changes.
This class represents playing a note as a harmonic on a single
string.
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render_te | Renders the contents of the technicalelement. |
| chnical"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
render_technical() -> Sequence[Element]
Renders the contents of the technicalelement.
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.notations.Mordent.txt
======================================================================
pymusicxml.notations.Mordent
****************************
class pymusicxml.notations.Mordent(inverted: bool = False, placement: str | StaffPlacement = 'above')
Bases: "Ornament"
Mordent ornament.
Parameters:
* **inverted** -- if true, an inverted mordent
* **placement** -- "above" or "below"
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render_or | Renders the contents of the ornaments element. |
| nament"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
render_ornament() -> Sequence[Element]
Renders the contents of the ornaments element.
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.notations.NonArpeggiate.txt
======================================================================
pymusicxml.notations.NonArpeggiate
**********************************
class pymusicxml.notations.NonArpeggiate
Bases: "Notation"
Chord non-arpeggiate notation. pymusicxml only allows full chord
non-arpeggiates.
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.notations.OpenString.txt
======================================================================
pymusicxml.notations.OpenString
*******************************
class pymusicxml.notations.OpenString
Bases: "Technical"
Open-string notation
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render_te | Renders the contents of the technicalelement. |
| chnical"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
render_technical() -> Sequence[Element]
Renders the contents of the technicalelement.
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.notations.Ornament.txt
======================================================================
pymusicxml.notations.Ornament
*****************************
class pymusicxml.notations.Ornament
Bases: "Notation", "ABC"
Abstract class for all ornament notations
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "render_or | Renders the contents of the ornaments element. |
| nament"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
abstractmethod render_ornament() -> Sequence[Element]
Renders the contents of the ornaments element.
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.notations.Schleifer.txt
======================================================================
pymusicxml.notations.Schleifer
******************************
class pymusicxml.notations.Schleifer(placement: str | StaffPlacement = 'above')
Bases: "Ornament"
Schleifer mark.
Parameters:
**placement** -- "above" or "below"
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render_or | Renders the contents of the ornaments element. |
| nament"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
render_ornament() -> Sequence[Element]
Renders the contents of the ornaments element.
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.notations.SnapPizzicato.txt
======================================================================
pymusicxml.notations.SnapPizzicato
**********************************
class pymusicxml.notations.SnapPizzicato
Bases: "Technical"
Snap-pizzicato notation
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render_te | Renders the contents of the technicalelement. |
| chnical"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
render_technical() -> Sequence[Element]
Renders the contents of the technicalelement.
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.notations.StartGliss.txt
======================================================================
pymusicxml.notations.StartGliss
*******************************
class pymusicxml.notations.StartGliss(number: int = 1)
Bases: "Notation"
Notation to attach to a note that starts a glissando
Parameters:
**number** -- each glissando is given an id number to
distinguish it from other glissandi. This must range from 1 to
6.
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.notations.StartMultiGliss.txt
======================================================================
pymusicxml.notations.StartMultiGliss
************************************
class pymusicxml.notations.StartMultiGliss(numbers: Sequence[int] = (1,))
Bases: "MultiGliss"
Multi-gliss notation used for glissing multiple members of a chord
Parameters:
**numbers** -- most natural is to pass a range object here, for
the range of numbers to assign to the glisses of consecutive
chord member. However, in the case of a chord where, say, you
want the upper two notes to gliss but not the bottom, pass
(None, 1, 2) to this parameter.
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.notations.StopGliss.txt
======================================================================
pymusicxml.notations.StopGliss
******************************
class pymusicxml.notations.StopGliss(number: int = 1)
Bases: "Notation"
Notation to attach to a note that ends a glissando
Parameters:
**number** -- this should correspond to the id number of the
associated "StartGliss".
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.notations.StopMultiGliss.txt
======================================================================
pymusicxml.notations.StopMultiGliss
***********************************
class pymusicxml.notations.StopMultiGliss(numbers: Sequence[int] = (1,))
Bases: "MultiGliss"
End of a multi-gliss notation used for glissing multiple members of
a chord.
Parameters:
**numbers** -- These should correspond to the id numbers of the
associated "StartMultiGliss".
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.notations.Stopped.txt
======================================================================
pymusicxml.notations.Stopped
****************************
class pymusicxml.notations.Stopped
Bases: "Technical"
Stopped notation
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render_te | Renders the contents of the technicalelement. |
| chnical"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
render_technical() -> Sequence[Element]
Renders the contents of the technicalelement.
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.notations.Technical.txt
======================================================================
pymusicxml.notations.Technical
******************************
class pymusicxml.notations.Technical
Bases: "Notation", "ABC"
Abstract class for all technical notations
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "render_te | Renders the contents of the technicalelement. |
| chnical"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
abstractmethod render_technical() -> Sequence[Element]
Renders the contents of the technicalelement.
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.notations.Tremolo.txt
======================================================================
pymusicxml.notations.Tremolo
****************************
class pymusicxml.notations.Tremolo(num_lines: int = 3)
Bases: "Ornament"
Tremolo lines on a note stem.
Parameters:
**num_lines** -- number of tremolo marks on the stem. (Defaults
to 3 for traditional unmeasured tremolo).
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render_or | Renders the contents of the ornaments element. |
| nament"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
render_ornament() -> Sequence[Element]
Renders the contents of the ornaments element.
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.notations.TrillMark.txt
======================================================================
pymusicxml.notations.TrillMark
******************************
class pymusicxml.notations.TrillMark(placement: str | StaffPlacement = 'above')
Bases: "Ornament"
Trill mark on a single note (without wavy line).
Parameters:
**placement** -- "above" or "below"
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render_or | Renders the contents of the ornaments element. |
| nament"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
render_ornament() -> Sequence[Element]
Renders the contents of the ornaments element.
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.notations.Turn.txt
======================================================================
pymusicxml.notations.Turn
*************************
class pymusicxml.notations.Turn(inverted: bool = False, delayed: bool = False, placement: str | StaffPlacement = 'above')
Bases: "Ornament"
Turn ornament.
Parameters:
* **inverted** -- if true, an inverted turn
* **delayed** -- if true, a turn which is delayed until the end
of the note
* **placement** -- "above" or "below"
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render_or | Renders the contents of the ornaments element. |
| nament"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
render_ornament() -> Sequence[Element]
Renders the contents of the ornaments element.
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.notations.UpBow.txt
======================================================================
pymusicxml.notations.UpBow
**************************
class pymusicxml.notations.UpBow
Bases: "Technical"
Up-bow notation
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render_te | Renders the contents of the technicalelement. |
| chnical"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
render_technical() -> Sequence[Element]
Renders the contents of the technicalelement.
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.notations.txt
======================================================================
pymusicxml.notations
********************
Module containing all non-spanner notations, such as glisses, bowings,
fermatas, etc.
-[ Classes ]-
+------------+--------------------------------------------------------------------------------------------+
| "Arpeggiat | Chord arpeggiation notation. |
| e"([direct | |
| ion]) | |
+------------+--------------------------------------------------------------------------------------------+
| "DownBow"( | Down-bow notation |
| ) | |
+------------+--------------------------------------------------------------------------------------------+
| "Fermata"( | Fermata notation. |
| [inverted] | |
| ) | |
+------------+--------------------------------------------------------------------------------------------+
| "Harmonic" | Harmonic notation. |
| () | |
+------------+--------------------------------------------------------------------------------------------+
| "Mordent"( | Mordent ornament. |
| [inverted, | |
| placement] | |
| ) | |
+------------+--------------------------------------------------------------------------------------------+
| "NonArpegg | Chord non-arpeggiate notation. |
| iate"() | |
+------------+--------------------------------------------------------------------------------------------+
| "OpenStrin | Open-string notation |
| g"() | |
+------------+--------------------------------------------------------------------------------------------+
| "Ornament" | Abstract class for all ornament notations |
| () | |
+------------+--------------------------------------------------------------------------------------------+
| "Schleifer | Schleifer mark. |
| "([placeme | |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "SnapPizzi | Snap-pizzicato notation |
| cato"() | |
+------------+--------------------------------------------------------------------------------------------+
| "StartGlis | Notation to attach to a note that starts a glissando |
| s"([number | |
| ]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StartMult | Multi-gliss notation used for glissing multiple members of a chord |
| iGliss"([n | |
| umbers]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StopGliss | Notation to attach to a note that ends a glissando |
| "([number] | |
| ) | |
+------------+--------------------------------------------------------------------------------------------+
| "StopMulti | End of a multi-gliss notation used for glissing multiple members of a chord. |
| Gliss"([nu | |
| mbers]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Stopped"( | Stopped notation |
| ) | |
+------------+--------------------------------------------------------------------------------------------+
| "Technical | Abstract class for all technical notations |
| "() | |
+------------+--------------------------------------------------------------------------------------------+
| "Tremolo"( | Tremolo lines on a note stem. |
| [num_lines | |
| ]) | |
+------------+--------------------------------------------------------------------------------------------+
| "TrillMark | Trill mark on a single note (without wavy line). |
| "([placeme | |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Turn"([in | Turn ornament. |
| verted, | |
| delayed, p | |
| lacement]) | |
+------------+--------------------------------------------------------------------------------------------+
| "UpBow"() | Up-bow notation |
+------------+--------------------------------------------------------------------------------------------+
* pymusicxml.notations.Arpeggiate
* "Arpeggiate"
* "Arpeggiate.render()"
* "Arpeggiate.export_to_file()"
* "Arpeggiate.to_xml()"
* "Arpeggiate.view_in_software()"
* "Arpeggiate.wrap_as_score()"
* pymusicxml.notations.DownBow
* "DownBow"
* "DownBow.render_technical()"
* "DownBow.export_to_file()"
* "DownBow.render()"
* "DownBow.to_xml()"
* "DownBow.view_in_software()"
* "DownBow.wrap_as_score()"
* pymusicxml.notations.Fermata
* "Fermata"
* "Fermata.render()"
* "Fermata.export_to_file()"
* "Fermata.to_xml()"
* "Fermata.view_in_software()"
* "Fermata.wrap_as_score()"
* pymusicxml.notations.Harmonic
* "Harmonic"
* "Harmonic.render_technical()"
* "Harmonic.export_to_file()"
* "Harmonic.render()"
* "Harmonic.to_xml()"
* "Harmonic.view_in_software()"
* "Harmonic.wrap_as_score()"
* pymusicxml.notations.Mordent
* "Mordent"
* "Mordent.render_ornament()"
* "Mordent.export_to_file()"
* "Mordent.render()"
* "Mordent.to_xml()"
* "Mordent.view_in_software()"
* "Mordent.wrap_as_score()"
* pymusicxml.notations.NonArpeggiate
* "NonArpeggiate"
* "NonArpeggiate.render()"
* "NonArpeggiate.export_to_file()"
* "NonArpeggiate.to_xml()"
* "NonArpeggiate.view_in_software()"
* "NonArpeggiate.wrap_as_score()"
* pymusicxml.notations.OpenString
* "OpenString"
* "OpenString.render_technical()"
* "OpenString.export_to_file()"
* "OpenString.render()"
* "OpenString.to_xml()"
* "OpenString.view_in_software()"
* "OpenString.wrap_as_score()"
* pymusicxml.notations.Ornament
* "Ornament"
* "Ornament.render_ornament()"
* "Ornament.render()"
* "Ornament.export_to_file()"
* "Ornament.to_xml()"
* "Ornament.view_in_software()"
* "Ornament.wrap_as_score()"
* pymusicxml.notations.Schleifer
* "Schleifer"
* "Schleifer.render_ornament()"
* "Schleifer.export_to_file()"
* "Schleifer.render()"
* "Schleifer.to_xml()"
* "Schleifer.view_in_software()"
* "Schleifer.wrap_as_score()"
* pymusicxml.notations.SnapPizzicato
* "SnapPizzicato"
* "SnapPizzicato.render_technical()"
* "SnapPizzicato.export_to_file()"
* "SnapPizzicato.render()"
* "SnapPizzicato.to_xml()"
* "SnapPizzicato.view_in_software()"
* "SnapPizzicato.wrap_as_score()"
* pymusicxml.notations.StartGliss
* "StartGliss"
* "StartGliss.render()"
* "StartGliss.export_to_file()"
* "StartGliss.to_xml()"
* "StartGliss.view_in_software()"
* "StartGliss.wrap_as_score()"
* pymusicxml.notations.StartMultiGliss
* "StartMultiGliss"
* "StartMultiGliss.render()"
* "StartMultiGliss.export_to_file()"
* "StartMultiGliss.to_xml()"
* "StartMultiGliss.view_in_software()"
* "StartMultiGliss.wrap_as_score()"
* pymusicxml.notations.StopGliss
* "StopGliss"
* "StopGliss.render()"
* "StopGliss.export_to_file()"
* "StopGliss.to_xml()"
* "StopGliss.view_in_software()"
* "StopGliss.wrap_as_score()"
* pymusicxml.notations.StopMultiGliss
* "StopMultiGliss"
* "StopMultiGliss.render()"
* "StopMultiGliss.export_to_file()"
* "StopMultiGliss.to_xml()"
* "StopMultiGliss.view_in_software()"
* "StopMultiGliss.wrap_as_score()"
* pymusicxml.notations.Stopped
* "Stopped"
* "Stopped.render_technical()"
* "Stopped.export_to_file()"
* "Stopped.render()"
* "Stopped.to_xml()"
* "Stopped.view_in_software()"
* "Stopped.wrap_as_score()"
* pymusicxml.notations.Technical
* "Technical"
* "Technical.render_technical()"
* "Technical.render()"
* "Technical.export_to_file()"
* "Technical.to_xml()"
* "Technical.view_in_software()"
* "Technical.wrap_as_score()"
* pymusicxml.notations.Tremolo
* "Tremolo"
* "Tremolo.render_ornament()"
* "Tremolo.export_to_file()"
* "Tremolo.render()"
* "Tremolo.to_xml()"
* "Tremolo.view_in_software()"
* "Tremolo.wrap_as_score()"
* pymusicxml.notations.TrillMark
* "TrillMark"
* "TrillMark.render_ornament()"
* "TrillMark.export_to_file()"
* "TrillMark.render()"
* "TrillMark.to_xml()"
* "TrillMark.view_in_software()"
* "TrillMark.wrap_as_score()"
* pymusicxml.notations.Turn
* "Turn"
* "Turn.render_ornament()"
* "Turn.export_to_file()"
* "Turn.render()"
* "Turn.to_xml()"
* "Turn.view_in_software()"
* "Turn.wrap_as_score()"
* pymusicxml.notations.UpBow
* "UpBow"
* "UpBow.render_technical()"
* "UpBow.export_to_file()"
* "UpBow.render()"
* "UpBow.to_xml()"
* "UpBow.view_in_software()"
* "UpBow.wrap_as_score()"
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.BarRest.txt
======================================================================
pymusicxml.score_components.BarRest
***********************************
class pymusicxml.score_components.BarRest(bar_length: float | Duration | BarRestDuration, directions: Sequence[Direction] = ())
Bases: "_XMLNote"
Class representing a bar rest.
Parameters:
* **bar_length** -- length of this bar, either as a number,
"Duration", or "BarRestDuration". Bar rest durations are a
little special, since they can be lengths (like 2.5 beats)
that are otherwise note notatable in a single note or rest
object.
* **directions** -- see "Note"
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "min_denom | Minimum divisor of a quarter note that would be needed to represent the duration of this |
| inator"() | note accurately. |
+------------+--------------------------------------------------------------------------------------------+
| "num_beams | Returns the number of beams needed to represent this note's duration. |
| "() | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "divisions | Subdivision used when representing this duration. |
| " | |
+------------+--------------------------------------------------------------------------------------------+
| "length_in | Length in terms of subdivisions. |
| _divisions | |
| " | |
+------------+--------------------------------------------------------------------------------------------+
| "true_leng | True length in terms of the number of quarter notes, taking into tuplet time modification. |
| th" | |
+------------+--------------------------------------------------------------------------------------------+
| "written_l | Written length in terms of the number of quarter notes. |
| ength" | |
+------------+--------------------------------------------------------------------------------------------+
property divisions: int
Subdivision used when representing this duration.
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
property length_in_divisions: int
Length in terms of subdivisions. (See description of "divisions"
attribute in "Duration")
min_denominator() -> int
Minimum divisor of a quarter note that would be needed to
represent the duration of this note accurately. For instance, a
triplet quarter note would have min_denominator 3, since it is
2/3 of a quarter.
num_beams() -> int
Returns the number of beams needed to represent this note's
duration.
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
property true_length: float
True length in terms of the number of quarter notes, taking into
tuplet time modification. Returns 0 in the case of grace notes.
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
property written_length: float
Written length in terms of the number of quarter notes.
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.BarRestDuration.txt
======================================================================
pymusicxml.score_components.BarRestDuration
*******************************************
class pymusicxml.score_components.BarRestDuration(length: float)
Bases: "DurationalObject"
Special duration object used for bar rests.
Parameters:
**length** -- Length of bar in quarter notes.
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "min_denom | Minimum divisor of a quarter note that would be needed to represent the duration of this |
| inator"() | note accurately. |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "divisions | Subdivision used when representing this duration. |
| " | |
+------------+--------------------------------------------------------------------------------------------+
| "length_in | Length in terms of subdivisions. |
| _divisions | |
| " | |
+------------+--------------------------------------------------------------------------------------------+
| "true_leng | True length in terms of the number of quarter notes, taking into tuplet time modification. |
| th" | |
+------------+--------------------------------------------------------------------------------------------+
| "written_l | Written length in terms of the number of quarter notes. |
| ength" | |
+------------+--------------------------------------------------------------------------------------------+
property written_length: float
Written length in terms of the number of quarter notes.
property divisions: int
Subdivision used when representing this duration.
min_denominator() -> int
Minimum divisor of a quarter note that would be needed to
represent the duration of this note accurately. For instance, a
triplet quarter note would have min_denominator 3, since it is
2/3 of a quarter.
property length_in_divisions: int
Length in terms of subdivisions. (See description of "divisions"
attribute in "Duration")
property true_length: float
True length in terms of the number of quarter notes, taking into
tuplet time modification. Returns 0 in the case of grace notes.
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.BeamedGroup.txt
======================================================================
pymusicxml.score_components.BeamedGroup
***************************************
class pymusicxml.score_components.BeamedGroup(contents: Sequence[MusicXMLComponent] = None)
Bases: "DurationalObject", "MusicXMLContainer"
Represents a group of notes/chords/rests joined under a single
beam.
Parameters:
**contents** -- a list of notes, chords and rests contained in
this group.
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "min_denom | Minimum divisor of a quarter note that would be needed to represent the duration of this |
| inator"() | note accurately. |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "render_co | Works out all the beaming for the contents of this group. |
| ntents_bea | |
| ming"() | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "append"(v | S.append(value) -- append value to the end of the sequence |
| alue) | |
+------------+--------------------------------------------------------------------------------------------+
| "clear"() | |
+------------+--------------------------------------------------------------------------------------------+
| "count"(va | |
| lue) | |
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "extend"(v | S.extend(iterable) -- extend sequence by appending elements from the iterable |
| alues) | |
+------------+--------------------------------------------------------------------------------------------+
| "index"(va | Raises ValueError if the value is not present. |
| lue, | |
| [start, | |
| [stop]]) | |
+------------+--------------------------------------------------------------------------------------------+
| "insert"(i | Insert the given object before the given index. |
| , o) | |
+------------+--------------------------------------------------------------------------------------------+
| "pop"([ind | Raise IndexError if list is empty or index is out of range. |
| ex]) | |
+------------+--------------------------------------------------------------------------------------------+
| "remove"(v | S.remove(value) -- remove first occurrence of value. |
| alue) | |
+------------+--------------------------------------------------------------------------------------------+
| "reverse"( | S.reverse() -- reverse *IN PLACE* |
| ) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "divisions | Subdivision used when representing this duration. |
| " | |
+------------+--------------------------------------------------------------------------------------------+
| "length_in | Length in terms of subdivisions. |
| _divisions | |
| " | |
+------------+--------------------------------------------------------------------------------------------+
| "true_leng | True length in terms of the number of quarter notes, taking into tuplet time modification. |
| th" | |
+------------+--------------------------------------------------------------------------------------------+
| "written_l | Written length in terms of the number of quarter notes. |
| ength" | |
+------------+--------------------------------------------------------------------------------------------+
render_contents_beaming() -> None
Works out all the beaming for the contents of this group. (Sets
the "beams" attribute for every element.)
property divisions: int
Subdivision used when representing this duration.
property true_length: float
True length in terms of the number of quarter notes, taking into
tuplet time modification. Returns 0 in the case of grace notes.
property written_length: float
Written length in terms of the number of quarter notes.
property length_in_divisions: int
Length in terms of subdivisions. (See description of "divisions"
attribute in "Duration")
min_denominator() -> int
Minimum divisor of a quarter note that would be needed to
represent the duration of this note accurately. For instance, a
triplet quarter note would have min_denominator 3, since it is
2/3 of a quarter.
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
append(value)
S.append(value) -- append value to the end of the sequence
clear() -> None -- remove all items from S
count(value) -> integer -- return number of occurrences of value
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
extend(values)
S.extend(iterable) -- extend sequence by appending elements from
the iterable
index(value[, start[, stop]]) -> integer -- return first index of value.
Raises ValueError if the value is not present.
Supporting start and stop arguments is optional, but
recommended.
insert(i, o) -> None
Insert the given object before the given index.
Parameters:
* **i** -- Index at which to insert
* **o** -- Object to insert
pop([index]) -> item -- remove and return item at index (default last).
Raise IndexError if list is empty or index is out of range.
remove(value)
S.remove(value) -- remove first occurrence of value. Raise
ValueError if the value is not present.
reverse()
S.reverse() -- reverse *IN PLACE*
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.Chord.txt
======================================================================
pymusicxml.score_components.Chord
*********************************
class pymusicxml.score_components.Chord(pitches: Sequence[Pitch | str], duration: Duration | str | float, ties: str | Sequence[str | None] = None, notations=(), articulations=(), noteheads=None, directions=(), stemless: bool = False, velocity: int = None)
Bases: "DurationalObject"
Class representing a chord. When rendered to MusicXML, a chord is
represented by sequential <note> tags, with all but the first
carrying a </chord> tag.
Parameters:
* **pitches** -- either a Pitch object or a string to parse as a
pitch (see "Pitch.from_string()")
* **duration** -- either a "Duration" object, a string to parse
as a duration (see "Duration.from_string()"), or a number of
quarter notes.
* **ties** -- either one of "start", "continue", "stop", or None
(in which case each note of the chord follows that tie
indication), or a list of such tie indications, one for each
note.
* **notations** -- a notation or list of notations like that
passed to a "Note" object. Since this is a chord, it is also
possible to include a "StartMultiGliss" or "StopMultiGliss"
object.
* **articulations** -- an articulation or list of articulations
like that passed to a "Note" object.
* **noteheads** -- Either a single notehead (in the form of a
"Notehead" or string representing XML notehead type) or a list
of such noteheads, one for each pitch. The former results in
all noteheads in the chord being the same; the latter results
in different noteheads for each chord member. Note that the
default of None represents ordinary noteheads.
* **directions** -- a direction or list of directions like that
passed to a "Note" object.
* **stemless** -- boolean for whether to render the chord with
no stem.
* **velocity** -- a note velocity (0-127) which gets passed
along and used for playback by many applications
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "min_denom | Minimum divisor of a quarter note that would be needed to represent the duration of this |
| inator"() | note accurately. |
+------------+--------------------------------------------------------------------------------------------+
| "num_beams | Returns the number of beams needed to represent this duration. |
| "() | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "articulat | Articulations attached to this chord. |
| ions" | |
+------------+--------------------------------------------------------------------------------------------+
| "beams" | Dictionary describing the notation of all the beams for this Chord. |
+------------+--------------------------------------------------------------------------------------------+
| "direction | Directions attached to this chord. |
| s" | |
+------------+--------------------------------------------------------------------------------------------+
| "divisions | Subdivision used when representing this duration. |
| " | |
+------------+--------------------------------------------------------------------------------------------+
| "duration" | The "Duration" of this chord. |
+------------+--------------------------------------------------------------------------------------------+
| "length_in | Length in terms of subdivisions. |
| _divisions | |
| " | |
+------------+--------------------------------------------------------------------------------------------+
| "notations | Notations attached to this chord. |
| " | |
+------------+--------------------------------------------------------------------------------------------+
| "pitches" | Tuple of the pitches of the notes in this chord. |
+------------+--------------------------------------------------------------------------------------------+
| "ties" | Either a string representing the tie state of all the notes, if all notes have the same |
| | tie state, or a tuple representing the tie state of each note individually. |
+------------+--------------------------------------------------------------------------------------------+
| "true_leng | True length in terms of the number of quarter notes, taking into tuplet time modification. |
| th" | |
+------------+--------------------------------------------------------------------------------------------+
| "tuplet_br | Whether or not this chord starts or stops a tuplet bracket. |
| acket" | |
+------------+--------------------------------------------------------------------------------------------+
| "voice" | Which voice this chord resides in. |
+------------+--------------------------------------------------------------------------------------------+
| "written_l | Written length in terms of the number of quarter notes. |
| ength" | |
+------------+--------------------------------------------------------------------------------------------+
property pitches
Tuple of the pitches of the notes in this chord.
num_beams() -> int
Returns the number of beams needed to represent this duration.
property duration
The "Duration" of this chord.
property true_length: float
True length in terms of the number of quarter notes, taking into
tuplet time modification. Returns 0 in the case of grace notes.
property written_length: float
Written length in terms of the number of quarter notes.
property length_in_divisions: int
Length in terms of subdivisions. (See description of "divisions"
attribute in "Duration")
property notations: Sequence[Notation]
Notations attached to this chord.
property articulations
Articulations attached to this chord.
property directions
Directions attached to this chord.
property divisions: int
Subdivision used when representing this duration.
property voice
Which voice this chord resides in.
property beams
Dictionary describing the notation of all the beams for this
Chord.
property ties
Either a string representing the tie state of all the notes, if
all notes have the same tie state, or a tuple representing the
tie state of each note individually.
property tuplet_bracket
Whether or not this chord starts or stops a tuplet bracket.
min_denominator() -> int
Minimum divisor of a quarter note that would be needed to
represent the duration of this note accurately. For instance, a
triplet quarter note would have min_denominator 3, since it is
2/3 of a quarter.
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.Clef.txt
======================================================================
pymusicxml.score_components.Clef
********************************
class pymusicxml.score_components.Clef(sign: str, line: int, octaves_transposition: int = 0)
Bases: "MusicXMLComponent"
Class representing a musical clef
Parameters:
* **sign** -- Whether it is a G, F, or C clef
* **line** -- Which line the clef is centered on
* **octaves_transposition** -- How many octaves up or down the
clef transposes
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "from_stri | Constructs a clef from one of the standard names, e.g. treble, bass, alto. |
| ng"(clef_s | |
| tring[, oc | |
| taves_tran | |
| sposition] | |
| ) | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "clef_name | Dictionary mapping standard clef names to tuple of (clef letter type, clef line) |
| _to_letter | |
| _and_line" | |
+------------+--------------------------------------------------------------------------------------------+
clef_name_to_letter_and_line = {'alto': ('C', 3), 'baritone': ('F', 3), 'bass': ('F', 4), 'mezzo-soprano': ('C', 2), 'soprano': ('C', 1), 'tenor': ('C', 4), 'treble': ('G', 2)}
Dictionary mapping standard clef names to tuple of (clef letter
type, clef line)
classmethod from_string(clef_string: str, octaves_transposition: int = 0)
Constructs a clef from one of the standard names, e.g. treble,
bass, alto
Parameters:
* **clef_string** -- name of the clef
* **octaves_transposition** -- octaves of transposition up or
down to be applied to the clef
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.Direction.txt
======================================================================
pymusicxml.score_components.Direction
*************************************
class pymusicxml.score_components.Direction(placement: str | StaffPlacement = 'above', voice: int = 1, staff: int = None)
Bases: "MusicXMLComponent", "ABC"
Abstract base class for musical directions, such as text and
metronome marks.
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "render_di | Renders the <direction-type> element that constitutes the main substance of a <direction> |
| rection_ty | element. |
| pe"() | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
abstractmethod render_direction_type() -> Sequence[Element]
Renders the <direction-type> element that constitutes the main
substance of a <direction> element.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.Duration.txt
======================================================================
pymusicxml.score_components.Duration
************************************
class pymusicxml.score_components.Duration(note_type: str, num_dots: int = 0, tuplet_ratio: tuple = None)
Bases: "DurationalObject"
Represents a length that can be written as a single note or rest.
Parameters:
* **note_type** -- written musicXML duration type, e.g.
"quarter"
* **num_dots** -- number of duration dots
* **tuplet_ratio** -- One of (a) None, indicating not part of a
tuplet (b) a tuple of either (# actual notes, # normal notes)
(c) a tuple of (# actual, # normal, note type), e.g. (4, 3,
0.5) for 4 in the space of 3 eighths.
Variables:
* **note_type** -- written musicXML duration type, e.g. quarter
* **num_dots** -- number of duration dots
* **tuplet_ratio** -- see param definition.
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "from_divi | Constructs a Duration from a divisor |
| sor"(divis | |
| or[, | |
| num_dots, | |
| tuplet_rat | |
| io]) | |
+------------+--------------------------------------------------------------------------------------------+
| "from_stri | Parses various string representations into a Duration |
| ng"(durati | |
| on_string) | |
+------------+--------------------------------------------------------------------------------------------+
| "from_writ | Constructs a Duration from a written length |
| ten_length | |
| "(written_ | |
| length[, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "get_note_ | Given a length in quarter notes, get the note type and number of dots. |
| type_and_n | |
| umber_of_d | |
| ots"(lengt | |
| h[, ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "min_denom | Minimum divisor of a quarter note that would be needed to represent the duration of this |
| inator"() | note accurately. |
+------------+--------------------------------------------------------------------------------------------+
| "num_beams | The number of beams needed to for a note of this duration. |
| "() | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "render_to | Renders the beat unit tags needed in metronome directions. |
| _beat_unit | |
| _tags"() | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "divisions | In MusicXML, "divisions" is a measure attribute that specifies a smallest metric |
| " | subdivision for the measure in terms of how many would fit in a quarter note. |
+------------+--------------------------------------------------------------------------------------------+
| "length_in | Length in terms of subdivisions. |
| _divisions | |
| " | |
+------------+--------------------------------------------------------------------------------------------+
| "true_leng | True length in terms of the number of quarter notes, taking into tuplet time modification. |
| th" | |
+------------+--------------------------------------------------------------------------------------------+
| "written_l | Written length in terms of the number of quarter notes. |
| ength" | |
+------------+--------------------------------------------------------------------------------------------+
property divisions: int
In MusicXML, "divisions" is a measure attribute that specifies a
smallest metric subdivision for the measure in terms of how many
would fit in a quarter note. So if divisions is 8, then a dotted
quarter would have duration 12. When we create a duration,
divisions is automatically set to the the smallest number with
which we could accurately specify this duration. So a dotted
quarter note would get set to 2 (since it's three 8th notes),
and a triplet quarter would get set to 3 (since it's 2/3rds of a
quarter note). Later, when we go to render a whole measure, the
least common multiple of all of these minimum divisions for all
the objects in the measure gets calculated, and the divisions
attribute for all the objects gets reset to that.
property written_length: float
Written length in terms of the number of quarter notes.
property true_length: float
True length in terms of the number of quarter notes, taking into
tuplet time modification. Returns 0 in the case of grace notes.
min_denominator() -> int
Minimum divisor of a quarter note that would be needed to
represent the duration of this note accurately. For instance, a
triplet quarter note would have min_denominator 3, since it is
2/3 of a quarter.
property length_in_divisions: int
Length in terms of subdivisions. (See description of "divisions"
attribute in "Duration")
num_beams() -> int
The number of beams needed to for a note of this duration.
classmethod from_written_length(written_length: float, tuplet_ratio=None, max_dots_allowed=4)
Constructs a Duration from a written length
Parameters:
* **written_length** -- written length in quarter notes
* **tuplet_ratio** -- see description in "Duration"
constructor
* **max_dots_allowed** -- The maximum number of dots to allow
Raise:
ValueError if the given note length is impossible with
max_dots_allowed dots or fewer
classmethod from_divisor(divisor: int, num_dots=0, tuplet_ratio=None)
Constructs a Duration from a divisor
Parameters:
* **divisor** -- the number of this duration that fit in a
whole note. 4 = quarter note, 8 = 8th note, etc.
* **num_dots** -- see description in "Duration" constructor
* **tuplet_ratio** -- see description in "Duration"
constructor
classmethod from_string(duration_string: str)
Parses various string representations into a Duration
Parameters:
**duration_string** -- Can take a variety of forms, e.g.
"dotted eighth", "16."
static get_note_type_and_number_of_dots(length: float, max_dots_allowed: int = 4) -> tuple[str, int]
Given a length in quarter notes, get the note type and number of
dots.
Parameters:
* **length** -- length in quarter notes
* **max_dots_allowed** -- maximum number of dots to allow
Raise:
ValueError if the given note length is impossible with
max_dots_allowed dots or fewer
Returns:
tuple of (note type string, number of dots)
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
render_to_beat_unit_tags() -> Sequence[Element]
Renders the beat unit tags needed in metronome directions.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.DurationalObject.txt
======================================================================
pymusicxml.score_components.DurationalObject
********************************************
class pymusicxml.score_components.DurationalObject
Bases: "MusicXMLComponent", "ABC"
Abstract base class for all objects that have duration within a
measure.
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "min_denom | Minimum divisor of a quarter note that would be needed to represent the duration of this |
| inator"() | note accurately. |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "divisions | Subdivision used when representing this duration. |
| " | |
+------------+--------------------------------------------------------------------------------------------+
| "length_in | Length in terms of subdivisions. |
| _divisions | |
| " | |
+------------+--------------------------------------------------------------------------------------------+
| "true_leng | True length in terms of the number of quarter notes, taking into tuplet time modification. |
| th" | |
+------------+--------------------------------------------------------------------------------------------+
| "written_l | Written length in terms of the number of quarter notes. |
| ength" | |
+------------+--------------------------------------------------------------------------------------------+
abstract property true_length: float
True length in terms of the number of quarter notes, taking into
tuplet time modification. Returns 0 in the case of grace notes.
abstract property written_length: float
Written length in terms of the number of quarter notes.
abstract property length_in_divisions: int
Length in terms of subdivisions. (See description of "divisions"
attribute in "Duration")
abstract property divisions: int
Subdivision used when representing this duration.
abstractmethod min_denominator() -> int
Minimum divisor of a quarter note that would be needed to
represent the duration of this note accurately. For instance, a
triplet quarter note would have min_denominator 3, since it is
2/3 of a quarter.
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
abstractmethod render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
abstractmethod wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.GraceChord.txt
======================================================================
pymusicxml.score_components.GraceChord
**************************************
class pymusicxml.score_components.GraceChord(pitches: Sequence[Pitch | str], duration: Duration | str | float, ties: str | Sequence[str | None] = None, notations=(), articulations=(), noteheads=None, directions=(), stemless: bool = False, slashed=False, velocity: int = None)
Bases: "Chord"
Subclass of "Chord" representing a durationless grace chord.
Parameters:
* **pitches** -- see "Chord"
* **duration** -- see "Chord". This will be the displayed
duration of the chord, even though it takes up no metric space
in the bar.
* **ties** -- see "Chord"
* **notations** -- see "Chord"
* **articulations** -- see "Chord"
* **notations** -- see "Chord"
* **articulations** -- see "Chord"
* **noteheads** -- see "Chord"
* **directions** -- see "Chord"
* **stemless** -- see "Chord"
* **slashed** -- whether or not this grace chord is rendered
with a slash.
* **velocity** -- a note velocity (0-127) which gets passed
along and used for playback by many applications
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "min_denom | Minimum divisor of a quarter note that would be needed to represent the duration of this |
| inator"() | note accurately. |
+------------+--------------------------------------------------------------------------------------------+
| "num_beams | Returns the number of beams needed to represent this duration. |
| "() | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "articulat | Articulations attached to this chord. |
| ions" | |
+------------+--------------------------------------------------------------------------------------------+
| "beams" | Dictionary describing the notation of all the beams for this Chord. |
+------------+--------------------------------------------------------------------------------------------+
| "direction | Directions attached to this chord. |
| s" | |
+------------+--------------------------------------------------------------------------------------------+
| "divisions | Subdivision used when representing this duration. |
| " | |
+------------+--------------------------------------------------------------------------------------------+
| "duration" | The "Duration" of this chord. |
+------------+--------------------------------------------------------------------------------------------+
| "length_in | Length in terms of subdivisions. |
| _divisions | |
| " | |
+------------+--------------------------------------------------------------------------------------------+
| "notations | Notations attached to this chord. |
| " | |
+------------+--------------------------------------------------------------------------------------------+
| "pitches" | Tuple of the pitches of the notes in this chord. |
+------------+--------------------------------------------------------------------------------------------+
| "ties" | Either a string representing the tie state of all the notes, if all notes have the same |
| | tie state, or a tuple representing the tie state of each note individually. |
+------------+--------------------------------------------------------------------------------------------+
| "true_leng | True length in terms of the number of quarter notes, taking into tuplet time modification. |
| th" | |
+------------+--------------------------------------------------------------------------------------------+
| "tuplet_br | Whether or not this chord starts or stops a tuplet bracket. |
| acket" | |
+------------+--------------------------------------------------------------------------------------------+
| "voice" | Which voice this chord resides in. |
+------------+--------------------------------------------------------------------------------------------+
| "written_l | Written length in terms of the number of quarter notes. |
| ength" | |
+------------+--------------------------------------------------------------------------------------------+
property articulations
Articulations attached to this chord.
property beams
Dictionary describing the notation of all the beams for this
Chord.
property directions
Directions attached to this chord.
property divisions: int
Subdivision used when representing this duration.
property duration
The "Duration" of this chord.
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
property length_in_divisions: int
Length in terms of subdivisions. (See description of "divisions"
attribute in "Duration")
min_denominator() -> int
Minimum divisor of a quarter note that would be needed to
represent the duration of this note accurately. For instance, a
triplet quarter note would have min_denominator 3, since it is
2/3 of a quarter.
property notations: Sequence[Notation]
Notations attached to this chord.
num_beams() -> int
Returns the number of beams needed to represent this duration.
property pitches
Tuple of the pitches of the notes in this chord.
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
property ties
Either a string representing the tie state of all the notes, if
all notes have the same tie state, or a tuple representing the
tie state of each note individually.
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
property true_length: float
True length in terms of the number of quarter notes, taking into
tuplet time modification. Returns 0 in the case of grace notes.
property tuplet_bracket
Whether or not this chord starts or stops a tuplet bracket.
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
property voice
Which voice this chord resides in.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
property written_length: float
Written length in terms of the number of quarter notes.
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.GraceNote.txt
======================================================================
pymusicxml.score_components.GraceNote
*************************************
class pymusicxml.score_components.GraceNote(pitch: Pitch | str, duration: Duration | str | float, ties: str = None, notations=(), articulations=(), notehead: Notehead | str = None, directions: Sequence[Direction] = (), stemless: bool = False, slashed=False, velocity: int = None)
Bases: "Note"
Subclass of "Note" representing a durationless grace note.
Parameters:
* **pitch** -- see "Note"
* **duration** -- see "Note". This will be the displayed
duration of the note, even though it takes up no metric space
in the bar.
* **ties** -- see "Note"
* **notations** -- see "Note"
* **articulations** -- see "Note"
* **notations** -- see "Note"
* **articulations** -- see "Note"
* **notehead** -- see "Note"
* **directions** -- see "Note"
* **stemless** -- see "Note"
* **slashed** -- whether or not this grace note is rendered with
a slash.
* **velocity** -- a note velocity (0-127) which gets passed
along and used for playback by many applications
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "min_denom | Minimum divisor of a quarter note that would be needed to represent the duration of this |
| inator"() | note accurately. |
+------------+--------------------------------------------------------------------------------------------+
| "num_beams | Returns the number of beams needed to represent this note's duration. |
| "() | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "divisions | Subdivision used when representing this duration. |
| " | |
+------------+--------------------------------------------------------------------------------------------+
| "length_in | Length in terms of subdivisions. |
| _divisions | |
| " | |
+------------+--------------------------------------------------------------------------------------------+
| "starts_ti | Whether or not this note starts a tie. |
| e" | |
+------------+--------------------------------------------------------------------------------------------+
| "stops_tie | Whether or not this note ends a tie. |
| " | |
+------------+--------------------------------------------------------------------------------------------+
| "true_leng | True length in terms of the number of quarter notes, taking into tuplet time modification. |
| th" | |
+------------+--------------------------------------------------------------------------------------------+
| "written_l | Written length in terms of the number of quarter notes. |
| ength" | |
+------------+--------------------------------------------------------------------------------------------+
property divisions: int
Subdivision used when representing this duration.
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
property length_in_divisions: int
Length in terms of subdivisions. (See description of "divisions"
attribute in "Duration")
min_denominator() -> int
Minimum divisor of a quarter note that would be needed to
represent the duration of this note accurately. For instance, a
triplet quarter note would have min_denominator 3, since it is
2/3 of a quarter.
num_beams() -> int
Returns the number of beams needed to represent this note's
duration.
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
property starts_tie
Whether or not this note starts a tie.
property stops_tie
Whether or not this note ends a tie.
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
property true_length: float
True length in terms of the number of quarter notes, taking into
tuplet time modification. Returns 0 in the case of grace notes.
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
property written_length: float
Written length in terms of the number of quarter notes.
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.KeySignature.txt
======================================================================
pymusicxml.score_components.KeySignature
****************************************
class pymusicxml.score_components.KeySignature
Bases: "MusicXMLComponent"
Abstract base class for traditional and non-traditional key
signatures. Also contains the "parse" method for parsing a string
into a key signature.
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "parse"(in | Parses several kinds of input into a TraditionalKeySignature or NonTraditionalKeySignature |
| terpretabl | object. |
| e_as_key_s | |
| ignature) | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "step_alte | Map of step letter -> alteration (in half steps) implied by this key. |
| rations"() | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "mode_fift | |
| h_alterati | |
| ons" | |
+------------+--------------------------------------------------------------------------------------------+
mode_fifth_alterations = {'aeolian': -3, 'dorian': -2, 'ionian': 0, 'locrian': -4, 'lydian': 1, 'major': 0, 'minor': -3, 'mixolydian': -1, 'phrygian': -4, None: 0}
static parse(interpretable_as_key_signature: KeySignature | int | str) -> KeySignature
Parses several kinds of input into a TraditionalKeySignature or
NonTraditionalKeySignature object.
Parameters:
**interpretable_as_key_signature** -- either a KeySignature
object, an integer representing the number of sharps (or
flats if negative), or a string to be parsed into a key
signature, such as "G major", "F# lydian", or "C#, Ab" (which
produces a non-traditional key-signature), etc.
abstractmethod render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
step_alterations() -> dict
Map of step letter -> alteration (in half steps) implied by this
key.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.Measure.txt
======================================================================
pymusicxml.score_components.Measure
***********************************
class pymusicxml.score_components.Measure(contents: Sequence[DurationalObject] | Sequence[Sequence[DurationalObject]] = None, time_signature: tuple = None, key: KeySignature | str | int = None, clef: Clef | str | tuple = None, barline: str = None, staves: str = None, number: int = 1, directions_with_displacements: Sequence[tuple[Direction, float]] = (), transpose: Transpose | None = None)
Bases: "MusicXMLComponent", "MusicXMLContainer"
Class representing a measure of music, perhaps with multiple
voices.
Parameters:
* **contents** -- Either a list of Notes / Chords / Rests /
Tuplets / BeamedGroups or a list of voices, each of which is a
list of Notes / Chords / Rests / Tuplets / BeamedGroups.
* **time_signature** -- in tuple form, e.g. (3, 4) for "3/4"
* **key** -- either a TraditionalKeySignature or
NonTraditionalKeySignature object, an integer representing the
number of sharps (or flats if negative), or a string to be
parsed into a key signature, such as "G major", "F# lydian",
etc.
* **clef** -- either None (for no clef), a Clef object, a string
(like "treble"), or a tuple like ("G", 2) to represent the
clef letter, the line it lands, and an optional octave
transposition as the third parameter
* **barline** -- either None, which means there will be a
regular barline, "double", "end", or any of the barline names
used in the MusicXML standard.
* **staves** -- for multi-part music, like piano music
* **number** -- which number in the score. Will be set
automatically by the containing Part
* **directions_with_displacements** -- this is a way of placing
directions at arbitrary positions in the bar. It takes a list
of tuples of (direction, position in the bar), where position
in the bar is a floating point number of quarter notes.
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "direction | Returns a tuple of all to the Diections in this measure, both those attached to notes and |
| s"() | those passed to the directions_with_displacements constructor argument. |
+------------+--------------------------------------------------------------------------------------------+
| "iter_dire | Iterates through the Directions in this measure, both those attached to notes and those |
| ctions"() | passed to the directions_with_displacements constructor argument. |
+------------+--------------------------------------------------------------------------------------------+
| "iter_leav | Iterates through the Notes/Chords/Rests in this measure, expanding out any tuplets or beam |
| es"([which | groups. |
| _voices]) | |
+------------+--------------------------------------------------------------------------------------------+
| "iter_nota | Iterates through the Notations in this measure, in order. |
| tions"() | |
+------------+--------------------------------------------------------------------------------------------+
| "leaves"([ | Returns a tuple of all to the Notes/Chords/Rests in this measure, expanding out any |
| which_voic | tuplets or beam groups. |
| es]) | |
+------------+--------------------------------------------------------------------------------------------+
| "notations | Returns a tuple of all to the Notation in this measure, returned in order within the |
| "() | measure. |
+------------+--------------------------------------------------------------------------------------------+
| "render"([ | Renders this component to a tuple of ElementTree.Element. |
| divisions] | |
| ) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "append"(v | S.append(value) -- append value to the end of the sequence |
| alue) | |
+------------+--------------------------------------------------------------------------------------------+
| "clear"() | |
+------------+--------------------------------------------------------------------------------------------+
| "count"(va | |
| lue) | |
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "extend"(v | S.extend(iterable) -- extend sequence by appending elements from the iterable |
| alues) | |
+------------+--------------------------------------------------------------------------------------------+
| "index"(va | Raises ValueError if the value is not present. |
| lue, | |
| [start, | |
| [stop]]) | |
+------------+--------------------------------------------------------------------------------------------+
| "insert"(i | Insert the given object before the given index. |
| , o) | |
+------------+--------------------------------------------------------------------------------------------+
| "pop"([ind | Raise IndexError if list is empty or index is out of range. |
| ex]) | |
+------------+--------------------------------------------------------------------------------------------+
| "remove"(v | S.remove(value) -- remove first occurrence of value. |
| alue) | |
+------------+--------------------------------------------------------------------------------------------+
| "reverse"( | S.reverse() -- reverse *IN PLACE* |
| ) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "voices" | Returns a tuple of the voices in this Measure |
+------------+--------------------------------------------------------------------------------------------+
property voices: tuple[Sequence[MusicXMLComponent]]
Returns a tuple of the voices in this Measure
iter_leaves(which_voices=None) -> Iterator[tuple[Note | Chord | Rest, float]]
Iterates through the Notes/Chords/Rests in this measure,
expanding out any tuplets or beam groups. The notes/chords/rests
draw from the specified voices.
Parameters:
**which_voices** -- List of voices to return notes from
(numbered 0, 1, 2, 3). The default value of None returns
notes from all voices.
:return tuples of (Note/Chord/Rest, beat within measure)
leaves(which_voices=None) -> Sequence[Note | Chord | Rest]
Returns a tuple of all to the Notes/Chords/Rests in this
measure, expanding out any tuplets or beam groups. The
notes/chords/rests and draw from the specified voices, and are
returned in order within the measure.
Parameters:
**which_voices** -- List of voices to return notes from
(numbered 0, 1, 2, 3). The default value of None returns
notes from all voices.
iter_directions() -> Iterator[tuple[Direction, float]]
Iterates through the Directions in this measure, both those
attached to notes and those passed to the
directions_with_displacements constructor argument.
:return tuples of (Direction, beat within measure)
iter_notations() -> Iterator[tuple[Notation, float]]
Iterates through the Notations in this measure, in order.
:return tuples of (Notation, beat_within_measure)
directions() -> Sequence[Direction]
Returns a tuple of all to the Diections in this measure, both
those attached to notes and those passed to the
directions_with_displacements constructor argument. Returned in
order within the measure.
notations() -> Sequence[Notation]
Returns a tuple of all to the Notation in this measure, returned
in order within the measure.
render(divisions: int = None) -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
append(value)
S.append(value) -- append value to the end of the sequence
clear() -> None -- remove all items from S
count(value) -> integer -- return number of occurrences of value
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
extend(values)
S.extend(iterable) -- extend sequence by appending elements from
the iterable
index(value[, start[, stop]]) -> integer -- return first index of value.
Raises ValueError if the value is not present.
Supporting start and stop arguments is optional, but
recommended.
insert(i, o) -> None
Insert the given object before the given index.
Parameters:
* **i** -- Index at which to insert
* **o** -- Object to insert
pop([index]) -> item -- remove and return item at index (default last).
Raise IndexError if list is empty or index is out of range.
remove(value)
S.remove(value) -- remove first occurrence of value. Raise
ValueError if the value is not present.
reverse()
S.reverse() -- reverse *IN PLACE*
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.MidNumberedSpanner.txt
======================================================================
pymusicxml.score_components.MidNumberedSpanner
**********************************************
class pymusicxml.score_components.MidNumberedSpanner(label: Any = 1)
Bases: "NumberedSpanner"
Abstract base class for the middle of a Direction or Notation that
spans multiple time-points.
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.MultiGliss.txt
======================================================================
pymusicxml.score_components.MultiGliss
**************************************
class pymusicxml.score_components.MultiGliss(numbers: Sequence[int] = (1,))
Bases: "Notation"
Abstract base class for start and stop multi glisses
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
abstractmethod render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.MusicXMLComponent.txt
======================================================================
pymusicxml.score_components.MusicXMLComponent
*********************************************
class pymusicxml.score_components.MusicXMLComponent
Bases: "ABC"
Abstract base class of all musical objects, providing functionality
for rendering and exporting to a file.
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
abstractmethod render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
abstractmethod wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.MusicXMLContainer.txt
======================================================================
pymusicxml.score_components.MusicXMLContainer
*********************************************
class pymusicxml.score_components.MusicXMLContainer(contents: Sequence[MusicXMLComponent], allowed_types: Sequence[Type])
Bases: "MutableSequence"
Base class for all musical objects that contain other musical
objects, such as "Part", "Measure", and *Tuplet*.
Parameters:
* **contents** -- Musical objects to be contained within this
object
* **allowed_types** -- Allowable types for objects contained
within this object
Variables:
* **contents** -- Musical objects contained within this object
* **allowed_types** -- Allowable types for objects contained
within this object
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "insert"(i | Insert the given object before the given index. |
| , o) | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "append"(v | S.append(value) -- append value to the end of the sequence |
| alue) | |
+------------+--------------------------------------------------------------------------------------------+
| "clear"() | |
+------------+--------------------------------------------------------------------------------------------+
| "count"(va | |
| lue) | |
+------------+--------------------------------------------------------------------------------------------+
| "extend"(v | S.extend(iterable) -- extend sequence by appending elements from the iterable |
| alues) | |
+------------+--------------------------------------------------------------------------------------------+
| "index"(va | Raises ValueError if the value is not present. |
| lue, | |
| [start, | |
| [stop]]) | |
+------------+--------------------------------------------------------------------------------------------+
| "pop"([ind | Raise IndexError if list is empty or index is out of range. |
| ex]) | |
+------------+--------------------------------------------------------------------------------------------+
| "remove"(v | S.remove(value) -- remove first occurrence of value. |
| alue) | |
+------------+--------------------------------------------------------------------------------------------+
| "reverse"( | S.reverse() -- reverse *IN PLACE* |
| ) | |
+------------+--------------------------------------------------------------------------------------------+
insert(i, o) -> None
Insert the given object before the given index.
Parameters:
* **i** -- Index at which to insert
* **o** -- Object to insert
append(value)
S.append(value) -- append value to the end of the sequence
clear() -> None -- remove all items from S
count(value) -> integer -- return number of occurrences of value
extend(values)
S.extend(iterable) -- extend sequence by appending elements from
the iterable
index(value[, start[, stop]]) -> integer -- return first index of value.
Raises ValueError if the value is not present.
Supporting start and stop arguments is optional, but
recommended.
pop([index]) -> item -- remove and return item at index (default last).
Raise IndexError if list is empty or index is out of range.
remove(value)
S.remove(value) -- remove first occurrence of value. Raise
ValueError if the value is not present.
reverse()
S.reverse() -- reverse *IN PLACE*
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.NonTraditionalKeySignature.txt
======================================================================
pymusicxml.score_components.NonTraditionalKeySignature
******************************************************
class pymusicxml.score_components.NonTraditionalKeySignature(*step_alteration_tuples)
Bases: "KeySignature"
A non-traditional key signature. See
https://www.w3.org/2021/06/musicxml40/musicxml-
reference/elements/key/.
Parameters:
**step_alteration_tuples** -- a list of (step, alteration) or
(step, alteration, accidental) tuples, each of which corresponds
to a set of <key-step>, <key-alter>, and optionally <key-
accidental> tags.
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "add_alter | Add another altered step to this key signature. |
| ation"(ste | |
| p, alterat | |
| ion[, acci | |
| dental]) | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "step_alte | Map of step letter -> alteration (in half steps) implied by this key. |
| rations"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "parse"(in | Parses several kinds of input into a TraditionalKeySignature or NonTraditionalKeySignature |
| terpretabl | object. |
| e_as_key_s | |
| ignature) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "mode_fift | |
| h_alterati | |
| ons" | |
+------------+--------------------------------------------------------------------------------------------+
add_alteration(step, alteration, accidental=None)
Add another altered step to this key signature.
Parameters:
* **step** -- the step being altered, e.g. "B"
* **alteration** -- how much to alter it by, in half steps,
e.g. -1 for a flat
* **accidental** -- which accidental to draw; inferred from
the alteration if left as None. (See "AccidentalType".)
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
step_alterations() -> dict
Map of step letter -> alteration (in half steps) implied by this
key.
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
mode_fifth_alterations = {'aeolian': -3, 'dorian': -2, 'ionian': 0, 'locrian': -4, 'lydian': 1, 'major': 0, 'minor': -3, 'mixolydian': -1, 'phrygian': -4, None: 0}
static parse(interpretable_as_key_signature: KeySignature | int | str) -> KeySignature
Parses several kinds of input into a TraditionalKeySignature or
NonTraditionalKeySignature object.
Parameters:
**interpretable_as_key_signature** -- either a KeySignature
object, an integer representing the number of sharps (or
flats if negative), or a string to be parsed into a key
signature, such as "G major", "F# lydian", or "C#, Ab" (which
produces a non-traditional key-signature), etc.
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.Notation.txt
======================================================================
pymusicxml.score_components.Notation
************************************
class pymusicxml.score_components.Notation
Bases: "MusicXMLComponent", "ABC"
Abstract base class for MusicXML Notations (glissandi, slurs).
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
abstractmethod render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.Note.txt
======================================================================
pymusicxml.score_components.Note
********************************
class pymusicxml.score_components.Note(pitch: Pitch | str, duration: Duration | str | float, ties: str = None, notations=(), articulations=(), notehead: Notehead | str = None, directions: Sequence[Direction] = (), stemless: bool = False, velocity: int = None)
Bases: "_XMLNote"
Class representing a single, pitched note.
Parameters:
* **pitch** -- either a Pitch object or a string to parse as a
pitch (see "Pitch.from_string()")
* **duration** -- either a "Duration" object, a string to parse
as a duration (see "Duration.from_string()"), or a number of
quarter notes.
* **ties** -- one of "start", "continue", "stop", None
* **notations** -- Either a single notation, or a list of
notations that will populate the musicXML "notations" tag.
Each is either a "Notation" object, an "ElementTree.Element"
object, or a string that will be converted into an Element
object.
* **articulations** -- Either a single articulations or a list
of articulations that will populate the musicXML
"articulations" tag (itself in the "notations" tag). Each is
either an "ElementTree.Element" object, or a string that will
be converted into an Element object.
* **notehead** -- a "Notehead" or a string representing XML
notehead type. Note that the default of None represents an
ordinary notehead.
* **directions** -- either a single direction, or a list of
directions (e.g. "TextAnnotation", "MetronomeMark") to
populate the musicXML "directions" tag.
* **stemless** -- boolean for whether to render the note with no
stem.
* **velocity** -- a note velocity (0-127) which gets passed
along and used for playback by many applications
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "min_denom | Minimum divisor of a quarter note that would be needed to represent the duration of this |
| inator"() | note accurately. |
+------------+--------------------------------------------------------------------------------------------+
| "num_beams | Returns the number of beams needed to represent this note's duration. |
| "() | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "divisions | Subdivision used when representing this duration. |
| " | |
+------------+--------------------------------------------------------------------------------------------+
| "length_in | Length in terms of subdivisions. |
| _divisions | |
| " | |
+------------+--------------------------------------------------------------------------------------------+
| "starts_ti | Whether or not this note starts a tie. |
| e" | |
+------------+--------------------------------------------------------------------------------------------+
| "stops_tie | Whether or not this note ends a tie. |
| " | |
+------------+--------------------------------------------------------------------------------------------+
| "true_leng | True length in terms of the number of quarter notes, taking into tuplet time modification. |
| th" | |
+------------+--------------------------------------------------------------------------------------------+
| "written_l | Written length in terms of the number of quarter notes. |
| ength" | |
+------------+--------------------------------------------------------------------------------------------+
property starts_tie
Whether or not this note starts a tie.
property stops_tie
Whether or not this note ends a tie.
property divisions: int
Subdivision used when representing this duration.
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
property length_in_divisions: int
Length in terms of subdivisions. (See description of "divisions"
attribute in "Duration")
min_denominator() -> int
Minimum divisor of a quarter note that would be needed to
represent the duration of this note accurately. For instance, a
triplet quarter note would have min_denominator 3, since it is
2/3 of a quarter.
num_beams() -> int
Returns the number of beams needed to represent this note's
duration.
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
property true_length: float
True length in terms of the number of quarter notes, taking into
tuplet time modification. Returns 0 in the case of grace notes.
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
property written_length: float
Written length in terms of the number of quarter notes.
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.Notehead.txt
======================================================================
pymusicxml.score_components.Notehead
************************************
class pymusicxml.score_components.Notehead(notehead_name: str, filled: bool = None, **other_attrs)
Bases: "MusicXMLComponent"
Class representing a notehead type.
Parameters:
* **notehead_name** -- accepts any of the MusicXML notehead
types, possibly preceded by "filled" or "open". So "filled
triangle" will create the triangle notehead type with the
filled flag set to true.
* **filled** -- whether or not the notehead is filled
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "valid_xml | List of valid MusicXML notehead types |
| _types" | |
+------------+--------------------------------------------------------------------------------------------+
valid_xml_types = ['normal', 'diamond', 'triangle', 'slash', 'cross', 'x', 'circle-x', 'inverted triangle', 'square', 'arrow down', 'arrow up', 'circled', 'slashed', 'back slashed', 'cluster', 'circle dot', 'left triangle', 'rectangle', 'do', 're', 'mi', 'fa', 'fa up', 'so', 'la', 'ti', 'none']
List of valid MusicXML notehead types
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.NumberedSpanner.txt
======================================================================
pymusicxml.score_components.NumberedSpanner
*******************************************
class pymusicxml.score_components.NumberedSpanner(label: Any = 1)
Bases: "ABC"
Abstract base class for part of a Direction or Notation that spans
multiple time-points.
Parameters:
**label** -- A label distinguishing this spanner from others of
the same type, so that a start and its stop can be paired (a
stop's label should match its start's). In the MusicXML standard
this is a number from 1 to 6, but pymusicxml allows anything
(e.g. a string); labels are converted to numbers on export.
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.Part.txt
======================================================================
pymusicxml.score_components.Part
********************************
class pymusicxml.score_components.Part(part_name: str, measures: Sequence[Measure] = None, part_id: int = 1, instrument_name: str = None, midi_program_num: int = None)
Bases: "MusicXMLComponent", "MusicXMLContainer"
Represents a musical part/staff.
Parameters:
* **part_name** -- name of this part
* **measures** -- list of measures contained in this part
* **part_id** -- unique identifier for the part (set
automatically by the containing Score upon rendering)
* **instrument_name** -- used by notation programs to understand
which sound to use; not rendered in score. Set automatically
based on part name if left as None.
* **midi_program_num** -- the general midi program number for
the instrument. Again, used by notation programs to pick an
instrument sound. Set automatically based on part name if left
as None.
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "iter_dire | Iterates through all directions, or all directions of a certain type, in this Part. |
| ctions"([d | |
| irection_t | |
| ype]) | |
+------------+--------------------------------------------------------------------------------------------+
| "iter_leav | Iterates through the Notes/Chords/Rests in this part, expanding out any measures, tuplets |
| es"([which | and beam groups. |
| _voices]) | |
+------------+--------------------------------------------------------------------------------------------+
| "iter_nota | Iterates through all notations, or all notations of a certain type, in this Part. |
| tions"([no | |
| tation_typ | |
| e]) | |
+------------+--------------------------------------------------------------------------------------------+
| "render"([ | Renders this component to a tuple of ElementTree.Element. |
| divisions] | |
| ) | |
+------------+--------------------------------------------------------------------------------------------+
| "render_pa | Renders the "score-part" tag for the top of the MusicXML score. |
| rt_list_en | |
| try"() | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "append"(v | S.append(value) -- append value to the end of the sequence |
| alue) | |
+------------+--------------------------------------------------------------------------------------------+
| "clear"() | |
+------------+--------------------------------------------------------------------------------------------+
| "count"(va | |
| lue) | |
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "extend"(v | S.extend(iterable) -- extend sequence by appending elements from the iterable |
| alues) | |
+------------+--------------------------------------------------------------------------------------------+
| "index"(va | Raises ValueError if the value is not present. |
| lue, | |
| [start, | |
| [stop]]) | |
+------------+--------------------------------------------------------------------------------------------+
| "insert"(i | Insert the given object before the given index. |
| , o) | |
+------------+--------------------------------------------------------------------------------------------+
| "pop"([ind | Raise IndexError if list is empty or index is out of range. |
| ex]) | |
+------------+--------------------------------------------------------------------------------------------+
| "remove"(v | S.remove(value) -- remove first occurrence of value. |
| alue) | |
+------------+--------------------------------------------------------------------------------------------+
| "reverse"( | S.reverse() -- reverse *IN PLACE* |
| ) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "general_m | |
| idi_preset | |
| _nums" | |
+------------+--------------------------------------------------------------------------------------------+
| "measures" | List of the measures in this Part. |
+------------+--------------------------------------------------------------------------------------------+
general_midi_preset_nums = {'Accordion': 22, 'Acoustic Bass': 33, 'Acoustic Grand Piano': 1, 'Acoustic Guitar (nylon)': 25, 'Acoustic Guitar (steel)': 26, 'Agogo': 114, 'Alto Sax': 66, 'Applause': 127, 'Bag pipe': 110, 'Banjo': 106, 'Baritone Sax': 68, 'Bassoon': 71, 'Bells': 15, 'Bird Tweet': 124, 'Blown Bottle': 77, 'Brass Section': 62, 'Breath Noise': 122, 'Bright Acoustic Piano': 2, 'Celesta': 9, 'Cello': 43, 'Choir Aahs': 53, 'Church Organ': 20, 'Clarinet': 72, 'Clavinet': 8, 'Contrabass': 44, 'Distortion Guitar': 31, 'Drawbar Organ': 17, 'Dulcimer': 16, 'Electric Bass (finger)': 34, 'Electric Bass (pick)': 35, 'Electric Grand Piano': 3, 'Electric Guitar (clean)': 28, 'Electric Guitar (jazz)': 27, 'Electric Guitar (muted)': 29, 'Electric Piano 1': 5, 'Electric Piano 2': 6, 'English Horn': 70, 'FX 1 (rain)': 97, 'FX 2 (soundtrack)': 98, 'FX 3 (crystal)': 99, 'FX 4 (atmosphere)': 100, 'FX 5 (brightness)': 101, 'FX 6 (goblins)': 102, 'FX 7 (echoes)': 103, 'FX 8 (sci-fi)': 104, 'Fiddle': 111, 'Flute': 74, 'French Horn': 61, 'Fretless Bass': 36, 'Glockenspiel': 10, 'Guitar Fret Noise': 121, 'Guitar harmonics': 32, 'Gunshot': 128, 'Harmonica': 23, 'Harp': 47, 'Harpsichord': 7, 'Helicopter': 126, 'Honky-tonk Piano': 4, 'Horn': 61, 'Kalimba': 109, 'Koto': 108, 'Lead 1 (square)': 81, 'Lead 2 (sawtooth)': 82, 'Lead 3 (calliope)': 83, 'Lead 4 (chiff)': 84, 'Lead 5 (charang)': 85, 'Lead 6 (voice)': 86, 'Lead 7 (fifths)': 87, 'Lead 8 (bass + lead)': 88, 'Marimba': 13, 'Melodic Tom': 118, 'Music Box': 11, 'Muted Trumpet': 60, 'Oboe': 69, 'Ocarina': 80, 'Orchestra Hit': 56, 'Orchestral Harp': 47, 'Organ': 20, 'Overdriven Guitar': 30, 'Pad 1 (new age)': 89, 'Pad 2 (warm)': 90, 'Pad 3 (polysynth)': 91, 'Pad 4 (choir)': 92, 'Pad 5 (bowed)': 93, 'Pad 6 (metallic)': 94, 'Pad 7 (halo)': 95, 'Pad 8 (sweep)': 96, 'Pan Flute': 76, 'Percussive Organ': 18, 'Piano': 1, 'Piccolo': 73, 'Pizzicato Strings': 46, 'Recorder': 75, 'Reed Organ': 21, 'Reverse Cymbal': 120, 'Rock Organ': 19, 'Sax': 66, 'Seashore': 123, 'Shakuhachi': 78, 'Shamisen': 107, 'Shanai': 112, 'Sitar': 105, 'Slap Bass 1': 37, 'Slap Bass 2': 38, 'Soprano Sax': 65, 'Steel Drums': 115, 'String Ensemble 1': 49, 'String Ensemble 2': 50, 'Strings': 49, 'Synth Bass 1': 39, 'Synth Bass 2': 40, 'Synth Brass 1': 63, 'Synth Brass 2': 64, 'Synth Drum': 119, 'Synth Strings 1': 51, 'Synth Strings 2': 52, 'Synth Voice': 55, 'Taiko Drum': 117, 'Tango Accordion': 24, 'Telephone Ring': 125, 'Tenor Sax': 67, 'Timpani': 48, 'Tinkle Bell': 113, 'Tom': 118, 'Tremolo Strings': 45, 'Trombone': 58, 'Trumpet': 57, 'Tuba': 59, 'Tubular Bells': 15, 'Vibraphone': 12, 'Viola': 42, 'Violin': 41, 'Violoncello': 43, 'Voice Oohs': 54, 'Whistle': 79, 'Woodblock': 116, 'Xylophone': 14}
property measures: Sequence[Measure]
List of the measures in this Part.
iter_leaves(which_voices=None) -> Iterator[Note | Chord | Rest]
Iterates through the Notes/Chords/Rests in this part, expanding
out any measures, tuplets and beam groups. The
notes/chords/rests are ordered in time, and draw from the
specified voices.
Parameters:
**which_voices** -- List of voices to return notes from
(numbered 0, 1, 2, 3). The default value of None returns
notes from all voices.
iter_directions(direction_type=None) -> Iterator[Direction]
Iterates through all directions, or all directions of a certain
type, in this Part.
Parameters:
**direction_type** -- the type of direction to filter for, if
any
iter_notations(notation_type=None) -> Iterator[Notation]
Iterates through all notations, or all notations of a certain
type, in this Part.
Parameters:
**notation_type** -- the type of notation to filter for, if
any
render(divisions: int = None) -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
render_part_list_entry() -> Sequence[Element]
Renders the "score-part" tag for the top of the MusicXML score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
append(value)
S.append(value) -- append value to the end of the sequence
clear() -> None -- remove all items from S
count(value) -> integer -- return number of occurrences of value
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
extend(values)
S.extend(iterable) -- extend sequence by appending elements from
the iterable
index(value[, start[, stop]]) -> integer -- return first index of value.
Raises ValueError if the value is not present.
Supporting start and stop arguments is optional, but
recommended.
insert(i, o) -> None
Insert the given object before the given index.
Parameters:
* **i** -- Index at which to insert
* **o** -- Object to insert
pop([index]) -> item -- remove and return item at index (default last).
Raise IndexError if list is empty or index is out of range.
remove(value)
S.remove(value) -- remove first occurrence of value. Raise
ValueError if the value is not present.
reverse()
S.reverse() -- reverse *IN PLACE*
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.PartGroup.txt
======================================================================
pymusicxml.score_components.PartGroup
*************************************
class pymusicxml.score_components.PartGroup(parts: Sequence[Part] = None, has_bracket: bool = True, has_group_bar_line: bool = True)
Bases: "MusicXMLComponent", "MusicXMLContainer"
Represents a part group (a group of related parts, possible
connected by a bracket)
Parameters:
* **parts** -- list of parts contained in this group
* **has_bracket** -- whether or not to place a bracket around
the group in the score
* **has_group_bar_line** -- whether or not to have bar lines cut
through the entire group
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render"([ | Renders this component to a tuple of ElementTree.Element. |
| divisions] | |
| ) | |
+------------+--------------------------------------------------------------------------------------------+
| "render_pa | Renders the "part-group" tag and containing "score-part" tags for the top of the MusicXML |
| rt_list_en | score. |
| try"() | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "append"(v | S.append(value) -- append value to the end of the sequence |
| alue) | |
+------------+--------------------------------------------------------------------------------------------+
| "clear"() | |
+------------+--------------------------------------------------------------------------------------------+
| "count"(va | |
| lue) | |
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "extend"(v | S.extend(iterable) -- extend sequence by appending elements from the iterable |
| alues) | |
+------------+--------------------------------------------------------------------------------------------+
| "index"(va | Raises ValueError if the value is not present. |
| lue, | |
| [start, | |
| [stop]]) | |
+------------+--------------------------------------------------------------------------------------------+
| "insert"(i | Insert the given object before the given index. |
| , o) | |
+------------+--------------------------------------------------------------------------------------------+
| "pop"([ind | Raise IndexError if list is empty or index is out of range. |
| ex]) | |
+------------+--------------------------------------------------------------------------------------------+
| "remove"(v | S.remove(value) -- remove first occurrence of value. |
| alue) | |
+------------+--------------------------------------------------------------------------------------------+
| "reverse"( | S.reverse() -- reverse *IN PLACE* |
| ) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "parts" | List of parts in this group. |
+------------+--------------------------------------------------------------------------------------------+
property parts: Sequence[Part]
List of parts in this group.
render(divisions: int = None) -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
render_part_list_entry() -> Sequence[Element]
Renders the "part-group" tag and containing "score-part" tags
for the top of the MusicXML score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
append(value)
S.append(value) -- append value to the end of the sequence
clear() -> None -- remove all items from S
count(value) -> integer -- return number of occurrences of value
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
extend(values)
S.extend(iterable) -- extend sequence by appending elements from
the iterable
index(value[, start[, stop]]) -> integer -- return first index of value.
Raises ValueError if the value is not present.
Supporting start and stop arguments is optional, but
recommended.
insert(i, o) -> None
Insert the given object before the given index.
Parameters:
* **i** -- Index at which to insert
* **o** -- Object to insert
pop([index]) -> item -- remove and return item at index (default last).
Raise IndexError if list is empty or index is out of range.
remove(value)
S.remove(value) -- remove first occurrence of value. Raise
ValueError if the value is not present.
reverse()
S.reverse() -- reverse *IN PLACE*
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.Pitch.txt
======================================================================
pymusicxml.score_components.Pitch
*********************************
class pymusicxml.score_components.Pitch(step: str, octave: int, alteration: float = 0)
Bases: "MusicXMLComponent"
Class representing a notated musical pitch.
Parameters:
* **step** -- letter name of the pitch ("c", "d", "e", "f", "g",
"a" or "b")
* **octave** -- which octave it is in (the octave starting with
middle C is octave 4)
* **alteration** -- number of half steps sharp or flat. For
instance, 1 would be sharp, -2 would be double-flat, and 0.5
would be quarter-tone sharp.
Variables:
* **step** -- letter name of the pitch ("c", "d", "e", "f", "g",
"a" or "b")
* **octave** -- octave of the pitch
* **alteration** -- number of half steps sharp or flat
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "from_stri | Constructs Pitch from either a lilypond pitch string or from standard pitch/octave |
| ng"(pitch_ | notation |
| string) | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "accidenta | The MusicXML accidental for this pitch's alteration, or None if it can't be drawn with a |
| l_name" | standard accidental (e.g. a fine microtone). |
+------------+--------------------------------------------------------------------------------------------+
classmethod from_string(pitch_string: str)
Constructs Pitch from either a lilypond pitch string or from
standard pitch/octave notation
Parameters:
**pitch_string** -- can take the form "C#5" (specifying
octave with number, and using '#' for sharp) or "cs'"
(specifying octave in the lilypond style and using 's' for
sharp)
Returns:
a Pitch
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
property accidental_name: str | None
The MusicXML accidental for this pitch's alteration, or None if
it can't be drawn with a standard accidental (e.g. a fine
microtone).
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.Rest.txt
======================================================================
pymusicxml.score_components.Rest
********************************
class pymusicxml.score_components.Rest(duration: Duration | str | float, notations: Sequence[Notation | str | Element] = (), directions: Sequence[Direction] = ())
Bases: "_XMLNote"
Class representing a notated rest.
Parameters:
* **duration** -- either a "Duration" object, a string to parse
as a duration (see "Duration.from_string()"), or a number of
quarter notes.
* **notations** -- see "Note"
* **directions** -- see "Note"
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "min_denom | Minimum divisor of a quarter note that would be needed to represent the duration of this |
| inator"() | note accurately. |
+------------+--------------------------------------------------------------------------------------------+
| "num_beams | Returns the number of beams needed to represent this note's duration. |
| "() | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "divisions | Subdivision used when representing this duration. |
| " | |
+------------+--------------------------------------------------------------------------------------------+
| "length_in | Length in terms of subdivisions. |
| _divisions | |
| " | |
+------------+--------------------------------------------------------------------------------------------+
| "true_leng | True length in terms of the number of quarter notes, taking into tuplet time modification. |
| th" | |
+------------+--------------------------------------------------------------------------------------------+
| "written_l | Written length in terms of the number of quarter notes. |
| ength" | |
+------------+--------------------------------------------------------------------------------------------+
property divisions: int
Subdivision used when representing this duration.
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
property length_in_divisions: int
Length in terms of subdivisions. (See description of "divisions"
attribute in "Duration")
min_denominator() -> int
Minimum divisor of a quarter note that would be needed to
represent the duration of this note accurately. For instance, a
triplet quarter note would have min_denominator 3, since it is
2/3 of a quarter.
num_beams() -> int
Returns the number of beams needed to represent this note's
duration.
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
property true_length: float
True length in terms of the number of quarter notes, taking into
tuplet time modification. Returns 0 in the case of grace notes.
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
property written_length: float
Written length in terms of the number of quarter notes.
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.Score.txt
======================================================================
pymusicxml.score_components.Score
*********************************
class pymusicxml.score_components.Score(contents: Sequence[Part | PartGroup] = None, title: str = None, composer: str = None)
Bases: "MusicXMLComponent", "MusicXMLContainer"
Class representing a full musical score
Parameters:
* **contents** -- list of parts and part groups included in this
score
* **title** -- title of the score
* **composer** -- name of the composer
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "append"(v | S.append(value) -- append value to the end of the sequence |
| alue) | |
+------------+--------------------------------------------------------------------------------------------+
| "clear"() | |
+------------+--------------------------------------------------------------------------------------------+
| "count"(va | |
| lue) | |
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "extend"(v | S.extend(iterable) -- extend sequence by appending elements from the iterable |
| alues) | |
+------------+--------------------------------------------------------------------------------------------+
| "index"(va | Raises ValueError if the value is not present. |
| lue, | |
| [start, | |
| [stop]]) | |
+------------+--------------------------------------------------------------------------------------------+
| "insert"(i | Insert the given object before the given index. |
| , o) | |
+------------+--------------------------------------------------------------------------------------------+
| "pop"([ind | Raise IndexError if list is empty or index is out of range. |
| ex]) | |
+------------+--------------------------------------------------------------------------------------------+
| "remove"(v | S.remove(value) -- remove first occurrence of value. |
| alue) | |
+------------+--------------------------------------------------------------------------------------------+
| "reverse"( | S.reverse() -- reverse *IN PLACE* |
| ) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "parts" | Returns a tuple of the parts in this score, expanding out any part groups. |
+------------+--------------------------------------------------------------------------------------------+
property parts: Sequence[Part]
Returns a tuple of the parts in this score, expanding out any
part groups.
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
append(value)
S.append(value) -- append value to the end of the sequence
clear() -> None -- remove all items from S
count(value) -> integer -- return number of occurrences of value
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
extend(values)
S.extend(iterable) -- extend sequence by appending elements from
the iterable
index(value[, start[, stop]]) -> integer -- return first index of value.
Raises ValueError if the value is not present.
Supporting start and stop arguments is optional, but
recommended.
insert(i, o) -> None
Insert the given object before the given index.
Parameters:
* **i** -- Index at which to insert
* **o** -- Object to insert
pop([index]) -> item -- remove and return item at index (default last).
Raise IndexError if list is empty or index is out of range.
remove(value)
S.remove(value) -- remove first occurrence of value. Raise
ValueError if the value is not present.
reverse()
S.reverse() -- reverse *IN PLACE*
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.StartNumberedSpanner.txt
======================================================================
pymusicxml.score_components.StartNumberedSpanner
************************************************
class pymusicxml.score_components.StartNumberedSpanner(label: Any = 1)
Bases: "NumberedSpanner"
Abstract base class for the start of a Direction or Notation that
spans multiple time-points.
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "MID_TYPES | |
| " | |
+------------+--------------------------------------------------------------------------------------------+
| "STOP_TYPE | The associated stop type; used for validating line numbers |
| " | |
+------------+--------------------------------------------------------------------------------------------+
STOP_TYPE: StopNumberedSpanner = NotImplemented
The associated stop type; used for validating line numbers
MID_TYPES: Sequence[MidNumberedSpanner] = ()
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.StopNumberedSpanner.txt
======================================================================
pymusicxml.score_components.StopNumberedSpanner
***********************************************
class pymusicxml.score_components.StopNumberedSpanner(label: Any = 1)
Bases: "NumberedSpanner"
Abstract base class for the end of a Direction or Notation that
spans multiple time-points.
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.TraditionalKeySignature.txt
======================================================================
pymusicxml.score_components.TraditionalKeySignature
***************************************************
class pymusicxml.score_components.TraditionalKeySignature(fifths, mode=None, cancel=None)
Bases: "KeySignature"
A traditional key signature. See
https://www.w3.org/2021/06/musicxml40/musicxml-
reference/elements/key/.
Parameters:
* **fifths** -- e.g. -2 for Bb major/G minor, or 3 for A
major/F# minor
* **mode** -- one of the standard modes, e.g. "major", "minor",
"lydian"
* **cancel** -- the fifths of the previous key signature being
canceled out
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "step_alte | Map of step letter -> alteration (in half steps) implied by this key. |
| rations"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "parse"(in | Parses several kinds of input into a TraditionalKeySignature or NonTraditionalKeySignature |
| terpretabl | object. |
| e_as_key_s | |
| ignature) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "mode_fift | |
| h_alterati | |
| ons" | |
+------------+--------------------------------------------------------------------------------------------+
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
step_alterations() -> dict
Map of step letter -> alteration (in half steps) implied by this
key.
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
mode_fifth_alterations = {'aeolian': -3, 'dorian': -2, 'ionian': 0, 'locrian': -4, 'lydian': 1, 'major': 0, 'minor': -3, 'mixolydian': -1, 'phrygian': -4, None: 0}
static parse(interpretable_as_key_signature: KeySignature | int | str) -> KeySignature
Parses several kinds of input into a TraditionalKeySignature or
NonTraditionalKeySignature object.
Parameters:
**interpretable_as_key_signature** -- either a KeySignature
object, an integer representing the number of sharps (or
flats if negative), or a string to be parsed into a key
signature, such as "G major", "F# lydian", or "C#, Ab" (which
produces a non-traditional key-signature), etc.
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.Transpose.txt
======================================================================
pymusicxml.score_components.Transpose
*************************************
class pymusicxml.score_components.Transpose(chromatic: int, diatonic: int = None, octave: int = None)
Bases: "MusicXMLComponent"
Class representing transposition. Used for instruments like guitar
or bass which transpose by an octave down.
The <transpose> element represents what must be added to a written
pitch to get a correct sounding pitch. It is used for encoding
parts for transposing instruments that are in written vs. concert
pitch.
Parameters:
* **chromatic** -- Chromatic transposition
* **diatonic** -- Diatonic transposition (optional)
* **octave** -- Octave change (optional)
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.Tuplet.txt
======================================================================
pymusicxml.score_components.Tuplet
**********************************
class pymusicxml.score_components.Tuplet(contents: Sequence[MusicXMLComponent], ratio: tuple)
Bases: "BeamedGroup"
Represents a tuplet; same as a BeamedGroup, but with a particular
time ratio associated with it.
Parameters:
* **contents** -- a list of notes, chords and rests contained in
this group.
* **ratio** -- a tuple representing the tuplet ratio (as
described in "Duration")
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "min_denom | Minimum divisor of a quarter note that would be needed to represent the duration of this |
| inator"() | note accurately. |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "append"(v | S.append(value) -- append value to the end of the sequence |
| alue) | |
+------------+--------------------------------------------------------------------------------------------+
| "clear"() | |
+------------+--------------------------------------------------------------------------------------------+
| "count"(va | |
| lue) | |
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "extend"(v | S.extend(iterable) -- extend sequence by appending elements from the iterable |
| alues) | |
+------------+--------------------------------------------------------------------------------------------+
| "index"(va | Raises ValueError if the value is not present. |
| lue, | |
| [start, | |
| [stop]]) | |
+------------+--------------------------------------------------------------------------------------------+
| "insert"(i | Insert the given object before the given index. |
| , o) | |
+------------+--------------------------------------------------------------------------------------------+
| "pop"([ind | Raise IndexError if list is empty or index is out of range. |
| ex]) | |
+------------+--------------------------------------------------------------------------------------------+
| "remove"(v | S.remove(value) -- remove first occurrence of value. |
| alue) | |
+------------+--------------------------------------------------------------------------------------------+
| "render_co | Works out all the beaming for the contents of this group. |
| ntents_bea | |
| ming"() | |
+------------+--------------------------------------------------------------------------------------------+
| "reverse"( | S.reverse() -- reverse *IN PLACE* |
| ) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "divisions | Subdivision used when representing this duration. |
| " | |
+------------+--------------------------------------------------------------------------------------------+
| "length_in | Length in terms of subdivisions. |
| _divisions | |
| " | |
+------------+--------------------------------------------------------------------------------------------+
| "true_leng | True length in terms of the number of quarter notes, taking into tuplet time modification. |
| th" | |
+------------+--------------------------------------------------------------------------------------------+
| "written_l | Written length in terms of the number of quarter notes. |
| ength" | |
+------------+--------------------------------------------------------------------------------------------+
min_denominator() -> int
Minimum divisor of a quarter note that would be needed to
represent the duration of this note accurately. For instance, a
triplet quarter note would have min_denominator 3, since it is
2/3 of a quarter.
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
append(value)
S.append(value) -- append value to the end of the sequence
clear() -> None -- remove all items from S
count(value) -> integer -- return number of occurrences of value
property divisions: int
Subdivision used when representing this duration.
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
extend(values)
S.extend(iterable) -- extend sequence by appending elements from
the iterable
index(value[, start[, stop]]) -> integer -- return first index of value.
Raises ValueError if the value is not present.
Supporting start and stop arguments is optional, but
recommended.
insert(i, o) -> None
Insert the given object before the given index.
Parameters:
* **i** -- Index at which to insert
* **o** -- Object to insert
property length_in_divisions: int
Length in terms of subdivisions. (See description of "divisions"
attribute in "Duration")
pop([index]) -> item -- remove and return item at index (default last).
Raise IndexError if list is empty or index is out of range.
remove(value)
S.remove(value) -- remove first occurrence of value. Raise
ValueError if the value is not present.
render_contents_beaming() -> None
Works out all the beaming for the contents of this group. (Sets
the "beams" attribute for every element.)
reverse()
S.reverse() -- reverse *IN PLACE*
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
property true_length: float
True length in terms of the number of quarter notes, taking into
tuplet time modification. Returns 0 in the case of grace notes.
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
property written_length: float
Written length in terms of the number of quarter notes.
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.pad_with_rests.txt
======================================================================
pymusicxml.score_components.pad_with_rests
******************************************
pymusicxml.score_components.pad_with_rests(components, desired_length)
Appends rests to a list of components to fill out the desired
length
Parameters:
* **components** -- a list of MusicXMLComponents
* **desired_length** -- in quarters
Returns:
an expanded list of components
======================================================================
=== FILE: pymusicxml/pymusicxml.score_components.txt
======================================================================
pymusicxml.score_components
***************************
Module containing all of the classes representing the hierarchy of a
musical score.
-[ Classes ]-
+------------+--------------------------------------------------------------------------------------------+
| "BarRest"( | Class representing a bar rest. |
| bar_length | |
| [, directi | |
| ons]) | |
+------------+--------------------------------------------------------------------------------------------+
| "BarRestDu | Special duration object used for bar rests. |
| ration"(le | |
| ngth) | |
+------------+--------------------------------------------------------------------------------------------+
| "BeamedGro | Represents a group of notes/chords/rests joined under a single beam. |
| up"([conte | |
| nts]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Chord"(pi | Class representing a chord. |
| tches, | |
| duration[, | |
| ties, | |
| notations, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Clef"(sig | Class representing a musical clef |
| n, line[, | |
| octaves_tr | |
| anspositio | |
| n]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Direction | Abstract base class for musical directions, such as text and metronome marks. |
| "([placeme | |
| nt, voice, | |
| staff]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Duration" | Represents a length that can be written as a single note or rest. |
| (note_type | |
| [, | |
| num_dots, | |
| tuplet_rat | |
| io]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Durationa | Abstract base class for all objects that have duration within a measure. |
| lObject"() | |
+------------+--------------------------------------------------------------------------------------------+
| "GraceChor | Subclass of "Chord" representing a durationless grace chord. |
| d"(pitches | |
| , | |
| duration[, | |
| ties, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "GraceNote | Subclass of "Note" representing a durationless grace note. |
| "(pitch, | |
| duration[, | |
| ties, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "KeySignat | Abstract base class for traditional and non-traditional key signatures. |
| ure"() | |
+------------+--------------------------------------------------------------------------------------------+
| "Measure"( | Class representing a measure of music, perhaps with multiple voices. |
| [contents, | |
| time_signa | |
| ture, key, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "MidNumber | Abstract base class for the middle of a Direction or Notation that spans multiple time- |
| edSpanner" | points. |
| ([label]) | |
+------------+--------------------------------------------------------------------------------------------+
| "MultiGlis | Abstract base class for start and stop multi glisses |
| s"([number | |
| s]) | |
+------------+--------------------------------------------------------------------------------------------+
| "MusicXMLC | Abstract base class of all musical objects, providing functionality for rendering and |
| omponent"( | exporting to a file. |
| ) | |
+------------+--------------------------------------------------------------------------------------------+
| "MusicXMLC | Base class for all musical objects that contain other musical objects, such as "Part", |
| ontainer"( | "Measure", and *Tuplet*. |
| contents, | |
| allowed_ty | |
| pes) | |
+------------+--------------------------------------------------------------------------------------------+
| "NonTradit | A non-traditional key signature. |
| ionalKeySi | |
| gnature"(. | |
| ..) | |
+------------+--------------------------------------------------------------------------------------------+
| "Notation" | Abstract base class for MusicXML Notations (glissandi, slurs). |
| () | |
+------------+--------------------------------------------------------------------------------------------+
| "Note"(pit | Class representing a single, pitched note. |
| ch, | |
| duration[, | |
| ties, | |
| notations, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Notehead" | Class representing a notehead type. |
| (notehead_ | |
| name[, | |
| filled]) | |
+------------+--------------------------------------------------------------------------------------------+
| "NumberedS | Abstract base class for part of a Direction or Notation that spans multiple time-points. |
| panner"([l | |
| abel]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Part"(par | Represents a musical part/staff. |
| t_name[, | |
| measures, | |
| part_id, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "PartGroup | Represents a part group (a group of related parts, possible connected by a bracket) |
| "([parts, | |
| has_bracke | |
| t, ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Pitch"(st | Class representing a notated musical pitch. |
| ep, | |
| octave[, a | |
| lteration] | |
| ) | |
+------------+--------------------------------------------------------------------------------------------+
| "Rest"(dur | Class representing a notated rest. |
| ation[, | |
| notations, | |
| directions | |
| ]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Score"([c | Class representing a full musical score |
| ontents, | |
| title, | |
| composer]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StartNumb | Abstract base class for the start of a Direction or Notation that spans multiple time- |
| eredSpanne | points. |
| r"([label] | |
| ) | |
+------------+--------------------------------------------------------------------------------------------+
| "StopNumbe | Abstract base class for the end of a Direction or Notation that spans multiple time- |
| redSpanner | points. |
| "([label]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Tradition | A traditional key signature. |
| alKeySigna | |
| ture"(fift | |
| hs[, mode, | |
| cancel]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Transpose | Class representing transposition. |
| "(chromati | |
| c[, | |
| diatonic, | |
| octave]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Tuplet"(c | Represents a tuplet; same as a BeamedGroup, but with a particular time ratio associated |
| ontents, | with it. |
| ratio) | |
+------------+--------------------------------------------------------------------------------------------+
* pymusicxml.score_components.BarRest
* "BarRest"
* "BarRest.divisions"
* "BarRest.export_to_file()"
* "BarRest.length_in_divisions"
* "BarRest.min_denominator()"
* "BarRest.num_beams()"
* "BarRest.render()"
* "BarRest.to_xml()"
* "BarRest.true_length"
* "BarRest.view_in_software()"
* "BarRest.wrap_as_score()"
* "BarRest.written_length"
* pymusicxml.score_components.BarRestDuration
* "BarRestDuration"
* "BarRestDuration.written_length"
* "BarRestDuration.divisions"
* "BarRestDuration.min_denominator()"
* "BarRestDuration.length_in_divisions"
* "BarRestDuration.true_length"
* "BarRestDuration.render()"
* "BarRestDuration.wrap_as_score()"
* "BarRestDuration.export_to_file()"
* "BarRestDuration.to_xml()"
* "BarRestDuration.view_in_software()"
* pymusicxml.score_components.BeamedGroup
* "BeamedGroup"
* "BeamedGroup.render_contents_beaming()"
* "BeamedGroup.divisions"
* "BeamedGroup.true_length"
* "BeamedGroup.written_length"
* "BeamedGroup.length_in_divisions"
* "BeamedGroup.min_denominator()"
* "BeamedGroup.render()"
* "BeamedGroup.wrap_as_score()"
* "BeamedGroup.append()"
* "BeamedGroup.clear()"
* "BeamedGroup.count()"
* "BeamedGroup.export_to_file()"
* "BeamedGroup.extend()"
* "BeamedGroup.index()"
* "BeamedGroup.insert()"
* "BeamedGroup.pop()"
* "BeamedGroup.remove()"
* "BeamedGroup.reverse()"
* "BeamedGroup.to_xml()"
* "BeamedGroup.view_in_software()"
* pymusicxml.score_components.Chord
* "Chord"
* "Chord.pitches"
* "Chord.num_beams()"
* "Chord.duration"
* "Chord.true_length"
* "Chord.written_length"
* "Chord.length_in_divisions"
* "Chord.notations"
* "Chord.articulations"
* "Chord.directions"
* "Chord.divisions"
* "Chord.voice"
* "Chord.beams"
* "Chord.ties"
* "Chord.tuplet_bracket"
* "Chord.min_denominator()"
* "Chord.render()"
* "Chord.wrap_as_score()"
* "Chord.export_to_file()"
* "Chord.to_xml()"
* "Chord.view_in_software()"
* pymusicxml.score_components.Clef
* "Clef"
* "Clef.clef_name_to_letter_and_line"
* "Clef.from_string()"
* "Clef.render()"
* "Clef.wrap_as_score()"
* "Clef.export_to_file()"
* "Clef.to_xml()"
* "Clef.view_in_software()"
* pymusicxml.score_components.Direction
* "Direction"
* "Direction.export_to_file()"
* "Direction.to_xml()"
* "Direction.view_in_software()"
* "Direction.render()"
* "Direction.render_direction_type()"
* "Direction.wrap_as_score()"
* pymusicxml.score_components.Duration
* "Duration"
* "Duration.divisions"
* "Duration.written_length"
* "Duration.true_length"
* "Duration.min_denominator()"
* "Duration.length_in_divisions"
* "Duration.num_beams()"
* "Duration.from_written_length()"
* "Duration.from_divisor()"
* "Duration.from_string()"
* "Duration.get_note_type_and_number_of_dots()"
* "Duration.render()"
* "Duration.render_to_beat_unit_tags()"
* "Duration.wrap_as_score()"
* "Duration.export_to_file()"
* "Duration.to_xml()"
* "Duration.view_in_software()"
* pymusicxml.score_components.DurationalObject
* "DurationalObject"
* "DurationalObject.true_length"
* "DurationalObject.written_length"
* "DurationalObject.length_in_divisions"
* "DurationalObject.divisions"
* "DurationalObject.min_denominator()"
* "DurationalObject.export_to_file()"
* "DurationalObject.render()"
* "DurationalObject.to_xml()"
* "DurationalObject.view_in_software()"
* "DurationalObject.wrap_as_score()"
* pymusicxml.score_components.GraceChord
* "GraceChord"
* "GraceChord.articulations"
* "GraceChord.beams"
* "GraceChord.directions"
* "GraceChord.divisions"
* "GraceChord.duration"
* "GraceChord.export_to_file()"
* "GraceChord.length_in_divisions"
* "GraceChord.min_denominator()"
* "GraceChord.notations"
* "GraceChord.num_beams()"
* "GraceChord.pitches"
* "GraceChord.render()"
* "GraceChord.ties"
* "GraceChord.to_xml()"
* "GraceChord.true_length"
* "GraceChord.tuplet_bracket"
* "GraceChord.view_in_software()"
* "GraceChord.voice"
* "GraceChord.wrap_as_score()"
* "GraceChord.written_length"
* pymusicxml.score_components.GraceNote
* "GraceNote"
* "GraceNote.divisions"
* "GraceNote.export_to_file()"
* "GraceNote.length_in_divisions"
* "GraceNote.min_denominator()"
* "GraceNote.num_beams()"
* "GraceNote.render()"
* "GraceNote.starts_tie"
* "GraceNote.stops_tie"
* "GraceNote.to_xml()"
* "GraceNote.true_length"
* "GraceNote.view_in_software()"
* "GraceNote.wrap_as_score()"
* "GraceNote.written_length"
* pymusicxml.score_components.KeySignature
* "KeySignature"
* "KeySignature.mode_fifth_alterations"
* "KeySignature.parse()"
* "KeySignature.render()"
* "KeySignature.step_alterations()"
* "KeySignature.wrap_as_score()"
* "KeySignature.export_to_file()"
* "KeySignature.to_xml()"
* "KeySignature.view_in_software()"
* pymusicxml.score_components.Measure
* "Measure"
* "Measure.voices"
* "Measure.iter_leaves()"
* "Measure.leaves()"
* "Measure.iter_directions()"
* "Measure.iter_notations()"
* "Measure.directions()"
* "Measure.notations()"
* "Measure.render()"
* "Measure.wrap_as_score()"
* "Measure.append()"
* "Measure.clear()"
* "Measure.count()"
* "Measure.export_to_file()"
* "Measure.extend()"
* "Measure.index()"
* "Measure.insert()"
* "Measure.pop()"
* "Measure.remove()"
* "Measure.reverse()"
* "Measure.to_xml()"
* "Measure.view_in_software()"
* pymusicxml.score_components.MidNumberedSpanner
* "MidNumberedSpanner"
* pymusicxml.score_components.MultiGliss
* "MultiGliss"
* "MultiGliss.export_to_file()"
* "MultiGliss.render()"
* "MultiGliss.to_xml()"
* "MultiGliss.view_in_software()"
* "MultiGliss.wrap_as_score()"
* pymusicxml.score_components.MusicXMLComponent
* "MusicXMLComponent"
* "MusicXMLComponent.render()"
* "MusicXMLComponent.wrap_as_score()"
* "MusicXMLComponent.to_xml()"
* "MusicXMLComponent.export_to_file()"
* "MusicXMLComponent.view_in_software()"
* pymusicxml.score_components.MusicXMLContainer
* "MusicXMLContainer"
* "MusicXMLContainer.insert()"
* "MusicXMLContainer.append()"
* "MusicXMLContainer.clear()"
* "MusicXMLContainer.count()"
* "MusicXMLContainer.extend()"
* "MusicXMLContainer.index()"
* "MusicXMLContainer.pop()"
* "MusicXMLContainer.remove()"
* "MusicXMLContainer.reverse()"
* pymusicxml.score_components.NonTraditionalKeySignature
* "NonTraditionalKeySignature"
* "NonTraditionalKeySignature.add_alteration()"
* "NonTraditionalKeySignature.render()"
* "NonTraditionalKeySignature.step_alterations()"
* "NonTraditionalKeySignature.export_to_file()"
* "NonTraditionalKeySignature.mode_fifth_alterations"
* "NonTraditionalKeySignature.parse()"
* "NonTraditionalKeySignature.to_xml()"
* "NonTraditionalKeySignature.view_in_software()"
* "NonTraditionalKeySignature.wrap_as_score()"
* pymusicxml.score_components.Notation
* "Notation"
* "Notation.render()"
* "Notation.export_to_file()"
* "Notation.to_xml()"
* "Notation.view_in_software()"
* "Notation.wrap_as_score()"
* pymusicxml.score_components.Note
* "Note"
* "Note.starts_tie"
* "Note.stops_tie"
* "Note.divisions"
* "Note.export_to_file()"
* "Note.length_in_divisions"
* "Note.min_denominator()"
* "Note.num_beams()"
* "Note.render()"
* "Note.to_xml()"
* "Note.true_length"
* "Note.view_in_software()"
* "Note.wrap_as_score()"
* "Note.written_length"
* pymusicxml.score_components.Notehead
* "Notehead"
* "Notehead.valid_xml_types"
* "Notehead.render()"
* "Notehead.wrap_as_score()"
* "Notehead.export_to_file()"
* "Notehead.to_xml()"
* "Notehead.view_in_software()"
* pymusicxml.score_components.NumberedSpanner
* "NumberedSpanner"
* pymusicxml.score_components.Part
* "Part"
* "Part.general_midi_preset_nums"
* "Part.measures"
* "Part.iter_leaves()"
* "Part.iter_directions()"
* "Part.iter_notations()"
* "Part.render()"
* "Part.render_part_list_entry()"
* "Part.wrap_as_score()"
* "Part.append()"
* "Part.clear()"
* "Part.count()"
* "Part.export_to_file()"
* "Part.extend()"
* "Part.index()"
* "Part.insert()"
* "Part.pop()"
* "Part.remove()"
* "Part.reverse()"
* "Part.to_xml()"
* "Part.view_in_software()"
* pymusicxml.score_components.PartGroup
* "PartGroup"
* "PartGroup.parts"
* "PartGroup.render()"
* "PartGroup.render_part_list_entry()"
* "PartGroup.wrap_as_score()"
* "PartGroup.append()"
* "PartGroup.clear()"
* "PartGroup.count()"
* "PartGroup.export_to_file()"
* "PartGroup.extend()"
* "PartGroup.index()"
* "PartGroup.insert()"
* "PartGroup.pop()"
* "PartGroup.remove()"
* "PartGroup.reverse()"
* "PartGroup.to_xml()"
* "PartGroup.view_in_software()"
* pymusicxml.score_components.Pitch
* "Pitch"
* "Pitch.from_string()"
* "Pitch.render()"
* "Pitch.accidental_name"
* "Pitch.wrap_as_score()"
* "Pitch.export_to_file()"
* "Pitch.to_xml()"
* "Pitch.view_in_software()"
* pymusicxml.score_components.Rest
* "Rest"
* "Rest.divisions"
* "Rest.export_to_file()"
* "Rest.length_in_divisions"
* "Rest.min_denominator()"
* "Rest.num_beams()"
* "Rest.render()"
* "Rest.to_xml()"
* "Rest.true_length"
* "Rest.view_in_software()"
* "Rest.wrap_as_score()"
* "Rest.written_length"
* pymusicxml.score_components.Score
* "Score"
* "Score.parts"
* "Score.render()"
* "Score.wrap_as_score()"
* "Score.append()"
* "Score.clear()"
* "Score.count()"
* "Score.export_to_file()"
* "Score.extend()"
* "Score.index()"
* "Score.insert()"
* "Score.pop()"
* "Score.remove()"
* "Score.reverse()"
* "Score.to_xml()"
* "Score.view_in_software()"
* pymusicxml.score_components.StartNumberedSpanner
* "StartNumberedSpanner"
* "StartNumberedSpanner.STOP_TYPE"
* "StartNumberedSpanner.MID_TYPES"
* pymusicxml.score_components.StopNumberedSpanner
* "StopNumberedSpanner"
* pymusicxml.score_components.TraditionalKeySignature
* "TraditionalKeySignature"
* "TraditionalKeySignature.render()"
* "TraditionalKeySignature.step_alterations()"
* "TraditionalKeySignature.export_to_file()"
* "TraditionalKeySignature.mode_fifth_alterations"
* "TraditionalKeySignature.parse()"
* "TraditionalKeySignature.to_xml()"
* "TraditionalKeySignature.view_in_software()"
* "TraditionalKeySignature.wrap_as_score()"
* pymusicxml.score_components.Transpose
* "Transpose"
* "Transpose.render()"
* "Transpose.wrap_as_score()"
* "Transpose.export_to_file()"
* "Transpose.to_xml()"
* "Transpose.view_in_software()"
* pymusicxml.score_components.Tuplet
* "Tuplet"
* "Tuplet.min_denominator()"
* "Tuplet.render()"
* "Tuplet.append()"
* "Tuplet.clear()"
* "Tuplet.count()"
* "Tuplet.divisions"
* "Tuplet.export_to_file()"
* "Tuplet.extend()"
* "Tuplet.index()"
* "Tuplet.insert()"
* "Tuplet.length_in_divisions"
* "Tuplet.pop()"
* "Tuplet.remove()"
* "Tuplet.render_contents_beaming()"
* "Tuplet.reverse()"
* "Tuplet.to_xml()"
* "Tuplet.true_length"
* "Tuplet.view_in_software()"
* "Tuplet.wrap_as_score()"
* "Tuplet.written_length"
-[ Functions ]-
+------------+--------------------------------------------------------------------------------------------+
| "pad_with_ | Appends rests to a list of components to fill out the desired length |
| rests"(com | |
| ponents, d | |
| esired_len | |
| gth) | |
+------------+--------------------------------------------------------------------------------------------+
* pymusicxml.score_components.pad_with_rests
* "pad_with_rests()"
======================================================================
=== FILE: pymusicxml/pymusicxml.spanners.ChangePedal.txt
======================================================================
pymusicxml.spanners.ChangePedal
*******************************
class pymusicxml.spanners.ChangePedal(label: Any = 1, sign: bool = True, line: bool = True, placement: str | StaffPlacement = 'below', voice: int = 1, staff: int = None)
Bases: "Direction", "MidNumberedSpanner"
Pedal change in the middle of a sustain pedal spanner.
Parameters:
* **label** -- See "NumberedSpanner".
* **sign** -- unclear what this means in the case of a change
pedal
* **line** -- whether or not to use a line in the pedal marking
* **placement** -- Where to place the direction in relation to
the staff ("above" or "below")
* **voice** -- Which voice to attach to
* **staff** -- Which staff to attach to if the part has multiple
staves
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render_di | Renders the <direction-type> element that constitutes the main substance of a <direction> |
| rection_ty | element. |
| pe"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
render_direction_type() -> Sequence[Element]
Renders the <direction-type> element that constitutes the main
substance of a <direction> element.
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.spanners.StartBracket.txt
======================================================================
pymusicxml.spanners.StartBracket
********************************
class pymusicxml.spanners.StartBracket(label: Any = 1, line_type: str | LineType = 'dashed', line_end: str | LineEnd = None, end_length: Real = None, text: str | TextAnnotation = None, placement: str | StaffPlacement = 'above', voice: int = 1, staff: int = None)
Bases: "Direction", "StartNumberedSpanner"
Start of a bracket spanner.
Parameters:
* **label** -- See "NumberedSpanner".
* **line_end** -- Type of hook/arrow at the start of this
bracket
* **end_length** -- Length of the hock at the start of this
bracket
* **text** -- Any text to attach to the start of this bracket
* **placement** -- Where to place the direction in relation to
the staff ("above" or "below")
* **voice** -- Which voice to attach to
* **staff** -- Which staff to attach to if the part has multiple
staves
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "render_di | Renders the <direction-type> element that constitutes the main substance of a <direction> |
| rection_ty | element. |
| pe"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "MID_TYPES | |
| " | |
+------------+--------------------------------------------------------------------------------------------+
STOP_TYPE
alias of "StopBracket"
render_direction_type() -> Sequence[Element]
Renders the <direction-type> element that constitutes the main
substance of a <direction> element.
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
MID_TYPES: Sequence[MidNumberedSpanner] = ()
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.spanners.StartDashes.txt
======================================================================
pymusicxml.spanners.StartDashes
*******************************
class pymusicxml.spanners.StartDashes(label: Any = 1, dash_length: Real = None, space_length: Real = None, text: str | TextAnnotation = None, placement: str | StaffPlacement = 'above', voice: int = 1, staff: int = None)
Bases: "Direction", "StartNumberedSpanner"
Start of a dashed spanner (e.g. used by a dashed "cresc." or "dim."
marking)
Parameters:
* **label** -- See "NumberedSpanner".
* **dash_length** -- Length of the dashes
* **space_length** -- Length of the space between the dashes
* **text** -- Any text to attach to the start of this dashed
spanner
* **placement** -- Where to place the direction in relation to
the staff ("above" or "below")
* **voice** -- Which voice to attach to
* **staff** -- Which staff to attach to if the part has multiple
staves
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "render_di | Renders the <direction-type> element that constitutes the main substance of a <direction> |
| rection_ty | element. |
| pe"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "MID_TYPES | |
| " | |
+------------+--------------------------------------------------------------------------------------------+
STOP_TYPE
alias of "StopDashes"
render_direction_type() -> Sequence[Element]
Renders the <direction-type> element that constitutes the main
substance of a <direction> element.
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
MID_TYPES: Sequence[MidNumberedSpanner] = ()
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.spanners.StartHairpin.txt
======================================================================
pymusicxml.spanners.StartHairpin
********************************
class pymusicxml.spanners.StartHairpin(hairpin_type: str | HairpinType, label: Any = 1, spread: Real = None, placement: str | StaffPlacement = 'below', niente: bool = False, voice: int = 1, staff: int = None)
Bases: "Direction", "StartNumberedSpanner"
Notation to attach to a note that starts a hairpin
Parameters:
* **hairpin_type** -- the type of hairpin ("crescendo" or
"diminuendo")
* **label** -- See "NumberedSpanner".
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render_di | Renders the <direction-type> element that constitutes the main substance of a <direction> |
| rection_ty | element. |
| pe"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "MID_TYPES | |
| " | |
+------------+--------------------------------------------------------------------------------------------+
STOP_TYPE
alias of "StopHairpin"
render_direction_type() -> Sequence[Element]
Renders the <direction-type> element that constitutes the main
substance of a <direction> element.
MID_TYPES: Sequence[MidNumberedSpanner] = ()
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.spanners.StartOctaveLine.txt
======================================================================
pymusicxml.spanners.StartOctaveLine
***********************************
class pymusicxml.spanners.StartOctaveLine(label: Any = 1, octaves: int = 1, dash_length: Real = None, space_length: Real = None, placement: str | StaffPlacement = 'above', voice: int = 1, staff: int = None)
Bases: "Direction", "StartNumberedSpanner"
Start of an octave-shift line, i.e. an "8va"/"8vb"/"15ma" bracket
with a dashed line and terminal hook.
Parameters:
* **label** -- See "NumberedSpanner".
* **octaves** -- how many octaves, and in which direction, the
notes are displaced. Positive means the notes sound higher
than written (8va, drawn above): 1 = 8va, 2 = 15ma, 3 = 22ma.
Negative means the notes sound lower than written (8vb, drawn
below). (Note that the resulting musicxml looks backwards
because it describes the modification of the written notes
relative to how they would be written with no ottava.)
* **dash_length** -- Length of the dashes (in tenths). (Note:
some renderers, e.g. verovio, ignore this.)
* **space_length** -- Length of the space between dashes (in
tenths).
* **placement** -- Where to place the direction in relation to
the staff ("above" or "below")
* **voice** -- Which voice to attach to
* **staff** -- Which staff to attach to if the part has multiple
staves
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render_di | Renders the <direction-type> element that constitutes the main substance of a <direction> |
| rection_ty | element. |
| pe"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "MID_TYPES | |
| " | |
+------------+--------------------------------------------------------------------------------------------+
| "size" | |
+------------+--------------------------------------------------------------------------------------------+
STOP_TYPE
alias of "StopOctaveLine"
property size: int
render_direction_type() -> Sequence[Element]
Renders the <direction-type> element that constitutes the main
substance of a <direction> element.
MID_TYPES: Sequence[MidNumberedSpanner] = ()
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.spanners.StartPedal.txt
======================================================================
pymusicxml.spanners.StartPedal
******************************
class pymusicxml.spanners.StartPedal(label: Any = 1, sign: bool = True, line: bool = True, placement: str | StaffPlacement = 'below', voice: int = 1, staff: int = None)
Bases: "Direction", "StartNumberedSpanner"
Start of a sustain pedal spanner.
Parameters:
* **label** -- See "NumberedSpanner".
* **sign** -- whether or not to include a "Ped" sign
* **line** -- whether or not to use a line in the pedal marking
* **placement** -- Where to place the direction in relation to
the staff ("above" or "below")
* **voice** -- Which voice to attach to
* **staff** -- Which staff to attach to if the part has multiple
staves
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render_di | Renders the <direction-type> element that constitutes the main substance of a <direction> |
| rection_ty | element. |
| pe"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "MID_TYPES | |
| " | |
+------------+--------------------------------------------------------------------------------------------+
STOP_TYPE
alias of "StopPedal"
MID_TYPES: Sequence[MidNumberedSpanner] = (<class 'pymusicxml.spanners.ChangePedal'>,)
render_direction_type() -> Sequence[Element]
Renders the <direction-type> element that constitutes the main
substance of a <direction> element.
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.spanners.StartSlur.txt
======================================================================
pymusicxml.spanners.StartSlur
*****************************
class pymusicxml.spanners.StartSlur(label: Any = 1)
Bases: "Notation", "StartNumberedSpanner"
Notation to attach to a note that starts a slur
Parameters:
**label** -- See "NumberedSpanner".
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "MID_TYPES | |
| " | |
+------------+--------------------------------------------------------------------------------------------+
MID_TYPES: Sequence[MidNumberedSpanner] = ()
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
STOP_TYPE
alias of "StopSlur"
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
======================================================================
=== FILE: pymusicxml/pymusicxml.spanners.StartTrill.txt
======================================================================
pymusicxml.spanners.StartTrill
******************************
class pymusicxml.spanners.StartTrill(label: Any = 1, placement: StaffPlacement | str = 'above', accidental: AccidentalType | str = None)
Bases: "Notation", "StartNumberedSpanner"
Starts a trill spanner with a wavy line.
Parameters:
* **label** -- See "NumberedSpanner".
* **placement** -- Where to place the direction in relation to
the staff ("above" or "below")
* **accidental** -- Accidental annotation to go on the trill
("flat-flat", "flat", "natural", "sharp", or "double-sharp")
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "MID_TYPES | |
| " | |
+------------+--------------------------------------------------------------------------------------------+
STOP_TYPE
alias of "StopTrill"
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
MID_TYPES: Sequence[MidNumberedSpanner] = ()
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.spanners.StopBracket.txt
======================================================================
pymusicxml.spanners.StopBracket
*******************************
class pymusicxml.spanners.StopBracket(label: Any = 1, line_end: str | LineEnd = None, end_length: Real = None, text: str | TextAnnotation = None, placement: str | StaffPlacement = 'above', voice: int = 1, staff: int = None)
Bases: "Direction", "StopNumberedSpanner"
End of a bracket spanner.
Parameters:
* **label** -- See "NumberedSpanner".
* **line_end** -- Type of hook/arrow at the end of this bracket
* **end_length** -- Length of the hock at the end of this
bracket
* **text** -- Any text to attach to the end of this bracket
* **placement** -- Where to place the direction in relation to
the staff ("above" or "below")
* **voice** -- Which voice to attach to
* **staff** -- Which staff to attach to if the part has multiple
staves
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "render_di | Renders the <direction-type> element that constitutes the main substance of a <direction> |
| rection_ty | element. |
| pe"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
render_direction_type() -> Sequence[Element]
Renders the <direction-type> element that constitutes the main
substance of a <direction> element.
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.spanners.StopDashes.txt
======================================================================
pymusicxml.spanners.StopDashes
******************************
class pymusicxml.spanners.StopDashes(label: Any = 1, text: str | TextAnnotation = None, placement: str | StaffPlacement = 'above', voice: int = 1, staff: int = None)
Bases: "Direction", "StopNumberedSpanner"
End of a dashed spanner (e.g. used by a dashed "cresc." or "dim."
marking)
Parameters:
* **label** -- See "NumberedSpanner".
* **text** -- Any text to attach to the end of this dashed
spanner
* **placement** -- Where to place the direction in relation to
the staff ("above" or "below")
* **voice** -- Which voice to attach to
* **staff** -- Which staff to attach to if the part has multiple
staves
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "render_di | Renders the <direction-type> element that constitutes the main substance of a <direction> |
| rection_ty | element. |
| pe"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
render_direction_type() -> Sequence[Element]
Renders the <direction-type> element that constitutes the main
substance of a <direction> element.
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.spanners.StopHairpin.txt
======================================================================
pymusicxml.spanners.StopHairpin
*******************************
class pymusicxml.spanners.StopHairpin(label: Any = 1, spread: Real = None, placement: str | StaffPlacement = 'below', voice: int = 1, staff: int = None)
Bases: "Direction", "StopNumberedSpanner"
Notation to attach to a note that ends a hairpin
Parameters:
**label** -- See "NumberedSpanner".
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render_di | Renders the <direction-type> element that constitutes the main substance of a <direction> |
| rection_ty | element. |
| pe"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
render_direction_type() -> Sequence[Element]
Renders the <direction-type> element that constitutes the main
substance of a <direction> element.
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.spanners.StopOctaveLine.txt
======================================================================
pymusicxml.spanners.StopOctaveLine
**********************************
class pymusicxml.spanners.StopOctaveLine(label: Any = 1, octaves: int = 1, placement: str | StaffPlacement = 'above', voice: int = 1, staff: int = None)
Bases: "Direction", "StopNumberedSpanner"
End of an octave-shift line (e.g. the end of an "8va" or "8vb").
Parameters:
* **label** -- See "NumberedSpanner".
* **octaves** -- how many octaves the line displaces; should
match the associated "StartOctaveLine". Only the magnitude
matters here (a stop carries no direction): 1 = 8va/8vb, 2 =
15ma/15mb, 3 = 22ma/22mb.
* **placement** -- Where to place the direction in relation to
the staff ("above" or "below")
* **voice** -- Which voice to attach to
* **staff** -- Which staff to attach to if the part has multiple
staves
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render_di | Renders the <direction-type> element that constitutes the main substance of a <direction> |
| rection_ty | element. |
| pe"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Attributes ]-
+------------+--------------------------------------------------------------------------------------------+
| "size" | |
+------------+--------------------------------------------------------------------------------------------+
property size: int
render_direction_type() -> Sequence[Element]
Renders the <direction-type> element that constitutes the main
substance of a <direction> element.
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.spanners.StopPedal.txt
======================================================================
pymusicxml.spanners.StopPedal
*****************************
class pymusicxml.spanners.StopPedal(label: Any = 1, sign: bool = False, line: bool = True, placement: str | StaffPlacement = 'below', voice: int = 1, staff: int = None)
Bases: "Direction", "StopNumberedSpanner"
Stops a sustain pedal spanner.
Parameters:
* **label** -- See "NumberedSpanner".
* **sign** -- whether or not to include a "*" sign
* **line** -- whether or not to use a line in the pedal marking
* **placement** -- Where to place the direction in relation to
the staff ("above" or "below")
* **voice** -- Which voice to attach to
* **staff** -- Which staff to attach to if the part has multiple
staves
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render_di | Renders the <direction-type> element that constitutes the main substance of a <direction> |
| rection_ty | element. |
| pe"() | |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
render_direction_type() -> Sequence[Element]
Renders the <direction-type> element that constitutes the main
substance of a <direction> element.
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.spanners.StopSlur.txt
======================================================================
pymusicxml.spanners.StopSlur
****************************
class pymusicxml.spanners.StopSlur(label: Any = 1)
Bases: "Notation", "StopNumberedSpanner"
Notation to attach to a note that ends a slur
Parameters:
**label** -- See "NumberedSpanner".
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.spanners.StopTrill.txt
======================================================================
pymusicxml.spanners.StopTrill
*****************************
class pymusicxml.spanners.StopTrill(label: Any = 1, placement: StaffPlacement | str = 'above')
Bases: "Notation", "StopNumberedSpanner"
Stops a trill spanner with a wavy line.
Parameters:
* **label** -- See "NumberedSpanner".
* **placement** -- Where to place the direction in relation to
the staff ("above" or "below")
-[ Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "render"() | Renders this component to a tuple of ElementTree.Element. |
+------------+--------------------------------------------------------------------------------------------+
-[ Inherited Methods ]-
+------------+--------------------------------------------------------------------------------------------+
| "export_to | Exports this musical object (wrapped as a score) to the given file path. |
| _file"(fil | |
| e_path[, p | |
| retty_prin | |
| t]) | |
+------------+--------------------------------------------------------------------------------------------+
| "to_xml"([ | Renders this component to MusicXML, adding a version tag, but not wrapping it up as a full |
| pretty_pri | score. |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "view_in_s | Uses the given terminal command to create a score out of this musical object, and open it |
| oftware"(c | in music notation software. |
| ommand) | |
+------------+--------------------------------------------------------------------------------------------+
| "wrap_as_s | Wraps this component in a "Score" so that it can be exported and viewed |
| core"() | |
+------------+--------------------------------------------------------------------------------------------+
render() -> Sequence[Element]
Renders this component to a tuple of ElementTree.Element. (The
reason for making it a tuple is that musical objects like chords
are represented by several notes side by side, with all but the
first containing a </chord> tag.)
export_to_file(file_path: str, pretty_print: bool = True) -> None
Exports this musical object (wrapped as a score) to the given
file path.
Parameters:
* **file_path** -- The path of the file we want to write to.
* **pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
to_xml(pretty_print: bool = False) -> str
Renders this component to MusicXML, adding a version tag, but
not wrapping it up as a full score.
Parameters:
**pretty_print** -- If True, breaks the MusicXML onto
multiple lines, with indentation
view_in_software(command: str) -> None
Uses the given terminal command to create a score out of this
musical object, and open it in music notation software.
Parameters:
**command** -- The terminal command corresponding to the
software with which we want to open the score.
wrap_as_score() -> Score
Wraps this component in a "Score" so that it can be exported and
viewed
======================================================================
=== FILE: pymusicxml/pymusicxml.spanners.txt
======================================================================
pymusicxml.spanners
*******************
Module containing all spanners (i.e. notations that span a time-range
in the score, such as slurs, brackets, hairpins, etc.)
-[ Classes ]-
+------------+--------------------------------------------------------------------------------------------+
| "ChangePed | Pedal change in the middle of a sustain pedal spanner. |
| al"([label | |
| , sign, | |
| line, | |
| placement, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StartBrac | Start of a bracket spanner. |
| ket"([labe | |
| l, | |
| line_type, | |
| line_end, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StartDash | Start of a dashed spanner (e.g. used by a dashed "cresc." or "dim." marking). |
| es"([label | |
| , dash_len | |
| gth, ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StartHair | Notation to attach to a note that starts a hairpin |
| pin"(hairp | |
| in_type[, | |
| label, | |
| spread, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StartOcta | Start of an octave-shift line, i.e. an "8va"/"8vb"/"15ma" bracket with a dashed line and |
| veLine"([l | terminal hook. |
| abel, | |
| octaves, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StartPeda | Start of a sustain pedal spanner. |
| l"([label, | |
| sign, | |
| line, | |
| placement, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StartSlur | Notation to attach to a note that starts a slur |
| "([label]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StartTril | Starts a trill spanner with a wavy line. |
| l"([label, | |
| placement, | |
| accidental | |
| ]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StopBrack | End of a bracket spanner. |
| et"([label | |
| , | |
| line_end, | |
| end_length | |
| , ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StopDashe | End of a dashed spanner (e.g. used by a dashed "cresc." or "dim." marking). |
| s"([label, | |
| text, | |
| placement, | |
| voice, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StopHairp | Notation to attach to a note that ends a hairpin |
| in"([label | |
| , spread, | |
| placement, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StopOctav | End of an octave-shift line (e.g. the end of an "8va" or "8vb"). |
| eLine"([la | |
| bel, | |
| octaves, | |
| placement, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StopPedal | Stops a sustain pedal spanner. |
| "([label, | |
| sign, | |
| line, | |
| placement, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StopSlur" | Notation to attach to a note that ends a slur |
| ([label]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StopTrill | Stops a trill spanner with a wavy line. |
| "([label, | |
| placement] | |
| ) | |
+------------+--------------------------------------------------------------------------------------------+
* pymusicxml.spanners.ChangePedal
* "ChangePedal"
* "ChangePedal.render_direction_type()"
* "ChangePedal.export_to_file()"
* "ChangePedal.render()"
* "ChangePedal.to_xml()"
* "ChangePedal.view_in_software()"
* "ChangePedal.wrap_as_score()"
* pymusicxml.spanners.StartBracket
* "StartBracket"
* "StartBracket.STOP_TYPE"
* "StartBracket.render_direction_type()"
* "StartBracket.render()"
* "StartBracket.MID_TYPES"
* "StartBracket.export_to_file()"
* "StartBracket.to_xml()"
* "StartBracket.view_in_software()"
* "StartBracket.wrap_as_score()"
* pymusicxml.spanners.StartDashes
* "StartDashes"
* "StartDashes.STOP_TYPE"
* "StartDashes.render_direction_type()"
* "StartDashes.render()"
* "StartDashes.MID_TYPES"
* "StartDashes.export_to_file()"
* "StartDashes.to_xml()"
* "StartDashes.view_in_software()"
* "StartDashes.wrap_as_score()"
* pymusicxml.spanners.StartHairpin
* "StartHairpin"
* "StartHairpin.STOP_TYPE"
* "StartHairpin.render_direction_type()"
* "StartHairpin.MID_TYPES"
* "StartHairpin.export_to_file()"
* "StartHairpin.render()"
* "StartHairpin.to_xml()"
* "StartHairpin.view_in_software()"
* "StartHairpin.wrap_as_score()"
* pymusicxml.spanners.StartOctaveLine
* "StartOctaveLine"
* "StartOctaveLine.STOP_TYPE"
* "StartOctaveLine.size"
* "StartOctaveLine.render_direction_type()"
* "StartOctaveLine.MID_TYPES"
* "StartOctaveLine.export_to_file()"
* "StartOctaveLine.render()"
* "StartOctaveLine.to_xml()"
* "StartOctaveLine.view_in_software()"
* "StartOctaveLine.wrap_as_score()"
* pymusicxml.spanners.StartPedal
* "StartPedal"
* "StartPedal.STOP_TYPE"
* "StartPedal.MID_TYPES"
* "StartPedal.render_direction_type()"
* "StartPedal.export_to_file()"
* "StartPedal.render()"
* "StartPedal.to_xml()"
* "StartPedal.view_in_software()"
* "StartPedal.wrap_as_score()"
* pymusicxml.spanners.StartSlur
* "StartSlur"
* "StartSlur.MID_TYPES"
* "StartSlur.export_to_file()"
* "StartSlur.to_xml()"
* "StartSlur.view_in_software()"
* "StartSlur.wrap_as_score()"
* "StartSlur.STOP_TYPE"
* "StartSlur.render()"
* pymusicxml.spanners.StartTrill
* "StartTrill"
* "StartTrill.STOP_TYPE"
* "StartTrill.render()"
* "StartTrill.MID_TYPES"
* "StartTrill.export_to_file()"
* "StartTrill.to_xml()"
* "StartTrill.view_in_software()"
* "StartTrill.wrap_as_score()"
* pymusicxml.spanners.StopBracket
* "StopBracket"
* "StopBracket.render_direction_type()"
* "StopBracket.render()"
* "StopBracket.export_to_file()"
* "StopBracket.to_xml()"
* "StopBracket.view_in_software()"
* "StopBracket.wrap_as_score()"
* pymusicxml.spanners.StopDashes
* "StopDashes"
* "StopDashes.render_direction_type()"
* "StopDashes.render()"
* "StopDashes.export_to_file()"
* "StopDashes.to_xml()"
* "StopDashes.view_in_software()"
* "StopDashes.wrap_as_score()"
* pymusicxml.spanners.StopHairpin
* "StopHairpin"
* "StopHairpin.render_direction_type()"
* "StopHairpin.export_to_file()"
* "StopHairpin.render()"
* "StopHairpin.to_xml()"
* "StopHairpin.view_in_software()"
* "StopHairpin.wrap_as_score()"
* pymusicxml.spanners.StopOctaveLine
* "StopOctaveLine"
* "StopOctaveLine.size"
* "StopOctaveLine.render_direction_type()"
* "StopOctaveLine.export_to_file()"
* "StopOctaveLine.render()"
* "StopOctaveLine.to_xml()"
* "StopOctaveLine.view_in_software()"
* "StopOctaveLine.wrap_as_score()"
* pymusicxml.spanners.StopPedal
* "StopPedal"
* "StopPedal.render_direction_type()"
* "StopPedal.export_to_file()"
* "StopPedal.render()"
* "StopPedal.to_xml()"
* "StopPedal.view_in_software()"
* "StopPedal.wrap_as_score()"
* pymusicxml.spanners.StopSlur
* "StopSlur"
* "StopSlur.export_to_file()"
* "StopSlur.render()"
* "StopSlur.to_xml()"
* "StopSlur.view_in_software()"
* "StopSlur.wrap_as_score()"
* pymusicxml.spanners.StopTrill
* "StopTrill"
* "StopTrill.render()"
* "StopTrill.export_to_file()"
* "StopTrill.to_xml()"
* "StopTrill.view_in_software()"
* "StopTrill.wrap_as_score()"
======================================================================
=== FILE: pymusicxml.txt
======================================================================
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: ]-
+------------+--------------------------------------------------------------------------------------------+
| "direction | Module containing all non-spanner subclasses of the "Direction" type. |
| s" | |
+------------+--------------------------------------------------------------------------------------------+
| "enums" | Module containing relevant Enums used throughout pymusicxml. |
+------------+--------------------------------------------------------------------------------------------+
| "notations | Module containing all non-spanner notations, such as glisses, bowings, fermatas, etc. |
| " | |
+------------+--------------------------------------------------------------------------------------------+
| "score_com | Module containing all of the classes representing the hierarchy of a musical score. |
| ponents" | |
+------------+--------------------------------------------------------------------------------------------+
| "spanners" | Module containing all spanners (i.e. notations that span a time-range in the score, such |
| | as slurs, brackets, hairpins, etc.). |
+------------+--------------------------------------------------------------------------------------------+
* pymusicxml.directions
* pymusicxml.directions.Degree
* "Degree"
* "Degree.DEGREE_TYPES"
* "Degree.render()"
* pymusicxml.directions.Dynamic
* "Dynamic"
* "Dynamic.STANDARD_TYPES"
* "Dynamic.render_direction_type()"
* "Dynamic.export_to_file()"
* "Dynamic.render()"
* "Dynamic.to_xml()"
* "Dynamic.view_in_software()"
* "Dynamic.wrap_as_score()"
* pymusicxml.directions.Harmony
* "Harmony"
* "Harmony.KINDS"
* "Harmony.render()"
* "Harmony.render_direction_type()"
* "Harmony.export_to_file()"
* "Harmony.to_xml()"
* "Harmony.view_in_software()"
* "Harmony.wrap_as_score()"
* pymusicxml.directions.MetronomeMark
* "MetronomeMark"
* "MetronomeMark.render_direction_type()"
* "MetronomeMark.export_to_file()"
* "MetronomeMark.render()"
* "MetronomeMark.to_xml()"
* "MetronomeMark.view_in_software()"
* "MetronomeMark.wrap_as_score()"
* pymusicxml.directions.TextAnnotation
* "TextAnnotation"
* "TextAnnotation.render_direction_type()"
* "TextAnnotation.export_to_file()"
* "TextAnnotation.render()"
* "TextAnnotation.to_xml()"
* "TextAnnotation.view_in_software()"
* "TextAnnotation.wrap_as_score()"
* pymusicxml.enums
* pymusicxml.enums.AccidentalType
* "AccidentalType"
* "AccidentalType.flat_flat"
* "AccidentalType.double_flat"
* "AccidentalType.flat"
* "AccidentalType.natural"
* "AccidentalType.sharp"
* "AccidentalType.double_sharp"
* pymusicxml.enums.ArpeggiationDirection
* "ArpeggiationDirection"
* "ArpeggiationDirection.up"
* "ArpeggiationDirection.down"
* pymusicxml.enums.HairpinType
* "HairpinType"
* "HairpinType.crescendo"
* "HairpinType.diminuendo"
* pymusicxml.enums.LineEnd
* "LineEnd"
* "LineEnd.up"
* "LineEnd.down"
* "LineEnd.both"
* "LineEnd.arrow"
* "LineEnd.none"
* pymusicxml.enums.LineType
* "LineType"
* "LineType.solid"
* "LineType.dashed"
* "LineType.dotted"
* "LineType.wavy"
* pymusicxml.enums.StaffPlacement
* "StaffPlacement"
* "StaffPlacement.above"
* "StaffPlacement.below"
* pymusicxml.notations
* pymusicxml.notations.Arpeggiate
* "Arpeggiate"
* "Arpeggiate.render()"
* "Arpeggiate.export_to_file()"
* "Arpeggiate.to_xml()"
* "Arpeggiate.view_in_software()"
* "Arpeggiate.wrap_as_score()"
* pymusicxml.notations.DownBow
* "DownBow"
* "DownBow.render_technical()"
* "DownBow.export_to_file()"
* "DownBow.render()"
* "DownBow.to_xml()"
* "DownBow.view_in_software()"
* "DownBow.wrap_as_score()"
* pymusicxml.notations.Fermata
* "Fermata"
* "Fermata.render()"
* "Fermata.export_to_file()"
* "Fermata.to_xml()"
* "Fermata.view_in_software()"
* "Fermata.wrap_as_score()"
* pymusicxml.notations.Harmonic
* "Harmonic"
* "Harmonic.render_technical()"
* "Harmonic.export_to_file()"
* "Harmonic.render()"
* "Harmonic.to_xml()"
* "Harmonic.view_in_software()"
* "Harmonic.wrap_as_score()"
* pymusicxml.notations.Mordent
* "Mordent"
* "Mordent.render_ornament()"
* "Mordent.export_to_file()"
* "Mordent.render()"
* "Mordent.to_xml()"
* "Mordent.view_in_software()"
* "Mordent.wrap_as_score()"
* pymusicxml.notations.NonArpeggiate
* "NonArpeggiate"
* "NonArpeggiate.render()"
* "NonArpeggiate.export_to_file()"
* "NonArpeggiate.to_xml()"
* "NonArpeggiate.view_in_software()"
* "NonArpeggiate.wrap_as_score()"
* pymusicxml.notations.OpenString
* "OpenString"
* "OpenString.render_technical()"
* "OpenString.export_to_file()"
* "OpenString.render()"
* "OpenString.to_xml()"
* "OpenString.view_in_software()"
* "OpenString.wrap_as_score()"
* pymusicxml.notations.Ornament
* "Ornament"
* "Ornament.render_ornament()"
* "Ornament.render()"
* "Ornament.export_to_file()"
* "Ornament.to_xml()"
* "Ornament.view_in_software()"
* "Ornament.wrap_as_score()"
* pymusicxml.notations.Schleifer
* "Schleifer"
* "Schleifer.render_ornament()"
* "Schleifer.export_to_file()"
* "Schleifer.render()"
* "Schleifer.to_xml()"
* "Schleifer.view_in_software()"
* "Schleifer.wrap_as_score()"
* pymusicxml.notations.SnapPizzicato
* "SnapPizzicato"
* "SnapPizzicato.render_technical()"
* "SnapPizzicato.export_to_file()"
* "SnapPizzicato.render()"
* "SnapPizzicato.to_xml()"
* "SnapPizzicato.view_in_software()"
* "SnapPizzicato.wrap_as_score()"
* pymusicxml.notations.StartGliss
* "StartGliss"
* "StartGliss.render()"
* "StartGliss.export_to_file()"
* "StartGliss.to_xml()"
* "StartGliss.view_in_software()"
* "StartGliss.wrap_as_score()"
* pymusicxml.notations.StartMultiGliss
* "StartMultiGliss"
* "StartMultiGliss.render()"
* "StartMultiGliss.export_to_file()"
* "StartMultiGliss.to_xml()"
* "StartMultiGliss.view_in_software()"
* "StartMultiGliss.wrap_as_score()"
* pymusicxml.notations.StopGliss
* "StopGliss"
* "StopGliss.render()"
* "StopGliss.export_to_file()"
* "StopGliss.to_xml()"
* "StopGliss.view_in_software()"
* "StopGliss.wrap_as_score()"
* pymusicxml.notations.StopMultiGliss
* "StopMultiGliss"
* "StopMultiGliss.render()"
* "StopMultiGliss.export_to_file()"
* "StopMultiGliss.to_xml()"
* "StopMultiGliss.view_in_software()"
* "StopMultiGliss.wrap_as_score()"
* pymusicxml.notations.Stopped
* "Stopped"
* "Stopped.render_technical()"
* "Stopped.export_to_file()"
* "Stopped.render()"
* "Stopped.to_xml()"
* "Stopped.view_in_software()"
* "Stopped.wrap_as_score()"
* pymusicxml.notations.Technical
* "Technical"
* "Technical.render_technical()"
* "Technical.render()"
* "Technical.export_to_file()"
* "Technical.to_xml()"
* "Technical.view_in_software()"
* "Technical.wrap_as_score()"
* pymusicxml.notations.Tremolo
* "Tremolo"
* "Tremolo.render_ornament()"
* "Tremolo.export_to_file()"
* "Tremolo.render()"
* "Tremolo.to_xml()"
* "Tremolo.view_in_software()"
* "Tremolo.wrap_as_score()"
* pymusicxml.notations.TrillMark
* "TrillMark"
* "TrillMark.render_ornament()"
* "TrillMark.export_to_file()"
* "TrillMark.render()"
* "TrillMark.to_xml()"
* "TrillMark.view_in_software()"
* "TrillMark.wrap_as_score()"
* pymusicxml.notations.Turn
* "Turn"
* "Turn.render_ornament()"
* "Turn.export_to_file()"
* "Turn.render()"
* "Turn.to_xml()"
* "Turn.view_in_software()"
* "Turn.wrap_as_score()"
* pymusicxml.notations.UpBow
* "UpBow"
* "UpBow.render_technical()"
* "UpBow.export_to_file()"
* "UpBow.render()"
* "UpBow.to_xml()"
* "UpBow.view_in_software()"
* "UpBow.wrap_as_score()"
* pymusicxml.score_components
* pymusicxml.score_components.BarRest
* "BarRest"
* "BarRest.divisions"
* "BarRest.export_to_file()"
* "BarRest.length_in_divisions"
* "BarRest.min_denominator()"
* "BarRest.num_beams()"
* "BarRest.render()"
* "BarRest.to_xml()"
* "BarRest.true_length"
* "BarRest.view_in_software()"
* "BarRest.wrap_as_score()"
* "BarRest.written_length"
* pymusicxml.score_components.BarRestDuration
* "BarRestDuration"
* "BarRestDuration.written_length"
* "BarRestDuration.divisions"
* "BarRestDuration.min_denominator()"
* "BarRestDuration.length_in_divisions"
* "BarRestDuration.true_length"
* "BarRestDuration.render()"
* "BarRestDuration.wrap_as_score()"
* "BarRestDuration.export_to_file()"
* "BarRestDuration.to_xml()"
* "BarRestDuration.view_in_software()"
* pymusicxml.score_components.BeamedGroup
* "BeamedGroup"
* "BeamedGroup.render_contents_beaming()"
* "BeamedGroup.divisions"
* "BeamedGroup.true_length"
* "BeamedGroup.written_length"
* "BeamedGroup.length_in_divisions"
* "BeamedGroup.min_denominator()"
* "BeamedGroup.render()"
* "BeamedGroup.wrap_as_score()"
* "BeamedGroup.append()"
* "BeamedGroup.clear()"
* "BeamedGroup.count()"
* "BeamedGroup.export_to_file()"
* "BeamedGroup.extend()"
* "BeamedGroup.index()"
* "BeamedGroup.insert()"
* "BeamedGroup.pop()"
* "BeamedGroup.remove()"
* "BeamedGroup.reverse()"
* "BeamedGroup.to_xml()"
* "BeamedGroup.view_in_software()"
* pymusicxml.score_components.Chord
* "Chord"
* "Chord.pitches"
* "Chord.num_beams()"
* "Chord.duration"
* "Chord.true_length"
* "Chord.written_length"
* "Chord.length_in_divisions"
* "Chord.notations"
* "Chord.articulations"
* "Chord.directions"
* "Chord.divisions"
* "Chord.voice"
* "Chord.beams"
* "Chord.ties"
* "Chord.tuplet_bracket"
* "Chord.min_denominator()"
* "Chord.render()"
* "Chord.wrap_as_score()"
* "Chord.export_to_file()"
* "Chord.to_xml()"
* "Chord.view_in_software()"
* pymusicxml.score_components.Clef
* "Clef"
* "Clef.clef_name_to_letter_and_line"
* "Clef.from_string()"
* "Clef.render()"
* "Clef.wrap_as_score()"
* "Clef.export_to_file()"
* "Clef.to_xml()"
* "Clef.view_in_software()"
* pymusicxml.score_components.Direction
* "Direction"
* "Direction.export_to_file()"
* "Direction.to_xml()"
* "Direction.view_in_software()"
* "Direction.render()"
* "Direction.render_direction_type()"
* "Direction.wrap_as_score()"
* pymusicxml.score_components.Duration
* "Duration"
* "Duration.divisions"
* "Duration.written_length"
* "Duration.true_length"
* "Duration.min_denominator()"
* "Duration.length_in_divisions"
* "Duration.num_beams()"
* "Duration.from_written_length()"
* "Duration.from_divisor()"
* "Duration.from_string()"
* "Duration.get_note_type_and_number_of_dots()"
* "Duration.render()"
* "Duration.render_to_beat_unit_tags()"
* "Duration.wrap_as_score()"
* "Duration.export_to_file()"
* "Duration.to_xml()"
* "Duration.view_in_software()"
* pymusicxml.score_components.DurationalObject
* "DurationalObject"
* "DurationalObject.true_length"
* "DurationalObject.written_length"
* "DurationalObject.length_in_divisions"
* "DurationalObject.divisions"
* "DurationalObject.min_denominator()"
* "DurationalObject.export_to_file()"
* "DurationalObject.render()"
* "DurationalObject.to_xml()"
* "DurationalObject.view_in_software()"
* "DurationalObject.wrap_as_score()"
* pymusicxml.score_components.GraceChord
* "GraceChord"
* "GraceChord.articulations"
* "GraceChord.beams"
* "GraceChord.directions"
* "GraceChord.divisions"
* "GraceChord.duration"
* "GraceChord.export_to_file()"
* "GraceChord.length_in_divisions"
* "GraceChord.min_denominator()"
* "GraceChord.notations"
* "GraceChord.num_beams()"
* "GraceChord.pitches"
* "GraceChord.render()"
* "GraceChord.ties"
* "GraceChord.to_xml()"
* "GraceChord.true_length"
* "GraceChord.tuplet_bracket"
* "GraceChord.view_in_software()"
* "GraceChord.voice"
* "GraceChord.wrap_as_score()"
* "GraceChord.written_length"
* pymusicxml.score_components.GraceNote
* "GraceNote"
* "GraceNote.divisions"
* "GraceNote.export_to_file()"
* "GraceNote.length_in_divisions"
* "GraceNote.min_denominator()"
* "GraceNote.num_beams()"
* "GraceNote.render()"
* "GraceNote.starts_tie"
* "GraceNote.stops_tie"
* "GraceNote.to_xml()"
* "GraceNote.true_length"
* "GraceNote.view_in_software()"
* "GraceNote.wrap_as_score()"
* "GraceNote.written_length"
* pymusicxml.score_components.KeySignature
* "KeySignature"
* "KeySignature.mode_fifth_alterations"
* "KeySignature.parse()"
* "KeySignature.render()"
* "KeySignature.step_alterations()"
* "KeySignature.wrap_as_score()"
* "KeySignature.export_to_file()"
* "KeySignature.to_xml()"
* "KeySignature.view_in_software()"
* pymusicxml.score_components.Measure
* "Measure"
* "Measure.voices"
* "Measure.iter_leaves()"
* "Measure.leaves()"
* "Measure.iter_directions()"
* "Measure.iter_notations()"
* "Measure.directions()"
* "Measure.notations()"
* "Measure.render()"
* "Measure.wrap_as_score()"
* "Measure.append()"
* "Measure.clear()"
* "Measure.count()"
* "Measure.export_to_file()"
* "Measure.extend()"
* "Measure.index()"
* "Measure.insert()"
* "Measure.pop()"
* "Measure.remove()"
* "Measure.reverse()"
* "Measure.to_xml()"
* "Measure.view_in_software()"
* pymusicxml.score_components.MidNumberedSpanner
* "MidNumberedSpanner"
* pymusicxml.score_components.MultiGliss
* "MultiGliss"
* "MultiGliss.export_to_file()"
* "MultiGliss.render()"
* "MultiGliss.to_xml()"
* "MultiGliss.view_in_software()"
* "MultiGliss.wrap_as_score()"
* pymusicxml.score_components.MusicXMLComponent
* "MusicXMLComponent"
* "MusicXMLComponent.render()"
* "MusicXMLComponent.wrap_as_score()"
* "MusicXMLComponent.to_xml()"
* "MusicXMLComponent.export_to_file()"
* "MusicXMLComponent.view_in_software()"
* pymusicxml.score_components.MusicXMLContainer
* "MusicXMLContainer"
* "MusicXMLContainer.insert()"
* "MusicXMLContainer.append()"
* "MusicXMLContainer.clear()"
* "MusicXMLContainer.count()"
* "MusicXMLContainer.extend()"
* "MusicXMLContainer.index()"
* "MusicXMLContainer.pop()"
* "MusicXMLContainer.remove()"
* "MusicXMLContainer.reverse()"
* pymusicxml.score_components.NonTraditionalKeySignature
* "NonTraditionalKeySignature"
* "NonTraditionalKeySignature.add_alteration()"
* "NonTraditionalKeySignature.render()"
* "NonTraditionalKeySignature.step_alterations()"
* "NonTraditionalKeySignature.export_to_file()"
* "NonTraditionalKeySignature.mode_fifth_alterations"
* "NonTraditionalKeySignature.parse()"
* "NonTraditionalKeySignature.to_xml()"
* "NonTraditionalKeySignature.view_in_software()"
* "NonTraditionalKeySignature.wrap_as_score()"
* pymusicxml.score_components.Notation
* "Notation"
* "Notation.render()"
* "Notation.export_to_file()"
* "Notation.to_xml()"
* "Notation.view_in_software()"
* "Notation.wrap_as_score()"
* pymusicxml.score_components.Note
* "Note"
* "Note.starts_tie"
* "Note.stops_tie"
* "Note.divisions"
* "Note.export_to_file()"
* "Note.length_in_divisions"
* "Note.min_denominator()"
* "Note.num_beams()"
* "Note.render()"
* "Note.to_xml()"
* "Note.true_length"
* "Note.view_in_software()"
* "Note.wrap_as_score()"
* "Note.written_length"
* pymusicxml.score_components.Notehead
* "Notehead"
* "Notehead.valid_xml_types"
* "Notehead.render()"
* "Notehead.wrap_as_score()"
* "Notehead.export_to_file()"
* "Notehead.to_xml()"
* "Notehead.view_in_software()"
* pymusicxml.score_components.NumberedSpanner
* "NumberedSpanner"
* pymusicxml.score_components.Part
* "Part"
* "Part.general_midi_preset_nums"
* "Part.measures"
* "Part.iter_leaves()"
* "Part.iter_directions()"
* "Part.iter_notations()"
* "Part.render()"
* "Part.render_part_list_entry()"
* "Part.wrap_as_score()"
* "Part.append()"
* "Part.clear()"
* "Part.count()"
* "Part.export_to_file()"
* "Part.extend()"
* "Part.index()"
* "Part.insert()"
* "Part.pop()"
* "Part.remove()"
* "Part.reverse()"
* "Part.to_xml()"
* "Part.view_in_software()"
* pymusicxml.score_components.PartGroup
* "PartGroup"
* "PartGroup.parts"
* "PartGroup.render()"
* "PartGroup.render_part_list_entry()"
* "PartGroup.wrap_as_score()"
* "PartGroup.append()"
* "PartGroup.clear()"
* "PartGroup.count()"
* "PartGroup.export_to_file()"
* "PartGroup.extend()"
* "PartGroup.index()"
* "PartGroup.insert()"
* "PartGroup.pop()"
* "PartGroup.remove()"
* "PartGroup.reverse()"
* "PartGroup.to_xml()"
* "PartGroup.view_in_software()"
* pymusicxml.score_components.Pitch
* "Pitch"
* "Pitch.from_string()"
* "Pitch.render()"
* "Pitch.accidental_name"
* "Pitch.wrap_as_score()"
* "Pitch.export_to_file()"
* "Pitch.to_xml()"
* "Pitch.view_in_software()"
* pymusicxml.score_components.Rest
* "Rest"
* "Rest.divisions"
* "Rest.export_to_file()"
* "Rest.length_in_divisions"
* "Rest.min_denominator()"
* "Rest.num_beams()"
* "Rest.render()"
* "Rest.to_xml()"
* "Rest.true_length"
* "Rest.view_in_software()"
* "Rest.wrap_as_score()"
* "Rest.written_length"
* pymusicxml.score_components.Score
* "Score"
* "Score.parts"
* "Score.render()"
* "Score.wrap_as_score()"
* "Score.append()"
* "Score.clear()"
* "Score.count()"
* "Score.export_to_file()"
* "Score.extend()"
* "Score.index()"
* "Score.insert()"
* "Score.pop()"
* "Score.remove()"
* "Score.reverse()"
* "Score.to_xml()"
* "Score.view_in_software()"
* pymusicxml.score_components.StartNumberedSpanner
* "StartNumberedSpanner"
* "StartNumberedSpanner.STOP_TYPE"
* "StartNumberedSpanner.MID_TYPES"
* pymusicxml.score_components.StopNumberedSpanner
* "StopNumberedSpanner"
* pymusicxml.score_components.TraditionalKeySignature
* "TraditionalKeySignature"
* "TraditionalKeySignature.render()"
* "TraditionalKeySignature.step_alterations()"
* "TraditionalKeySignature.export_to_file()"
* "TraditionalKeySignature.mode_fifth_alterations"
* "TraditionalKeySignature.parse()"
* "TraditionalKeySignature.to_xml()"
* "TraditionalKeySignature.view_in_software()"
* "TraditionalKeySignature.wrap_as_score()"
* pymusicxml.score_components.Transpose
* "Transpose"
* "Transpose.render()"
* "Transpose.wrap_as_score()"
* "Transpose.export_to_file()"
* "Transpose.to_xml()"
* "Transpose.view_in_software()"
* pymusicxml.score_components.Tuplet
* "Tuplet"
* "Tuplet.min_denominator()"
* "Tuplet.render()"
* "Tuplet.append()"
* "Tuplet.clear()"
* "Tuplet.count()"
* "Tuplet.divisions"
* "Tuplet.export_to_file()"
* "Tuplet.extend()"
* "Tuplet.index()"
* "Tuplet.insert()"
* "Tuplet.length_in_divisions"
* "Tuplet.pop()"
* "Tuplet.remove()"
* "Tuplet.render_contents_beaming()"
* "Tuplet.reverse()"
* "Tuplet.to_xml()"
* "Tuplet.true_length"
* "Tuplet.view_in_software()"
* "Tuplet.wrap_as_score()"
* "Tuplet.written_length"
* pymusicxml.score_components.pad_with_rests
* "pad_with_rests()"
* pymusicxml.spanners
* pymusicxml.spanners.ChangePedal
* "ChangePedal"
* "ChangePedal.render_direction_type()"
* "ChangePedal.export_to_file()"
* "ChangePedal.render()"
* "ChangePedal.to_xml()"
* "ChangePedal.view_in_software()"
* "ChangePedal.wrap_as_score()"
* pymusicxml.spanners.StartBracket
* "StartBracket"
* "StartBracket.STOP_TYPE"
* "StartBracket.render_direction_type()"
* "StartBracket.render()"
* "StartBracket.MID_TYPES"
* "StartBracket.export_to_file()"
* "StartBracket.to_xml()"
* "StartBracket.view_in_software()"
* "StartBracket.wrap_as_score()"
* pymusicxml.spanners.StartDashes
* "StartDashes"
* "StartDashes.STOP_TYPE"
* "StartDashes.render_direction_type()"
* "StartDashes.render()"
* "StartDashes.MID_TYPES"
* "StartDashes.export_to_file()"
* "StartDashes.to_xml()"
* "StartDashes.view_in_software()"
* "StartDashes.wrap_as_score()"
* pymusicxml.spanners.StartHairpin
* "StartHairpin"
* "StartHairpin.STOP_TYPE"
* "StartHairpin.render_direction_type()"
* "StartHairpin.MID_TYPES"
* "StartHairpin.export_to_file()"
* "StartHairpin.render()"
* "StartHairpin.to_xml()"
* "StartHairpin.view_in_software()"
* "StartHairpin.wrap_as_score()"
* pymusicxml.spanners.StartOctaveLine
* "StartOctaveLine"
* "StartOctaveLine.STOP_TYPE"
* "StartOctaveLine.size"
* "StartOctaveLine.render_direction_type()"
* "StartOctaveLine.MID_TYPES"
* "StartOctaveLine.export_to_file()"
* "StartOctaveLine.render()"
* "StartOctaveLine.to_xml()"
* "StartOctaveLine.view_in_software()"
* "StartOctaveLine.wrap_as_score()"
* pymusicxml.spanners.StartPedal
* "StartPedal"
* "StartPedal.STOP_TYPE"
* "StartPedal.MID_TYPES"
* "StartPedal.render_direction_type()"
* "StartPedal.export_to_file()"
* "StartPedal.render()"
* "StartPedal.to_xml()"
* "StartPedal.view_in_software()"
* "StartPedal.wrap_as_score()"
* pymusicxml.spanners.StartSlur
* "StartSlur"
* "StartSlur.MID_TYPES"
* "StartSlur.export_to_file()"
* "StartSlur.to_xml()"
* "StartSlur.view_in_software()"
* "StartSlur.wrap_as_score()"
* "StartSlur.STOP_TYPE"
* "StartSlur.render()"
* pymusicxml.spanners.StartTrill
* "StartTrill"
* "StartTrill.STOP_TYPE"
* "StartTrill.render()"
* "StartTrill.MID_TYPES"
* "StartTrill.export_to_file()"
* "StartTrill.to_xml()"
* "StartTrill.view_in_software()"
* "StartTrill.wrap_as_score()"
* pymusicxml.spanners.StopBracket
* "StopBracket"
* "StopBracket.render_direction_type()"
* "StopBracket.render()"
* "StopBracket.export_to_file()"
* "StopBracket.to_xml()"
* "StopBracket.view_in_software()"
* "StopBracket.wrap_as_score()"
* pymusicxml.spanners.StopDashes
* "StopDashes"
* "StopDashes.render_direction_type()"
* "StopDashes.render()"
* "StopDashes.export_to_file()"
* "StopDashes.to_xml()"
* "StopDashes.view_in_software()"
* "StopDashes.wrap_as_score()"
* pymusicxml.spanners.StopHairpin
* "StopHairpin"
* "StopHairpin.render_direction_type()"
* "StopHairpin.export_to_file()"
* "StopHairpin.render()"
* "StopHairpin.to_xml()"
* "StopHairpin.view_in_software()"
* "StopHairpin.wrap_as_score()"
* pymusicxml.spanners.StopOctaveLine
* "StopOctaveLine"
* "StopOctaveLine.size"
* "StopOctaveLine.render_direction_type()"
* "StopOctaveLine.export_to_file()"
* "StopOctaveLine.render()"
* "StopOctaveLine.to_xml()"
* "StopOctaveLine.view_in_software()"
* "StopOctaveLine.wrap_as_score()"
* pymusicxml.spanners.StopPedal
* "StopPedal"
* "StopPedal.render_direction_type()"
* "StopPedal.export_to_file()"
* "StopPedal.render()"
* "StopPedal.to_xml()"
* "StopPedal.view_in_software()"
* "StopPedal.wrap_as_score()"
* pymusicxml.spanners.StopSlur
* "StopSlur"
* "StopSlur.export_to_file()"
* "StopSlur.render()"
* "StopSlur.to_xml()"
* "StopSlur.view_in_software()"
* "StopSlur.wrap_as_score()"
* pymusicxml.spanners.StopTrill
* "StopTrill"
* "StopTrill.render()"
* "StopTrill.export_to_file()"
* "StopTrill.to_xml()"
* "StopTrill.view_in_software()"
* "StopTrill.wrap_as_score()"
-[ Public-Facing API (result of *import **): ]-
+------------+--------------------------------------------------------------------------------------------+
| "Degree"(v | The <degree> element is used to add, alter, or subtract individual notes in the chord. |
| alue, | |
| alter[, de | |
| gree_type, | |
| print_obje | |
| ct]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Dynamic"( | Class representing a dynamic that is attached to the staff |
| dynamic_te | |
| xt[, | |
| placement, | |
| voice, | |
| staff]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Harmony"( | Class representing harmonic notation. |
| root_lette | |
| r, root_al | |
| ter, | |
| kind[, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Metronome | Class representing a tempo-specifying metronome mark |
| Mark"(beat | |
| _length, | |
| bpm[, | |
| placement, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "TextAnnot | Class representing text that is attached to the staff |
| ation"(tex | |
| t[, | |
| font_size, | |
| italic, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Enum"(new | Create a collection of name/value pairs. |
| _class_nam | |
| e, /, | |
| names, *[, | |
| module, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Accidenta | An accidental, as used in a "NonTraditionalKeySignature". |
| lType"(*va | |
| lues) | |
+------------+--------------------------------------------------------------------------------------------+
| "Arpeggiat | The direction in which an arpeggiated chord is rolled. |
| ionDirecti | |
| on"(*value | |
| s) | |
+------------+--------------------------------------------------------------------------------------------+
| "HairpinTy | Whether a hairpin spanner opens outward (crescendo) or closes inward (diminuendo). |
| pe"(*value | |
| s) | |
+------------+--------------------------------------------------------------------------------------------+
| "LineEnd"( | The hook drawn at the end of a bracket or dashed line spanner: a vertical hook pointing up |
| *values) | or down, hooks at both ends, an arrowhead, or no hook at all. |
+------------+--------------------------------------------------------------------------------------------+
| "LineType" | The style of line drawn by a spanner, such as a bracket or a dashed line. |
| (*values) | |
+------------+--------------------------------------------------------------------------------------------+
| "StaffPlac | Whether a direction or notation is placed above or below the staff. |
| ement"(*va | |
| lues) | |
+------------+--------------------------------------------------------------------------------------------+
| "Arpeggiat | Chord arpeggiation notation. |
| e"([direct | |
| ion]) | |
+------------+--------------------------------------------------------------------------------------------+
| "DownBow"( | Down-bow notation |
| ) | |
+------------+--------------------------------------------------------------------------------------------+
| "Fermata"( | Fermata notation. |
| [inverted] | |
| ) | |
+------------+--------------------------------------------------------------------------------------------+
| "Harmonic" | Harmonic notation. |
| () | |
+------------+--------------------------------------------------------------------------------------------+
| "Mordent"( | Mordent ornament. |
| [inverted, | |
| placement] | |
| ) | |
+------------+--------------------------------------------------------------------------------------------+
| "NonArpegg | Chord non-arpeggiate notation. |
| iate"() | |
+------------+--------------------------------------------------------------------------------------------+
| "OpenStrin | Open-string notation |
| g"() | |
+------------+--------------------------------------------------------------------------------------------+
| "Ornament" | Abstract class for all ornament notations |
| () | |
+------------+--------------------------------------------------------------------------------------------+
| "Schleifer | Schleifer mark. |
| "([placeme | |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "SnapPizzi | Snap-pizzicato notation |
| cato"() | |
+------------+--------------------------------------------------------------------------------------------+
| "StartGlis | Notation to attach to a note that starts a glissando |
| s"([number | |
| ]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StartMult | Multi-gliss notation used for glissing multiple members of a chord |
| iGliss"([n | |
| umbers]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StopGliss | Notation to attach to a note that ends a glissando |
| "([number] | |
| ) | |
+------------+--------------------------------------------------------------------------------------------+
| "StopMulti | End of a multi-gliss notation used for glissing multiple members of a chord. |
| Gliss"([nu | |
| mbers]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Stopped"( | Stopped notation |
| ) | |
+------------+--------------------------------------------------------------------------------------------+
| "Technical | Abstract class for all technical notations |
| "() | |
+------------+--------------------------------------------------------------------------------------------+
| "Tremolo"( | Tremolo lines on a note stem. |
| [num_lines | |
| ]) | |
+------------+--------------------------------------------------------------------------------------------+
| "TrillMark | Trill mark on a single note (without wavy line). |
| "([placeme | |
| nt]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Turn"([in | Turn ornament. |
| verted, | |
| delayed, p | |
| lacement]) | |
+------------+--------------------------------------------------------------------------------------------+
| "UpBow"() | Up-bow notation |
+------------+--------------------------------------------------------------------------------------------+
| "BarRest"( | Class representing a bar rest. |
| bar_length | |
| [, directi | |
| ons]) | |
+------------+--------------------------------------------------------------------------------------------+
| "BarRestDu | Special duration object used for bar rests. |
| ration"(le | |
| ngth) | |
+------------+--------------------------------------------------------------------------------------------+
| "BeamedGro | Represents a group of notes/chords/rests joined under a single beam. |
| up"([conte | |
| nts]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Chord"(pi | Class representing a chord. |
| tches, | |
| duration[, | |
| ties, | |
| notations, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Clef"(sig | Class representing a musical clef |
| n, line[, | |
| octaves_tr | |
| anspositio | |
| n]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Direction | Abstract base class for musical directions, such as text and metronome marks. |
| "([placeme | |
| nt, voice, | |
| staff]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Duration" | Represents a length that can be written as a single note or rest. |
| (note_type | |
| [, | |
| num_dots, | |
| tuplet_rat | |
| io]) | |
+------------+--------------------------------------------------------------------------------------------+
| "GraceChor | Subclass of "Chord" representing a durationless grace chord. |
| d"(pitches | |
| , | |
| duration[, | |
| ties, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "GraceNote | Subclass of "Note" representing a durationless grace note. |
| "(pitch, | |
| duration[, | |
| ties, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Measure"( | Class representing a measure of music, perhaps with multiple voices. |
| [contents, | |
| time_signa | |
| ture, key, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Notation" | Abstract base class for MusicXML Notations (glissandi, slurs). |
| () | |
+------------+--------------------------------------------------------------------------------------------+
| "Note"(pit | Class representing a single, pitched note. |
| ch, | |
| duration[, | |
| ties, | |
| notations, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Notehead" | Class representing a notehead type. |
| (notehead_ | |
| name[, | |
| filled]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Part"(par | Represents a musical part/staff. |
| t_name[, | |
| measures, | |
| part_id, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "PartGroup | Represents a part group (a group of related parts, possible connected by a bracket) |
| "([parts, | |
| has_bracke | |
| t, ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Pitch"(st | Class representing a notated musical pitch. |
| ep, | |
| octave[, a | |
| lteration] | |
| ) | |
+------------+--------------------------------------------------------------------------------------------+
| "Rest"(dur | Class representing a notated rest. |
| ation[, | |
| notations, | |
| directions | |
| ]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Score"([c | Class representing a full musical score |
| ontents, | |
| title, | |
| composer]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Transpose | Class representing transposition. |
| "(chromati | |
| c[, | |
| diatonic, | |
| octave]) | |
+------------+--------------------------------------------------------------------------------------------+
| "Tuplet"(c | Represents a tuplet; same as a BeamedGroup, but with a particular time ratio associated |
| ontents, | with it. |
| ratio) | |
+------------+--------------------------------------------------------------------------------------------+
| "ChangePed | Pedal change in the middle of a sustain pedal spanner. |
| al"([label | |
| , sign, | |
| line, | |
| placement, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StartBrac | Start of a bracket spanner. |
| ket"([labe | |
| l, | |
| line_type, | |
| line_end, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StartDash | Start of a dashed spanner (e.g. used by a dashed "cresc." or "dim." marking). |
| es"([label | |
| , dash_len | |
| gth, ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StartHair | Notation to attach to a note that starts a hairpin |
| pin"(hairp | |
| in_type[, | |
| label, | |
| spread, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StartOcta | Start of an octave-shift line, i.e. an "8va"/"8vb"/"15ma" bracket with a dashed line and |
| veLine"([l | terminal hook. |
| abel, | |
| octaves, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StartPeda | Start of a sustain pedal spanner. |
| l"([label, | |
| sign, | |
| line, | |
| placement, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StartSlur | Notation to attach to a note that starts a slur |
| "([label]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StartTril | Starts a trill spanner with a wavy line. |
| l"([label, | |
| placement, | |
| accidental | |
| ]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StopBrack | End of a bracket spanner. |
| et"([label | |
| , | |
| line_end, | |
| end_length | |
| , ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StopDashe | End of a dashed spanner (e.g. used by a dashed "cresc." or "dim." marking). |
| s"([label, | |
| text, | |
| placement, | |
| voice, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StopHairp | Notation to attach to a note that ends a hairpin |
| in"([label | |
| , spread, | |
| placement, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StopOctav | End of an octave-shift line (e.g. the end of an "8va" or "8vb"). |
| eLine"([la | |
| bel, | |
| octaves, | |
| placement, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StopPedal | Stops a sustain pedal spanner. |
| "([label, | |
| sign, | |
| line, | |
| placement, | |
| ...]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StopSlur" | Notation to attach to a note that ends a slur |
| ([label]) | |
+------------+--------------------------------------------------------------------------------------------+
| "StopTrill | Stops a trill spanner with a wavy line. |
| "([label, | |
| placement] | |
| ) | |
+------------+--------------------------------------------------------------------------------------------+