This commit is contained in:
EillesWan 2022-05-08 18:33:28 +08:00
parent e1d4cd9933
commit cae0b7f23d
2 changed files with 2 additions and 2 deletions

Binary file not shown.

View File

@ -275,7 +275,7 @@ class midiConvert:
self, scoreboardname: str = 'mscplay', volume: float = 1.0, speed: float = 1.0 self, scoreboardname: str = 'mscplay', volume: float = 1.0, speed: float = 1.0
) -> list: ) -> list:
""" """
使用Dislink Sforza的转换算法将midi转换为我的世界命令列表 使用被金羿修改后的Dislink Sforza的转换算法将midi转换为我的世界命令列表
:param scoreboardname: 我的世界的计分板名称 :param scoreboardname: 我的世界的计分板名称
:param volume: 音量注意这里的音量范围为(0,1]如果超出将被处理为正确值其原理为在距离玩家 (1 / volume -1) 的地方播放音频 :param volume: 音量注意这里的音量范围为(0,1]如果超出将被处理为正确值其原理为在距离玩家 (1 / volume -1) 的地方播放音频
:param speed: 速度注意这里的速度指的是播放倍率其原理为在播放音频的时候每个音符的播放时间除以 speed :param speed: 速度注意这里的速度指的是播放倍率其原理为在播放音频的时候每个音符的播放时间除以 speed
@ -316,7 +316,7 @@ class midiConvert:
+ '=' + '='
+ str(nowscore) + str(nowscore)
+ '}' + '}'
+ f'] ~ ~ ~ playsound {self.__Inst2SoundID(instrumentID)} @s ~ ~{1/volume-1} ~ {msg.velocity*(0.7 if msg.channel == 0 else 0.9)} {2**((msg.note-66)/12)}' + f'] ~ ~ ~ playsound {self.__Inst2SoundID(instrumentID)} @s ~ ~{1/volume-1} ~ {msg.velocity*(0.7 if msg.channel == 0 else 0.9)} {2**((msg.note-66)/12)}' # 此处需要修改
) )
commands += 1 commands += 1
if len(singleTrack) != 0: if len(singleTrack) != 0: