mirror of
https://github.com/TriM-Organization/Musicreater.git
synced 2024-11-13 10:57:43 +08:00
没改
This commit is contained in:
parent
73854be7be
commit
abb53a7499
@ -36,6 +36,7 @@ import brotli
|
||||
import json
|
||||
import uuid
|
||||
import shutil
|
||||
import math
|
||||
|
||||
|
||||
def makeZip(sourceDir, outFilename, compression=8, exceptFile=None):
|
||||
@ -91,8 +92,8 @@ class midiConvert:
|
||||
:param instrumentID: midi的乐器ID
|
||||
:param default: 如果instrumentID不在范围内,返回的默认我的世界乐器名称
|
||||
:return: (str我的世界乐器名, int转换算法中的X)"""
|
||||
|
||||
return {
|
||||
try:
|
||||
a = {
|
||||
0: ("note.harp", 6),
|
||||
1: ("note.harp", 6),
|
||||
2: ("note.pling", 6),
|
||||
@ -222,6 +223,9 @@ class midiConvert:
|
||||
126: ("note.basedrum", 7), # 打击乐器无音域
|
||||
127: ("note.snare", 7), # 打击乐器无音域
|
||||
}[instrumentID]
|
||||
except:
|
||||
a = ("note.harp", 6)
|
||||
return a
|
||||
|
||||
def __score2time(self, score: int):
|
||||
return str(int(int(score / 20) / 60)) + ":" + str(int(int(score / 20) % 60))
|
||||
@ -628,8 +632,6 @@ class midiConvert:
|
||||
:param total: 总方块数量
|
||||
:param maxHeight: 最大高度
|
||||
:return: 外切正方形的边长 int"""
|
||||
import math
|
||||
|
||||
return math.ceil(math.sqrt(math.ceil(total / maxHeight)))
|
||||
|
||||
def tomcpack(
|
||||
|
Loading…
Reference in New Issue
Block a user