mirror of
https://github.com/TriM-Organization/Musicreater.git
synced 2025-09-04 03:16:23 +00:00
由于Merge错误,我得提交未完成的修改
This commit is contained in:
88
docs/Use of Funtions.md
Normal file
88
docs/Use of Funtions.md
Normal file
@ -0,0 +1,88 @@
|
||||
<h1 align="center">音·创 Musicreater</h1>
|
||||
|
||||
<p align="center">
|
||||
<img width="128" height="128" src="https://s1.ax1x.com/2022/05/06/Ouhghj.md.png" >
|
||||
</p>
|
||||
|
||||
|
||||
## Instructions📕
|
||||
|
||||
> 0. Install Python 3.6+
|
||||
>
|
||||
> While installing, be sure to check "add Python 3.X to path", otherwise it needs to be set manually
|
||||
>
|
||||
> After the installation, remember to enter in CMD: "python" to try
|
||||
>
|
||||
> whether the installation is successful.
|
||||
>
|
||||
> Python installation tutorial can be found on the Internet easily.
|
||||
>
|
||||
> 1. Install (download this program)
|
||||
> Git, you can use the following commands:
|
||||
>
|
||||
> `git clone -b pkgver https://gitee.com/EillesWan/Musicreater.git`
|
||||
>
|
||||
> If Git is not installed, you can download the zip package from the website. Then decompress it
|
||||
> and enter the directory.
|
||||
>
|
||||
> 2. Run (enter directory)
|
||||
>
|
||||
> Open CMD in the directory, enter the directory, and execute the following commands:
|
||||
>
|
||||
> `pip install mido`
|
||||
>
|
||||
> `pip install brotli`
|
||||
>
|
||||
> `pip install openpyxl`
|
||||
>
|
||||
> 3. Start using!
|
||||
>
|
||||
> Open CMD in the directory, enter the directory, and execute the following commands:
|
||||
>
|
||||
> (Choose what you need)
|
||||
>
|
||||
> `python example_convert_bdx.py`
|
||||
>
|
||||
> `python example_convert_mcpack.py`
|
||||
|
||||
### Instructions for **Customize Progress Bar**
|
||||
|
||||
We have supported the function of making progress bar in *Minecraft*'s music player. And also the method of customize them. So the following instructions are about the parameters of the Progress Bar Customizition.
|
||||
|
||||
A Progress Bar, of course, is composed of **changeless** parts and **changable** parts. And the changable parts include texts or *images*(these images are made up of texts, or we can say, character paintings 😁). That is, for *Minecraft*, a changable image in a progress bar is just the "bar" part(which is like a stripe).
|
||||
|
||||
We use a string to describe the style of progress bar you need, and it includes many **identifier**s to replace the changable parts.
|
||||
|
||||
There are the identifiers:
|
||||
|
||||
| Identifier | Changable Part |
|
||||
|--------------|------------------------------------------------------|
|
||||
| `%%N` | Music name(file name which is imported into program) |
|
||||
| `%%s` | Value of scoreboard of now |
|
||||
| `%^s` | Max value of scoreboard |
|
||||
| `%%t` | Current playback time |
|
||||
| `%^t` | Total music time |
|
||||
| `%%%` | Current playback progress |
|
||||
| `_` | To be replaced by the *Bar* part of the progress bar |
|
||||
|
||||
The `_` is a placeholder to identifying the *bar* part, yeah, just the changable image.
|
||||
|
||||
This is an example of **style description string**, and this is also the default style of *Musicreater*'s progress bar.
|
||||
|
||||
`▶ %%N [ %%s/%^s %%% __________ %%t|%^t]`
|
||||
|
||||
This is a progress bar with only one line, but it is possible if you want to give a multiline parameter into the style description string.
|
||||
|
||||
But the string above is only for style identification, but we also need to identifying the changable image's image(just what the bar's look).
|
||||
|
||||
A "bar", simply, included 2 parts: *Have Been Played* & *Not Been Played*. So we use a tuple to pass the parameter. It's under a simple format: `(str: played, str: not)`. For example, the default parameter is below:
|
||||
|
||||
`('§e=§r', '§7=§r')`
|
||||
|
||||
So it's time to combine what I said in one parameter now!
|
||||
|
||||
This is a default definder parameter:
|
||||
|
||||
`('▶ %%N [ %%s/%^s %%% __________ %%t|%^t]',('§e=§r', '§7=§r'))`
|
||||
|
||||
*Tip: To avoid errors, please not to use the identifiers as the other part of your style.*
|
117
docs/使用教程.md
Normal file
117
docs/使用教程.md
Normal file
@ -0,0 +1,117 @@
|
||||
<h1 align="center">音·创 Musicreater</h1>
|
||||
|
||||
<p align="center">
|
||||
<img width="128" height="128" src="https://s1.ax1x.com/2022/05/06/Ouhghj.md.png" >
|
||||
</p>
|
||||
|
||||
|
||||
## 使用教程📕
|
||||
|
||||
> 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>
|
||||
|
||||
|
||||
### 对于 进度条自定义 功能的说明
|
||||
|
||||
因为我们提供了可以自动转换进度条的功能,因此在这里给出进度条自定义参数的详细解释。
|
||||
|
||||
一个进度条,明显地,有**固定部分**和**可变部分**来构成。而可变部分又包括了文字和图形两种(当然,《我的世界》里头的进度条,可变的图形也就是那个“条”了)。这一点你需要了解,因为后文中包含了很多这方面的概念需要你了解。
|
||||
|
||||
进度条的自定义功能使用一个字符串来定义自己的样式,其中包含众多**标识符**来表示可变部分。
|
||||
|
||||
标识符如下(注意大小写):
|
||||
|
||||
| 标识符 | 指定的可变量 |
|
||||
|---------|----------------|
|
||||
| `%%N` | 乐曲名(即传入的文件名)|
|
||||
| `%%s` | 当前计分板值 |
|
||||
| `%^s` | 计分板最大值 |
|
||||
| `%%t` | 当前播放时间 |
|
||||
| `%^t` | 曲目总时长 |
|
||||
| `%%%` | 当前进度比率 |
|
||||
| `_` | 用以表示进度条占位|
|
||||
|
||||
表示进度条占位的 `_` 是用来标识你的进度条的。也就是可变部分的唯一的图形部分。
|
||||
|
||||
**样式定义字符串**的样例如下,这也是默认的进度条的样式:
|
||||
|
||||
`▶ %%N [ %%s/%^s %%% __________ %%t|%^t]`
|
||||
|
||||
这是单独一行的进度条,当然你也可以制作多行的,如果是一行的,输出时所使用的指令便是 `title`,而如果是多行的话,输出就会用 `titleraw` 作为进度条字幕。
|
||||
|
||||
哦对了,上面的只不过是样式定义,同时还需要定义的是可变图形的部分,也就是进度条上那个真正的“条”。
|
||||
|
||||
对于这个我们就采用了固定参数的方法,对于一个进度条,无非就是“已经播放过的”和“没播放过的”两种形态,所以,使用一个元组来传入这两个参数就是最简单的了。元组的格式也很简单:`(str: 播放过的部分长啥样, str: 没播放过的部分长啥样)` 。例如,我们默认的进度“条”的定义是这样的:
|
||||
|
||||
`('§e=§r', '§7=§r')`
|
||||
|
||||
综合起来,把这些参数传给函数需要一个参数整合,你猜用的啥?啊对对对,我用的还是元组!
|
||||
|
||||
我们的默认定义参数如下:
|
||||
|
||||
`(r'▶ %%N [ %%s/%^s %%% __________ %%t|%^t]',('§e=§r', '§7=§r'))`
|
||||
|
||||
*对了!为了避免生成错误,请尽量避免使用标识符作为定义样式字符串的其他部分*
|
Reference in New Issue
Block a user