musicscore.key
- class musicscore.key.Key(fifths: int = 0, show: bool = True, *args, **kwargs)[source]
Bases:
XMLWrapper- to_string(*args, **kwargs) str
XMLWrappermethodCalls
to_stringmethod of self.xml_object- Returns:
musicxml snippet
- property fifths: int | None
Set and get
value_ofXMLFifthschild object of associatedXMLKey- Returns:
self.xml_object.xml_fifths.value_
- property xml_object: XMLElement
XMLWrappermethodThis musicscore class has an equivalent
MusicXMLclass which can be reached via this property.If an attribute is not found directly in the main class, it wll be passed on to
__get_attribute__or__set__attribute__methods ofself.xml_object. It can also use the short cut attributes ofXMLElementto get or set the first child.- Returns:
wrapped MusicXML element of type
XMLClass