-
Notifications
You must be signed in to change notification settings - Fork 0
Score
anstepp edited this page Dec 7, 2020
·
2 revisions
A Score object contains a list of Part objects. These Parts are fed in at instantiation as an argument.
Example:
list_of_notes = [Note(4,4,0) for x in range(5)]
time_signature = [(4,4)]
list_of_parts = [Part(list_of_notes, time_signature) for x in range(4)]
our_score = Score(list_of_parts)
Score also has the very important method to write to .musicxml, as seen here:
our_score.convert_to_xml("our_score.musicxml")
Calling the convert_to_xml()
function will write a file dictated by the string you pass as an argument.
The Score object will pad empty measures onto parts that are shorter than the longest.