create AI Song Maker

This commit is contained in:
Elias Bachaalany
2024-02-14 17:56:52 -08:00
parent 5e448b7f41
commit 666b2b9fd2
6 changed files with 163 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
for part in score.parts: # score is returned from the previous process_and_output_score function call
# Iterate through all elements in the part
for element in part.recurse():
#Make changes e.g. add Articulation and Expression
musicxml_path = '/mnt/data/song_musicxml.xml'
midi_path = '/mnt/data/song_midi.midi'
score.write('musicxml', fp=musicxml_path)
score.write('midi', fp=midi_path)