修复部分bug,准备合并

This commit is contained in:
2023-02-01 18:48:30 +08:00
parent 6aa557dcd2
commit 53fda9c986
14 changed files with 186 additions and 1210 deletions

View File

@ -28,7 +28,7 @@ import shutil
from .utils import *
from .exceptions import *
import instC
from .instConstants import *
from typing import TypeVar, Union
@ -204,17 +204,14 @@ class midiConvert:
default: 如果instrumentID不在范围内返回的默认我的世界乐器名称
:return: (str我的世界乐器名, int转换算法中的X)"""
try:
return instC.with_pitch[instrumentID]
return pitched_instrument_list[instrumentID]
except KeyError:
return "note.flute", 5
@staticmethod
def __bitInst2ID_withX(instrumentID):
try:
try:
return instC.without_pitch[instrumentID]
except KeyError:
return "note.bd", 7
return percussion_instrument_list[instrumentID]
except KeyError:
print("WARN", "无法使用打击乐器列表库可能是不支持当前环境打击乐器使用Dislink算法代替。")
if instrumentID == 55: