angryduck
angryduck

Reputation: 31

How do I encoding musescore in Music21?

enter image description here

enter image description here

from music21 import *

us = environment.UserSettings()
us["musicxmlPath"] = r"C:/Program Files/MuseScore 3/bin/MuseScore3.exe"
us["musescoreDirectPNGPath"] = r"C:/Program Files/MuseScore 3/bin/MuseScore3.exe"
.
.
.
xml_file_name = f'output_dance_{str(int(time.time()))}.musicxml'
xml_file_path = f'app/data/output_audio/{xml_file_name}'
midi_stream.write('musicxml', fp=xml_file_path)

When I make musicxml in music21, how can I encode musiccore instead of music21?

Upvotes: 0

Views: 342

Answers (1)

Jacob Walls
Jacob Walls

Reputation: 861

music21 did actually encode the output from scratch, so that's why it's listed in <software>, but if you wish to change it:

from music21 import *
beach_score = corpus.parse('beach')
beach_score.metadata.software = ['Musescore']

If .metadata doesn't return anything for your score, you may need to insert a metadata.Metadata object into the beginning of your score and manipulate that.

Upvotes: 0

Related Questions