[英]How do I encoding musescore in Music21?
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?当我在 music21 中制作 musicxml 时,如何编码 musiccore 而不是 music21?
music21
did actually encode the output from scratch, so that's why it's listed in <software>
, but if you wish to change it: music21
实际上确实从头开始对 output 进行了编码,所以这就是它在<software>
中列出的原因,但是如果您想更改它:
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.如果
.metadata
没有为您的乐谱返回任何内容,您可能需要将metadata.Metadata
object 插入乐谱的开头并对其进行操作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.