From eda3a957cfc5f38123a50db661958adb552d498b Mon Sep 17 00:00:00 2001 From: bgArray <474037765@qq.com> Date: Tue, 12 Apr 2022 18:11:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B7=B2=E7=9F=A5=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 3a92e48..11338bf 100644 --- a/main.py +++ b/main.py @@ -112,8 +112,8 @@ class midiConvert: ticks += msg.time if msg.type == 'note_on' and msg.velocity != 0: singleTrack.append('execute @a[scores={' + scoreboardname + '=' + - str(round((ticks * tempo)((self.midi.ticks_per_beat * float(speed)) * - 50000))) + '}' + + str(round((ticks * tempo)/((self.midi.ticks_per_beat * float(speed)) * + 50000))) + '}' + f'] ~~~ playsound {self.__Inst2SoundID(instrumentID)} ' f'@s ~~{1 / volume - 1}~ {msg.velocity * (0.7 if msg.channel == 0 else 0.9)}' f' {2 ** ((msg.note - 66) / 12)}')