mirror of
https://github.com/TriM-Organization/Musicreater.git
synced 2025-02-26 12:26:34 +08:00
更新demo的输入操作,一并增加教程
This commit is contained in:
parent
2e11a9949b
commit
ad2fcd6f14
63
README.md
63
README.md
@ -39,69 +39,6 @@
|
|||||||
|
|
||||||
## 使用教程📕
|
## 使用教程📕
|
||||||
|
|
||||||
> 0. 安装python3.6+
|
|
||||||
>
|
|
||||||
> 在安装时,一定要勾选Add Python 3.X to PATH,不然就要手动设置!!
|
|
||||||
>
|
|
||||||
> 同时,装完之后记得在cmd中输入:python 试试是否安装成功,
|
|
||||||
> python的安装可以去网上随便找一下。
|
|
||||||
> 成功安装之后,在cmd中输入python会显示:
|
|
||||||
> <img src=https://foruda.gitee.com/images/1659972669907359295/cmd.png>
|
|
||||||
> 之类的东西。
|
|
||||||
> 1. 安装(下载本程序)git的话,可以使用以下命令:
|
|
||||||
>
|
|
||||||
> `git clone -b pkgver https://gitee.com/EillesWan/Musicreater.git`
|
|
||||||
>
|
|
||||||
> 没有安装git的话,可以下载zip包,解压后进入目录即可。
|
|
||||||
> <img src=" https://foruda.gitee.com/images/1659972440341216712/下载.png" >
|
|
||||||
> 2. 运行(进入目录)
|
|
||||||
> 在目录下打开cmd,进入到目录下,执行以下命令:
|
|
||||||
> <img src=https://foruda.gitee.com/images/1659974437388532868/输入.png>
|
|
||||||
> <img src=https://foruda.gitee.com/images/1659974754378201859/输入c.png>
|
|
||||||
> 回车一下,然后:
|
|
||||||
> <img src=https://foruda.gitee.com/images/1659974794561970425/pip.png>
|
|
||||||
> 输入下面的三个指令即可!
|
|
||||||
>
|
|
||||||
> `pip install mido`
|
|
||||||
>
|
|
||||||
> `pip install brotli`
|
|
||||||
>
|
|
||||||
> `pip install openpyxl`
|
|
||||||
>
|
|
||||||
> 3. 开始使用!
|
|
||||||
> 在目录下打开cmd(步骤与上面的图片一致,只是执行的代码换了),进入到目录下,执行以下命令:(选择你需要的)
|
|
||||||
>
|
|
||||||
> `python example_convert_bdx.py`
|
|
||||||
>
|
|
||||||
> `python example_convert_mcpack.py`
|
|
||||||
>
|
|
||||||
> 4. 错误补充说明
|
|
||||||
> 如果你遇到了以下这种情况
|
|
||||||
> <img src=https://foruda.gitee.com/images/1659972789779764953/bug.jpeg>
|
|
||||||
> 那么,请按照这篇文章指引做:
|
|
||||||
> https://blog.csdn.net/qq_41179280/article/details/123804948
|
|
||||||
>
|
|
||||||
> 感谢Mono帮我们发现这个问题
|
|
||||||
>
|
|
||||||
> 5. 使用补充说明
|
|
||||||
> <img src=https://foruda.gitee.com/images/1659974810147043475/运行.png>
|
|
||||||
> midi路径:含有mid文件路径、文件名、后缀的完整绝对路径
|
|
||||||
>
|
|
||||||
> 输出路径:输出文件夹的路径,就写一个英文.(句号)可以表示生成到当前目录下
|
|
||||||
> (意思就是支持相对路径)
|
|
||||||
>
|
|
||||||
> 是否重置计分板:1或0(歌曲放完是否重置,推荐1)
|
|
||||||
>
|
|
||||||
> 是否启用进度条:1或0(看个人需要)
|
|
||||||
>
|
|
||||||
> 计分板名称:游戏内的计分板名称
|
|
||||||
>
|
|
||||||
> 音量:0-1之间的小数(含0,1)正常来说推荐1
|
|
||||||
>
|
|
||||||
> 变速:float数据,一般写1
|
|
||||||
>
|
|
||||||
> 没有报错且在输出路径下找到mcpack或bdx即为生成成功:
|
|
||||||
> <img src=https://foruda.gitee.com/images/1659973655881460036/输出.png>
|
|
||||||
|
|
||||||
|
|
||||||
### 对于 进度条自定义 功能的说明
|
### 对于 进度条自定义 功能的说明
|
||||||
|
@ -20,9 +20,19 @@ if not os.path.exists(outpath):
|
|||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
authorname = input('请输入作者:')
|
authorname = input('请输入作者:')
|
||||||
isProgress = input('是否开启进度条(1|0):')
|
while True:
|
||||||
|
isProgress = input('*进度条[注]:')
|
||||||
if isProgress != '' :
|
if isProgress != '' :
|
||||||
isProgress = bool(int(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):')
|
volume = input('请输入音量(0-1):')
|
||||||
if volume != '':
|
if volume != '':
|
||||||
volume = float(volume)
|
volume = float(volume)
|
||||||
@ -47,7 +57,7 @@ if os.path.isdir(midipath):
|
|||||||
convertion.toBDXfile_withDelay(
|
convertion.toBDXfile_withDelay(
|
||||||
1,
|
1,
|
||||||
authorname if authorname != '' else input('请输入作者:'),
|
authorname if authorname != '' else input('请输入作者:'),
|
||||||
isProgress if isProgress != '' else bool(int(input('是否开启进度条(1|0):'))),
|
isProgress,
|
||||||
heightmax if heightmax != '' else int(input('请输入指令结构最大生成高度:')),
|
heightmax if heightmax != '' else int(input('请输入指令结构最大生成高度:')),
|
||||||
volume if volume != '' else float(input('请输入音量(0-1]:')),
|
volume if volume != '' else float(input('请输入音量(0-1]:')),
|
||||||
speed if speed != '' else float(input('请输入速度倍率:')),
|
speed if speed != '' else float(input('请输入速度倍率:')),
|
||||||
@ -59,7 +69,7 @@ else:
|
|||||||
convertion.toBDXfile_withDelay(
|
convertion.toBDXfile_withDelay(
|
||||||
1,
|
1,
|
||||||
authorname if authorname != '' else input('请输入作者:'),
|
authorname if authorname != '' else input('请输入作者:'),
|
||||||
isProgress if isProgress != '' else bool(int(input('是否开启进度条(1|0):'))),
|
isProgress,
|
||||||
heightmax if heightmax != '' else int(input('请输入指令结构最大生成高度:')),
|
heightmax if heightmax != '' else int(input('请输入指令结构最大生成高度:')),
|
||||||
volume if volume != '' else float(input('请输入音量(0-1]:')),
|
volume if volume != '' else float(input('请输入音量(0-1]:')),
|
||||||
speed if speed != '' else float(input('请输入速度倍率:')),
|
speed if speed != '' else float(input('请输入速度倍率:')),
|
||||||
|
92
docs/使用教程.md
Normal file
92
docs/使用教程.md
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
# 演示程序使用教程
|
||||||
|
|
||||||
|
*由于先前的 **读我文件**(README.md) 过于冗杂,现另辟蹊径来给大家全方位的教程。*
|
||||||
|
|
||||||
|
*这是演示程序的使用教程,将在这里提供演示程序的相应的使用教程*
|
||||||
|
|
||||||
|
## 视窗(Windows)操作系统
|
||||||
|
|
||||||
|
### 运行环境安装
|
||||||
|
|
||||||
|
0. 安装python3.6+
|
||||||
|
|
||||||
|
首先需要下载Python的安装包
|
||||||
|
|
||||||
|
> [下载64位Python安装包](https://www.python.org/ftp/python/3.8.10/python-3.8.10-amd64.exe)
|
||||||
|
> [下载32位Python安装包](https://www.python.org/ftp/python/3.8.10/python-3.8.10.exe)
|
||||||
|
|
||||||
|
在安装时,最好需要勾选 `Add Python 3.X to PATH` ,如下图所示,当然,如果您对自己非常自信,您也可以手动设置此项目:
|
||||||
|
|
||||||
|
若您对Python一知半解或者不怎么了解、并对自己的系统盘有大约150*MB*的信心的话,您可以在安装时直接选择*快速安装*(Install Now)
|
||||||
|
|
||||||
|
若您选择了*自定义安装*(Customize Installation),请务必勾选 `pip` 和 `py launcher` 便于后续安装依赖,如下图:
|
||||||
|
|
||||||
|
安装结束之后可以在*终端*(命令行/PowerShell/Bash/etc)中输入:python 试试是否安装成功,成功安装之后,在终端中输入python会显示诸如如下图片的提示:
|
||||||
|
|
||||||
|
<img src=https://foruda.gitee.com/images/1659972669907359295/cmd.png>
|
||||||
|
|
||||||
|
1. 下载本代码库以及演示程序
|
||||||
|
|
||||||
|
- 若您使用git,请直接拷贝本仓库:
|
||||||
|
|
||||||
|
`git clone -b pkgver https://gitee.com/EillesWan/Musicreater.git`
|
||||||
|
|
||||||
|
- 若您不使用git,可以在*码云*(Gitee)或GitHub下载zip包,或者[加入QQ群聊861684859](https://jq.qq.com/?_wv=1027&k=hpeRxrYr),在群文件中获取。
|
||||||
|
|
||||||
|
<img src=" https://foruda.gitee.com/images/1659972440341216712/下载.png" >
|
||||||
|
|
||||||
|
2. 安装依赖
|
||||||
|
|
||||||
|
请以管理员模式打开您的*终端*(命令行/PowerShell/Bash/etc),例如 命令行,打开方式如下:
|
||||||
|
|
||||||
|
1. 在*视窗开始菜单*(Windows开始)中搜索 `cmd`
|
||||||
|
|
||||||
|
2.
|
||||||
|
|
||||||
|
`pip install mido`
|
||||||
|
|
||||||
|
`pip install brotli`
|
||||||
|
|
||||||
|
`pip install openpyxl`
|
||||||
|
|
||||||
|
3. 开始使用!
|
||||||
|
|
||||||
|
在目录下打开cmd,进入到目录下,执行以下命令:
|
||||||
|
<img src=https://foruda.gitee.com/images/1659974437388532868/输入.png>
|
||||||
|
<img src=https://foruda.gitee.com/images/1659974754378201859/输入c.png>
|
||||||
|
回车一下,然后:
|
||||||
|
<img src=https://foruda.gitee.com/images/1659974794561970425/pip.png>
|
||||||
|
|
||||||
|
在目录下打开cmd(步骤与上面的图片一致,只是执行的代码换了),进入到目录下,执行以下命令:(选择你需要的)
|
||||||
|
|
||||||
|
`python example_convert_bdx.py`
|
||||||
|
|
||||||
|
`python example_convert_mcpack.py`
|
||||||
|
|
||||||
|
4. 错误补充说明
|
||||||
|
如果你遇到了以下这种情况
|
||||||
|
<img src=https://foruda.gitee.com/images/1659972789779764953/bug.jpeg>
|
||||||
|
那么,请按照这篇文章指引做:
|
||||||
|
https://blog.csdn.net/qq_41179280/article/details/123804948
|
||||||
|
|
||||||
|
感谢Mono帮我们发现这个问题
|
||||||
|
|
||||||
|
5. 使用补充说明
|
||||||
|
<img src=https://foruda.gitee.com/images/1659974810147043475/运行.png>
|
||||||
|
midi路径:含有mid文件路径、文件名、后缀的完整绝对路径
|
||||||
|
|
||||||
|
输出路径:输出文件夹的路径,就写一个英文.(句号)可以表示生成到当前目录下
|
||||||
|
(意思就是支持相对路径)
|
||||||
|
|
||||||
|
是否重置计分板:1或0(歌曲放完是否重置,推荐1)
|
||||||
|
|
||||||
|
是否启用进度条:1或0(看个人需要)
|
||||||
|
|
||||||
|
计分板名称:游戏内的计分板名称
|
||||||
|
|
||||||
|
音量:0-1之间的小数(含0,1)正常来说推荐1
|
||||||
|
|
||||||
|
变速:float数据,一般写1
|
||||||
|
|
||||||
|
没有报错且在输出路径下找到mcpack或bdx即为生成成功:
|
||||||
|
<img src=https://foruda.gitee.com/images/1659973655881460036/输出.png>
|
Loading…
x
Reference in New Issue
Block a user