这是学校里做的更新

This commit is contained in:
2022-10-05 22:18:03 +08:00
parent 3b53846ade
commit 5ea47c54cb
7 changed files with 306 additions and 234 deletions

View File

@ -20,9 +20,19 @@ if not os.path.exists(outpath):
while True:
try:
authorname = input('请输入作者:')
isProgress = input('是否开启进度条(1|0)')
if isProgress != '':
isProgress = bool(int(isProgress))
while True:
isProgress = input('*进度条[注]')
if isProgress != '' :
if isProgress in ('1','True'):
isProgress = True
elif isProgress in ('0', 'False'):
isProgress = False
else:
isProgress = isProgress
else:
continue
break
volume = input('请输入音量0-1')
if volume != '':
volume = float(volume)
@ -35,10 +45,9 @@ while True:
heightmax = int(heightmax)
break
except:
except BaseException:
print('输入错误,请重新输入')
if os.path.isdir(midipath):
for i in os.listdir(midipath):
if i.endswith('.mid'):
@ -47,7 +56,7 @@ if os.path.isdir(midipath):
convertion.toBDXfile_withDelay(
1,
authorname if authorname != '' else input('请输入作者:'),
isProgress if isProgress != '' else bool(int(input('是否开启进度条(1|0)'))),
isProgress,
heightmax if heightmax != '' else int(input('请输入指令结构最大生成高度:')),
volume if volume != '' else float(input('请输入音量(0-1]')),
speed if speed != '' else float(input('请输入速度倍率:')),
@ -59,7 +68,7 @@ else:
convertion.toBDXfile_withDelay(
1,
authorname if authorname != '' else input('请输入作者:'),
isProgress if isProgress != '' else bool(int(input('是否开启进度条(1|0)'))),
isProgress,
heightmax if heightmax != '' else int(input('请输入指令结构最大生成高度:')),
volume if volume != '' else float(input('请输入音量(0-1]')),
speed if speed != '' else float(input('请输入速度倍率:')),