修复已知问题

This commit is contained in:
bgArray 2022-04-12 18:11:57 +08:00
parent 4788d8949b
commit eda3a957cf

View File

@ -112,8 +112,8 @@ class midiConvert:
ticks += msg.time ticks += msg.time
if msg.type == 'note_on' and msg.velocity != 0: if msg.type == 'note_on' and msg.velocity != 0:
singleTrack.append('execute @a[scores={' + scoreboardname + '=' + singleTrack.append('execute @a[scores={' + scoreboardname + '=' +
str(round((ticks * tempo)((self.midi.ticks_per_beat * float(speed)) * str(round((ticks * tempo)/((self.midi.ticks_per_beat * float(speed)) *
50000))) + '}' + 50000))) + '}' +
f'] ~~~ playsound {self.__Inst2SoundID(instrumentID)} ' f'] ~~~ playsound {self.__Inst2SoundID(instrumentID)} '
f'@s ~~{1 / volume - 1}~ {msg.velocity * (0.7 if msg.channel == 0 else 0.9)}' f'@s ~~{1 / volume - 1}~ {msg.velocity * (0.7 if msg.channel == 0 else 0.9)}'
f' {2 ** ((msg.note - 66) / 12)}') f' {2 ** ((msg.note - 66) / 12)}')