From 451d1d8e8023dc50fdd1b932dfd996c365f68e45 Mon Sep 17 00:00:00 2001 From: Eilles Wan Date: Fri, 7 Oct 2022 12:23:02 +0000 Subject: [PATCH] =?UTF-8?q?update=20msctPkgver/main.py.=20=E6=8F=92?= =?UTF-8?q?=E5=80=BCOK?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Eilles Wan --- msctPkgver/main.py | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/msctPkgver/main.py b/msctPkgver/main.py index e8a4a30..472add4 100644 --- a/msctPkgver/main.py +++ b/msctPkgver/main.py @@ -811,27 +811,23 @@ class midiConvert: # 然后计算即可 # 我找时间写完 + soundID, _X = self.__Inst2soundIDwithX(InstID) + + score_now = round(msg.startTime+i*(msg.lastTime / 500)/ float(speed) / 50000) - soundID, _X = self.__Inst2soundIDwithX(InstID) - score_now = round(msg[-1]/ float(speed) / 50000) - maxScore = max(maxScore,score_now) + maxScore = max(maxScore,score_now) - nowTrack.append( + nowTrack.append( "execute @a[scores={" + str(scoreboardname) + "=" + str(score_now) + "}" - + f"] ~ ~ ~ playsound {soundID} @s ~ ~{1 / MaxVolume - 1} ~ {msg[2] * (0.7 if CheckFirstChannel else 0.9)} {2 ** ((msg[1] - 60 - _X) / 12)}" - ) - - cmdAmount += 1 + + f"] ~ ~ ~ playsound {soundID} @s ~ ~{1 / (MaxVolume)*(1-i*500/msg.lastTime) - 1} ~ {msg[2] * (0.7 if CheckFirstChannel else 0.9)} {2 ** ((msg[1] - 60 - _X) / 12)}" + ) + cmdAmount += 1 tracks.append(nowTrack) - - - return [tracks, cmdAmount, maxScore] - return [tracks, cmdAmount, maxScore]