update msctPkgver/main.py.

插值OK

Signed-off-by: Eilles Wan <w-yi_doctoryi@outlook.com>
This commit is contained in:
Eilles Wan 2022-10-07 12:23:02 +00:00 committed by Gitee
parent 085ab3f4c0
commit 451d1d8e80
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -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]