加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
formatAnnotation.py 3.48 KB
一键复制 编辑 原始数据 按行查看 历史
bgArray 提交于 2022-04-13 21:21 . 数据读取更新
# Instrument["Instrument"]["@id"] = i["Instrument"]["@id"]
# Instrument["Instrument"]["longName"] = i["Instrument"]["longName"]
# Instrument["Instrument"]["shortName"] = i["Instrument"]["shortName"]
# Instrument["Instrument"]["trackName"] = trackName["trackName"]
# try:
# Instrument["Instrument"]["minPitchP"] = i["Instrument"]["minPitchP"]
# except KeyError:
# Instrument["Instrument"]["minPitchP"] = None
# try:
# Instrument["Instrument"]["maxPitchP"] = i["Instrument"]["maxPitchP"]
# except KeyError:
# Instrument["Instrument"]["maxPitchP"] = None
# try:
# Instrument["Instrument"]["minPitchA"] = i["Instrument"]["minPitchA"]
# except KeyError:
# Instrument["Instrument"]["minPitchA"] = None
# try:
# Instrument["Instrument"]["maxPitchA"] = i["Instrument"]["maxPitchA"]
# except KeyError:
# Instrument["Instrument"]["maxPitchA"] = None
# Instrument["Instrument"]["instrumentId"] = i["Instrument"]["instrumentId"]
# try:
# Instrument["Instrument"]["clef"] = i["Instrument"]['clef']
# except KeyError:
# pass
# try:
# Instrument["Instrument"]["singleNoteDynamics"] = i["Instrument"]["singleNoteDynamics"]
# except KeyError:
# pass
# Instrument["Instrument"]["Articulation"] = i["Instrument"]["Articulation"]
# Instrument["Instrument"]["Channel"] = i["Instrument"]["Channel"]
#
# try:
# Instrument["Instrument"]["useDrumset"] = i["Instrument"]["useDrumset"]
# except KeyError:
# pass
# try:
# Instrument["Instrument"]["Drum"] = i["Instrument"]["Drum"]
# except KeyError:
# pass
# try:
# Instrument["Instrument"]["transposeDiatonic"] = i["Instrument"]["transposeDiatonic"]
# {"@id": "", "longName": "", "shortName": "", "trackName": "", "minPitchP": "0",
# "maxPitchP": "0", "minPitchA": "0", "maxPitchA": "0", "instrumentId": "",
# # 'clef': {'@staff': "0", '#text': 'F'}, 'singleNoteDynamics': '0',
# 'Articulation': [
# # {'velocity': '100', 'gateTime': '95'},
# # {'@name': 'staccatissimo', 'velocity': '100',
# # 'gateTime': '33'},
# # {'@name': 'staccato', 'velocity': '100', 'gateTime': '50'},
# # {'@name': 'portato', 'velocity': '100', 'gateTime': '67'},
# # {'@name': 'tenuto', 'velocity': '100', 'gateTime': '100'},
# # {'@name': 'marcato', 'velocity': '120', 'gateTime': '67'},
# # {'@name': 'sforzato', 'velocity': '150', 'gateTime': '100'},
# # {'@name': 'sforzatoStaccato', 'velocity': '150',
# # 'gateTime': '50'},
# # {'@name': 'marcatoStaccato', 'velocity': '120',
# # 'gateTime': '50'},
# # {'@name': 'marcatoTenuto', 'velocity': '120',
# # 'gateTime': '100'}
# ],
# 'Channel': [
# # {'program': {'@value': '0'},
# # 'controller': {'@ctrl': '91', '@value': '127'},
# # 'synti': 'Fluid', 'midiPort': '0', 'midiChannel': '0'},
# # {'@name': 'harmony', 'program': {'@value': '0'},
# # 'controller': {'@ctrl': '91', '@value': '127'},
# # 'synti': 'Fluid', 'midiPort': '2', 'midiChannel': '15'}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化