Compare commits

...

No commits in common. "v1.1.1" and "main" have entirely different histories.
v1.1.1 ... main

35 changed files with 8 additions and 17320 deletions

156
.gitignore vendored
View File

@ -1,156 +0,0 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# mystuff
/.vscode
*.mid
*.midi
*.mcpack
*.bdx
*.json
/Musicreater
/TrimLog
/logs
*.llc.config
/MSCT
salt.py
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
# Pycharm
.idea/

View File

@ -1,219 +0,0 @@
**注意,以下条款或版权声明应当且必须是高于此仓库中任何其他声明的**
1. 伶伦的全部开发者享有其完整版权,其开发者可以在任一时刻终止以后伶伦源代码开放,若经由其开发者授予特殊权利,则授权对象可以将源代码进行特定的被特殊授权的操作
2. 伶伦或(及)其代码允许在 Apache2.0 协议的条款与说明下进行非商业使用
3. 除部分代码特殊声明外,伶伦允许对其或(及)其代码进行商业化使用,但是需要经过伶伦主要开发者(诸葛亮与八卦阵、金羿)的一致授权,同时,授权对象在商业化授权的使用过程中必须依照 Apache2.0 协议的条款与说明
4. 若存在对于伶伦包含的部分代码的特殊开源声明,则此部分代码依照其特定的开源方式授权,但若此部分代码经由此部分代码的主要开发者一致特殊授权后商用,则授权对象在商用时依照此部分的开发者所准许的方式(或条款)进行商用,或默认依照 Apache2.0 协议进行商业化使用
5. Apache2.0 协议的英文原文副本可见下文
> The English Translation of the TERMS AND CONDITIONS above is listed below
>
> This translated version is for reference only and has no legal effect.
>
> The version with legal effect is the Chinese version above.
**Note, The TERMS AND CONDITIONS below should and must be above all others in this repository**
1. *Linglun Studio* is fully copyrighted by all its developers, the developers have the right to make *Linglun Studio* close sourced at any time. Operations are permitted under specific terms instructed by its developer(s).
2. Non-commercial use of *Linglun Studio* and(or) its source code is permitted under Apache License 2.0.
3. Commercial use of *Linglun Studio* is permitted under Apache License 2.0 with the unanimous permission of the steering developers of *Linglun Studio* (*bgArray*诸葛亮与八卦阵 and *Eilles*金羿).
4. *Linglun Studio* is open sourced under priority given:
1. License granted by the core developer(s) of a section after negotiation.
2. Explicitly stated license.
3. Apache 2.0 License.
5. A copy of the original Apache Lisence 2.0 can be found below.
```text
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
Copyright © 2024 Team-Ryoun 金羿("Eilles Wan") & 诸葛亮与八卦阵("bgArray")
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```

View File

@ -1,65 +1,12 @@
<h1 align="center">伶伦转换器</h1>
# ***NOTICE*** 请注意
## ***NEVER NEVER UPDATE FILES IN THIS REPOSITORY*** 请不要在此处编辑
<p align="center">
<img width="128" height="128" src="https://gitee.com/TriM-Organization/Linglun-Converter/raw/master/resources/LLC_LOGO_OK_PLAIN_BANNER.png">
</img>
</p>
> 此仓库中的编辑信息会被 Gitee 的更新覆盖,您在此做出的更改皆无效
>
> **Editions in *this repo(on GitHub)* will all be covered by the ones on Gitee so it's a MUST NOT edit this *on GitHub***
<h3 align="center">一个免费开源的《我的世界》数字音频转换器</h3>
IF YOU WANT TO TAKE PART IN THE DEVELOPMENT OF THIS PROJECT , PLEASE CONTACT EILLES,
or you can see [This Repo on Gitee](https://gitee.com/TriM-Organization/Linglun-Converter)
<p align="center">
<img src="https://img.shields.io/badge/BUILD%20WITH%20LOVE-FF3432?style=for-the-badge">
<p>
[![][Bilibili: 金羿ELS]](https://space.bilibili.com/397369002/)
[![][Bilibili: 诸葛亮与八卦阵]](https://space.bilibili.com/604072474)
[![CodeStyle: black]](https://github.com/psf/black)
[![][python]](https://www.python.org/)
[![][license]](LICENSE)
<!-- [![][release]](../../releases) -->
<!-- 简体中文 | [English](README_EN.md) -->
## 介绍🚀
**伶伦** 是一款免费开源的 **《我的世界》** 数字音频工作站
**伶伦转换器** 是仅用于 **《我的世界》** 数字音频转换的工具
欢迎加群:[861684859](https://jq.qq.com/?_wv=1027&k=hpeRxrYr)
## 教程📕
[转换器的使用与安装](./docs/功能使用说明.md)
[对于小白的答疑指南](./docs/新手答疑指南.md)
[对于本软件部分疑问的一些解答](./docs/问与答.md)
[生成文件的使用](https://gitee.com/TriM-Organization/Musicreater/blob/master/docs/%E7%94%9F%E6%88%90%E6%96%87%E4%BB%B6%E7%9A%84%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E.md)
[转换库的代码文档](https://gitee.com/TriM-Organization/Musicreater/blob/master/docs/%E5%BA%93%E7%9A%84%E7%94%9F%E6%88%90%E4%B8%8E%E5%8A%9F%E8%83%BD%E6%96%87%E6%A1%A3.md)
[转换乐器对照参考表](https://gitee.com/TriM-Organization/Musicreater/blob/master/docs/%E8%BD%AC%E6%8D%A2%E4%B9%90%E5%99%A8%E5%AF%B9%E7%85%A7%E8%A1%A8.md)
## 致谢🙏
> 感谢广大群友为此软件提供的测试和建议
## 联系📞
QQ群 [861684859](https://jq.qq.com/?_wv=1027&k=hpeRxrYr)
电邮 [TriM-Organization@hotmail.com](mailto:TriM-Organization@hotmail.com)
[Bilibili: 金羿ELS]: https://img.shields.io/badge/Bilibili-%E9%87%91%E7%BE%BFELS-00A1E7?style=for-the-badge
[Bilibili: 诸葛亮与八卦阵]: https://img.shields.io/badge/Bilibili-%E8%AF%B8%E8%91%9B%E4%BA%AE%E4%B8%8E%E5%85%AB%E5%8D%A6%E9%98%B5-00A1E7?style=for-the-badge
[CodeStyle: black]: https://img.shields.io/badge/code%20style-black-121110.svg?style=for-the-badge
[python]: https://img.shields.io/badge/python-3.6-AB70FF?style=for-the-badge
<!-- [release]: https://img.shields.io//TriM-Organization/Linglun-Converter?style=for-the-badge -->
[license]: https://img.shields.io/badge/Licence-Apache-228B22?style=for-the-badge
若欲加入开发,请联系金羿或者看一看[Gitee上的此项目](https://gitee.com/TriM-Organization/Linglun-Converter)

View File

@ -1,78 +0,0 @@
<h1 align="center">Linglun Converter</h1>
# Instructions for Using Demo(s)
*This is a tutorial for using the demo(s) of this library, not the Development Guide.*
*Developing Documentation is now not translated yet, you can see here for the [Chinese Orignal Version](%E5%BA%93%E7%9A%84%E7%94%9F%E6%88%90%E4%B8%8E%E5%8A%9F%E8%83%BD%E6%96%87%E6%A1%A3.md) if you understand Chinese*
## Instructions of Downloading and Starting using Demo
### [Windows OS](./download%26start_EN/Windows.md)
### [Linux OS](./download%26start_EN/Linux.md)
### [Android OS](./download%26start_EN/Android.md)
2. More Info for Parameters of Our Demo Program(s)
<img src=https://foruda.gitee.com/images/1659974810147043475/运行.png>
|Input Prompt|English Translation|Description|
|----------------|----------------|-------|
|请输入MIDI文件路径|Midi File Path|Path of a .mid file or a directory. While directory entered, our demo will convert all midi(s) in the directory|
|请输入输出路径|Output Path|Where files converted in|
|是否重置计分板|Whether Reset Scoreboard Automatically|Can only be 1 or 0(Recommanded 1)|
|*进度条[注]|Progressbar|Whether to enable Progressbar and customize progressbar style. Type 0 or False to disable, 1 or True to use default style, or type using format taught in follow the Instructions below to customize one you like|
|请输入计分板名称|Scoreboard Name|*Only not byDelay* The name of scoreboard that player using|
|请输入音量|Volume|Only decimal in [0,1],(Recommanded 1)|
|请输入速度倍率|Speed Multiplying Factor|Maybe you want to play it faster(1) or slower(0 1)?|
|请输入玩家选择器|Player Selector|Full Selector including `@x`. E.g: Play for players tagged `Holo`, enter `@a[tag=Holo]` on this parameter|
# 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.*

View File

@ -1,169 +0,0 @@
## 使用前的准备工作
### 安装终端工具
这里我们选用 **Termux** 作为我们的终端工具来安装这是一个强大的终端模拟器旨在安卓环境下模拟Linux的软件包环境。
1. 下载
下载可以通过 [GitHub源](https://github.com/termux/termux-app/releases) 或者 [F-Droid源](https://f-droid.org/en/packages/com.termux/) ,个人建议选择 F-Droid 源,因为在国内可以访问得到,而 GitHub 源就看运气。
2. 安装
下载*APK*包后直接安装,安装后打开可以看到一个类似这样的界面:
<img height="512" src="https://foruda.gitee.com/images/1665933025120627254/a0479618_9911226.jpeg">
3. 完成
恭喜你,你已经获得了一个极客般流畅地操作你手机的终端工具。
### 安装运行环境
1. 换源
接下来,我们就要来准备安装一下 **Python** 运行环境了,这是运行 **Python** 源代码必要的。
首先,我估计你等不了多久,急得要死,所以我们要让下载速度稍微快一点,先来换个源。在 **Termux** 中,输入以下指令:
```bash
echo "deb https://mirror.mwt.me/termux/main stable main" > /data/data/com.termux/files/usr/etc/apt/sources.list
```
*感谢 天如<QQ 3291691454>为我们带来的简单换源方法。*
- *非必要步骤*:手动编辑换源
如果你闲着没事,非要要手动编辑个文档来换源,那用啥?用普通的编辑器肯定可以,于是我们就让他更普通一点,用**nano**吧!
**Termux** 中,输入以下指令:
```bash
export EDITOR=nano
apt edit-sources
```
那么请把看到的如左下图的界面变为右下图吧:
<table><tr>
<td><img src="https://foruda.gitee.com/images/1665933104313107707/41108f03_9911226.jpeg"></td>
<td><img src="https://foruda.gitee.com/images/1665933122534781330/3887a901_9911226.jpeg"></td>
</tr></table>
- 图片中的文件,最后应该加入的两行为:
```bash
deb https://mirrors.ustc.edu.cn/termux/apt/termux-main/ stable main
deb https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main/ stable main
```
然后键入 `Ctrl`+`S`,再键入 `Ctrl`+`X`,退出`nano`
在换源之后,你可能会见到类似的提示:
```bash
Your '/data/data/com.termux/files/usr/etc/apt/sources.list' file changed. Please run 'apt-get update'.
```
那就遵循它的指引,输入:
```bash
apt-get update
```
Alright.
2. 安装 **Python**
```bash
apt-get install python3
```
如果遇到提示问是否继续,那就输入`Y`表示是,如左下图,安装成功后,图若右下。
<table><tr>
<td><img src="https://foruda.gitee.com/images/1665933181440420034/7f0fb5fd_9911226.jpeg"></td>
<td><img src="https://foruda.gitee.com/images/1665933238339972260/a9f06f4f_9911226.jpeg"></td>
</tr></table>
接下来,我们来试一试 **Python** 是不是安装成了吧,输入
```bash
python3 -V
```
如果输出了形如 `Python 3.X.X` 的提示,则完成。
3. 安装依赖库
```bash
# 首先换源
pip config set global.index-url http://mirrors.aliyun.com/pypi/simple/
# 然后安装(依次执行下面的指令)
apt-get install python-numpy
pip install brotli TrimMCStruct
pip install Musicreater TrimLog
python -m pip install --upgrade pip setuptools wheel
```
- 如果出现以下情况,真是死了鬼的,我们要来再搞个设置:
<img height="512" src="https://foruda.gitee.com/images/1665933289612919459/b87b7804_9911226.jpeg">
我们来修改收信任的源设置:
```bash
pip config set global.trusted-host mirrors.aliyun.com/
```
之后再来安装即可
```bash
pip install brotli TrimMCStruct
pip install Musicreater TrimLog
python -m pip install --upgrade pip setuptools wheel
```
安装成功后您可能会见到类似下图的提示:
<img src="https://foruda.gitee.com/images/1662737676719454287/f61a70f7_9911226.png">
### 安装下载工具
既然已经有了运行环境,那么我们就需要下载一个用来下载我们的**伶伦转换器**的工具,我非常推崇**Git**这种方便快捷好用还能下载仓库的代码管理器,这个世界上你也找不到第二个,所以我们来安装一下:
```bash
pkg install git
```
安装完成后记得测试一下:
<img height="512" src="https://foruda.gitee.com/images/1665933331269483373/9374c85d_9911226.jpeg">
## 本软件的下载与使用
1. 使用Git下载本程序代码
```bash
git clone https://gitee.com/TriM-Organization/Linglun-Converter.git llc
```
当上述命令执行成功,你会在执行此命令的所在位置发现一个名为 `llc` 的文件夹,其中包含的正是我们心心念念下载的本程序源代码。
本程序可以直接从源代码运行,因此,赶快进入下载到的文件夹:
```bash
cd llc
```
1. 开始使用命令行程序
依照你的需要,执行以下命令以运行程序:
```bash
python llc_cli.py
```
运行成功了,哦耶!
<img height="512" src="https://foruda.gitee.com/images/1686963721390700714/b82fb3d5_9911226.png">

View File

@ -1,105 +0,0 @@
## 运行环境安装
### 检验Python运行环境
0. 一般的Linux发行版都有安装Python环境我们只需要保证其版本即可理论上 ≥Python3.6 都可以运行我们的库
我们可以使用
```bash
python -V
```
来查看 Python 版本,如下
<img src=https://foruda.gitee.com/images/1665120915821957090/429561fd_9911226.png>
1. *非必要环节*:回退版本
如果你跟作者一样,觉得 Python 3.10+ 太难用很烦人的话,那真是皆大欢喜,让我们一起来回退版本吧!
- pacman 包管理器多用于Arch Linux上
1. 让我们先来把 python3 加入忽略升级的列表中,使用`vim`修改`/etc/pacman.conf`,在`IgnorePkg`后加上`python3`
```bash
sudo vim /etc/pacman.conf
```
<img src=https://foruda.gitee.com/images/1665124611490335193/5e99ca26_9911226.png>
2. 然后我们开始从[Arch Achieve](https://archive.archlinux.org/packages/)上找Python的版本列表。*这里说明一下在Arch中Python默认指的是Python3而与其他某些Linux发行版中Python默认指代Python2不同所以在Arch Achieve中也是如此。*)我这里找到的是[Python3.8.6](https://archive.archlinux.org/packages/p/python/python-3.8.6-1-x86_64.pkg.tar.zst),于是我们用`pacman`把她下载下来并安装:
```bash
sudo pacman -U https://archive.archlinux.org/packages/p/python/python-3.8.6-1-x86_64.pkg.tar.zst
```
<img src=https://foruda.gitee.com/images/1665126362769399903/ea4b9598_9911226.png>
3. 完美!
- 其他包管理器
暂无
### 检查并安装pip包管理器依赖
1. 我们在安装依赖库之前应该确认一下Python自带的包管理器pip是否安装到位
```bash
python -m pip # 确认pip是否安装
# 当这个命令输入后有长段提示出现则为已经安装
# 如果返回如下那么则pip尚未安装
/usr/bin/python: No module named pip
# 可以使用如下命令来安装pip
sudo pacman -S python-pip
# 安装完成后记得验证
python -m pip
# 如果还是失败那么就需要用其他工具安装pip
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
# 安装完成后一定要验证!!!
python -m pip
```
2. 确认完成之后,我们来安装一下依赖库:
```bash
pip install mido -i https://mirrors.aliyun.com/pypi/simple/
pip install brotli -i https://mirrors.aliyun.com/pypi/simple/
pip install Musicreater -i https://mirrors.aliyun.com/pypi/simple/
pip install TrimLog -i https://mirrors.aliyun.com/pypi/simple/
```
3. 安装成功后可能会见到类似下图的提示:
<img src="https://foruda.gitee.com/images/1662737676719454287/f61a70f7_9911226.png">
## 本代码库的下载与使用
1. 使用Git下载本库及其示例代码
```bash
git clone https://gitee.com/TriM-Organization/Linglun-Converter.git llc
```
当上述命令执行成功,你会在执行此命令的所在位置发现一个名为 `llc` 的文件夹,其中包含的正是我们心心念念下载的本程序和示例代码。
而我们要运行的也正是示例代码,因此,赶快进入下载到的文件夹:
```bash
cd llc
```
1. 开始使用
在目录下打开终端,执行以下命令以运行演示程序:
```bash
python llc_cli.py
```

View File

@ -1,112 +0,0 @@
## 运行打包文件(推荐)
### 一、下载打包好的应用程序
1. 在[代码仓库发布页](https://gitee.com/TriM-Organization/Linglun-Converter/releases)找到最新的下载。
<img src=https://foruda.gitee.com/images/1699105959996885442/be19644e_9911226.png>
请注意选择对您合适的构建版本
### 二、开始使用
2. 将下载得到的文件解压缩后,直接运行其中的 `llc_win_wxPython.exe`
<img src=https://foruda.gitee.com/images/1699106497816902973/48dc0942_9911226.png>
<img src=https://foruda.gitee.com/images/1699106542397488143/5638cd3e_9911226.png>
<img src=https://foruda.gitee.com/images/1699106557013748881/70f90fac_9911226.png>
3. 即可开始使用
<img src=https://foruda.gitee.com/images/1699106948861444130/30c156bc_9911226.png>
## 从代码运行(最新功能)
### 一、运行环境安装
#### (一)安装 Python3.8+
1. 首先需要下载Python的安装包最好是 *Python3.10*,因为作者就用的是这个版本
注意此程序现已不支持Python3.6。请更新到至少Python3.8但是我们对于Python3.8的支持也即将停止为了更好的兼容避免不必要的麻烦我们强烈建议您更新到Python3.10。(这意味着我们即将放弃对Windows7的支持)
> [下载64位Python3.10安装包](https://www.python.org/ftp/python/3.10.11/python-3.10.11-amd64.exe)
> [下载32位Python3.10安装包](https://www.python.org/ftp/python/3.10.11/python-3.10.11.exe)
2. 在安装时,最好需要勾选 `Add Python 3.X to PATH`,如下图所示:
<img src=https://foruda.gitee.com/images/1662736520757331846/e38efb81_9911226.png>
- 若您对Python一知半解或者不怎么了解、并对自己的系统盘通常是C盘有大约150*兆字节*(MB)的信心的话,您可以在安装时直接选择*快速安装*(Install Now)
3. 若您选择了*自定义安装*(Customize Installation),请务必勾选 `pip``py launcher` 便于后续安装依赖,如下图:
<img src=https://foruda.gitee.com/images/1662736621235871190/2ac3d98f_9911226.png>
4. 安装结束之后可以在*终端*(命令行/PowerShell/Bash/etc)中输入:`python -V` 试试是否安装成功成功安装之后在终端中输入python会显示诸如如下图片的提示
<img src=https://foruda.gitee.com/images/1699107336707287940/1837e2f6_9911226.png>
#### (二)安装依赖
1. 请以管理员模式打开您的*终端*(命令行/PowerShell/Bash/etc)
例如,命令行,可以如此打开:在*视窗开始菜单*(Windows开始)中搜索 `cmd`, 并以管理员身份运行
<img src="https://foruda.gitee.com/images/1662736878650993886/62487dd8_9911226.png">
2. 打开了终端之后,请在终端中输入以下指令
```bash
pip install Brotli TrimMCStruct Musicreater TrimLog --upgrade -i https://mirrors.aliyun.com/pypi/simple/
```
3. 安装成功后您可能会见到类似下图的提示:
<img src="https://foruda.gitee.com/images/1662737676719454287/f61a70f7_9911226.png">
### 二、本工具的下载与使用
0. 下载本代码库以及演示程序
- 若您使用git请直接克隆本仓库
```bash
git clone https://gitee.com/TriM-Organization/Linglun-Converter.git
```
- 若您不使用git可以在[*码云*(Gitee)](https://gitee.com/TriM-Organization/Linglun-Converter.git)或[*GitHub*](https://github.com/TriM-Organization/Linglun-Converter.git)下载zip包或者[加入QQ群聊861684859](https://jq.qq.com/?_wv=1027&k=hpeRxrYr),在群文件中获取。
1. 开始使用
您可以直接双击 `llc_cli.py` 以运行演示程序,或者按照以下步骤使用终端应用运行。
在目录下打开终端。
例如:打开命令行:请进入到目录下,在文件资源管理器的地址框内输入`cmd`并回车:
<img src=https://foruda.gitee.com/images/1659974437388532868/输入.png>
<img src=https://foruda.gitee.com/images/1659974754378201859/输入c.png>
在打开的终端中使用以下指令:
```bash
python ./llc_cli.py
```
### 三、安装时错误的补充说明
1. Microsoft Visual C++ Redistributable 环境出错
如果你遇到了类似以下这种情况:
<img src=https://foruda.gitee.com/images/1659972789779764953/bug.jpeg>
请下载最新的VCREDIST安装包可以参照[这个网页](https://docs.microsoft.com/zh-CN/cpp/windows/latest-supported-vc-redist)的说明,也可以在这直接选择你需要的安装包下载:
> [下载64位VCREDIST安装包](https://aka.ms/vs/17/release/vc_redist.x64.exe)
> [下载32位VCREDIST安装包](https://aka.ms/vs/17/release/vc_redist.x86.exe)
感谢群友 *Mono* 帮我们发现这个问题。

View File

@ -1,97 +0,0 @@
## Before we Use
### Installing Terminal APP
We choose **Termux** as the Terminal APP as it is the powerful Linux simulator.
1. Dowloading
From both [GitHub](https://github.com/termux/termux-app/releases) or [F-Droid](https://f-droid.org/en/packages/com.termux/) to download is OK.
2. Installing
*APK* file is easy to install and you must know it without my instruments, you can see something like below after opening this app.
<img height="512" src="https://foruda.gitee.com/images/1665933025120627254/a0479618_9911226.jpeg">
3. Finish
OK, congratulations for ok installing *Termux*.
### Installing Runtime Environment
1. Installing **Python**
```bash
apt-get install python3
```
The picture left below is while you may enter `Y` to continue.
Aftering succeed in installing you will see as right bicture below.
<table><tr>
<td><img src="https://foruda.gitee.com/images/1665933181440420034/7f0fb5fd_9911226.jpeg"></td>
<td><img src="https://foruda.gitee.com/images/1665933238339972260/a9f06f4f_9911226.jpeg"></td>
</tr></table>
OK, let try whether success installing **Python** via
```bash
python3 -V
```
Sth. like `Python 3.X.X` will occur if so.
3. Installing dependences
```bash
pip install mido
pip install brotli
```
Sth. like below will occur if successful.
<img src="https://foruda.gitee.com/images/1662737676719454287/f61a70f7_9911226.png">
### Install Downloading Tool
Tired to translate, QwQ.....
Sleep for a while and this can be a TO-DO.
既然已经有了运行环境,那么我们就需要下载下我们的**音·创库版示例代码**工具,我非常推崇**Git**这种方便快捷好用还能下载仓库的代码管理器,这个世界上你也找不到第二个,所以我们来安装一下:
```bash
pkg install git
```
安装完成后记得测试一下:
<img height="512" src="https://foruda.gitee.com/images/1665933331269483373/9374c85d_9911226.jpeg">
## 本代码库的下载与演示程序的使用
1. 使用Git下载本库及其示例代码
```bash
git clone -b pkgver https://gitee.com/EillesWan/Musicreater.git MSCTpkgver
```
当上述命令执行成功,你会在执行此命令的所在位置发现一个名为 `MSCTpkgver` 的文件夹,其中包含的正是我们心心念念下载的本程序和示例代码。
而我们要运行的也正是示例代码,因此,赶快进入下载到的文件夹:
```bash
cd MSCTpkgver
```
1. 开始使用演示程序
依照你的需要,执行以下命令以运行库的演示程序:
```bash
python magicDemo.py
```
运行成功了,哦耶!
<img height="512" src="https://foruda.gitee.com/images/1665933366784631363/db9f80f6_9911226.jpeg">

View File

@ -1,102 +0,0 @@
## Install Runtime Environment
### Install and Verify Python Runtime
0. Common Linux Distributions do include a Python Runtime Environment, what we should do is only to check whether it is a satisfied version to our program. If the version ≥Python3.6, theoretically our program can be run.
We can type:
```bash
python -V
```
To check the Python version, as the follows
<img src=https://foruda.gitee.com/images/1665120915821957090/429561fd_9911226.png>
1. **Not Necessary**
If you want to change a Python version just as what I want to do, it is such a great fantastic action! Let do as the follows:
- pacman Package ManagerIn Arch Linux Mostly
1. Let's write python3 into the ingore list of updating. Via `vim` to edit `/etc/pacman.conf`, add `python3` after `IgnorePkg`.
```bash
sudo vim /etc/pacman.conf
```
<img src=https://foruda.gitee.com/images/1665124611490335193/5e99ca26_9911226.png>
2. Then we can search for python releases in [Arch Achieve](https://archive.archlinux.org/packages/).*HERE, under Arch, Python refers to Python3 defaultly, while some other Linux releases using Python2 as default. So dose Arch Achieve.*What I find here is [Python3.8.6](https://archive.archlinux.org/packages/p/python/python-3.8.6-1-x86_64.pkg.tar.zst), so let's download she via `pacman`:
```bash
sudo pacman -U https://archive.archlinux.org/packages/p/python/python-3.8.6-1-x86_64.pkg.tar.zst
```
<img src=https://foruda.gitee.com/images/1665126362769399903/ea4b9598_9911226.png>
3. Perfect!
- Other Package Manager
None yet.
### Install and Verify pip Package Manager
1. Before installing, it is to be checked, wheather Python's pip is OK:
```bash
python -m pip # To check is pip installed
# If a long tip occured, it is OK
# If returned as this, then not.
/usr/bin/python: No module named pip
# We can install pip via:
sudo pacman -S python-pip
# Verfy, remember.
python -m pip
# If you did but failed, we should use other methods to install pip:
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
# Verfy, must.
python -m pip
```
2. After checking, let's install the dependences.
```bash
pip install mido -i
pip install brotli -i
```
3. See the tips below as successfully installed
<img src="https://foruda.gitee.com/images/1662737676719454287/f61a70f7_9911226.png">
## Download this lib's sources code and Using its demos.
1. Download via Git
```bash
git clone -b pkgver https://github.com/TriM-Organization/Musicreater.git MSCTpkgver
```
If succeed, a directory named `MSCTpkgver` well be found in the path you run this command, and inside it is the source code and demo(s) we wantted to download.
What we want to use is the demo(s) so enter the folder via:
```bash
cd MSCTpkgver
```
1. Starting Using Demo(s)
Via
```bash
python magicDemo.py
```

View File

@ -1,116 +0,0 @@
## Use a Pre-Built Release (Recommended)
### 一、Download the Packed Program
1. Fne the newest release in [The Release Page](https://gitee.com/TriM-Organization/Linglun-Converter/releases)
<img src=https://foruda.gitee.com/images/1699105959996885442/be19644e_9911226.png>
Please consider a proper build release that satisfy your device.
### 二、Start Using
2. After downloading, extract the files and then double click `llc_win_wxPython.exe` to run.
<img src=https://foruda.gitee.com/images/1699106497816902973/48dc0942_9911226.png>
<img src=https://foruda.gitee.com/images/1699106542397488143/5638cd3e_9911226.png>
<img src=https://foruda.gitee.com/images/1699106557013748881/70f90fac_9911226.png>
3. Start to use now.
<img src=https://foruda.gitee.com/images/1699106948861444130/30c156bc_9911226.png>
## Run From Source Code (latest functions provided)
### Install Runtime Environment
#### Install Python 3.8+
1. First of all, you need to install the runtime environment of this library, *Python*. But please ensure that the version is above 3.8. Maybe a Installation Pack could be one of the choices:
> [Downloading Python 64-bit](https://www.python.org/ftp/python/3.8.10/python-3.8.10-amd64.exe)
> [Downloading Python 32-bit](https://www.python.org/ftp/python/3.8.10/python-3.8.10.exe)
2. While installing, it's best to check `Add Python 3.X to PATH`(just as the screenshot showed below), otherwise it needs to be set manually which may cause some time wasting.
<img src=https://foruda.gitee.com/images/1662736520757331846/e38efb81_9911226.png>
- If you are new to Python or not very familiar to Computer Programming, and having the disk space in your PC's System Partition (usually C:) of 150 *MB*, you can directly choose *Install Now*.
3. However, if you want to do it like a pro, choosing *Customize Installation*, it's necessary to be sure to check `pip` and `py launcher` will be installed on your computer(see screenshot below). The two options is required for the next step of installing the requirements.
<img src=https://foruda.gitee.com/images/1662736621235871190/2ac3d98f_9911226.png>
4. After the installation, you can enter in your *Terminal*(CMD/PowerShell/Bash/etc): `python` to ensure whether the installation was successful. If it was, your terminal will show things like below:
<img src=https://foruda.gitee.com/images/1659972669907359295/cmd.png>
#### Installing Requirements
1. It's better to open your *Terminal*(CMD/PowerShell/Bash/etc) under Administrator Mode.
For example, if you want to use CMD in Administrator Mode, you can search `cmd` in the *Start Menu*, right click it and *Run as Administrator*
<img src="https://foruda.gitee.com/images/1662736878650993886/62487dd8_9911226.png">
2. Okay, after that, please enter in your Terminal:
```bash
pip install mido
pip install brotli
```
3. If successful you will see something like below:
<img src="https://foruda.gitee.com/images/1662737676719454287/f61a70f7_9911226.png">
### Downloading & Using of this tool
1. Download This Package
- If you use Git, you can clone this lib via the following commands:
```bash
git clone https://github.com/TriM-Organization/Linglun-Converter.git
```
- If Git is not installed, you can download the zip package from the code page(from [GitHub](https://github.com/TriM-Organization/Musicreater.git) or [Gitee](https://gitee.com/TriM-Organization/Musicreater.git)). Or you are a Chinese fan having a QQ account, you can [Join the QQ Group 861684859](https://jq.qq.com/?_wv=1027&k=hpeRxrYr) and get it from our GroupFiles.
<img src="https://foruda.gitee.com/images/1669540786443169766/fabf0acd_9911226.png">
But it should be noticed that you're clear instructed to choose the branch "pkgver" first instead of downloading it directly from the "master" branch, the master branch is now under developing and has no practical use.
2. Start Using
You can directly double click `llc_xxx(_xxx).py` to run the demo, or follow instructions below using Terminal APP to run it.
Open your terminal in the directory of this, taking CMD, for example, just enter the directory and enter `cmd` in the path box:
<img src=https://foruda.gitee.com/images/1659974437388532868/输入.png>
<img src=https://foruda.gitee.com/images/1659974754378201859/输入c.png>
And enter the commands below:
```bash
python ./llc_win_wxPython.py
```
### Addition for Error(s) Using or Installing
1. Environment Error of Microsoft Visual C++ Redistributable
If you meet this condition as the screenshot shows:
<img src=https://foruda.gitee.com/images/1659972789779764953/bug.jpeg>
Your MSVC Environment may be not installed, and you can download and install
> [Here of 64-Bit VCREDIST](https://aka.ms/vs/17/release/vc_redist.x64.exe)
> [Here of 32-Bit VCREDIST](https://aka.ms/vs/17/release/vc_redist.x86.exe)
or follow [this page](https://learn.microsoft.com/en-gb/cpp/windows/latest-supported-vc-redist)'s instructions.
Thanks to our groupmate *Mono* for helping us finding this problem.

View File

@ -1,50 +0,0 @@
<h1 align="center">伶伦转换器</h1>
# 使用教程
## 下载与启动教程
### [视窗(Windows)操作系统](./download%26start/Windows.md)
### [林纳克斯(Linux)与其衍生操作系统](./download%26start/Linux.md)
### [安卓(Android)与其衍生操作系统](./download%26start/Android.md)
## 使用教程
1. 参数说明
<img src=https://foruda.gitee.com/images/1695492228675012042/2136cbe4_9911226.png>
- MIDI地址含有mid文件路径、文件名、后缀的完整文件路径或者一个目录可接受批量转换。相对或绝对路径皆可
- 输出地址:输出文件夹的路径,不需要指示文件名
- 转换算法(**已废弃**通过不同通道隔离音轨识别最佳乐器的算法编号为3金羿的算法将所有的音轨合并通过通道来分组的算法编号为2神羽和金羿的算法旧算法即通过音轨分组的算法编号为1Dislink的算法。新算法在某些方面转换效果更好但是如果新算法转换有误的话请使用旧算法。
- 输出文件类型:支持 `BDX` 结构和 `MCPACK` 包,其中,以 `BDX` 结构输出支持延迟和积分两种播放器, `MCPACK` 附加包则比前者多了一种 中继器播放器。
- 播放器类型:`BDX` 结构仅支持**计分板**和**延迟**的两种播放方式;`MCPACK`则支持**计分板**、**延迟**和**中继器**三种播放方式。具体地关于这些播放方式如何使用的问题,详见[生成文件的使用说明](https://gitee.com/TriM-Organization/Musicreater/blob/master/docs/%E7%94%9F%E6%88%90%E6%96%87%E4%BB%B6%E7%9A%84%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E.md)
- 音量大小正小数在0不含~1包含的范围之内用以表示播放音量大小。
- 速度倍率正小数其值不可为0用以表示游戏中播放此音乐的速度倍数。
- 启用进度条:是否启用自动生成进度条。
- 若是,则可选是否自定义进度条
自定义的进度条样式,可以参考[功能文档](https://gitee.com/TriM-Organization/Musicreater/blob/master/docs/%E5%BA%93%E7%9A%84%E7%94%9F%E6%88%90%E4%B8%8E%E5%8A%9F%E8%83%BD%E6%96%87%E6%A1%A3.md#%E8%BF%9B%E5%BA%A6%E6%9D%A1%E8%87%AA%E5%AE%9A%E4%B9%89)
- 计分板名称(仅计分板播放器):游戏内的用以延迟的计分板名称
- 是否重置计分板(仅计分板播放器):歌曲放完是否重置,推荐选择自动重置
- 玩家选择器(仅延迟播放器):包括 `@x` 在内的全部选择器。例:若要选择全部标签为`Holo`的玩家,则需要如此输入:`@a[tag=Holo]`
- 作者仅BDX结构结构的生成作者署名
- 指令结构最大高度(`MCPACK`的计分板播放器不含此项):生成音乐结构的最大堆叠高度。对于如何堆叠的问题,可以查看[结构部分的开发文档](https://gitee.com/TriM-Organization/Musicreater/blob/master/docs/%E5%BA%93%E7%9A%84%E7%94%9F%E6%88%90%E4%B8%8E%E5%8A%9F%E8%83%BD%E6%96%87%E6%A1%A3.md#%E6%96%87%E4%BB%B6%E6%A0%BC%E5%BC%8F)了解详细内容。
- 没有报错且在输出路径下找到对应的文件即为生成成功:
<img src=https://foruda.gitee.com/images/1659973655881460036/输出.png>

View File

@ -1,169 +0,0 @@
<h1 align="center">**伶伦转换器**</h1>
# 新手答疑指南
**考虑到某些用户电脑技术不是特别先进,且对这个项目充满了好奇心,但是又了解的不是很充分,为此,我特别在这里写一份新手指南,以满足各位的好奇心。放心,本文件全程中文。**
## 第一部分 关于 **音·创** 的作用
### 1.1 **音·创** 简介
**音·创 _Musicreater_** 是一款免费开源的针对 **《我的世界》** 的midi音乐转换库
而能够与人交互,以达到转换功能的,是 **音·创** 库的程序实现:**伶伦转换器**。
**伶伦转换器** 目前已经具备较为完善的[**教程**](./%E5%8A%9F%E8%83%BD%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E.md),其中包括了下载安装一类,使你能够方便地进行转换。
**伶伦转换器**也是免费开源的,采用**带有特殊条款的Apache2.0**开源协议授权,详情请见[协议](../LICENSE.md)。
另外的,**伶伦转换器**并不是伶伦的主要开发方向,其功能也并非是 **伶伦** 本体伶伦DAW所提供的主要功能。**从 _音·创__伶伦_ 的开发,其目的是为了方便 _《我的世界》_ 的音乐作者,进行 _《我的世界》_ 相关音乐的开发与创作**而并不是转换MIDI文件转换器的实现是在数字音频工作站的开发之前进行一定的技术探索以更好地开发数字音乐工作站。
### 1.2 **音·创** 库到底有什么功能?
* - [x] 支持导入`.mid`文件
* - [x] 支持写入`.mcpack`文件
* - [x] 支持写入`.bdx`文件
* 不支持导入.mp3 .mp4 .wav等音频流文件
## 第二部分 关于格式的问题
### 2.1 关于.mid格式
其实对于经常玩音乐电子制作的朋友们来说,`MIDI`格式并不陌生,这里我简单介绍一下。
**MIDI文件的本质是电子乐谱而不是记录声音波形文件的.mp3/.wav/.m4a等等文件。**
因此我们将MIDI转换到《我的世界》播放器的过程实际上就是把一类乐谱变为另一类乐谱的过程。而真正的演奏是在游戏内实现的。
> mid格式是由MIDI继承而来。MID文件并不是一段录制好的声音而是记录声音的信息然后再告诉声卡如何再现音乐的一组指令。
> 这样一个MIDI文件每存1分钟的音乐只用大约510KB。今天MID文件主要用于原始乐器作品、流行歌曲的业余表演、游戏音轨以及电子贺卡等。
>
> ——百度百科
>
> MIDI 音乐,保存在电脑上,就是 *.mid 类型的文件。和一般意义上的“音乐”不同mid 类型的音乐通常并不是可直接发行供大众欣赏的音乐,
> 它更像是一种音乐创作者使用的工程文件。它没有歌词,不含有人类语言。如果说五线谱是给人类阅读的乐谱,
> MIDI音乐文件便是给计算机或其他电子设备使用的乐谱。对于“音乐”这个世界来说它微不足道却又是现代数字音乐的基石。虽不为大众所知
> 但在 MIDI 音乐爱好者眼中,它却是非常有意思的东西。有了 MIDI 音乐技术和一台电脑,基本就等于拥有了一个乐队,加上相关的音乐知识,
> 就可以自己指挥这个“乐队”,创作音乐作品了!
> 同时MIDI 技术由于数据结构简单又与音乐有关也成为了部分技术极客的爱好。有人使用MIDI技术+Arduino开源硬件制作了架子鼓
> 有人通过分析大量MIDI乐曲结构设计了人工智能作曲软件还有更酷的人使用MIDI音乐制作了随节奏变幻的特斯拉线圈
> 在MIDI 音乐的世界里汇聚了一批喜欢音乐又热爱技术的人。我们有理由相信玩MIDI音乐的你定是多才多艺的。
>
> ——midishow.com
### 2.2 关于.mid格式的获取
通过刚刚的介绍,你可能已经发现,`.MID`文件因为受众并不多而并没有被广泛熟知,因而你之前可能完全没见过这个文件,更何况要弄一首自己心仪的歌了。
这里介绍几个获取.mid格式的方法
0. 最简单的方法是向你心仪的作编曲人投递一份申请请求TA将其作编曲过程中的相关工程文件给你这样你就可以获得一首乐曲的电子曲谱从而获得其MIDI文件。
1. 如果无法向作曲人申请相关文件的话,成为一个作编曲人也许是一个不错的选择,当然,很多人做不到这一点,但是有必要提到这一点,当你在下面的渠道中都无法获得想要的文件时,你应该考虑是不是需要自己创作内容,或者,请别人帮你创作内容。
2. 当你没有这样的文件时,问问别人或者从群里下载公开的文件也是个思路,不过这个办法通常使用次数有限且能找到的文件不多,不过,值得注意的是,[**音·创**开发交流群](https://jq.qq.com/?_wv=1027&k=hpeRxrYr)的**群文件中所含的MIDI文件均为网友分享学习交流使用请在下载后一个小时内删除。**
3. 自己找MIDI现在我将给你提供一个完整的找mid的方法请认真学习
**1.** 首先你需要在[MidiShow](www.midishow.com)网站中注册一个账号并不复杂你可能只需要一个QQ号便可以授权登录。
**2.** 登录你的账号,主界面应该如下图所示:
<img src="https://foruda.gitee.com/images/1672644995747340749/36c9c143_10062986.png">
**3.** 在显眼的搜索框中,输入你想要的歌曲名称,接下来的教程,我以`夜空中最亮的星`这首歌及它的mid来演示下载流程。点击搜索框完成这一步。
<img src="https://foruda.gitee.com/images/1672645340943813483/44d0db69_10062986.png">
**4.** 接下来看到搜索结果如下,你可以点进去一个听听,决定你是否要下载;也有可能你什么都没搜到,那你就得换首歌或者换个途径了。
<img src="https://foruda.gitee.com/images/1672645574402099694/6b7e18e5_10062986.png">
**5.** 点击播放按钮试听,网站上的效果可能一般,但是会听音乐的人应该很快就能决定你是否需要下载这个音乐。如果需要下载,你可以进行到下一步,
如果不行,那你可以退回刚刚的页面换一个。
<img src="https://foruda.gitee.com/images/1672645752246438160/47cead78_10062986.png">
**6.** 翻到最下面,如图,你可以对这首歌进行打分,打分可以使积分+1如果你喜欢这首乐曲的话建议打5分你可以对这首歌进行评论一次有意义的评论可以+3分。而下载一首歌需要-3积分如果你先完成了这两项操作再下载那你还会再赚1积分。所以推荐这样做
<img src="https://foruda.gitee.com/images/1672646433045265565/26ea29b2_10062986.png">
**完成后会像这样:**
<img src="https://foruda.gitee.com/images/1672646242419857480/5e8809b8_10062986.png">
**7.** 接下来下载,往上翻网页,找到这个标识,然后单击。
<img src="https://foruda.gitee.com/images/1672646275215822535/63b402db_10062986.png">
**8.** 确认完毕后点击下载。
<img src="https://foruda.gitee.com/images/1672646309787744490/f459adac_10062986.png">
**9.** 完成下载,如图:
<img src="https://foruda.gitee.com/images/1672646335942429563/2449ed0b_10062986.png">
4. 使用音频波形转换MIDI的工具也是一个选择。不得不说科技的进步带来了许多便利让这样困难的事情也变得简单。如果上述方法仍然没有解决你的问题那么你可以在下一章节中找到有关这个途径的说明。
### 2.3 波形格式转换为.mid格式
**注意,使用这个技术有一定难度,酌情使用!**
文件转换:此技术是将记录声音波形文件的.mp3/.wav/.m4a等等文件转换为.mid数字乐谱文件的。
概述波形转mid需要把**模拟的波形频谱信号转为数字乐谱信号**,这个过程**一定有损失**,而且损失非常大。
请各位以后不要在答疑群中问类似于我这个转换效果为什么不好这样的问题,谢谢。
如果直接用**widi**的话相当于对声音进行了[**傅里叶变换**](https://baike.baidu.com/item/%E5%82%85%E9%87%8C%E5%8F%B6%E5%8F%98%E6%8D%A2/7119029),你确实可以分离出其中的音高,但是效果在不同情况下差异较大,尤其是有架子鼓啊啥的玩也的时候,比较**差**。
[widi工具链接](https://pan.baidu.com/s/1j_Jui0piQ6rMOXM0GJtqTg) 提取码b0lw
如果**只有钢琴**的谱子需要分离,有一个完美的选择:[Giant MIDI-Piano](https://zhuanlan.zhihu.com/p/270999354)
如果不然有其他的乐器也需要分离,那么可能就有点困难,像**cakewalk**就确实也可以把音频变成mid但是可能要
**先把原MP3分离成人声音轨、贝斯音轨等再傅里叶变换。**
当然我也可能了解的不全,没准现在已经有船新的技术可以分离的更好了,那就太棒了!(〃'▽'〃)
另外,我们开发者也象征性的找了一些相关的网站,我们没使用过,不担保效果。
[serocs.cn](https://www.serocs.cn/transcription/)
同时midishow论坛里有一些大佬也提供了解决方案看看他们的发言也是一个不错的选择。我就只给个论坛链接了经常有人问这种问题你可以去那里随便找到一篇帖子看看。[MidiShow论坛](https://www.midishow.com/question)
### 2.4 输出格式的问题
在前面说到,输出主要有`.mcpack``.bdx`文件的输出,接下来我会围绕这两个文件进行简单的说明。
#### 2.4.1 .mcpack是什么
输出.mcpack文件其实对于一个**资深《我的世界:基岩版》玩家**应该并不陌生。
`.mcpack`文件其实就是《我的世界:基岩版》的附加包文件,里面一般分为行为包和材质包
我们生成的命令组属于**行为包** (下图就是一个例子)
<img src="https://foruda.gitee.com/images/1672647779755793187/884abaa9_10062986.png">
如果你是使用桌面平台游玩基岩版,像我一样,是可以直接打开这个文件、并将这个包导入我的世界的。当然,移动平台也很简单,在游戏资源包界面有导入本地资源包的选项,便可将其导入。
资源包导入世界之后的使用方法,我们也制作了[**简单的教程**](https://gitee.com/TriM-Organization/Musicreater/blob/master/docs/%E7%94%9F%E6%88%90%E6%96%87%E4%BB%B6%E7%9A%84%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E.md),如果你对使用导入后的文件有所疑问,可以看看。
#### 2.4.2 .bdx是什么
.bdx 文件其实是一个新型结构文件,利用一些标识符对结构进行标记,可以使用相关软件导入到《我的世界:中国版》。
由于这不属于官方文件,且我并不是很熟悉这个结构,所以请对这个格式有问题的好兄弟加一下[QQ群](https://jq.qq.com/?_wv=1027&k=hpeRxrYr),问问群里有导入经验的大佬。
## 第三部分 关于其他问题
如果你在仔细阅读以上内容之后,仍然感觉有所困惑,可以加我们的[QQ群](https://jq.qq.com/?_wv=1027&k=hpeRxrYr)来提问,但是请注意,**由于开发者们都很忙,群友们的耐心也都有限,所以恳请大家提出有意义的问题。**
如果您在使用过程中遇到报错,希望你能够把完整的报错内容复制给我们,而不是截一半的屏幕或者在群内大呼小叫。以下两张图给了你很好的解释说明。
<table><tr><td><img src=https://foruda.gitee.com/images/1673053210913625261/37197693_9911226.png></td><td><img src=https://foruda.gitee.com/images/1673052430511255221/6a279fae_9911226.png></td></tr></table>
这里附一个关于[智慧地提问](https://github.com/tvvocold/How-To-Ask-Questions-The-Smart-Way)的文章,大家可以看看。
希望不要我把这个文件在聊天中甩给你,那说明我可能已经没有耐心了。
看完这份说明,如果你打算开始使用我们的工具的话,请移步至[演示程序使用教程](./%E5%8A%9F%E8%83%BD%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E.md)。
## 第三部分 结尾
**欢迎加群:[861684859](https://jq.qq.com/?_wv=1027&k=hpeRxrYr)**
**欢迎加群:[861684859](https://jq.qq.com/?_wv=1027&k=hpeRxrYr)**
**欢迎加群:[861684859](https://jq.qq.com/?_wv=1027&k=hpeRxrYr)**
**如果遇到问题,仔细地再次[阅读教程](./%E5%8A%9F%E8%83%BD%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E.md)很重要!!!!!**
**如果遇到问题,仔细地再次[阅读教程](./%E5%8A%9F%E8%83%BD%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E.md)很重要!!!!!**
**如果遇到问题,仔细地再次[阅读教程](./%E5%8A%9F%E8%83%BD%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E.md)很重要!!!!!**
(重要的事情说三遍)
**(有能力的同志麻烦给仓库star一下)**
**(有能力的同志麻烦给仓库star一下)**
**(有能力的同志麻烦给仓库star一下)**

View File

@ -1,35 +0,0 @@
<h1 align="center">伶伦转换器</h1>
# 疑问与帮助
## 关于音·创与伶伦转换器
1. “**伶伦**”是什么?
**伶伦** 是一个针对《我的世界》的数字音频工作站,用以创作、编辑《我的世界》风格的曲目。
2. “**伶伦转换器**”是什么?
**伶伦转换器** 是一个用于将Midi文件转换至我的世界可读格式的工具。其使用 **音·创** 作为转换工具库其目的旨在方便midi创作者进行简单的音乐转换同时也是 **音·创** 的一个实现。
3. 为什么要将 **音·创** 的功能迁移至 **伶伦转换器**
**音·创** 作为单独存在的转换工具库,如果每次更新都需要从源码下载更新可能对用户十分的不友好。而且,**音·创** 的实现本是为了其他程序的调用,而不是一个转换程序。经过一段时间的观察与开发后,我们发现如果是以一种“可以用来转换音乐”的工具出现在大众面前,那么 **音·创** 不仅不能被人理解,反而可能会让人困惑于其的具体功用,因此将 **伶伦转换器** 作为 **音·创** 库的实现,将独立的转换功能用更加亲用户的形式展现在大众面前,是一个更好的选择。
4. 之前使用的“**音·创库版本**”的示例程序,现在还能用吗?
仍然可以使用,不过由于不再维护,已有的错误不会自动修复。
## 关于转换所需参数
1. 什么是延迟播放器?
播放音乐不同的音符之间存在间隔可以用不同的方式实现音符间空白的时间。其一是计分板通过给计分板加分对应分数播放对应的音符就可以间隔到还有就是命令方块自带的延迟这样也可以实现音符间空白。延迟播放器即后者但是因为只能对命令方块写入这样的延迟数据所以仅可以使用包含NBT的结构导出或者直接输出至世界。
2. 可不可以不要积分板?
详见问1切换你所需要的播放器即可。
4. **_已废弃_** 转换算法是什么?怎么填?是越新越好吗?
转换算法是音·创库中所需要指定的内容转换的算法都已经开源可以在音·创仓库内找到。目前转换算法1对应的算法是将midi文件中的所有音轨单独提取并逐轨解析。而算法2是将所有音符单独提取出来而后解析各个音符。算法的转换过程的差异可能会导致结果不同但由于算法1已经不在进行主动维护算法2的效果将会比1更好所以建议使用算法2。算法3所对应的是尚在研究的插值算法使用可能导致转换出错。

View File

@ -1,397 +0,0 @@
# -*- coding: utf-8 -*-
# 伶伦 开发交流群 861684859
"""
伶伦转换器 命令行
Linglun Converter CLI
版权所有 © 2024 金羿 & 睿乐开发组
Copyright © 2024 EillesWan & TriM Org.
开源相关声明请见 ./License.md
Terms & Conditions: ./Lisense.md
"""
__version__ = "0.0.7"
import datetime
import os
import random
# import sys
import Musicreater
from Musicreater.constants import DEFAULT_PROGRESSBAR_STYLE
from Musicreater.plugin import ConvertConfig
from Musicreater.plugin.addonpack import (
to_addon_pack_in_delay,
to_addon_pack_in_repeater,
to_addon_pack_in_score,
)
from Musicreater.plugin.mcstructfile import (
to_mcstructure_file_in_delay,
to_mcstructure_file_in_repeater,
# to_mcstructure_file_in_score,
)
from Musicreater.plugin.bdxfile import to_BDX_file_in_delay, to_BDX_file_in_score
from utils.io import MainConsole, int_str, prt, ipt, myWords, isin, bool_str, float_str
# from Musicreater.plugin.mcstructure import commands_to_structure, commands_to_redstone_delay_structure
MainConsole.print(
"[#121110 on #F0F2F4] ",
style="#121110 on #F0F2F4",
justify="center",
)
# osc.project_name = "伶伦转换器"
# osc.version = __version__
# if len(sys.argv) > 0:
# def go_for_args(debugMode: str = "False", logfile: str = "True"):
# global logger
# osc.isRelease = False if debugMode.lower() in ("true", "1") else True
# logger.printing = not osc.isRelease
# logger.writing = True if logfile.lower() in ("true", "1") else False
# go_for_args(*sys.argv)
# 显示大标题
MainConsole.rule(
title="[bold #AB70FF]欢迎使用伶伦独立转换器", characters="=", style="#26E2FF"
)
# MainConsole.rule(title="[bold #AB70FF]Welcome to Linglun Converter", characters="-")
MainConsole.rule(
title="[#AB70FF]版本{} | 音·创内核版本{}".format(
__version__, Musicreater.__version__
),
characters="-",
style="#26E2FF",
)
nowYang = datetime.datetime.now()
if nowYang.month == 8 and nowYang.day == 6:
# 诸葛八卦生日
MainConsole.print(
"[#7DB5F0 on #121110]今天可不是催更的日子!\n诸葛亮与八卦阵{}岁生日快乐!".format(
nowYang.year - 2008
),
style="#7DB5F0 on #121110",
justify="center",
)
elif nowYang.month == 4 and nowYang.day == 3:
# 金羿生日快乐
MainConsole.print(
"[#0089F2 on #F0F2F4]今天就不要催更啦!\n金羿{}岁生日快乐!".format(
nowYang.year - 2006
),
style="#0089F2 on #F0F2F4",
justify="center",
)
else:
# 显示箴言部分
MainConsole.print(
"[#121110 on #F0F2F4]{}".format(random.choice(myWords)),
style="#121110 on #F0F2F4",
justify="center",
)
# prt(f"{_('LangChd')}{_(':')}{_(currentLang)}")
def format_ipt(
notice: str,
fun,
err_note: str = "输入内容有误,请重新输入。",
*extraArg,
):
"""循环输入,以某种格式
notice: 输入时的提示
fun: 格式函数
err_note: 输入不符格式时的提示
*extraArg: 对于函数的其他参数"""
while True:
result = ipt(notice)
try:
fun_result = fun(result, *extraArg)
break
except ValueError:
prt(err_note)
continue
return result, fun_result
# 获取midi列表
while True:
midi_path = ipt(f"MIDI地址或所在目录地址")
try:
if os.path.exists(midi_path):
if os.path.isfile(midi_path):
midis = (midi_path,)
elif os.path.isdir(midi_path):
midis = (
os.path.join(midi_path, i)
for i in os.listdir(midi_path)
if i.lower().endswith(".mid") or i.lower().endswith(".midi")
)
else:
prt("输入内容有误,请重新输入。")
continue
else:
prt("该地址不存在,或无法访问该地址,请重新输入。")
continue
except PermissionError:
prt("无法访问该地址,请检查是否给予程序相关文件的访问权限。")
continue
break
# 获取输出地址
while True:
out_path = ipt(f"文件生成输出地址:")
try:
if not os.path.exists(out_path):
prt("该地址不存在,或无法访问该地址,请重新输入。")
continue
except PermissionError:
prt("无法访问该地址,请检查是否给予程序相关文件的访问权限。")
continue
break
# 选择输出格式
def is_in_bdx_mcpack(sth: str):
return isin(
sth,
{
1: ("bdx", "1", "币帝查", "币帝·艾克斯", "", ""),
0: ("mcpack", "0", "唉姆西·派克", "", ""),
2: ("MCSTRUCTURE", "2", "", "麦块结构", "MC结构", "", "我的世界结构"),
},
)
def is_in_player(sth: str, in_ok: tuple):
return isin(
sth,
dict(
[
(i, v)
for i, v in [
0,
("delay", "0", "延迟", "帝蕾"),
1,
("score", "1", "计分板", "积分", "积分板", "计分", "斯阔尔"),
2,
("repeater", "2", "中继器", "瑞皮特"),
]
if i in in_ok
]
),
)
output_file_format = format_ipt(
"输出文件类型 (mcpack/0|bdx/1)",
is_in_bdx_mcpack,
"输入内容有误,请重新输入。",
)[1]
if output_file_format == 0:
player_format = format_ipt(
"播放器类型 (延迟/0|计分板/1|中继器/2)",
is_in_player,
"输入内容有误,请重新输入。",
)[1]
elif output_file_format == 1:
player_format = format_ipt(
"播放器类型 (延迟/0|计分板/1)",
lambda a: is_in_player(a, (0, 1)),
"输入内容有误,请重新输入。",
)[1]
else:
player_format = format_ipt(
"播放器类型 (延迟/0|中继器/2)",
lambda a: is_in_player(a, (0, 2)),
"输入内容有误,请重新输入。",
)[1]
old_exe_enabled = not format_ipt(
"启用新版代执行指令 (否/0|是/1)",
bool_str,
"输入内容格式错误,应为 是/1/真/t/y 或 否/0/假/f/n",
)[1]
if os.path.exists("./demo_config.json"):
import json
prompts = json.load(open("./demo_config.json", "r", encoding="utf-8"))
prompts = prompts[:-1]
else:
prompts = []
# 提示语 检测函数 错误提示语
for args in [
(
"音量大小 (0,1]",
float_str,
),
(
"速度倍率 (0,+∞)",
float_str,
),
(
"自动生成进度条 (否/0|是/1)",
bool_str,
),
(
(
"计分板名称:",
str,
)
if player_format == 1
else (
"受播放玩家的选择器:",
str,
)
),
(
(
"自动重置计分板 (否/0|是/1)",
bool_str,
)
if player_format == 1
else ()
),
(
(
"BDX作者署名",
str,
)
if output_file_format == 1
else (
(
"结构延展方向x+|z+|x-|z-",
lambda a: isin(
a,
{
"z+": ["z+", "Z+"],
"x+": ["X+", "x+"],
"z-": ["Z-", "z-"],
"x-": ["x-", "X-"],
},
),
)
if (player_format == 2 and output_file_format == 2)
else ()
)
),
(
(
"结构生成最大高度 (0,+∞)",
int_str,
)
if player_format == 0
else (
(
"基础空白方块concrete",
str,
)
if (player_format == 2 and output_file_format == 2)
else ()
)
),
]:
if args:
prompts.append(
format_ipt(
*args, err_note="输入内容格式错误,应符合 {}".format(args[1])
)[1]
)
if prompts[2]:
costom_pgb_enabled = format_ipt(
"自定义进度条样式 (否/0|是/1)",
bool_str,
"输入内容格式错误,应为 是/1/真/t/y 或 否/0/假/f/n",
)[1]
if costom_pgb_enabled:
style = ipt("基本样式组 (回车默认)")
if not style:
style = DEFAULT_PROGRESSBAR_STYLE[0]
yet_part = ipt("未播放样式 (回车默认)")
if not yet_part:
yet_part = DEFAULT_PROGRESSBAR_STYLE[1][1]
done_part = ipt("已播放样式 (回车默认)")
if not done_part:
done_part = DEFAULT_PROGRESSBAR_STYLE[1][0]
if output_file_format == 0:
if player_format == 1:
cvt_method = to_addon_pack_in_score
elif player_format == 0:
cvt_method = to_addon_pack_in_delay
elif player_format == 2:
cvt_method = to_addon_pack_in_repeater
elif output_file_format == 2:
# if player_format == 1:
# cvt_method = to_mcstructure_file_in_score
if player_format == 0:
cvt_method = to_mcstructure_file_in_delay
elif player_format == 2:
cvt_method = to_mcstructure_file_in_repeater
for singleMidi in midis:
prt("\n" f"正在处理 {singleMidi}")
cvt_mid = Musicreater.MidiConvert.from_midi_file(
singleMidi, old_exe_format=old_exe_enabled
)
cvt_cfg = ConvertConfig(
out_path,
*prompts[:2],
progressbar=(
((style, (done_part, yet_part)) if costom_pgb_enabled else True) # type: ignore
if prompts[2]
else False
),
)
conversion_result = (
(cvt_method(cvt_mid, cvt_cfg, *prompts[3:])) # type: ignore
if output_file_format == 0
else (
(
to_BDX_file_in_score(cvt_mid, cvt_cfg, *prompts[3:])
if player_format == 1
else to_BDX_file_in_delay(cvt_mid, cvt_cfg, *prompts[3:])
)
if output_file_format == 1
else (cvt_method(cvt_mid, cvt_cfg, *prompts[3:])) # type: ignore
)
)
prt(
f" 结构大小:{conversion_result[0]},播放刻数:{conversion_result[1]}"
if output_file_format == 2
else f" 指令总长:{conversion_result[0]},播放刻数:{conversion_result[1]}{f''',结构大小:{conversion_result[2]},末点坐标:{conversion_result[3]}''' if output_file_format == 1 else ''}" # type: ignore
)
exitSth = ipt("结束。换行以退出程序。")
if exitSth == "record":
import json
with open("./demo_config.json", "w", encoding="utf-8") as f:
json.dump(prompts, f)
elif exitSth == "delrec":
os.remove("./demo_config.json")

View File

@ -1,225 +0,0 @@
# -*- coding: utf-8 -*-
# 伶伦 开发交流群 861684859
"""
伶伦转换器暨模组特用奇巧
Linglun Converter for Special Use with addons
版权所有 © 2024 金羿 & 睿乐开发组
Copyright © 2024 EillesWan & TriM Org.
开源相关声明请见 ./License.md
Terms & Conditions: ./Lisense.md
"""
__version__ = "0.0.1"
import json
import os
import sys
from rich.table import Table
import Musicreater
from Musicreater.constants import MIDI_PITCH_NAME_TABLE, PERCUSSION_INSTRUMENT_LIST
from utils.io import *
osc.project_name = "伶伦暨模组特用奇巧"
osc.version = __version__
if len(sys.argv) > 0:
def go_for_args(debugMode: str = "False", logfile: str = "True"):
global logger
osc.isRelease = False if debugMode.lower() in ("true", "1") else True
logger.printing = not osc.isRelease
logger.writing = True if logfile.lower() in ("true", "1") else False
go_for_args(*sys.argv)
# 显示大标题
MainConsole.print(
"[#121110 on #F0F2F4] ",
style="#121110 on #F0F2F4",
justify="center",
)
MainConsole.rule(
title="[bold #AB70FF]欢迎使用{}".format(osc.project_name),
characters="=",
style="#26E2FF",
)
# MainConsole.rule(title="[bold #AB70FF]Welcome to Linglun Converter", characters="-")
MainConsole.rule(
title="[#AB70FF]版本{} | 音·创内核版本{}".format(__version__, Musicreater.__version__),
characters="-",
style="#26E2FF",
)
MainConsole.print(
"[#121110 on #F0F2F4] ",
style="#121110 on #F0F2F4",
justify="center",
)
# 获取midi列表
while True:
midi_path = ipt(f"MIDI地址或所在目录地址")
try:
if os.path.exists(midi_path):
if os.path.isfile(midi_path):
midis = (midi_path,)
elif os.path.isdir(midi_path):
midis = (
os.path.join(midi_path, i)
for i in os.listdir(midi_path)
if i.lower().endswith(".mid") or i.lower().endswith(".midi")
)
else:
prt("输入内容有误,请重新输入。")
continue
else:
prt("该地址不存在,或无法访问该地址,请重新输入。")
continue
except PermissionError:
prt("无法访问该地址,请检查是否给予程序相关文件的访问权限。")
continue
break
# percussion_only = format_ipt(
# "仅处理打击乐器 (否/0|是/1)", bool_str, "输入内容格式错误,应为 是/1/真/t/y 或 否/0/假/f/n"
# )[1]
speed: float = format_ipt("播放速度", float_str, "错误,需要浮点型数据;请重新输入。")[1]
final_result: Dict[str, Dict[int, List[Tuple[str, int, str]]]] = {}
for single_midi in midis:
fn = os.path.splitext(os.path.split(single_midi)[-1])[0]
midi_cvt = Musicreater.MidiConvert.from_midi_file(
single_midi,
)
midi_cvt.to_music_channels()
max_delay = 0
instrument_ID = -1
total_track = {}
instriments = {}
# 此处 我们把通道视为音轨
for i in midi_cvt.channels.keys():
# 如果当前通道为空 则跳过
if not midi_cvt.channels[i]:
continue
# 第十通道是打击乐通道
SpecialBits = True if i == 9 else False
for track_no, track in midi_cvt.channels[i].items():
for msg in track:
if msg[0] == "PgmC":
instrument_ID = msg[1]
if msg[0] == "NoteS":
soundID, _X = (
midi_cvt.perc_inst_to_soundID_withX(msg[1])
if SpecialBits
else midi_cvt.inst_to_souldID_withX(instrument_ID)
)
score_now = round(msg[-1] / float(speed) / 50)
max_delay = max(max_delay, score_now)
mc_pitch = "" if SpecialBits else 2 ** ((msg[1] - 60 - _X) / 12)
try:
total_track[score_now].append(
(MIDI_PITCH_NAME_TABLE[msg[1]], mc_pitch, soundID),
)
except (IndexError, KeyError):
total_track[score_now] = [
(MIDI_PITCH_NAME_TABLE[msg[1]], mc_pitch, soundID),
]
try:
instriments[soundID] += 1
except (IndexError, KeyError):
instriments[soundID] = 1
del midi_cvt
table = Table(
*instriments.keys(),
title="[bold #AB70FF on #121110]{} 乐器统计".format(fn),
title_style="#26E2FF on #121110",
)
table.add_row(*[str(i) for i in instriments.values()])
MainConsole.print(
"[bold #8B50DF on #F0F2F4]-={}=-".format(fn),
style="#AB70FF on #F0F2F4",
justify="center",
)
prt(table)
inst_selected: Set[str] = format_ipt(
"""请选择需要保留的乐器;以空格作分割;以 percussion 表示全部打击乐器|以 pitched 表示全部乐音乐器|以 all 表示所有乐器\n""",
lambda x: set(
[
i.lower()
for i in x.split(" ")
if isin(
i,
{
True: (
list(instriments.keys()) + ["all", "pitched", "percussion"]
)
},
)
]
),
"输入错误,需要在已有的乐器范围之内。",
strict_mode=True,
)[1]
if "all" in inst_selected:
inst_selected.remove("all")
for i in instriments.keys():
inst_selected.add(i)
if "percussion" in inst_selected:
inst_selected.remove("percussion")
for i in instriments.keys():
if i in PERCUSSION_INSTRUMENT_LIST:
inst_selected.add(i)
if "pitched" in inst_selected:
inst_selected.remove("pitched")
for i in instriments.keys():
if i not in PERCUSSION_INSTRUMENT_LIST:
inst_selected.add(i)
result_piece = []
for i, ele in total_track.items():
this_ele = [k for k in ele if k[-1] in inst_selected]
if this_ele:
result_piece.append((i, this_ele))
result_piece.sort(key=lambda x: x[0])
final_result[fn] = {}
for ind, ele in result_piece:
final_result[fn][ind - result_piece[0][0]] = ele
with open("result.json", "w", encoding="utf-8") as f:
json.dump(
final_result,
f,
ensure_ascii=False,
indent=3,
sort_keys=True,
)

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +0,0 @@
Musicreater>=1.7.2.1
TrimLog>=0.8.3
requests>=2.0.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 535 KiB

View File

@ -1,2 +0,0 @@
chcp 65001
wt.exe -w LLC_CLI new-tab --title 伶伦转换器命令行 cmd /k "py" ".\llc_cli.py"

View File

View File

@ -1,268 +0,0 @@
# -*- coding: utf-8 -*-
"""
伶伦转换器 命令行组件
Linglun Converter Command Line IO Component
版权所有 © 2024 金羿 & 睿乐开发组
Copyright © 2024 EillesWan & TriM Org.
开源相关声明请见 ./License.md
Terms & Conditions: ./Lisense.md
"""
import requests
from typing import (
Any,
Callable,
Dict,
List,
Literal,
Optional,
Set,
TextIO,
Tuple,
Iterable,
Sequence,
Union,
)
import TrimLog
from TrimLog import object_constants, logger, log__init__
logger.is_logging = True
logger.suffix = ".llc"
logger.is_tips = True
logger.info("读取 言·论 信息……")
try:
myWords = (
requests.get(
"https://gitee.com/TriM-Organization/LinglunStudio/raw/master/resources/myWords.txt",
).text
.strip("\n")
.split("\n")
)
except (ConnectionError, requests.HTTPError, requests.RequestException) as E:
logger.warning(f"读取言·论信息发生 互联网连接 错误:\n{E}")
myWords = ["以梦想为驱使 创造属于自己的未来"]
# noinspection PyBroadException
except BaseException as E:
logger.warning(f"读取言·论信息发生 未知 错误:\n{E}")
myWords = ["灵光焕发 深艺献心"]
logger.info("注册出入方法……")
JustifyMethod = Literal["default", "left", "center", "right", "full"]
OverflowMethod = Literal["fold", "crop", "ellipsis", "ignore"]
# 高级的打印函数
def prt(
*objects: Any,
sep: str = " ",
end: str = "\n",
justify: Optional[JustifyMethod] = None,
overflow: Optional[OverflowMethod] = None,
no_wrap: Optional[bool] = None,
emoji: Optional[bool] = None,
markup: Optional[bool] = None,
highlight: Optional[bool] = None,
width: Optional[int] = None,
height: Optional[int] = None,
crop: bool = True,
soft_wrap: Optional[bool] = None,
new_line_start: bool = False,
) -> None:
"""打印到控制台。
Args:
objects (位置性的args): 要记录到终端的对象
sep (str, 可选): 要在打印数据之间写入的字符串默认为""
end (str, optio可选nal): 在打印数据结束时写入的字符串默认值为"\\\\n"
justify (str, 可选): 校正位置可为"default", "left", "right", "center" "full". 默认为`None`
overflow (str, 可选): 控制溢出"ignore"忽略, "crop"裁剪, "fold"折叠, "ellipsis"省略号默认为`None`
no_wrap (Optional[bool], 可选): 禁用文字包装默认为`None`
emoji (Optional[bool], 可选): 启用表情符号代码或使用控制台默认的`None`默认为`None`
markup (Optional[bool], 可选): 启用标记`None`使用控制台默认值默认为`None`
highlight (Optional[bool], 可选): 启用自动高亮`None`使用控制台默认值默认为`None`
width (Optional[int], 可选): 输出的宽度`None`自动检测默认为`None`
height
crop (Optional[bool], 可选): 裁剪输出到终端的宽度默认为`True`
soft_wrap (bool, 可选): 启用软包装模式禁止文字包装和裁剪`None``用于 控制台默认值默认为`None`
new_line_start (bool, False): 如果输出包含多行在开始时插入一个新行默认值为`False`
"""
logger.console.print(
*objects,
sep=sep,
end=end,
style="#F0F2F4 on #121110",
justify=justify,
overflow=overflow,
no_wrap=no_wrap,
emoji=emoji,
markup=markup,
highlight=highlight,
width=width,
height=height,
crop=crop,
soft_wrap=soft_wrap,
new_line_start=new_line_start,
)
# 高级的输入函数
def ipt(
*objects: Any,
sep: str = " ",
justify: Optional[JustifyMethod] = None,
overflow: Optional[OverflowMethod] = None,
no_wrap: Optional[bool] = None,
emoji: Optional[bool] = None,
markup: Optional[bool] = None,
highlight: Optional[bool] = None,
width: Optional[int] = None,
height: Optional[int] = None,
crop: bool = True,
soft_wrap: Optional[bool] = None,
new_line_start: bool = False,
password: bool = False,
stream: Optional[TextIO] = None,
) -> str:
"""显示一个提示并等待用户的输入。
它的工作方式与Python内建的 :func:`input` 函数相同如果Python内建的 :mod:`readline` 模块先前已经加载则提供详细的行编辑和历史功能
Args:
objects (位置性的args): 要记录到终端的对象
sep (str, 可选): 要在打印数据之间写入的字符串默认为""
justify (str, 可选): 校正位置可为"default", "left", "right", "center" "full". 默认为`None`
overflow (str, 可选): 控制溢出"ignore"忽略, "crop"裁剪, "fold"折叠, "ellipsis"省略号默认为`None`
no_wrap (Optional[bool], 可选): 禁用文字包装默认为`None`
emoji (Optional[bool], 可选): 启用表情符号代码或使用控制台默认的`None`默认为`None`
markup (Optional[bool], 可选): 启用标记`None`使用控制台默认值默认为`None`
highlight (Optional[bool], 可选): 启用自动高亮`None`使用控制台默认值默认为`None`
width (Optional[int], 可选): 输出的宽度`None`自动检测默认为`None`
crop (Optional[bool], 可选): 裁剪输出到终端的宽度默认为`True`
height
soft_wrap (bool, 可选): 启用软包装模式禁止文字包装和裁剪`None``用于 控制台默认值默认为`None`
new_line_start (bool, False): 如果输出包含多行在开始时插入一个新行默认值为`False`
password (bool, 可选): 隐藏已经输入的文案默认值为`False`
stream (TextIO, 可选): 可选从文件中读取而非控制台默认为 `None`
Returns:
str: 从stdin读取的字符串
"""
logger.console.print(
*objects,
sep=sep,
end="",
style="#F0F2F4 on #121110",
justify=justify,
overflow=overflow,
no_wrap=no_wrap,
emoji=emoji,
markup=markup,
highlight=highlight,
width=width,
height=height,
crop=crop,
soft_wrap=soft_wrap,
new_line_start=new_line_start,
)
return logger.console.input(password=password, stream=stream)
def format_ipt(
notice: str,
fun: Callable,
err_note: str = "{}",
strict_mode: bool = False,
*extraArg,
) -> Tuple[str, Any]:
"""循环输入,以某种格式
notice: 输入时的提示
fun: 格式函数
err_note: 输入不符格式时的提示
strict_mode: 是否将函数值作为结束循环的判断依据之一
*extraArg: 对于函数的其他参数"""
while True:
result = ipt(notice)
try:
if strict_mode:
if fun_result := fun(result, *extraArg):
break
else:
fun_result = fun(result, *extraArg)
break
except ValueError as E:
prt(err_note.format(E))
continue
return result, fun_result
def isin(sth: str, range_list: dict):
sth = sth.lower()
for bool_value, res_list in range_list.items():
if sth in res_list:
return bool_value
raise ValueError(
"不在可选范围内:{}".format([j for i in range_list.values() for j in i])
)
# 真假字符串判断
def bool_str(sth: str):
try:
return bool(float(sth))
except ValueError:
if str(sth).lower() in ("true", "", "", "y", "t"):
return True
elif str(sth).lower() in ("false", "", "", "f", "n"):
return False
else:
raise ValueError("非法逻辑字串")
def float_str(sth: str):
try:
return float(sth)
except ValueError:
return float(
sth.replace("", "1")
.replace("", "2")
.replace("", "3")
.replace("", "4")
.replace("", "5")
.replace("", "6")
.replace("", "7")
.replace("", "8")
.replace("", "9")
.replace("", "0")
.replace("", "1")
.replace("", "2")
.replace("", "3")
.replace("", "4")
.replace("", "5")
.replace("", "6")
.replace("", "7")
.replace("", "8")
.replace("", "9")
.replace("", "0")
.replace("", "0")
.replace("", "1")
.replace("", "2")
.replace("", "2")
.replace("", "7")
.replace("", ".")
)
def int_str(sth: str):
return int(float_str(sth))

View File

@ -1,29 +0,0 @@
# -*- coding: utf-8 -*-
"""
伶伦转换器 本地化组件
Linglun Converter Language Localization Component
版权所有 © 2024 金羿 & 睿乐开发组
Copyright © 2024 EillesWan & TriM Org.
开源相关声明请见 ./License.md
Terms & Conditions: ./Lisense.md
"""
from .io import logger, Any
def _() -> str:
return ""
def main():
pass
if __name__ == "__main__":
main()

View File

@ -1,120 +0,0 @@
# -*- coding: utf-8 -*-
"""
伶伦转换器 打包存档组件
Linglun Converter Language Localization Component
版权所有 © 2024 金羿 & 睿乐开发组
Copyright © 2024 EillesWan & TriM Org.
开源相关声明请见 ./License.md
Terms & Conditions: ./Lisense.md
"""
import hashlib
import dill
import brotli
from .salt import salt
from .io import Any
def unpack_llc_pack(from_dist: str, raise_error: bool = True):
with open(from_dist, "rb") as f:
salty_sha256_value, md5_value, packed_bytes = f.read().split(b" | \n", 2)
if (md5_value == hashlib.md5(packed_bytes).digest()) and (
salty_sha256_value
== hashlib.pbkdf2_hmac("sha256", md5_value + packed_bytes, salt, 16)
):
return dill.loads(
brotli.decompress(packed_bytes),
)
else:
if raise_error:
raise ValueError("文件读取失败:签名不一致,可能存在注入风险。")
else:
return ValueError("文件读取失败:签名不一致,可能存在注入风险。")
def enpack_llc_pack(sth: Any, to_dist: str):
packing_bytes = brotli.compress(
dill.dumps(
sth,
)
)
md5_value = hashlib.md5(packing_bytes).digest() # 长度 16
salty_sha256_value = hashlib.pbkdf2_hmac(
"sha256", md5_value + packing_bytes, salt, 16
) # 长度 32
with open(
to_dist,
"wb",
) as f:
f.write(salty_sha256_value)
f.write(b" | \n")
f.write(md5_value)
f.write(b" | \n")
f.write(packing_bytes)
def enpack_msct_pack(sth, to_dist: str):
packing_bytes = brotli.compress(
dill.dumps(
sth,
)
)
with open(
to_dist,
"wb",
) as f:
f.write(packing_bytes)
return hashlib.sha256(packing_bytes)
def unpack_msct_pack(from_dist: str, hash_value: str, raise_error: bool = True):
with open(from_dist, "rb") as f:
packed_data = f.read()
now_hash = hashlib.sha256(packed_data).hexdigest()
if now_hash == hash_value:
return dill.loads(brotli.decompress(packed_data))
else:
if raise_error:
raise ValueError(
"文件读取失败:\n传入:{}\n需求:{}\n签名不一致,可能存在注入风险。".format(
now_hash, hash_value
)
)
else:
return ValueError(
"文件读取失败:\n传入:{}\n需求:{}\n签名不一致,可能存在注入风险。".format(
now_hash, hash_value
)
)
def load_msct_packed_data(
packed_data: bytes, hash_value: str, raise_error: bool = True
):
now_hash = hashlib.sha256(packed_data).hexdigest()
if now_hash == hash_value:
return dill.loads(brotli.decompress(packed_data))
else:
if raise_error:
raise ValueError(
"文件读取失败:\n传入:{}\n需求:{}\n签名不一致,可能存在注入风险。".format(
now_hash, hash_value
)
)
else:
return ValueError(
"文件读取失败:\n传入:{}\n需求:{}\n签名不一致,可能存在注入风险。".format(
now_hash, hash_value
)
)

View File

@ -1,158 +0,0 @@
# -*- coding: utf-8 -*-
"""
伶伦转换器 版本检查组件
Linglun Converter Version Checking Component
版权所有 © 2024 金羿 & 睿乐开发组
Copyright © 2024 EillesWan & TriM Org.
开源相关声明请见 ./License.md
Terms & Conditions: ./Lisense.md
"""
from .io import TrimLog, requests, Sequence, Iterable, Callable, Optional, Dict, Union
def is_ver_char(text: str) -> bool:
return text.isnumeric() or text == "."
def cut_ver_str(text: str) -> str:
text += " "
len_of_text = len(text) - 1
i = 0
while i <= len_of_text:
if is_ver_char(text[i]) and (text[i + 1] if i < len_of_text else False):
j = i
while is_ver_char(text[j]) and j < len_of_text:
j += 1
temp_str = text[i:j].strip()
if ("." in temp_str) and (temp_str[0] != ".") and (temp_str[-1] != "."):
return temp_str
i = j
i += 1
return ""
def get_ver_str(text: str) -> Iterable[str]:
text += " "
all_ver_str = []
len_of_text = len(text) - 1
i = 0
while i <= len_of_text:
if is_ver_char(text[i]) and (text[i + 1] if i < len_of_text else False):
j = i
while is_ver_char(text[j]) and j < len_of_text:
j += 1
temp_str = text[i:j].strip()
if ("." in temp_str) and (temp_str[0] != ".") and (temp_str[-1] != "."):
all_ver_str.append(temp_str)
i = j
i += 1
return all_ver_str
def is_ver_bigger(ver_1: Sequence[int], ver_2: Sequence[int]) -> bool:
len_v1 = len(ver_1)
len_v2 = len(ver_2)
for i in range(min(len_v1, len_v2)):
if ver_1[i] == ver_2[i]:
continue
else:
return ver_1[i] > ver_2[i]
return len_v1 > len_v2
def check_update_repo(
appname: str,
get_text_url: str,
version_now: str,
message_show_fun: Callable,
logger: TrimLog.Logger,
version_disp: Optional[str] = None,
version_renew_tip: str = "!有新版本!\n最新的 {app} 已经是 {latest} 版本,当前您正在使用的仍是 {current} 版本,您可以前往下载地址更新。",
):
if not version_disp:
version_disp = version_now
logger.info("当前 {} 版本:{}".format(appname,version_now))
try:
code_content: str = requests.get(get_text_url).text
except Exception as E: # noinspection PyBroadException
logger.warning("无法获取更新版本信息:{}".format(E))
return
code_content = code_content[code_content.find("__version__") :]
code_content = code_content[code_content.find('"') + 1 :]
version_content = code_content[: code_content.find('"')]
logger.info("已获取 {} 新版本信息:{}".format(appname,version_content))
if is_ver_bigger(
[int(v) for v in cut_ver_str(version_content).split(".")],
[int(v) for v in cut_ver_str(version_now).split(".")],
):
if "__zhver__" in code_content:
code_content = code_content[code_content.find("__zhver__") :]
code_content = code_content[code_content.find('"') + 1 :]
version_content = code_content[: code_content.find('"')]
message_show_fun(
version_renew_tip.format(
app=appname, latest=version_content, current=version_disp
)
)
# code_content = code_content[code_content.find('"')+1:]
# version_content = code_content[:code_content.find('"')]
# version_content_len = len(version_content)
# for i in range(version_content_len):
# if is_ver_char(version_content[i]) and (version_content[i+1] if i < version_content.__len__() else False):
# j = i
# while is_ver_char(version_content[j]):j+=1
# return version_content[i:j]
# "".join([version_content[i] for i in range(version_content.__len__()) if is_ver_char(version_content[i]) and ((version_content[i-1] if i > 0 else False) or (version_content[i+1] if i < version_content.__len__() else False))]).split('.')
def check_update_release(
appname: str,
get_release_url: str,
version_now: str,
notice_fun: Callable[[str, str], bool],
logger: TrimLog.Logger,
version_renew_tip: str = "!有新版本!\n最新的 {app} 已经是 {latest} 版本,当前您正在使用的仍是 {current} 版本,是否更新?",
) -> Union[None, Dict[str, str]]:
logger.info("当前 {} 版本:{}".format(appname,version_now))
try:
code_content: Dict = requests.get(get_release_url).json()
except Exception as E: # noinspection PyBroadException
logger.warning("无法获取更新版本信息:{}".format(E))
return
version_content = code_content["release"]["tag"]["name"]
logger.info("已获取 {} 新版本信息:{}".format(appname,version_content))
if is_ver_bigger(
[int(v) for v in cut_ver_str(version_content).split(".")],
[int(v) for v in cut_ver_str(version_now).split(".")],
):
if notice_fun(
version_renew_tip.format(
app=appname, latest=version_content, current=version_now
),
code_content["release"]["release"]["description"],
):
return dict(
[
(d["name"], d["download_url"])
for d in code_content["release"]["release"]["attach_files"]
]
)

View File

@ -1,147 +0,0 @@
import wx
import wx.html
class HTMLFrame(wx.Frame):
"""桌面程序主窗口类"""
def __init__(
self,
parent,
tip_text,
web_text,
window_title: str = "新版本已发布",
bg_colour: tuple = (0, 0, 0),
window_size: tuple = (800, 480),
):
"""构造函数"""
wx.Frame.__init__(
self,
parent,
id=wx.ID_ANY,
title=window_title,
pos=wx.DefaultPosition,
size=window_size,
style=wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL,
)
# self.SetIcon(wx.Icon('', wx.BITMAP_TYPE_ICO))
self.SetBackgroundColour(bg_colour)
self.Center()
self.SetSizeHints(wx.DefaultSize, wx.DefaultSize)
bSizer1 = wx.BoxSizer(wx.VERTICAL)
self.m_staticText1 = wx.StaticText(
self,
wx.ID_ANY,
tip_text,
wx.DefaultPosition,
wx.DefaultSize,
wx.ALIGN_CENTER_HORIZONTAL,
)
self.m_staticText1.Wrap(-1)
self.m_staticText1.SetFont(
wx.Font(
wx.NORMAL_FONT.GetPointSize() * 2,
wx.FONTFAMILY_DEFAULT,
wx.FONTSTYLE_NORMAL,
wx.FONTWEIGHT_NORMAL,
False,
"OPPOSans M",
)
)
bSizer1.Add(self.m_staticText1, 3, wx.ALL | wx.ALIGN_CENTER_HORIZONTAL, 5)
self.m_htmlWin1 = wx.html.HtmlWindow(
self,
wx.ID_ANY,
wx.DefaultPosition,
wx.DefaultSize,
wx.html.HW_SCROLLBAR_AUTO,
)
self.m_htmlWin1.SetFont(
wx.Font(
wx.NORMAL_FONT.GetPointSize(),
wx.FONTFAMILY_DEFAULT,
wx.FONTSTYLE_NORMAL,
wx.FONTWEIGHT_NORMAL,
False,
"OPPOSans R",
)
)
self.m_htmlWin1.SetStandardFonts(normal_face="OPPOSans R")
bSizer1.Add(self.m_htmlWin1, 5, wx.EXPAND | wx.RESERVE_SPACE_EVEN_IF_HIDDEN, 5)
bSizer2 = wx.BoxSizer(wx.HORIZONTAL)
self.m_button1 = wx.Button(
self, wx.ID_ANY, "取消", wx.DefaultPosition, wx.DefaultSize, 0
)
bSizer2.Add(self.m_button1, 0, wx.ALL, 5)
self.m_button2 = wx.Button(
self, wx.ID_ANY, "更新", wx.DefaultPosition, wx.DefaultSize, 0
)
bSizer2.Add(self.m_button2, 0, wx.ALL, 5)
bSizer1.Add(bSizer2, 0, wx.ALIGN_RIGHT, 5)
self.SetSizer(bSizer1)
self.Layout()
self.Centre(wx.BOTH)
self.m_htmlWin1.SetPage(web_text)
# Connect Events
self.m_button1.Bind(wx.EVT_BUTTON, self.on_Cancel_Click)
self.m_button2.Bind(wx.EVT_BUTTON, self.on_Update_Click)
self.ok = False
def __del__(self):
# return self.ok
pass
def getok(self) -> bool:
return self.ok
# Virtual event handlers, override them in your derived class
def on_Cancel_Click(self, event):
self.ok = False
self.Destroy()
def on_Update_Click(self, event):
self.ok = True
self.Destroy()
def go_update_tip(tip_text: str, html_context: str) -> bool:
app = wx.App()
frame = HTMLFrame(
None,
tip_text,
html_context,
bg_colour=wx.SystemSettings.GetColour(wx.SYS_COLOUR_MENU),
)
frame.Show()
app.MainLoop()
return frame.getok()
if __name__ == "__main__":
go_update_tip(
"!有新版本!\n最新的 {app} 已经是 {latest} 版本,当前您正在使用的仍是 {current} 版本,是否更新?",
'<ol>\n<li>\n<strong>[修复]</strong> 完成<ahref="https://gitee.com/TriM-Organization/Linglun-Converter/issues/I8YN22" rel="nofollow noreferrer noopener"target="_blank">#I8YN22</a>问题的修复,解决转换错误的问题</li>\n<li>\n<strong>[新增]</strong>支持选择自定的乐器对照表</li>\n<li>\n<strong>[新增]</strong>支持自选距离音量算法</li>\n<li>\n<strong>[新增]</strong>使用Packer以打包发行版详情如下方说明</li>\n<li>\n<strong>[优化]</strong>提高调用效率,优化代码结构</li>\n<li>\n<strong>[优化]</strong>提升部分注释可读性</li>\n</ol>\n',
)
go_update_tip(
"!有新版本!\n最新的 音·创 已经是 1.7.3 版本,当前您正在使用的仍是 1.7.0 版本,是否更新?",
'<ol>\n<li>\n<strong>[修复]</strong> 完成<a href="https://gitee.com/TriM-Organization/Linglun-Converter/issues/I8YN22" rel="nofollow noreferrer noopener" target="_blank">#I8YN22</a>问题的修复,解决转换错误的问题</li>\n<li>\n<strong>[新增]</strong> 支持选择自定的乐器对照表</li>\n<li>\n<strong>[新增]</strong> 支持自选距离音量算法</li>\n<li>\n<strong>[新增]</strong> 使用Packer以打包发行版详情如下方说明</li>\n<li>\n<strong>[优化]</strong> 提高调用效率,优 化代码结构</li>\n<li>\n<strong>[优化]</strong> 提升部分注释可读性</li>\n</ol>\n<h2>打包文件结构</h2>\n<p>我们使用Python库 <code>dill</code> 和 <code>Brotli</code> 对整个库的包体进行打包,方式如下:</p>\n<div class="markdown-code-block">\n<pre lang="python" class="python"><code>packing_bytes = brotli.compress(dill.dumps(sth,))\n</code></pre>\n<div class="markdown-code-block-copy-btn"></div>\n</div>\n<p>每个包中的内容为:</p>\n<div class="markdown-code-block">\n<pre lang="python" class="python"><code>MSCT_MAIN = (\n Musicreater,\n Musicreater.experiment,\n Musicreater.previous,\n)\n\nMSCT_PLUGIN = (Musicreater.plugin,)\n\nMSCT_PLUGIN_FUNCTION = (\n to_addon_pack_in_delay,\n to_addon_pack_in_repeater,\n to_addon_pack_in_score,\n to_mcstructure_file_in_delay,\n to_mcstructure_file_in_repeater,\n to_mcstructure_file_in_score,\n to_BDX_file_in_delay,\n to_BDX_file_in_score,\n)\n</code></pre>\n<div class="markdown-code-block-copy-btn"></div>\n</div>',
)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,352 +0,0 @@
# -*- coding: utf-8 -*-
###########################################################################
## Python code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
## http://www.wxformbuilder.org/
##
## PLEASE DO *NOT* EDIT THIS FILE!
###########################################################################
import wx
import wx.xrc
###########################################################################
## Class LingLunMainFrame
###########################################################################
class LingLunMainFrame ( wx.Frame ):
def __init__( self, parent ):
wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = wx.EmptyString, pos = wx.DefaultPosition, size = wx.Size( 659,778 ), style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL, name = u"LingLunConverter" )
self.SetSizeHints( wx.DefaultSize, wx.DefaultSize )
self.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
self.SetForegroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOWTEXT ) )
self.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOW ) )
self.m_statusBar2 = self.CreateStatusBar( 1, wx.STB_SIZEGRIP, wx.ID_ANY )
self.m_menubar1 = wx.MenuBar( 0 )
self.FileMenu = wx.Menu()
self.m_Exit_menuItem1 = wx.MenuItem( self.FileMenu, wx.ID_ANY, u"退出", u"这是退出按钮", wx.ITEM_NORMAL )
self.FileMenu.Append( self.m_Exit_menuItem1 )
self.m_menubar1.Append( self.FileMenu, u"文件" )
self.SetMenuBar( self.m_menubar1 )
m_mainBoxSizer = wx.BoxSizer( wx.VERTICAL )
s_yanLunbarSizer = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"言·论" ), wx.VERTICAL )
self.m_LinglunWords_staticText1 = wx.StaticText( s_yanLunbarSizer.GetStaticBox(), wx.ID_ANY, u"灵光焕发 深艺献心", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTER_HORIZONTAL|wx.ST_ELLIPSIZE_MIDDLE|wx.ST_NO_AUTORESIZE )
self.m_LinglunWords_staticText1.Wrap( -1 )
self.m_LinglunWords_staticText1.SetFont( wx.Font( 12, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans B" ) )
self.m_LinglunWords_staticText1.SetForegroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_HIGHLIGHTTEXT ) )
self.m_LinglunWords_staticText1.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOWTEXT ) )
s_yanLunbarSizer.Add( self.m_LinglunWords_staticText1, 0, wx.EXPAND, 5 )
m_mainBoxSizer.Add( s_yanLunbarSizer, 1, wx.ALL|wx.EXPAND|wx.RESERVE_SPACE_EVEN_IF_HIDDEN|wx.TOP, 2 )
s_midiChooseSizer = wx.BoxSizer( wx.HORIZONTAL )
self.m_ChooseMidiTips_staticText3 = wx.StaticText( self, wx.ID_ANY, u"选择MIDI文件", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_ChooseMidiTips_staticText3.Wrap( -1 )
s_midiChooseSizer.Add( self.m_ChooseMidiTips_staticText3, 0, wx.ALL, 5 )
ss_MidiChooserSizer_bSizer9 = wx.BoxSizer( wx.VERTICAL )
self.m_ChooseMIDI_filePicker1 = wx.FilePickerCtrl( self, wx.ID_ANY, u"./", u"选择MIDI文件", u"MIDI 序列 (*.mid;*.midi)|*.mid;*.midi", wx.DefaultPosition, wx.DefaultSize, wx.FLP_DEFAULT_STYLE|wx.FLP_FILE_MUST_EXIST|wx.FLP_OPEN|wx.FLP_USE_TEXTCTRL )
ss_MidiChooserSizer_bSizer9.Add( self.m_ChooseMIDI_filePicker1, 0, wx.ALL|wx.EXPAND, 5 )
s_midiChooseSizer.Add( ss_MidiChooserSizer_bSizer9, 1, wx.EXPAND, 5 )
m_mainBoxSizer.Add( s_midiChooseSizer, 1, wx.EXPAND, 5 )
s_formatChooseSizer = wx.BoxSizer( wx.HORIZONTAL )
ss_outputFormatChooseSizer = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"选择输出格式" ), wx.VERTICAL )
m_outformatChoice_choice1Choices = [ u"附加包", u"BDX结构" ]
self.m_outformatChoice_choice1 = wx.Choice( ss_outputFormatChooseSizer.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_outformatChoice_choice1Choices, wx.CB_SORT )
self.m_outformatChoice_choice1.SetSelection( 0 )
ss_outputFormatChooseSizer.Add( self.m_outformatChoice_choice1, 0, wx.ALL|wx.EXPAND, 5 )
s_formatChooseSizer.Add( ss_outputFormatChooseSizer, 1, wx.ALL|wx.EXPAND, 5 )
ss_playerChooseSizer = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"选择播放器" ), wx.VERTICAL )
m_playerChoice_choice2Choices = [ u"计分板", u"延时", u"中继器" ]
self.m_playerChoice_choice2 = wx.Choice( ss_playerChooseSizer.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_playerChoice_choice2Choices, 0 )
self.m_playerChoice_choice2.SetSelection( 0 )
ss_playerChooseSizer.Add( self.m_playerChoice_choice2, 0, wx.ALL|wx.EXPAND, 5 )
s_formatChooseSizer.Add( ss_playerChooseSizer, 1, wx.ALL|wx.EXPAND, 5 )
m_mainBoxSizer.Add( s_formatChooseSizer, 1, wx.EXPAND, 5 )
s_promptSizer = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"转换参数" ), wx.VERTICAL )
ss_regularPromoptsEnteringSizer1 = wx.BoxSizer( wx.HORIZONTAL )
sss_VolumnPersentageEnteringSizer = wx.StaticBoxSizer( wx.StaticBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"音量大小" ), wx.HORIZONTAL )
self.m_volumn_slider = wx.Slider( sss_VolumnPersentageEnteringSizer.GetStaticBox(), wx.ID_ANY, 1000, 0, 1000, wx.DefaultPosition, wx.DefaultSize, wx.SL_HORIZONTAL )
sss_VolumnPersentageEnteringSizer.Add( self.m_volumn_slider, 0, wx.ALL, 5 )
self.m_volumn_spinCtrlDouble1 = wx.SpinCtrlDouble( sss_VolumnPersentageEnteringSizer.GetStaticBox(), wx.ID_ANY, u"100", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTER_HORIZONTAL|wx.SP_ARROW_KEYS|wx.TE_PROCESS_ENTER, 0, 100, 100.000000, 0.5 )
self.m_volumn_spinCtrlDouble1.SetDigits( 2 )
sss_VolumnPersentageEnteringSizer.Add( self.m_volumn_spinCtrlDouble1, 0, wx.ALL, 5 )
ss_regularPromoptsEnteringSizer1.Add( sss_VolumnPersentageEnteringSizer, 1, wx.ALL|wx.EXPAND, 5 )
sss_SpeedEnteringSizer = wx.StaticBoxSizer( wx.StaticBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"播放倍速" ), wx.HORIZONTAL )
self.m_speed_slider = wx.Slider( sss_SpeedEnteringSizer.GetStaticBox(), wx.ID_ANY, 50, 0, 100, wx.DefaultPosition, wx.DefaultSize, wx.SL_HORIZONTAL )
sss_SpeedEnteringSizer.Add( self.m_speed_slider, 0, wx.ALL, 5 )
self.m_speed_spinCtrlDouble = wx.SpinCtrlDouble( sss_SpeedEnteringSizer.GetStaticBox(), wx.ID_ANY, u"1", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTER_HORIZONTAL|wx.SP_ARROW_KEYS|wx.TE_PROCESS_ENTER, 0, 10, 1, 0.1 )
self.m_speed_spinCtrlDouble.SetDigits( 2 )
sss_SpeedEnteringSizer.Add( self.m_speed_spinCtrlDouble, 0, wx.ALL, 5 )
ss_regularPromoptsEnteringSizer1.Add( sss_SpeedEnteringSizer, 1, wx.ALL|wx.EXPAND, 5 )
s_promptSizer.Add( ss_regularPromoptsEnteringSizer1, 1, wx.EXPAND|wx.SHAPED, 5 )
ss_progressbarCheckingSizer = wx.StaticBoxSizer( wx.StaticBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"进度条" ), wx.HORIZONTAL )
self.m_progressBarEnablingCheckBox1 = wx.CheckBox( ss_progressbarCheckingSizer.GetStaticBox(), wx.ID_ANY, u"启用进度条", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_RIGHT )
self.m_progressBarEnablingCheckBox1.SetValue(True)
ss_progressbarCheckingSizer.Add( self.m_progressBarEnablingCheckBox1, 0, wx.ALL, 5 )
sss_customProgressBarSizer_wSizer6 = wx.WrapSizer( wx.HORIZONTAL, wx.WRAPSIZER_DEFAULT_FLAGS )
ssss_basicProgressStylePattle_sbSizer9 = wx.StaticBoxSizer( wx.StaticBox( ss_progressbarCheckingSizer.GetStaticBox(), wx.ID_ANY, u"基本样式组" ), wx.VERTICAL )
self.m_BasicProgressBarStyleEntering_textCtrl4 = wx.TextCtrl( ssss_basicProgressStylePattle_sbSizer9.GetStaticBox(), wx.ID_ANY, u"%%N [ %%s/%^s %%% __________ %%t|%^t ]", wx.DefaultPosition, wx.DefaultSize, wx.TE_LEFT|wx.TE_NO_VSCROLL|wx.TE_RICH )
ssss_basicProgressStylePattle_sbSizer9.Add( self.m_BasicProgressBarStyleEntering_textCtrl4, 0, wx.ALL|wx.EXPAND, 5 )
sss_customProgressBarSizer_wSizer6.Add( ssss_basicProgressStylePattle_sbSizer9, 1, wx.EXPAND, 5 )
ssss_UnplayedPartProgressbarPattle_sbSizer10 = wx.StaticBoxSizer( wx.StaticBox( ss_progressbarCheckingSizer.GetStaticBox(), wx.ID_ANY, u"未播放之样式" ), wx.VERTICAL )
self.m_unplayerProgressbarStyleEntering_textCtrl5 = wx.TextCtrl( ssss_UnplayedPartProgressbarPattle_sbSizer10.GetStaticBox(), wx.ID_ANY, u"§7=§r", wx.DefaultPosition, wx.DefaultSize, wx.TE_LEFT|wx.TE_NO_VSCROLL )
ssss_UnplayedPartProgressbarPattle_sbSizer10.Add( self.m_unplayerProgressbarStyleEntering_textCtrl5, 0, wx.ALL, 5 )
sss_customProgressBarSizer_wSizer6.Add( ssss_UnplayedPartProgressbarPattle_sbSizer10, 1, wx.EXPAND, 5 )
ssss_PlayedPartProgressbarPattle_sbSizer11 = wx.StaticBoxSizer( wx.StaticBox( ss_progressbarCheckingSizer.GetStaticBox(), wx.ID_ANY, u"已播放之样式" ), wx.VERTICAL )
self.m_playerProgressbarStyleEntering_textCtrl5 = wx.TextCtrl( ssss_PlayedPartProgressbarPattle_sbSizer11.GetStaticBox(), wx.ID_ANY, u"§e=§r", wx.DefaultPosition, wx.DefaultSize, wx.TE_LEFT|wx.TE_NO_VSCROLL )
ssss_PlayedPartProgressbarPattle_sbSizer11.Add( self.m_playerProgressbarStyleEntering_textCtrl5, 0, wx.ALL, 5 )
sss_customProgressBarSizer_wSizer6.Add( ssss_PlayedPartProgressbarPattle_sbSizer11, 1, wx.EXPAND, 5 )
ss_progressbarCheckingSizer.Add( sss_customProgressBarSizer_wSizer6, 1, wx.EXPAND, 5 )
s_promptSizer.Add( ss_progressbarCheckingSizer, 1, wx.EXPAND, 5 )
ss_HideAndSeekSizer_bSizer15 = wx.BoxSizer( wx.VERTICAL )
sss_ScoreboardPlayerPromptsSizer_bSizer7 = wx.BoxSizer( wx.HORIZONTAL )
self.m_EnterScoreboardNameTip_staticText4 = wx.StaticText( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"播放计分板名称", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_EnterScoreboardNameTip_staticText4.Wrap( -1 )
sss_ScoreboardPlayerPromptsSizer_bSizer7.Add( self.m_EnterScoreboardNameTip_staticText4, 0, wx.ALL, 5 )
self.m_ScoreboardNameEntering_textCtrl9 = wx.TextCtrl( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"mscplay", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_ScoreboardNameEntering_textCtrl9.SetMaxLength( 10 )
sss_ScoreboardPlayerPromptsSizer_bSizer7.Add( self.m_ScoreboardNameEntering_textCtrl9, 0, wx.ALL, 5 )
self.m_staticline1 = wx.StaticLine( s_promptSizer.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
self.m_staticline1.SetMinSize( wx.Size( 2,-1 ) )
sss_ScoreboardPlayerPromptsSizer_bSizer7.Add( self.m_staticline1, 0, wx.ALL|wx.EXPAND, 5 )
self.m_IsAutoResetScoreboard_checkBox2 = wx.CheckBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"自动重置计分板", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_RIGHT )
sss_ScoreboardPlayerPromptsSizer_bSizer7.Add( self.m_IsAutoResetScoreboard_checkBox2, 0, wx.ALL, 5 )
ss_HideAndSeekSizer_bSizer15.Add( sss_ScoreboardPlayerPromptsSizer_bSizer7, 1, wx.SHAPED, 5 )
sss_StructurePlayerPromptsSizer_bSizer8 = wx.BoxSizer( wx.HORIZONTAL )
self.m_PlayerSelectorEnteringTips_staticText41 = wx.StaticText( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"玩家选择器", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_PlayerSelectorEnteringTips_staticText41.Wrap( -1 )
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_PlayerSelectorEnteringTips_staticText41, 0, wx.ALL, 5 )
m_PlayerSelectorEntering_comboBox1Choices = [ u"@a", u"@p", u"@e[type=player]" ]
self.m_PlayerSelectorEntering_comboBox1 = wx.ComboBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"@a", wx.DefaultPosition, wx.DefaultSize, m_PlayerSelectorEntering_comboBox1Choices, wx.CB_DROPDOWN|wx.TE_PROCESS_ENTER )
self.m_PlayerSelectorEntering_comboBox1.SetSelection( 0 )
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_PlayerSelectorEntering_comboBox1, 0, wx.ALL, 5 )
self.m_staticline2 = wx.StaticLine( s_promptSizer.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
self.m_staticline2.SetMinSize( wx.Size( 2,-1 ) )
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_staticline2, 0, wx.ALL|wx.EXPAND, 5 )
self.StructureMaxHeoghtTips_ = wx.StaticText( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"结构生成最大高度", wx.DefaultPosition, wx.DefaultSize, 0 )
self.StructureMaxHeoghtTips_.Wrap( -1 )
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.StructureMaxHeoghtTips_, 0, wx.ALL, 5 )
self.m_StructureHeight_slider7 = wx.Slider( s_promptSizer.GetStaticBox(), wx.ID_ANY, 50, 3, 1024, wx.DefaultPosition, wx.DefaultSize, wx.SL_HORIZONTAL )
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_StructureHeight_slider7, 0, wx.ALL, 5 )
self.m_spinCtrl1 = wx.SpinCtrl( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"50", wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 3, 1024, 50 )
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_spinCtrl1, 0, wx.ALL, 5 )
ss_HideAndSeekSizer_bSizer15.Add( sss_StructurePlayerPromptsSizer_bSizer8, 1, wx.SHAPED, 5 )
sss_BDXfileSignNameSizer_bSizer13 = wx.BoxSizer( wx.HORIZONTAL )
self.m_BDXfileSignNameTips_staticText8 = wx.StaticText( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"BDX作者署名", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_BDXfileSignNameTips_staticText8.Wrap( -1 )
sss_BDXfileSignNameSizer_bSizer13.Add( self.m_BDXfileSignNameTips_staticText8, 0, wx.ALL, 5 )
self.m_EnteringBDXfileSignName_textCtrl12 = wx.TextCtrl( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"UserYou", wx.DefaultPosition, wx.DefaultSize, 0 )
sss_BDXfileSignNameSizer_bSizer13.Add( self.m_EnteringBDXfileSignName_textCtrl12, 0, wx.ALL, 5 )
ss_HideAndSeekSizer_bSizer15.Add( sss_BDXfileSignNameSizer_bSizer13, 1, wx.SHAPED, 5 )
s_promptSizer.Add( ss_HideAndSeekSizer_bSizer15, 1, wx.EXPAND, 5 )
m_mainBoxSizer.Add( s_promptSizer, 1, wx.EXPAND, 5 )
s_StartSizer_sbSizer18 = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"开始转换" ), wx.HORIZONTAL )
s_StartSizer_sbSizer18.SetMinSize( wx.Size( -1,100 ) )
s_StartSizer_sbSizer18.Add( ( 0, 0), 1, wx.EXPAND, 5 )
self.m_button2 = wx.Button( s_StartSizer_sbSizer18.GetStaticBox(), wx.ID_ANY, u"转换,启动!", wx.DefaultPosition, wx.DefaultSize, 0 )
s_StartSizer_sbSizer18.Add( self.m_button2, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
m_mainBoxSizer.Add( s_StartSizer_sbSizer18, 1, wx.ALL|wx.EXPAND|wx.RESERVE_SPACE_EVEN_IF_HIDDEN, 5 )
self.SetSizer( m_mainBoxSizer )
self.Layout()
self.Centre( wx.BOTH )
# Connect Events
self.Bind( wx.EVT_MENU, self.onExitButtonPressed, id = self.m_Exit_menuItem1.GetId() )
self.m_LinglunWords_staticText1.Bind( wx.EVT_LEFT_DCLICK, self.onYanlunDClicked )
self.m_LinglunWords_staticText1.Bind( wx.EVT_MOUSEWHEEL, self.onYanlunWheeled )
self.m_ChooseMidiTips_staticText3.Bind( wx.EVT_LEFT_DCLICK, self.MidiEasterEgg )
self.m_ChooseMIDI_filePicker1.Bind( wx.EVT_FILEPICKER_CHANGED, self.onFileChosen )
self.m_outformatChoice_choice1.Bind( wx.EVT_CHOICE, self.onOutputFormatChosen )
self.m_playerChoice_choice2.Bind( wx.EVT_CHOICE, self.onPlayerChosen )
self.m_volumn_slider.Bind( wx.EVT_SCROLL, self.onVolumeScrolling )
self.m_volumn_spinCtrlDouble1.Bind( wx.EVT_SPINCTRLDOUBLE, self.onVolumeSpinChanged )
self.m_speed_slider.Bind( wx.EVT_SCROLL, self.onSpeedScrolling )
self.m_speed_spinCtrlDouble.Bind( wx.EVT_SPINCTRLDOUBLE, self.onSpeedSpinChanged )
self.m_progressBarEnablingCheckBox1.Bind( wx.EVT_CHECKBOX, self.onProgressbarChecked )
self.m_BasicProgressBarStyleEntering_textCtrl4.Bind( wx.EVT_TEXT, self.onProgressbarBasicStyleUpdating )
self.m_unplayerProgressbarStyleEntering_textCtrl5.Bind( wx.EVT_TEXT, self.onProgressbarUnplayedStyleUpdating )
self.m_playerProgressbarStyleEntering_textCtrl5.Bind( wx.EVT_TEXT, self.onProgressbarPlayedStyleUpdating )
self.m_ScoreboardNameEntering_textCtrl9.Bind( wx.EVT_TEXT, self.onScoreboredNameUpdating )
self.m_IsAutoResetScoreboard_checkBox2.Bind( wx.EVT_CHECKBOX, self.onAutoResetScoreboardChecked )
self.m_PlayerSelectorEntering_comboBox1.Bind( wx.EVT_TEXT, self.onPlayerSelectorUpdating )
self.m_StructureHeight_slider7.Bind( wx.EVT_SCROLL, self.onStructureMaxHeightScrolling )
self.m_spinCtrl1.Bind( wx.EVT_SPINCTRL, self.onStructureMaxHeightSpinChanged )
self.m_EnteringBDXfileSignName_textCtrl12.Bind( wx.EVT_TEXT, self.onBDXfileSignNameUpdating )
self.m_button2.Bind( wx.EVT_BUTTON, self.onStartButtonPressed )
def __del__( self ):
pass
# Virtual event handlers, override them in your derived class
def onExitButtonPressed( self, event ):
event.Skip()
def onYanlunDClicked( self, event ):
event.Skip()
def onYanlunWheeled( self, event ):
event.Skip()
def MidiEasterEgg( self, event ):
event.Skip()
def onFileChosen( self, event ):
event.Skip()
def onOutputFormatChosen( self, event ):
event.Skip()
def onPlayerChosen( self, event ):
event.Skip()
def onVolumeScrolling( self, event ):
event.Skip()
def onVolumeSpinChanged( self, event ):
event.Skip()
def onSpeedScrolling( self, event ):
event.Skip()
def onSpeedSpinChanged( self, event ):
event.Skip()
def onProgressbarChecked( self, event ):
event.Skip()
def onProgressbarBasicStyleUpdating( self, event ):
event.Skip()
def onProgressbarUnplayedStyleUpdating( self, event ):
event.Skip()
def onProgressbarPlayedStyleUpdating( self, event ):
event.Skip()
def onScoreboredNameUpdating( self, event ):
event.Skip()
def onAutoResetScoreboardChecked( self, event ):
event.Skip()
def onPlayerSelectorUpdating( self, event ):
event.Skip()
def onStructureMaxHeightScrolling( self, event ):
event.Skip()
def onStructureMaxHeightSpinChanged( self, event ):
event.Skip()
def onBDXfileSignNameUpdating( self, event ):
event.Skip()
def onStartButtonPressed( self, event ):
event.Skip()

View File

@ -1,478 +0,0 @@
# -*- coding: utf-8 -*-
###########################################################################
## Python code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
## http://www.wxformbuilder.org/
##
## PLEASE DO *NOT* EDIT THIS FILE!
###########################################################################
import wx
import wx.xrc
import wx.propgrid as pg
###########################################################################
## Class LingLunMainFrame
###########################################################################
class LingLunMainFrame ( wx.Frame ):
def __init__( self, parent ):
wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = wx.EmptyString, pos = wx.DefaultPosition, size = wx.Size( 660,723 ), style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL, name = u"LingLunConverter" )
self.SetSizeHints( wx.DefaultSize, wx.DefaultSize )
self.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
self.SetForegroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOWTEXT ) )
self.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOW ) )
self.m_statusBar2 = self.CreateStatusBar( 1, wx.STB_SIZEGRIP, wx.ID_ANY )
self.m_statusBar2.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
self.m_menubar1 = wx.MenuBar( 0 )
self.m_menubar1.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
self.FileMenu = wx.Menu()
self.m_Exit_menuItem1 = wx.MenuItem( self.FileMenu, wx.ID_ANY, u"退出", u"这是退出按钮", wx.ITEM_NORMAL )
self.FileMenu.Append( self.m_Exit_menuItem1 )
self.m_menubar1.Append( self.FileMenu, u"文件" )
self.SetMenuBar( self.m_menubar1 )
m_mainBoxSizer = wx.BoxSizer( wx.VERTICAL )
s_yanLunbarSizer = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"言·论" ), wx.VERTICAL )
self.m_LinglunWords_staticText1 = wx.StaticText( s_yanLunbarSizer.GetStaticBox(), wx.ID_ANY, u"灵光焕发 深艺献心", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTER_HORIZONTAL|wx.ST_ELLIPSIZE_MIDDLE|wx.ST_NO_AUTORESIZE )
self.m_LinglunWords_staticText1.Wrap( -1 )
self.m_LinglunWords_staticText1.SetFont( wx.Font( 12, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans B" ) )
self.m_LinglunWords_staticText1.SetForegroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_HIGHLIGHTTEXT ) )
self.m_LinglunWords_staticText1.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOWTEXT ) )
s_yanLunbarSizer.Add( self.m_LinglunWords_staticText1, 0, wx.EXPAND, 5 )
m_mainBoxSizer.Add( s_yanLunbarSizer, 0, wx.ALL|wx.EXPAND|wx.RESERVE_SPACE_EVEN_IF_HIDDEN|wx.TOP, 2 )
self.mian_notebook = wx.Notebook( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, 0 )
self.mian_notebook.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
self.convert_page = wx.Panel( self.mian_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
main_page_sizer = wx.BoxSizer( wx.VERTICAL )
s_midiChooseSizer = wx.BoxSizer( wx.HORIZONTAL )
self.m_ChooseMidiTips_staticText3 = wx.StaticText( self.convert_page, wx.ID_ANY, u"选择MIDI文件\n(双击移除)", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_ChooseMidiTips_staticText3.Wrap( -1 )
s_midiChooseSizer.Add( self.m_ChooseMidiTips_staticText3, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
ss_MidiChooserSizer_bSizer9 = wx.BoxSizer( wx.VERTICAL )
m_midiFilesList_listBox2Choices = []
self.m_midiFilesList_listBox2 = wx.ListBox( self.convert_page, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_midiFilesList_listBox2Choices, wx.LB_HSCROLL|wx.LB_SORT )
ss_MidiChooserSizer_bSizer9.Add( self.m_midiFilesList_listBox2, 0, wx.EXPAND, 0 )
s_midiChooseSizer.Add( ss_MidiChooserSizer_bSizer9, 1, wx.EXPAND, 5 )
self.m_midiBroseButton_button21 = wx.Button( self.convert_page, wx.ID_ANY, u"打开…", wx.DefaultPosition, wx.DefaultSize, 0 )
s_midiChooseSizer.Add( self.m_midiBroseButton_button21, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
main_page_sizer.Add( s_midiChooseSizer, 0, wx.EXPAND, 5 )
s_formatChooseSizer = wx.BoxSizer( wx.HORIZONTAL )
ss_outputFormatChooseSizer = wx.StaticBoxSizer( wx.StaticBox( self.convert_page, wx.ID_ANY, u"选择输出格式" ), wx.VERTICAL )
m_outformatChoice_choice1Choices = [ u"附加包", u"BDX结构" ]
self.m_outformatChoice_choice1 = wx.Choice( ss_outputFormatChooseSizer.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_outformatChoice_choice1Choices, 0 )
self.m_outformatChoice_choice1.SetSelection( 0 )
ss_outputFormatChooseSizer.Add( self.m_outformatChoice_choice1, 0, wx.ALL|wx.EXPAND, 5 )
s_formatChooseSizer.Add( ss_outputFormatChooseSizer, 1, wx.ALL|wx.EXPAND, 5 )
ss_playerChooseSizer = wx.StaticBoxSizer( wx.StaticBox( self.convert_page, wx.ID_ANY, u"选择播放器" ), wx.VERTICAL )
m_playerChoice_choice2Choices = [ u"计分板", u"延时", u"中继器" ]
self.m_playerChoice_choice2 = wx.Choice( ss_playerChooseSizer.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_playerChoice_choice2Choices, 0 )
self.m_playerChoice_choice2.SetSelection( 2 )
ss_playerChooseSizer.Add( self.m_playerChoice_choice2, 0, wx.ALL|wx.EXPAND, 5 )
s_formatChooseSizer.Add( ss_playerChooseSizer, 1, wx.ALL|wx.EXPAND, 5 )
main_page_sizer.Add( s_formatChooseSizer, 0, wx.EXPAND, 5 )
s_promptSizer = wx.StaticBoxSizer( wx.StaticBox( self.convert_page, wx.ID_ANY, u"转换参数" ), wx.VERTICAL )
ss_regularPromoptsEnteringSizer1 = wx.BoxSizer( wx.HORIZONTAL )
sss_VolumnPersentageEnteringSizer = wx.StaticBoxSizer( wx.StaticBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"音量大小" ), wx.HORIZONTAL )
self.m_volumn_slider = wx.Slider( sss_VolumnPersentageEnteringSizer.GetStaticBox(), wx.ID_ANY, 1000, 0, 1000, wx.DefaultPosition, wx.DefaultSize, wx.SL_HORIZONTAL )
sss_VolumnPersentageEnteringSizer.Add( self.m_volumn_slider, 0, wx.ALL, 5 )
self.m_volumn_spinCtrlDouble1 = wx.SpinCtrlDouble( sss_VolumnPersentageEnteringSizer.GetStaticBox(), wx.ID_ANY, u"100", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTER_HORIZONTAL|wx.SP_ARROW_KEYS|wx.TE_PROCESS_ENTER, 0, 100, 100.000000, 0.5 )
self.m_volumn_spinCtrlDouble1.SetDigits( 2 )
sss_VolumnPersentageEnteringSizer.Add( self.m_volumn_spinCtrlDouble1, 0, wx.ALL, 5 )
ss_regularPromoptsEnteringSizer1.Add( sss_VolumnPersentageEnteringSizer, 0, wx.ALL|wx.EXPAND|wx.SHAPED|wx.ALIGN_CENTER_VERTICAL, 5 )
sss_SpeedEnteringSizer = wx.StaticBoxSizer( wx.StaticBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"播放倍速" ), wx.HORIZONTAL )
self.m_speed_slider = wx.Slider( sss_SpeedEnteringSizer.GetStaticBox(), wx.ID_ANY, 50, 0, 100, wx.DefaultPosition, wx.DefaultSize, wx.SL_HORIZONTAL )
sss_SpeedEnteringSizer.Add( self.m_speed_slider, 0, wx.ALL, 5 )
self.m_speed_spinCtrlDouble = wx.SpinCtrlDouble( sss_SpeedEnteringSizer.GetStaticBox(), wx.ID_ANY, u"1", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTER_HORIZONTAL|wx.SP_ARROW_KEYS|wx.TE_PROCESS_ENTER, 0.01, 10, 1, 0.1 )
self.m_speed_spinCtrlDouble.SetDigits( 2 )
sss_SpeedEnteringSizer.Add( self.m_speed_spinCtrlDouble, 0, wx.ALL, 5 )
ss_regularPromoptsEnteringSizer1.Add( sss_SpeedEnteringSizer, 0, wx.ALL|wx.EXPAND|wx.SHAPED|wx.ALIGN_CENTER_VERTICAL, 5 )
s_promptSizer.Add( ss_regularPromoptsEnteringSizer1, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.EXPAND, 5 )
ss_commandCheckingSizer = wx.StaticBoxSizer( wx.StaticBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"指令设置" ), wx.HORIZONTAL )
self.m_progressBarEnablingCheckBox1 = wx.CheckBox( ss_commandCheckingSizer.GetStaticBox(), wx.ID_ANY, u"启用进度条", wx.DefaultPosition, wx.DefaultSize, 0 )
ss_commandCheckingSizer.Add( self.m_progressBarEnablingCheckBox1, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
self.m_oldExeFormatChecker_checkBox3 = wx.CheckBox( ss_commandCheckingSizer.GetStaticBox(), wx.ID_ANY, u"启用旧版执行指令格式", wx.DefaultPosition, wx.DefaultSize, 0 )
ss_commandCheckingSizer.Add( self.m_oldExeFormatChecker_checkBox3, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
s_promptSizer.Add( ss_commandCheckingSizer, 0, wx.EXPAND, 5 )
ss_HideAndSeekSizer_bSizer15 = wx.BoxSizer( wx.VERTICAL )
sss_ScoreboardPlayerPromptsSizer_bSizer7 = wx.BoxSizer( wx.HORIZONTAL )
self.m_EnterScoreboardNameTip_staticText4 = wx.StaticText( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"播放计分板名称", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_EnterScoreboardNameTip_staticText4.Wrap( -1 )
sss_ScoreboardPlayerPromptsSizer_bSizer7.Add( self.m_EnterScoreboardNameTip_staticText4, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
self.m_ScoreboardNameEntering_textCtrl9 = wx.TextCtrl( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"mscplay", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_ScoreboardNameEntering_textCtrl9.SetMaxLength( 10 )
sss_ScoreboardPlayerPromptsSizer_bSizer7.Add( self.m_ScoreboardNameEntering_textCtrl9, 0, wx.ALL, 5 )
self.m_staticline1 = wx.StaticLine( s_promptSizer.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
self.m_staticline1.SetMinSize( wx.Size( 2,-1 ) )
sss_ScoreboardPlayerPromptsSizer_bSizer7.Add( self.m_staticline1, 0, wx.ALL|wx.EXPAND, 5 )
self.m_IsAutoResetScoreboard_checkBox2 = wx.CheckBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"自动重置计分板", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_RIGHT )
sss_ScoreboardPlayerPromptsSizer_bSizer7.Add( self.m_IsAutoResetScoreboard_checkBox2, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
ss_HideAndSeekSizer_bSizer15.Add( sss_ScoreboardPlayerPromptsSizer_bSizer7, 0, wx.SHAPED|wx.EXPAND, 5 )
sss_StructurePlayerPromptsSizer_bSizer8 = wx.BoxSizer( wx.HORIZONTAL )
self.m_PlayerSelectorEnteringTips_staticText41 = wx.StaticText( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"玩家选择器", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_PlayerSelectorEnteringTips_staticText41.Wrap( -1 )
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_PlayerSelectorEnteringTips_staticText41, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
m_PlayerSelectorEntering_comboBox1Choices = [ u"@a", u"@p", u"@e[type=player]" ]
self.m_PlayerSelectorEntering_comboBox1 = wx.ComboBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"@a", wx.DefaultPosition, wx.DefaultSize, m_PlayerSelectorEntering_comboBox1Choices, wx.CB_DROPDOWN|wx.TE_PROCESS_ENTER )
self.m_PlayerSelectorEntering_comboBox1.SetSelection( 0 )
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_PlayerSelectorEntering_comboBox1, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
self.m_staticline2 = wx.StaticLine( s_promptSizer.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
self.m_staticline2.SetMinSize( wx.Size( 2,-1 ) )
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_staticline2, 0, wx.ALL|wx.EXPAND, 5 )
self.StructureMaxHeoghtTips_ = wx.StaticText( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"结构生成最大高度", wx.DefaultPosition, wx.DefaultSize, 0 )
self.StructureMaxHeoghtTips_.Wrap( -1 )
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.StructureMaxHeoghtTips_, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
self.m_StructureHeight_slider7 = wx.Slider( s_promptSizer.GetStaticBox(), wx.ID_ANY, 50, 3, 1024, wx.DefaultPosition, wx.DefaultSize, wx.SL_HORIZONTAL )
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_StructureHeight_slider7, 0, wx.ALL, 5 )
self.m_enteringStructureMaxHeight_spinCtrl1 = wx.SpinCtrl( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"50", wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 3, 1024, 50 )
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_enteringStructureMaxHeight_spinCtrl1, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
ss_HideAndSeekSizer_bSizer15.Add( sss_StructurePlayerPromptsSizer_bSizer8, 0, wx.SHAPED|wx.EXPAND, 5 )
sss_BDXfileSignNameSizer_bSizer13 = wx.BoxSizer( wx.HORIZONTAL )
self.m_BDXfileSignNameTips_staticText8 = wx.StaticText( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"BDX作者署名", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_BDXfileSignNameTips_staticText8.Wrap( -1 )
sss_BDXfileSignNameSizer_bSizer13.Add( self.m_BDXfileSignNameTips_staticText8, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
self.m_EnteringBDXfileSignName_textCtrl12 = wx.TextCtrl( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"UserYou", wx.DefaultPosition, wx.DefaultSize, 0 )
sss_BDXfileSignNameSizer_bSizer13.Add( self.m_EnteringBDXfileSignName_textCtrl12, 0, wx.ALL, 5 )
ss_HideAndSeekSizer_bSizer15.Add( sss_BDXfileSignNameSizer_bSizer13, 0, wx.SHAPED|wx.EXPAND, 5 )
s_promptSizer.Add( ss_HideAndSeekSizer_bSizer15, 0, wx.EXPAND, 5 )
main_page_sizer.Add( s_promptSizer, 0, wx.SHAPED|wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 5 )
s_StartSizer_sbSizer18 = wx.StaticBoxSizer( wx.StaticBox( self.convert_page, wx.ID_ANY, u"开始转换" ), wx.HORIZONTAL )
s_StartSizer_sbSizer18.SetMinSize( wx.Size( -1,100 ) )
s_StartSizer_sbSizer18.Add( ( 0, 0), 1, wx.EXPAND, 5 )
self.m_start_button2 = wx.Button( s_StartSizer_sbSizer18.GetStaticBox(), wx.ID_ANY, u"开始转换", wx.DefaultPosition, wx.DefaultSize, 0 )
s_StartSizer_sbSizer18.Add( self.m_start_button2, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
main_page_sizer.Add( s_StartSizer_sbSizer18, 1, wx.ALL|wx.EXPAND|wx.RESERVE_SPACE_EVEN_IF_HIDDEN, 5 )
self.convert_page.SetSizer( main_page_sizer )
self.convert_page.Layout()
main_page_sizer.Fit( self.convert_page )
self.mian_notebook.AddPage( self.convert_page, u"开始转换", False )
self.setting_page = wx.Panel( self.mian_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
setting_page_sizer = wx.BoxSizer( wx.VERTICAL )
self.setting_notebook = wx.Notebook( self.setting_page, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.NB_FIXEDWIDTH|wx.NB_MULTILINE|wx.NB_RIGHT )
self.setting_notebook.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "@OPPOSans R" ) )
self.setting_notebook.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOW ) )
self.setting_page1 = wx.Panel( self.setting_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
self.setting_page1.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
setting_page1_box_sizer = wx.BoxSizer( wx.VERTICAL )
sss_customProgressBarSizer_wSizer6 = wx.WrapSizer( wx.HORIZONTAL, wx.WRAPSIZER_DEFAULT_FLAGS )
setting_page1_progressbar_style = wx.StaticBoxSizer( wx.StaticBox( self.setting_page1, wx.ID_ANY, u"进度条" ), wx.HORIZONTAL )
ssss_basicProgressStylePattle_sbSizer9 = wx.StaticBoxSizer( wx.StaticBox( setting_page1_progressbar_style.GetStaticBox(), wx.ID_ANY, u"基本样式组" ), wx.VERTICAL )
self.m_BasicProgressBarStyleEntering_textCtrl4 = wx.TextCtrl( ssss_basicProgressStylePattle_sbSizer9.GetStaticBox(), wx.ID_ANY, u"%%N [ %%s/%^s %%% __________ %%t|%^t ]", wx.DefaultPosition, wx.DefaultSize, wx.TE_LEFT|wx.TE_NO_VSCROLL )
ssss_basicProgressStylePattle_sbSizer9.Add( self.m_BasicProgressBarStyleEntering_textCtrl4, 0, wx.ALL|wx.EXPAND, 5 )
setting_page1_progressbar_style.Add( ssss_basicProgressStylePattle_sbSizer9, 1, wx.ALL|wx.EXPAND, 5 )
ssss_UnplayedPartProgressbarPattle_sbSizer10 = wx.StaticBoxSizer( wx.StaticBox( setting_page1_progressbar_style.GetStaticBox(), wx.ID_ANY, u"未播放之样式" ), wx.VERTICAL )
self.m_unplayedProgressbarStyleEntering_textCtrl5 = wx.TextCtrl( ssss_UnplayedPartProgressbarPattle_sbSizer10.GetStaticBox(), wx.ID_ANY, u"§7=§r", wx.DefaultPosition, wx.DefaultSize, wx.TE_LEFT|wx.TE_NO_VSCROLL )
ssss_UnplayedPartProgressbarPattle_sbSizer10.Add( self.m_unplayedProgressbarStyleEntering_textCtrl5, 0, wx.ALL, 5 )
setting_page1_progressbar_style.Add( ssss_UnplayedPartProgressbarPattle_sbSizer10, 1, wx.ALL|wx.EXPAND, 5 )
ssss_PlayedPartProgressbarPattle_sbSizer11 = wx.StaticBoxSizer( wx.StaticBox( setting_page1_progressbar_style.GetStaticBox(), wx.ID_ANY, u"已播放之样式" ), wx.VERTICAL )
self.m_playedProgressbarStyleEntering_textCtrl5 = wx.TextCtrl( ssss_PlayedPartProgressbarPattle_sbSizer11.GetStaticBox(), wx.ID_ANY, u"§e=§r", wx.DefaultPosition, wx.DefaultSize, wx.TE_LEFT|wx.TE_NO_VSCROLL )
ssss_PlayedPartProgressbarPattle_sbSizer11.Add( self.m_playedProgressbarStyleEntering_textCtrl5, 0, wx.ALL, 5 )
setting_page1_progressbar_style.Add( ssss_PlayedPartProgressbarPattle_sbSizer11, 1, wx.ALL|wx.EXPAND, 5 )
sss_customProgressBarSizer_wSizer6.Add( setting_page1_progressbar_style, 1, wx.ALL|wx.EXPAND, 5 )
setting_page1_experiment_style = wx.StaticBoxSizer( wx.StaticBox( self.setting_page1, wx.ID_ANY, u"实验性功能" ), wx.HORIZONTAL )
self.m_enable_experiment_checkBox = wx.CheckBox( setting_page1_experiment_style.GetStaticBox(), wx.ID_ANY, u"启用实验性功能", wx.DefaultPosition, wx.DefaultSize, 0 )
setting_page1_experiment_style.Add( self.m_enable_experiment_checkBox, 1, wx.ALIGN_CENTER_VERTICAL|wx.ALL|wx.EXPAND, 5 )
experiment_type_choiceChoices = [ u"常规转换", u"长音插值", u"同刻偏移" ]
self.experiment_type_choice = wx.Choice( setting_page1_experiment_style.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, experiment_type_choiceChoices, 0 )
self.experiment_type_choice.SetSelection( 0 )
setting_page1_experiment_style.Add( self.experiment_type_choice, 2, wx.ALL|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5 )
self.m_ignore_midi_error_checkBox = wx.CheckBox( setting_page1_experiment_style.GetStaticBox(), wx.ID_ANY, u"忽略MIDI错误", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_ignore_midi_error_checkBox.SetValue(True)
setting_page1_experiment_style.Add( self.m_ignore_midi_error_checkBox, 1, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
sss_customProgressBarSizer_wSizer6.Add( setting_page1_experiment_style, 1, wx.ALL|wx.EXPAND, 5 )
setting_page1_box_sizer.Add( sss_customProgressBarSizer_wSizer6, 1, wx.ALL|wx.EXPAND, 5 )
self.setting_page1.SetSizer( setting_page1_box_sizer )
self.setting_page1.Layout()
setting_page1_box_sizer.Fit( self.setting_page1 )
self.setting_notebook.AddPage( self.setting_page1, u"基本信息", True )
self.setting_page2 = wx.Panel( self.setting_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
self.setting_page2.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, wx.EmptyString ) )
setting_page2_box_sizer = wx.BoxSizer( wx.VERTICAL )
m_pitched_instrument_table_choiceChoices = [ u"“偷吃”的对照表", u"“经典”对照表" ]
self.m_pitched_instrument_table_choice = wx.Choice( self.setting_page2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_pitched_instrument_table_choiceChoices, 0 )
self.m_pitched_instrument_table_choice.SetSelection( 0 )
self.m_pitched_instrument_table_choice.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
setting_page2_box_sizer.Add( self.m_pitched_instrument_table_choice, 0, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL|wx.EXPAND, 5 )
self.m_pitched_notes_table_propertyGrid1 = pg.PropertyGrid(self.setting_page2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.propgrid.PG_BOLD_MODIFIED|wx.propgrid.PG_DEFAULT_STYLE)
self.m_pitched_notes_table_propertyGrid1.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
self.m_propertyGridItem1 = self.m_pitched_notes_table_propertyGrid1.Append( pg.StringProperty( u"乐音乐器1", u"乐音乐器1" ) )
self.m_propertyGridItem2 = self.m_pitched_notes_table_propertyGrid1.Append( pg.StringProperty( u"乐音乐器2", u"乐音乐器2" ) )
setting_page2_box_sizer.Add( self.m_pitched_notes_table_propertyGrid1, 1, wx.ALL|wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 5 )
self.setting_page2.SetSizer( setting_page2_box_sizer )
self.setting_page2.Layout()
setting_page2_box_sizer.Fit( self.setting_page2 )
self.setting_notebook.AddPage( self.setting_page2, u"乐音乐器对照表", False )
self.setting_page3 = wx.Panel( self.setting_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
setting_page3_box_sizer = wx.BoxSizer( wx.VERTICAL )
m_percussion_instrument_table_choice1Choices = [ u"“偷吃”的对照表", u"“经典”对照表" ]
self.m_percussion_instrument_table_choice1 = wx.Choice( self.setting_page3, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_percussion_instrument_table_choice1Choices, 0 )
self.m_percussion_instrument_table_choice1.SetSelection( 0 )
self.m_percussion_instrument_table_choice1.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
setting_page3_box_sizer.Add( self.m_percussion_instrument_table_choice1, 0, wx.ALL|wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 5 )
self.m_percussion_notes_table_propertyGrid11 = pg.PropertyGrid(self.setting_page3, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.propgrid.PG_BOLD_MODIFIED|wx.propgrid.PG_DEFAULT_STYLE)
self.m_percussion_notes_table_propertyGrid11.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
self.m_propertyGridItem11 = self.m_percussion_notes_table_propertyGrid11.Append( pg.StringProperty( u"打击乐器1", u"打击乐器1" ) )
self.m_propertyGridItem21 = self.m_percussion_notes_table_propertyGrid11.Append( pg.StringProperty( u"打击乐器2", u"打击乐器2" ) )
setting_page3_box_sizer.Add( self.m_percussion_notes_table_propertyGrid11, 1, wx.ALL|wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 5 )
self.setting_page3.SetSizer( setting_page3_box_sizer )
self.setting_page3.Layout()
setting_page3_box_sizer.Fit( self.setting_page3 )
self.setting_notebook.AddPage( self.setting_page3, u"打击乐器对照表", False )
setting_page_sizer.Add( self.setting_notebook, 1, wx.EXPAND |wx.ALL, 5 )
self.setting_page.SetSizer( setting_page_sizer )
self.setting_page.Layout()
setting_page_sizer.Fit( self.setting_page )
self.mian_notebook.AddPage( self.setting_page, u"数据设置", True )
m_mainBoxSizer.Add( self.mian_notebook, 1, wx.EXPAND |wx.ALL, 5 )
self.SetSizer( m_mainBoxSizer )
self.Layout()
self.Centre( wx.BOTH )
# Connect Events
self.Bind( wx.EVT_MENU, self.onExitButtonPressed, id = self.m_Exit_menuItem1.GetId() )
self.m_LinglunWords_staticText1.Bind( wx.EVT_LEFT_DCLICK, self.onYanlunDClicked )
self.m_LinglunWords_staticText1.Bind( wx.EVT_MOUSEWHEEL, self.onYanlunWheeled )
self.m_ChooseMidiTips_staticText3.Bind( wx.EVT_LEFT_DCLICK, self.MidiEasterEgg )
self.m_midiFilesList_listBox2.Bind( wx.EVT_LISTBOX, self.onFileListUpdated )
self.m_midiFilesList_listBox2.Bind( wx.EVT_LISTBOX_DCLICK, self.onFileDoubleClicked )
self.m_midiBroseButton_button21.Bind( wx.EVT_BUTTON, self.openFile )
self.m_outformatChoice_choice1.Bind( wx.EVT_CHOICE, self.onOutputFormatChosen )
self.m_playerChoice_choice2.Bind( wx.EVT_CHOICE, self.onPlayerChosen )
self.m_volumn_slider.Bind( wx.EVT_SCROLL, self.onVolumeScrolling )
self.m_volumn_spinCtrlDouble1.Bind( wx.EVT_SPINCTRLDOUBLE, self.onVolumeSpinChanged )
self.m_speed_slider.Bind( wx.EVT_SCROLL, self.onSpeedScrolling )
self.m_speed_spinCtrlDouble.Bind( wx.EVT_SPINCTRLDOUBLE, self.onSpeedSpinChanged )
self.m_progressBarEnablingCheckBox1.Bind( wx.EVT_CHECKBOX, self.onProgressbarChecked )
self.m_ScoreboardNameEntering_textCtrl9.Bind( wx.EVT_TEXT, self.onScoreboredNameUpdating )
self.m_IsAutoResetScoreboard_checkBox2.Bind( wx.EVT_CHECKBOX, self.onAutoResetScoreboardChecked )
self.m_PlayerSelectorEntering_comboBox1.Bind( wx.EVT_TEXT, self.onPlayerSelectorUpdating )
self.m_StructureHeight_slider7.Bind( wx.EVT_SCROLL, self.onStructureMaxHeightScrolling )
self.m_enteringStructureMaxHeight_spinCtrl1.Bind( wx.EVT_SPINCTRL, self.onStructureMaxHeightSpinChanged )
self.m_EnteringBDXfileSignName_textCtrl12.Bind( wx.EVT_TEXT, self.onBDXfileSignNameUpdating )
self.m_start_button2.Bind( wx.EVT_BUTTON, self.onStartButtonPressed )
self.m_BasicProgressBarStyleEntering_textCtrl4.Bind( wx.EVT_TEXT, self.onProgressbarBasicStyleUpdating )
self.m_unplayedProgressbarStyleEntering_textCtrl5.Bind( wx.EVT_TEXT, self.onProgressbarUnplayedStyleUpdating )
self.m_playedProgressbarStyleEntering_textCtrl5.Bind( wx.EVT_TEXT, self.onProgressbarPlayedStyleUpdating )
def __del__( self ):
pass
# Virtual event handlers, override them in your derived class
def onExitButtonPressed( self, event ):
event.Skip()
def onYanlunDClicked( self, event ):
event.Skip()
def onYanlunWheeled( self, event ):
event.Skip()
def MidiEasterEgg( self, event ):
event.Skip()
def onFileListUpdated( self, event ):
event.Skip()
def onFileDoubleClicked( self, event ):
event.Skip()
def openFile( self, event ):
event.Skip()
def onOutputFormatChosen( self, event ):
event.Skip()
def onPlayerChosen( self, event ):
event.Skip()
def onVolumeScrolling( self, event ):
event.Skip()
def onVolumeSpinChanged( self, event ):
event.Skip()
def onSpeedScrolling( self, event ):
event.Skip()
def onSpeedSpinChanged( self, event ):
event.Skip()
def onProgressbarChecked( self, event ):
event.Skip()
def onScoreboredNameUpdating( self, event ):
event.Skip()
def onAutoResetScoreboardChecked( self, event ):
event.Skip()
def onPlayerSelectorUpdating( self, event ):
event.Skip()
def onStructureMaxHeightScrolling( self, event ):
event.Skip()
def onStructureMaxHeightSpinChanged( self, event ):
event.Skip()
def onBDXfileSignNameUpdating( self, event ):
event.Skip()
def onStartButtonPressed( self, event ):
event.Skip()
def onProgressbarBasicStyleUpdating( self, event ):
event.Skip()
def onProgressbarUnplayedStyleUpdating( self, event ):
event.Skip()
def onProgressbarPlayedStyleUpdating( self, event ):
event.Skip()

View File

@ -1,514 +0,0 @@
# -*- coding: utf-8 -*-
###########################################################################
## Python code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
## http://www.wxformbuilder.org/
##
## PLEASE DO *NOT* EDIT THIS FILE!
###########################################################################
import wx
import wx.xrc
import wx.propgrid as pg
###########################################################################
## Class LingLunMainFrame
###########################################################################
class LingLunMainFrame ( wx.Frame ):
def __init__( self, parent ):
wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = wx.EmptyString, pos = wx.DefaultPosition, size = wx.Size( 660,723 ), style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL, name = u"LingLunConverter" )
self.SetSizeHints( wx.DefaultSize, wx.DefaultSize )
self.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
self.SetForegroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOWTEXT ) )
self.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOW ) )
self.m_statusBar2 = self.CreateStatusBar( 1, wx.STB_SIZEGRIP, wx.ID_ANY )
self.m_statusBar2.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
self.m_menubar1 = wx.MenuBar( 0 )
self.m_menubar1.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
self.FileMenu = wx.Menu()
self.m_Exit_menuItem1 = wx.MenuItem( self.FileMenu, wx.ID_ANY, u"退出", u"这是退出按钮", wx.ITEM_NORMAL )
self.FileMenu.Append( self.m_Exit_menuItem1 )
self.m_menubar1.Append( self.FileMenu, u"文件" )
self.SetMenuBar( self.m_menubar1 )
m_mainBoxSizer = wx.BoxSizer( wx.VERTICAL )
s_yanLunbarSizer = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"言·论" ), wx.VERTICAL )
self.m_LinglunWords_staticText1 = wx.StaticText( s_yanLunbarSizer.GetStaticBox(), wx.ID_ANY, u"灵光焕发 深艺献心", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTER_HORIZONTAL|wx.ST_ELLIPSIZE_MIDDLE|wx.ST_NO_AUTORESIZE )
self.m_LinglunWords_staticText1.Wrap( -1 )
self.m_LinglunWords_staticText1.SetFont( wx.Font( 12, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans B" ) )
self.m_LinglunWords_staticText1.SetForegroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_HIGHLIGHTTEXT ) )
self.m_LinglunWords_staticText1.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOWTEXT ) )
s_yanLunbarSizer.Add( self.m_LinglunWords_staticText1, 0, wx.EXPAND, 5 )
m_mainBoxSizer.Add( s_yanLunbarSizer, 0, wx.ALL|wx.EXPAND|wx.RESERVE_SPACE_EVEN_IF_HIDDEN|wx.TOP, 2 )
self.mian_notebook = wx.Notebook( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, 0 )
self.mian_notebook.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
self.convert_page = wx.Panel( self.mian_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
self.mian_notebook.AddPage( self.convert_page, u"开始转换", False )
self.setting_page = wx.Panel( self.mian_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
self.mian_notebook.AddPage( self.setting_page, u"数据设置", True )
m_mainBoxSizer.Add( self.mian_notebook, 1, wx.EXPAND |wx.ALL, 5 )
self.SetSizer( m_mainBoxSizer )
self.Layout()
self.Centre( wx.BOTH )
# Connect Events
self.Bind( wx.EVT_MENU, self.onExitButtonPressed, id = self.m_Exit_menuItem1.GetId() )
self.m_LinglunWords_staticText1.Bind( wx.EVT_LEFT_DCLICK, self.onYanlunDClicked )
self.m_LinglunWords_staticText1.Bind( wx.EVT_MOUSEWHEEL, self.onYanlunWheeled )
def __del__( self ):
pass
# Virtual event handlers, override them in your derived class
def onExitButtonPressed( self, event ):
event.Skip()
def onYanlunDClicked( self, event ):
event.Skip()
def onYanlunWheeled( self, event ):
event.Skip()
###########################################################################
## Class convert_page_panel
###########################################################################
class convert_page_panel ( wx.Panel ):
def __init__( self, parent, id = wx.ID_ANY, pos = wx.DefaultPosition, size = wx.Size( 565,540 ), style = wx.TAB_TRAVERSAL, name = wx.EmptyString ):
wx.Panel.__init__ ( self, parent, id = id, pos = pos, size = size, style = style, name = name )
self.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOW ) )
main_page_sizer = wx.BoxSizer( wx.VERTICAL )
s_midiChooseSizer = wx.BoxSizer( wx.HORIZONTAL )
self.m_ChooseMidiTips_staticText3 = wx.StaticText( self, wx.ID_ANY, u"选择MIDI文件\n(双击移除)", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_ChooseMidiTips_staticText3.Wrap( -1 )
s_midiChooseSizer.Add( self.m_ChooseMidiTips_staticText3, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
ss_MidiChooserSizer_bSizer9 = wx.BoxSizer( wx.VERTICAL )
m_midiFilesList_listBox2Choices = []
self.m_midiFilesList_listBox2 = wx.ListBox( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_midiFilesList_listBox2Choices, wx.LB_HSCROLL|wx.LB_SORT )
ss_MidiChooserSizer_bSizer9.Add( self.m_midiFilesList_listBox2, 0, wx.EXPAND, 0 )
s_midiChooseSizer.Add( ss_MidiChooserSizer_bSizer9, 1, wx.EXPAND, 5 )
self.m_midiBroseButton_button21 = wx.Button( self, wx.ID_ANY, u"打开…", wx.DefaultPosition, wx.DefaultSize, 0 )
s_midiChooseSizer.Add( self.m_midiBroseButton_button21, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
main_page_sizer.Add( s_midiChooseSizer, 0, wx.EXPAND, 5 )
s_formatChooseSizer = wx.BoxSizer( wx.HORIZONTAL )
ss_outputFormatChooseSizer = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"选择输出格式" ), wx.VERTICAL )
m_outformatChoice_choice1Choices = [ u"附加包", u"BDX结构" ]
self.m_outformatChoice_choice1 = wx.Choice( ss_outputFormatChooseSizer.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_outformatChoice_choice1Choices, 0 )
self.m_outformatChoice_choice1.SetSelection( 0 )
ss_outputFormatChooseSizer.Add( self.m_outformatChoice_choice1, 0, wx.ALL|wx.EXPAND, 5 )
s_formatChooseSizer.Add( ss_outputFormatChooseSizer, 1, wx.ALL|wx.EXPAND, 5 )
ss_playerChooseSizer = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"选择播放器" ), wx.VERTICAL )
m_playerChoice_choice2Choices = [ u"计分板", u"延时", u"中继器" ]
self.m_playerChoice_choice2 = wx.Choice( ss_playerChooseSizer.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_playerChoice_choice2Choices, 0 )
self.m_playerChoice_choice2.SetSelection( 2 )
ss_playerChooseSizer.Add( self.m_playerChoice_choice2, 0, wx.ALL|wx.EXPAND, 5 )
s_formatChooseSizer.Add( ss_playerChooseSizer, 1, wx.ALL|wx.EXPAND, 5 )
main_page_sizer.Add( s_formatChooseSizer, 0, wx.EXPAND, 5 )
s_promptSizer = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"转换参数" ), wx.VERTICAL )
ss_regularPromoptsEnteringSizer1 = wx.BoxSizer( wx.HORIZONTAL )
sss_VolumnPersentageEnteringSizer = wx.StaticBoxSizer( wx.StaticBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"音量大小" ), wx.HORIZONTAL )
self.m_volumn_slider = wx.Slider( sss_VolumnPersentageEnteringSizer.GetStaticBox(), wx.ID_ANY, 1000, 0, 1000, wx.DefaultPosition, wx.DefaultSize, wx.SL_HORIZONTAL )
sss_VolumnPersentageEnteringSizer.Add( self.m_volumn_slider, 0, wx.ALL, 5 )
self.m_volumn_spinCtrlDouble1 = wx.SpinCtrlDouble( sss_VolumnPersentageEnteringSizer.GetStaticBox(), wx.ID_ANY, u"100", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTER_HORIZONTAL|wx.SP_ARROW_KEYS|wx.TE_PROCESS_ENTER, 0, 100, 100.000000, 0.5 )
self.m_volumn_spinCtrlDouble1.SetDigits( 2 )
sss_VolumnPersentageEnteringSizer.Add( self.m_volumn_spinCtrlDouble1, 0, wx.ALL, 5 )
ss_regularPromoptsEnteringSizer1.Add( sss_VolumnPersentageEnteringSizer, 0, wx.ALL|wx.EXPAND|wx.SHAPED|wx.ALIGN_CENTER_VERTICAL, 5 )
sss_SpeedEnteringSizer = wx.StaticBoxSizer( wx.StaticBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"播放倍速" ), wx.HORIZONTAL )
self.m_speed_slider = wx.Slider( sss_SpeedEnteringSizer.GetStaticBox(), wx.ID_ANY, 50, 0, 100, wx.DefaultPosition, wx.DefaultSize, wx.SL_HORIZONTAL )
sss_SpeedEnteringSizer.Add( self.m_speed_slider, 0, wx.ALL, 5 )
self.m_speed_spinCtrlDouble = wx.SpinCtrlDouble( sss_SpeedEnteringSizer.GetStaticBox(), wx.ID_ANY, u"1", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTER_HORIZONTAL|wx.SP_ARROW_KEYS|wx.TE_PROCESS_ENTER, 0.01, 10, 1, 0.1 )
self.m_speed_spinCtrlDouble.SetDigits( 2 )
sss_SpeedEnteringSizer.Add( self.m_speed_spinCtrlDouble, 0, wx.ALL, 5 )
ss_regularPromoptsEnteringSizer1.Add( sss_SpeedEnteringSizer, 0, wx.ALL|wx.EXPAND|wx.SHAPED|wx.ALIGN_CENTER_VERTICAL, 5 )
s_promptSizer.Add( ss_regularPromoptsEnteringSizer1, 0, wx.EXPAND, 5 )
ss_commandCheckingSizer = wx.StaticBoxSizer( wx.StaticBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"指令设置" ), wx.HORIZONTAL )
self.m_progressBarEnablingCheckBox1 = wx.CheckBox( ss_commandCheckingSizer.GetStaticBox(), wx.ID_ANY, u"启用进度条", wx.DefaultPosition, wx.DefaultSize, 0 )
ss_commandCheckingSizer.Add( self.m_progressBarEnablingCheckBox1, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
self.m_oldExeFormatChecker_checkBox3 = wx.CheckBox( ss_commandCheckingSizer.GetStaticBox(), wx.ID_ANY, u"启用旧版执行指令格式", wx.DefaultPosition, wx.DefaultSize, 0 )
ss_commandCheckingSizer.Add( self.m_oldExeFormatChecker_checkBox3, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
s_promptSizer.Add( ss_commandCheckingSizer, 0, wx.EXPAND, 5 )
ss_HideAndSeekSizer_bSizer15 = wx.BoxSizer( wx.VERTICAL )
sss_ScoreboardPlayerPromptsSizer_bSizer7 = wx.BoxSizer( wx.HORIZONTAL )
self.m_EnterScoreboardNameTip_staticText4 = wx.StaticText( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"播放计分板名称", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_EnterScoreboardNameTip_staticText4.Wrap( -1 )
sss_ScoreboardPlayerPromptsSizer_bSizer7.Add( self.m_EnterScoreboardNameTip_staticText4, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
self.m_ScoreboardNameEntering_textCtrl9 = wx.TextCtrl( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"mscplay", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_ScoreboardNameEntering_textCtrl9.SetMaxLength( 10 )
sss_ScoreboardPlayerPromptsSizer_bSizer7.Add( self.m_ScoreboardNameEntering_textCtrl9, 0, wx.ALL, 5 )
self.m_staticline1 = wx.StaticLine( s_promptSizer.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
self.m_staticline1.SetMinSize( wx.Size( 2,-1 ) )
sss_ScoreboardPlayerPromptsSizer_bSizer7.Add( self.m_staticline1, 0, wx.ALL|wx.EXPAND, 5 )
self.m_IsAutoResetScoreboard_checkBox2 = wx.CheckBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"自动重置计分板", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_RIGHT )
sss_ScoreboardPlayerPromptsSizer_bSizer7.Add( self.m_IsAutoResetScoreboard_checkBox2, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
ss_HideAndSeekSizer_bSizer15.Add( sss_ScoreboardPlayerPromptsSizer_bSizer7, 0, wx.SHAPED|wx.EXPAND, 5 )
sss_StructurePlayerPromptsSizer_bSizer8 = wx.BoxSizer( wx.HORIZONTAL )
self.m_PlayerSelectorEnteringTips_staticText41 = wx.StaticText( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"玩家选择器", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_PlayerSelectorEnteringTips_staticText41.Wrap( -1 )
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_PlayerSelectorEnteringTips_staticText41, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
m_PlayerSelectorEntering_comboBox1Choices = [ u"@a", u"@p", u"@e[type=player]" ]
self.m_PlayerSelectorEntering_comboBox1 = wx.ComboBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"@a", wx.DefaultPosition, wx.DefaultSize, m_PlayerSelectorEntering_comboBox1Choices, wx.CB_DROPDOWN|wx.TE_PROCESS_ENTER )
self.m_PlayerSelectorEntering_comboBox1.SetSelection( 0 )
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_PlayerSelectorEntering_comboBox1, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
self.m_staticline2 = wx.StaticLine( s_promptSizer.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
self.m_staticline2.SetMinSize( wx.Size( 2,-1 ) )
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_staticline2, 0, wx.ALL|wx.EXPAND, 5 )
self.StructureMaxHeoghtTips_ = wx.StaticText( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"结构生成最大高度", wx.DefaultPosition, wx.DefaultSize, 0 )
self.StructureMaxHeoghtTips_.Wrap( -1 )
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.StructureMaxHeoghtTips_, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
self.m_StructureHeight_slider7 = wx.Slider( s_promptSizer.GetStaticBox(), wx.ID_ANY, 50, 3, 1024, wx.DefaultPosition, wx.DefaultSize, wx.SL_HORIZONTAL )
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_StructureHeight_slider7, 0, wx.ALL, 5 )
self.m_enteringStructureMaxHeight_spinCtrl1 = wx.SpinCtrl( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"50", wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 3, 1024, 50 )
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_enteringStructureMaxHeight_spinCtrl1, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
ss_HideAndSeekSizer_bSizer15.Add( sss_StructurePlayerPromptsSizer_bSizer8, 0, wx.SHAPED|wx.EXPAND, 5 )
sss_BDXfileSignNameSizer_bSizer13 = wx.BoxSizer( wx.HORIZONTAL )
self.m_BDXfileSignNameTips_staticText8 = wx.StaticText( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"BDX作者署名", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_BDXfileSignNameTips_staticText8.Wrap( -1 )
sss_BDXfileSignNameSizer_bSizer13.Add( self.m_BDXfileSignNameTips_staticText8, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
self.m_EnteringBDXfileSignName_textCtrl12 = wx.TextCtrl( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"UserYou", wx.DefaultPosition, wx.DefaultSize, 0 )
sss_BDXfileSignNameSizer_bSizer13.Add( self.m_EnteringBDXfileSignName_textCtrl12, 0, wx.ALL, 5 )
ss_HideAndSeekSizer_bSizer15.Add( sss_BDXfileSignNameSizer_bSizer13, 0, wx.SHAPED|wx.EXPAND, 5 )
s_promptSizer.Add( ss_HideAndSeekSizer_bSizer15, 0, wx.EXPAND, 5 )
main_page_sizer.Add( s_promptSizer, 0, wx.SHAPED|wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 5 )
s_StartSizer_sbSizer18 = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"开始转换" ), wx.HORIZONTAL )
s_StartSizer_sbSizer18.SetMinSize( wx.Size( -1,100 ) )
s_StartSizer_sbSizer18.Add( ( 0, 0), 1, wx.EXPAND, 5 )
self.m_start_button2 = wx.Button( s_StartSizer_sbSizer18.GetStaticBox(), wx.ID_ANY, u"开始转换", wx.DefaultPosition, wx.DefaultSize, 0 )
s_StartSizer_sbSizer18.Add( self.m_start_button2, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
main_page_sizer.Add( s_StartSizer_sbSizer18, 1, wx.ALL|wx.EXPAND|wx.RESERVE_SPACE_EVEN_IF_HIDDEN, 5 )
self.SetSizer( main_page_sizer )
self.Layout()
# Connect Events
self.m_ChooseMidiTips_staticText3.Bind( wx.EVT_LEFT_DCLICK, self.MidiEasterEgg )
self.m_midiFilesList_listBox2.Bind( wx.EVT_LISTBOX, self.onFileListUpdated )
self.m_midiFilesList_listBox2.Bind( wx.EVT_LISTBOX_DCLICK, self.onFileDoubleClicked )
self.m_midiBroseButton_button21.Bind( wx.EVT_BUTTON, self.openFile )
self.m_outformatChoice_choice1.Bind( wx.EVT_CHOICE, self.onOutputFormatChosen )
self.m_playerChoice_choice2.Bind( wx.EVT_CHOICE, self.onPlayerChosen )
self.m_volumn_slider.Bind( wx.EVT_SCROLL, self.onVolumeScrolling )
self.m_volumn_spinCtrlDouble1.Bind( wx.EVT_SPINCTRLDOUBLE, self.onVolumeSpinChanged )
self.m_speed_slider.Bind( wx.EVT_SCROLL, self.onSpeedScrolling )
self.m_speed_spinCtrlDouble.Bind( wx.EVT_SPINCTRLDOUBLE, self.onSpeedSpinChanged )
self.m_progressBarEnablingCheckBox1.Bind( wx.EVT_CHECKBOX, self.onProgressbarChecked )
self.m_ScoreboardNameEntering_textCtrl9.Bind( wx.EVT_TEXT, self.onScoreboredNameUpdating )
self.m_IsAutoResetScoreboard_checkBox2.Bind( wx.EVT_CHECKBOX, self.onAutoResetScoreboardChecked )
self.m_PlayerSelectorEntering_comboBox1.Bind( wx.EVT_TEXT, self.onPlayerSelectorUpdating )
self.m_StructureHeight_slider7.Bind( wx.EVT_SCROLL, self.onStructureMaxHeightScrolling )
self.m_enteringStructureMaxHeight_spinCtrl1.Bind( wx.EVT_SPINCTRL, self.onStructureMaxHeightSpinChanged )
self.m_EnteringBDXfileSignName_textCtrl12.Bind( wx.EVT_TEXT, self.onBDXfileSignNameUpdating )
self.m_start_button2.Bind( wx.EVT_BUTTON, self.onStartButtonPressed )
def __del__( self ):
pass
# Virtual event handlers, override them in your derived class
def MidiEasterEgg( self, event ):
event.Skip()
def onFileListUpdated( self, event ):
event.Skip()
def onFileDoubleClicked( self, event ):
event.Skip()
def openFile( self, event ):
event.Skip()
def onOutputFormatChosen( self, event ):
event.Skip()
def onPlayerChosen( self, event ):
event.Skip()
def onVolumeScrolling( self, event ):
event.Skip()
def onVolumeSpinChanged( self, event ):
event.Skip()
def onSpeedScrolling( self, event ):
event.Skip()
def onSpeedSpinChanged( self, event ):
event.Skip()
def onProgressbarChecked( self, event ):
event.Skip()
def onScoreboredNameUpdating( self, event ):
event.Skip()
def onAutoResetScoreboardChecked( self, event ):
event.Skip()
def onPlayerSelectorUpdating( self, event ):
event.Skip()
def onStructureMaxHeightScrolling( self, event ):
event.Skip()
def onStructureMaxHeightSpinChanged( self, event ):
event.Skip()
def onBDXfileSignNameUpdating( self, event ):
event.Skip()
def onStartButtonPressed( self, event ):
event.Skip()
###########################################################################
## Class setting_page_pannel
###########################################################################
class setting_page_pannel ( wx.Panel ):
def __init__( self, parent, id = wx.ID_ANY, pos = wx.DefaultPosition, size = wx.Size( 565,540 ), style = wx.TAB_TRAVERSAL, name = wx.EmptyString ):
wx.Panel.__init__ ( self, parent, id = id, pos = pos, size = size, style = style, name = name )
setting_page_sizer = wx.BoxSizer( wx.VERTICAL )
self.setting_notebook = wx.Notebook( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.NB_FIXEDWIDTH|wx.NB_MULTILINE|wx.NB_RIGHT )
self.setting_notebook.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "@OPPOSans R" ) )
self.setting_notebook.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOW ) )
self.setting_page1 = wx.Panel( self.setting_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
self.setting_page1.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
setting_page1_box_sizer = wx.BoxSizer( wx.VERTICAL )
sss_customProgressBarSizer_wSizer6 = wx.WrapSizer( wx.HORIZONTAL, wx.WRAPSIZER_DEFAULT_FLAGS )
setting_page1_progressbar_style = wx.StaticBoxSizer( wx.StaticBox( self.setting_page1, wx.ID_ANY, u"进度条" ), wx.HORIZONTAL )
ssss_basicProgressStylePattle_sbSizer9 = wx.StaticBoxSizer( wx.StaticBox( setting_page1_progressbar_style.GetStaticBox(), wx.ID_ANY, u"基本样式组" ), wx.VERTICAL )
self.m_BasicProgressBarStyleEntering_textCtrl4 = wx.TextCtrl( ssss_basicProgressStylePattle_sbSizer9.GetStaticBox(), wx.ID_ANY, u"%%N [ %%s/%^s %%% __________ %%t|%^t ]", wx.DefaultPosition, wx.DefaultSize, wx.TE_LEFT|wx.TE_NO_VSCROLL )
ssss_basicProgressStylePattle_sbSizer9.Add( self.m_BasicProgressBarStyleEntering_textCtrl4, 0, wx.ALL|wx.EXPAND, 5 )
setting_page1_progressbar_style.Add( ssss_basicProgressStylePattle_sbSizer9, 1, wx.ALL|wx.EXPAND, 5 )
ssss_UnplayedPartProgressbarPattle_sbSizer10 = wx.StaticBoxSizer( wx.StaticBox( setting_page1_progressbar_style.GetStaticBox(), wx.ID_ANY, u"未播放之样式" ), wx.VERTICAL )
self.m_unplayedProgressbarStyleEntering_textCtrl5 = wx.TextCtrl( ssss_UnplayedPartProgressbarPattle_sbSizer10.GetStaticBox(), wx.ID_ANY, u"§7=§r", wx.DefaultPosition, wx.DefaultSize, wx.TE_LEFT|wx.TE_NO_VSCROLL )
ssss_UnplayedPartProgressbarPattle_sbSizer10.Add( self.m_unplayedProgressbarStyleEntering_textCtrl5, 0, wx.ALL, 5 )
setting_page1_progressbar_style.Add( ssss_UnplayedPartProgressbarPattle_sbSizer10, 1, wx.ALL|wx.EXPAND, 5 )
ssss_PlayedPartProgressbarPattle_sbSizer11 = wx.StaticBoxSizer( wx.StaticBox( setting_page1_progressbar_style.GetStaticBox(), wx.ID_ANY, u"已播放之样式" ), wx.VERTICAL )
self.m_playedProgressbarStyleEntering_textCtrl5 = wx.TextCtrl( ssss_PlayedPartProgressbarPattle_sbSizer11.GetStaticBox(), wx.ID_ANY, u"§e=§r", wx.DefaultPosition, wx.DefaultSize, wx.TE_LEFT|wx.TE_NO_VSCROLL )
ssss_PlayedPartProgressbarPattle_sbSizer11.Add( self.m_playedProgressbarStyleEntering_textCtrl5, 0, wx.ALL, 5 )
setting_page1_progressbar_style.Add( ssss_PlayedPartProgressbarPattle_sbSizer11, 1, wx.ALL|wx.EXPAND, 5 )
sss_customProgressBarSizer_wSizer6.Add( setting_page1_progressbar_style, 1, wx.ALL|wx.EXPAND, 5 )
setting_page1_experiment_style = wx.StaticBoxSizer( wx.StaticBox( self.setting_page1, wx.ID_ANY, u"实验性功能" ), wx.HORIZONTAL )
self.m_enable_experiment_checkBox = wx.CheckBox( setting_page1_experiment_style.GetStaticBox(), wx.ID_ANY, u"启用实验性功能", wx.DefaultPosition, wx.DefaultSize, 0 )
setting_page1_experiment_style.Add( self.m_enable_experiment_checkBox, 1, wx.ALIGN_CENTER_VERTICAL|wx.ALL|wx.EXPAND, 5 )
experiment_type_choiceChoices = [ u"常规转换", u"长音插值", u"同刻偏移" ]
self.experiment_type_choice = wx.Choice( setting_page1_experiment_style.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, experiment_type_choiceChoices, 0 )
self.experiment_type_choice.SetSelection( 0 )
setting_page1_experiment_style.Add( self.experiment_type_choice, 2, wx.ALL|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5 )
self.m_ignore_midi_error_checkBox = wx.CheckBox( setting_page1_experiment_style.GetStaticBox(), wx.ID_ANY, u"忽略MIDI错误", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_ignore_midi_error_checkBox.SetValue(True)
setting_page1_experiment_style.Add( self.m_ignore_midi_error_checkBox, 1, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
sss_customProgressBarSizer_wSizer6.Add( setting_page1_experiment_style, 1, wx.ALL|wx.EXPAND, 5 )
setting_page1_box_sizer.Add( sss_customProgressBarSizer_wSizer6, 1, wx.ALL|wx.EXPAND, 5 )
self.setting_page1.SetSizer( setting_page1_box_sizer )
self.setting_page1.Layout()
setting_page1_box_sizer.Fit( self.setting_page1 )
self.setting_notebook.AddPage( self.setting_page1, u"基本信息", True )
self.setting_page2 = wx.Panel( self.setting_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
self.setting_page2.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, wx.EmptyString ) )
setting_page2_box_sizer = wx.BoxSizer( wx.VERTICAL )
m_pitched_instrument_table_choiceChoices = [ u"“偷吃”的对照表", u"“经典”对照表" ]
self.m_pitched_instrument_table_choice = wx.Choice( self.setting_page2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_pitched_instrument_table_choiceChoices, 0 )
self.m_pitched_instrument_table_choice.SetSelection( 0 )
self.m_pitched_instrument_table_choice.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
setting_page2_box_sizer.Add( self.m_pitched_instrument_table_choice, 0, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL|wx.EXPAND, 5 )
self.m_pitched_notes_table_propertyGrid1 = pg.PropertyGrid(self.setting_page2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.propgrid.PG_BOLD_MODIFIED|wx.propgrid.PG_DEFAULT_STYLE)
self.m_pitched_notes_table_propertyGrid1.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
self.m_propertyGridItem1 = self.m_pitched_notes_table_propertyGrid1.Append( pg.StringProperty( u"乐音乐器1", u"乐音乐器1" ) )
self.m_propertyGridItem2 = self.m_pitched_notes_table_propertyGrid1.Append( pg.StringProperty( u"乐音乐器2", u"乐音乐器2" ) )
setting_page2_box_sizer.Add( self.m_pitched_notes_table_propertyGrid1, 1, wx.ALL|wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 5 )
self.setting_page2.SetSizer( setting_page2_box_sizer )
self.setting_page2.Layout()
setting_page2_box_sizer.Fit( self.setting_page2 )
self.setting_notebook.AddPage( self.setting_page2, u"乐音乐器对照表", False )
self.setting_page3 = wx.Panel( self.setting_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
setting_page3_box_sizer = wx.BoxSizer( wx.VERTICAL )
m_percussion_instrument_table_choice1Choices = [ u"“偷吃”的对照表", u"“经典”对照表" ]
self.m_percussion_instrument_table_choice1 = wx.Choice( self.setting_page3, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_percussion_instrument_table_choice1Choices, 0 )
self.m_percussion_instrument_table_choice1.SetSelection( 0 )
self.m_percussion_instrument_table_choice1.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
setting_page3_box_sizer.Add( self.m_percussion_instrument_table_choice1, 0, wx.ALL|wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 5 )
self.m_percussion_notes_table_propertyGrid11 = pg.PropertyGrid(self.setting_page3, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.propgrid.PG_BOLD_MODIFIED|wx.propgrid.PG_DEFAULT_STYLE)
self.m_percussion_notes_table_propertyGrid11.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
self.m_propertyGridItem11 = self.m_percussion_notes_table_propertyGrid11.Append( pg.StringProperty( u"打击乐器1", u"打击乐器1" ) )
self.m_propertyGridItem21 = self.m_percussion_notes_table_propertyGrid11.Append( pg.StringProperty( u"打击乐器2", u"打击乐器2" ) )
setting_page3_box_sizer.Add( self.m_percussion_notes_table_propertyGrid11, 1, wx.ALL|wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 5 )
self.setting_page3.SetSizer( setting_page3_box_sizer )
self.setting_page3.Layout()
setting_page3_box_sizer.Fit( self.setting_page3 )
self.setting_notebook.AddPage( self.setting_page3, u"打击乐器对照表", False )
setting_page_sizer.Add( self.setting_notebook, 1, wx.EXPAND |wx.ALL, 5 )
self.SetSizer( setting_page_sizer )
self.Layout()
# Connect Events
self.m_BasicProgressBarStyleEntering_textCtrl4.Bind( wx.EVT_TEXT, self.onProgressbarBasicStyleUpdating )
self.m_unplayedProgressbarStyleEntering_textCtrl5.Bind( wx.EVT_TEXT, self.onProgressbarUnplayedStyleUpdating )
self.m_playedProgressbarStyleEntering_textCtrl5.Bind( wx.EVT_TEXT, self.onProgressbarPlayedStyleUpdating )
def __del__( self ):
pass
# Virtual event handlers, override them in your derived class
def onProgressbarBasicStyleUpdating( self, event ):
event.Skip()
def onProgressbarUnplayedStyleUpdating( self, event ):
event.Skip()
def onProgressbarPlayedStyleUpdating( self, event ):
event.Skip()

View File

@ -1,612 +0,0 @@
# -*- coding: utf-8 -*-
###########################################################################
## Python code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
## http://www.wxformbuilder.org/
##
## PLEASE DO *NOT* EDIT THIS FILE!
###########################################################################
import wx
import wx.xrc
import wx.propgrid as pg
###########################################################################
## Class LingLunMainFrame
###########################################################################
class LingLunMainFrame ( wx.Frame ):
def __init__( self, parent ):
wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = wx.EmptyString, pos = wx.DefaultPosition, size = wx.Size( 660,723 ), style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL, name = u"LingLunConverter" )
self.SetSizeHints( wx.DefaultSize, wx.DefaultSize )
self.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
self.SetForegroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOWTEXT ) )
self.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOW ) )
self.m_statusBar2 = self.CreateStatusBar( 1, wx.STB_SIZEGRIP, wx.ID_ANY )
self.m_statusBar2.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
self.m_menubar1 = wx.MenuBar( 0 )
self.m_menubar1.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
self.FileMenu = wx.Menu()
self.m_ClearSetting_menuItem2 = wx.MenuItem( self.FileMenu, wx.ID_ANY, u"重置设置", u"将全部数据设置重置为默认值(下次启动时生效)", wx.ITEM_CHECK )
self.FileMenu.Append( self.m_ClearSetting_menuItem2 )
self.m_Exit_menuItem1 = wx.MenuItem( self.FileMenu, wx.ID_ANY, u"退出", u"这是退出按钮", wx.ITEM_NORMAL )
self.FileMenu.Append( self.m_Exit_menuItem1 )
self.m_menubar1.Append( self.FileMenu, u"文件" )
self.SetMenuBar( self.m_menubar1 )
m_mainBoxSizer = wx.BoxSizer( wx.VERTICAL )
s_yanLunbarSizer = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"言·论" ), wx.VERTICAL )
self.m_LinglunWords_staticText1 = wx.StaticText( s_yanLunbarSizer.GetStaticBox(), wx.ID_ANY, u"灵光焕发 深艺献心", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTER_HORIZONTAL|wx.ST_ELLIPSIZE_MIDDLE|wx.ST_NO_AUTORESIZE )
self.m_LinglunWords_staticText1.Wrap( -1 )
self.m_LinglunWords_staticText1.SetFont( wx.Font( 12, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans B" ) )
self.m_LinglunWords_staticText1.SetForegroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_HIGHLIGHTTEXT ) )
self.m_LinglunWords_staticText1.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOWTEXT ) )
s_yanLunbarSizer.Add( self.m_LinglunWords_staticText1, 0, wx.EXPAND, 5 )
m_mainBoxSizer.Add( s_yanLunbarSizer, 0, wx.ALL|wx.EXPAND|wx.RESERVE_SPACE_EVEN_IF_HIDDEN|wx.TOP, 2 )
self.mian_notebook = wx.Notebook( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, 0 )
self.mian_notebook.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
self.convert_page = wx.Panel( self.mian_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
self.mian_notebook.AddPage( self.convert_page, u"开始转换", True )
self.setting_page = wx.Panel( self.mian_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
self.mian_notebook.AddPage( self.setting_page, u"数据设置", False )
m_mainBoxSizer.Add( self.mian_notebook, 1, wx.EXPAND |wx.ALL, 5 )
self.SetSizer( m_mainBoxSizer )
self.Layout()
self.Centre( wx.BOTH )
# Connect Events
self.Bind( wx.EVT_MENU, self.onResetSettingButtonSelection, id = self.m_ClearSetting_menuItem2.GetId() )
self.Bind( wx.EVT_MENU, self.onExitButtonPressed, id = self.m_Exit_menuItem1.GetId() )
self.m_LinglunWords_staticText1.Bind( wx.EVT_LEFT_DCLICK, self.onYanlunDClicked )
self.m_LinglunWords_staticText1.Bind( wx.EVT_MOUSEWHEEL, self.onYanlunWheeled )
def __del__( self ):
pass
# Virtual event handlers, override them in your derived class
def onResetSettingButtonSelection( self, event ):
event.Skip()
def onExitButtonPressed( self, event ):
event.Skip()
def onYanlunDClicked( self, event ):
event.Skip()
def onYanlunWheeled( self, event ):
event.Skip()
###########################################################################
## Class ConvertPagePanel
###########################################################################
class ConvertPagePanel ( wx.Panel ):
def __init__( self, parent, id = wx.ID_ANY, pos = wx.DefaultPosition, size = wx.Size( 652,588 ), style = wx.TAB_TRAVERSAL, name = wx.EmptyString ):
wx.Panel.__init__ ( self, parent, id = id, pos = pos, size = size, style = style, name = name )
self.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOW ) )
main_page_sizer = wx.BoxSizer( wx.VERTICAL )
s_midiChooseSizer = wx.BoxSizer( wx.HORIZONTAL )
MidiChooser_Delete_and_Tips_bSizer15 = wx.BoxSizer( wx.VERTICAL )
self.m_ChooseMidiTips_staticText3 = wx.StaticText( self, wx.ID_ANY, u"选择MIDI文件\n(双击移除)", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_ChooseMidiTips_staticText3.Wrap( -1 )
MidiChooser_Delete_and_Tips_bSizer15.Add( self.m_ChooseMidiTips_staticText3, 0, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL, 5 )
self.m_done_then_remove_checkBox6 = wx.CheckBox( self, wx.ID_ANY, u"完成后移除", wx.DefaultPosition, wx.DefaultSize, 0 )
MidiChooser_Delete_and_Tips_bSizer15.Add( self.m_done_then_remove_checkBox6, 0, wx.ALL, 5 )
s_midiChooseSizer.Add( MidiChooser_Delete_and_Tips_bSizer15, 0, wx.SHAPED|wx.EXPAND, 0 )
ss_MidiChooserSizer_bSizer9 = wx.BoxSizer( wx.VERTICAL )
m_midiFilesList_listBox2Choices = []
self.m_midiFilesList_listBox2 = wx.ListBox( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_midiFilesList_listBox2Choices, wx.LB_HSCROLL|wx.LB_SORT )
ss_MidiChooserSizer_bSizer9.Add( self.m_midiFilesList_listBox2, 1, wx.EXPAND, 0 )
s_midiChooseSizer.Add( ss_MidiChooserSizer_bSizer9, 1, wx.EXPAND, 5 )
MidiChooser_Open_and_Clear_Buttons_bSizer16 = wx.BoxSizer( wx.VERTICAL )
self.m_midiBroseButton_button21 = wx.Button( self, wx.ID_ANY, u"打开…", wx.DefaultPosition, wx.DefaultSize, 0 )
MidiChooser_Open_and_Clear_Buttons_bSizer16.Add( self.m_midiBroseButton_button21, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
self.m_midiChooser_Clear_button3 = wx.Button( self, wx.ID_ANY, u"清空文件", wx.DefaultPosition, wx.DefaultSize, 0 )
MidiChooser_Open_and_Clear_Buttons_bSizer16.Add( self.m_midiChooser_Clear_button3, 0, wx.ALL, 5 )
s_midiChooseSizer.Add( MidiChooser_Open_and_Clear_Buttons_bSizer16, 0, wx.EXPAND, 5 )
main_page_sizer.Add( s_midiChooseSizer, 0, wx.EXPAND, 5 )
s_formatChooseSizer = wx.BoxSizer( wx.HORIZONTAL )
ss_outputFormatChooseSizer = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"选择输出格式" ), wx.VERTICAL )
m_outformatChoice_choice1Choices = [ u"附加包", u"BDX结构" ]
self.m_outformatChoice_choice1 = wx.Choice( ss_outputFormatChooseSizer.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_outformatChoice_choice1Choices, 0 )
self.m_outformatChoice_choice1.SetSelection( 0 )
ss_outputFormatChooseSizer.Add( self.m_outformatChoice_choice1, 0, wx.ALL|wx.EXPAND, 5 )
s_formatChooseSizer.Add( ss_outputFormatChooseSizer, 1, wx.ALL|wx.EXPAND, 5 )
ss_playerChooseSizer = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"选择播放器" ), wx.VERTICAL )
m_playerChoice_choice2Choices = [ u"计分板", u"延时", u"中继器" ]
self.m_playerChoice_choice2 = wx.Choice( ss_playerChooseSizer.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_playerChoice_choice2Choices, 0 )
self.m_playerChoice_choice2.SetSelection( 2 )
ss_playerChooseSizer.Add( self.m_playerChoice_choice2, 0, wx.ALL|wx.EXPAND, 5 )
s_formatChooseSizer.Add( ss_playerChooseSizer, 1, wx.ALL|wx.EXPAND, 5 )
main_page_sizer.Add( s_formatChooseSizer, 0, wx.EXPAND, 5 )
s_promptSizer = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"转换参数" ), wx.VERTICAL )
ss_regularPromoptsEnteringSizer1 = wx.BoxSizer( wx.HORIZONTAL )
sss_VolumnPersentageEnteringSizer = wx.StaticBoxSizer( wx.StaticBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"音量大小" ), wx.HORIZONTAL )
self.m_volumn_slider = wx.Slider( sss_VolumnPersentageEnteringSizer.GetStaticBox(), wx.ID_ANY, 1000, 0, 1000, wx.DefaultPosition, wx.DefaultSize, wx.SL_HORIZONTAL )
sss_VolumnPersentageEnteringSizer.Add( self.m_volumn_slider, 0, wx.ALL, 5 )
self.m_volumn_spinCtrlDouble1 = wx.SpinCtrlDouble( sss_VolumnPersentageEnteringSizer.GetStaticBox(), wx.ID_ANY, u"100", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTER_HORIZONTAL|wx.SP_ARROW_KEYS|wx.TE_PROCESS_ENTER, 0, 100, 100.000000, 0.5 )
self.m_volumn_spinCtrlDouble1.SetDigits( 2 )
sss_VolumnPersentageEnteringSizer.Add( self.m_volumn_spinCtrlDouble1, 0, wx.ALL, 5 )
ss_regularPromoptsEnteringSizer1.Add( sss_VolumnPersentageEnteringSizer, 0, wx.ALL|wx.EXPAND, 5 )
sss_SpeedEnteringSizer = wx.StaticBoxSizer( wx.StaticBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"播放倍速" ), wx.HORIZONTAL )
self.m_speed_slider = wx.Slider( sss_SpeedEnteringSizer.GetStaticBox(), wx.ID_ANY, 50, 0, 100, wx.DefaultPosition, wx.DefaultSize, wx.SL_HORIZONTAL )
sss_SpeedEnteringSizer.Add( self.m_speed_slider, 0, wx.ALL, 5 )
self.m_speed_spinCtrlDouble = wx.SpinCtrlDouble( sss_SpeedEnteringSizer.GetStaticBox(), wx.ID_ANY, u"1", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTER_HORIZONTAL|wx.SP_ARROW_KEYS|wx.TE_PROCESS_ENTER, 0.01, 10, 1, 0.1 )
self.m_speed_spinCtrlDouble.SetDigits( 2 )
sss_SpeedEnteringSizer.Add( self.m_speed_spinCtrlDouble, 0, wx.ALL, 5 )
ss_regularPromoptsEnteringSizer1.Add( sss_SpeedEnteringSizer, 0, wx.ALL|wx.EXPAND, 5 )
s_promptSizer.Add( ss_regularPromoptsEnteringSizer1, 0, wx.EXPAND, 5 )
ss_commandCheckingSizer = wx.StaticBoxSizer( wx.StaticBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"指令设置" ), wx.HORIZONTAL )
self.m_progressBarEnablingCheckBox1 = wx.CheckBox( ss_commandCheckingSizer.GetStaticBox(), wx.ID_ANY, u"启用进度条", wx.DefaultPosition, wx.DefaultSize, 0 )
ss_commandCheckingSizer.Add( self.m_progressBarEnablingCheckBox1, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
self.m_oldExeFormatChecker_checkBox3 = wx.CheckBox( ss_commandCheckingSizer.GetStaticBox(), wx.ID_ANY, u"启用旧版执行指令格式", wx.DefaultPosition, wx.DefaultSize, 0 )
ss_commandCheckingSizer.Add( self.m_oldExeFormatChecker_checkBox3, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
s_promptSizer.Add( ss_commandCheckingSizer, 0, wx.EXPAND, 5 )
ss_HideAndSeekSizer_bSizer15 = wx.BoxSizer( wx.VERTICAL )
sss_ScoreboardPlayerPromptsSizer_bSizer7 = wx.BoxSizer( wx.HORIZONTAL )
self.m_EnterScoreboardNameTip_staticText4 = wx.StaticText( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"播放计分板名称", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_EnterScoreboardNameTip_staticText4.Wrap( -1 )
sss_ScoreboardPlayerPromptsSizer_bSizer7.Add( self.m_EnterScoreboardNameTip_staticText4, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
self.m_ScoreboardNameEntering_textCtrl9 = wx.TextCtrl( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"mscplay", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_ScoreboardNameEntering_textCtrl9.SetMaxLength( 10 )
sss_ScoreboardPlayerPromptsSizer_bSizer7.Add( self.m_ScoreboardNameEntering_textCtrl9, 0, wx.ALL, 5 )
self.m_staticline1 = wx.StaticLine( s_promptSizer.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
self.m_staticline1.SetMinSize( wx.Size( 2,-1 ) )
sss_ScoreboardPlayerPromptsSizer_bSizer7.Add( self.m_staticline1, 0, wx.ALL|wx.EXPAND, 5 )
self.m_IsAutoResetScoreboard_checkBox2 = wx.CheckBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"自动重置计分板", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_RIGHT )
sss_ScoreboardPlayerPromptsSizer_bSizer7.Add( self.m_IsAutoResetScoreboard_checkBox2, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
ss_HideAndSeekSizer_bSizer15.Add( sss_ScoreboardPlayerPromptsSizer_bSizer7, 0, wx.SHAPED|wx.EXPAND, 5 )
sss_StructurePlayerPromptsSizer_bSizer8 = wx.BoxSizer( wx.HORIZONTAL )
self.m_PlayerSelectorEnteringTips_staticText41 = wx.StaticText( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"玩家选择器", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_PlayerSelectorEnteringTips_staticText41.Wrap( -1 )
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_PlayerSelectorEnteringTips_staticText41, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
m_PlayerSelectorEntering_comboBox1Choices = [ u"@a", u"@p", u"@e[type=player]" ]
self.m_PlayerSelectorEntering_comboBox1 = wx.ComboBox( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"@a", wx.DefaultPosition, wx.DefaultSize, m_PlayerSelectorEntering_comboBox1Choices, wx.CB_DROPDOWN|wx.TE_PROCESS_ENTER )
self.m_PlayerSelectorEntering_comboBox1.SetSelection( 0 )
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_PlayerSelectorEntering_comboBox1, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
self.m_staticline2 = wx.StaticLine( s_promptSizer.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
self.m_staticline2.SetMinSize( wx.Size( 2,-1 ) )
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_staticline2, 0, wx.ALL|wx.EXPAND, 5 )
self.StructureMaxHeoghtTips_ = wx.StaticText( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"结构生成最大高度", wx.DefaultPosition, wx.DefaultSize, 0 )
self.StructureMaxHeoghtTips_.Wrap( -1 )
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.StructureMaxHeoghtTips_, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
self.m_StructureHeight_slider7 = wx.Slider( s_promptSizer.GetStaticBox(), wx.ID_ANY, 50, 3, 1024, wx.DefaultPosition, wx.DefaultSize, wx.SL_HORIZONTAL )
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_StructureHeight_slider7, 0, wx.ALL, 5 )
self.m_enteringStructureMaxHeight_spinCtrl1 = wx.SpinCtrl( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"50", wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 3, 1024, 50 )
sss_StructurePlayerPromptsSizer_bSizer8.Add( self.m_enteringStructureMaxHeight_spinCtrl1, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
ss_HideAndSeekSizer_bSizer15.Add( sss_StructurePlayerPromptsSizer_bSizer8, 0, wx.SHAPED|wx.EXPAND, 5 )
sss_BDXfileSignNameSizer_bSizer13 = wx.BoxSizer( wx.HORIZONTAL )
self.m_BDXfileSignNameTips_staticText8 = wx.StaticText( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"BDX作者署名", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_BDXfileSignNameTips_staticText8.Wrap( -1 )
sss_BDXfileSignNameSizer_bSizer13.Add( self.m_BDXfileSignNameTips_staticText8, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
self.m_EnteringBDXfileSignName_textCtrl12 = wx.TextCtrl( s_promptSizer.GetStaticBox(), wx.ID_ANY, u"UserYou", wx.DefaultPosition, wx.DefaultSize, 0 )
sss_BDXfileSignNameSizer_bSizer13.Add( self.m_EnteringBDXfileSignName_textCtrl12, 0, wx.ALL, 5 )
ss_HideAndSeekSizer_bSizer15.Add( sss_BDXfileSignNameSizer_bSizer13, 0, wx.SHAPED|wx.EXPAND, 5 )
s_promptSizer.Add( ss_HideAndSeekSizer_bSizer15, 0, wx.EXPAND, 5 )
main_page_sizer.Add( s_promptSizer, 0, wx.ALL|wx.EXPAND|wx.SHAPED, 5 )
s_StartSizer_sbSizer18 = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"开始转换" ), wx.HORIZONTAL )
s_StartSizer_sbSizer18.SetMinSize( wx.Size( -1,100 ) )
ss_Midi_Convert_distPath_bSizer17 = wx.BoxSizer( wx.VERTICAL )
ss_Dest_chooser_Sizer_in_bSizer18 = wx.BoxSizer( wx.HORIZONTAL )
self.m_tip_Change_Dest_staticText7 = wx.StaticText( s_StartSizer_sbSizer18.GetStaticBox(), wx.ID_ANY, u"指定输出路径", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_tip_Change_Dest_staticText7.Wrap( -1 )
ss_Dest_chooser_Sizer_in_bSizer18.Add( self.m_tip_Change_Dest_staticText7, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
self.m_Convertion_Destination_Picker_dirPicker1 = wx.DirPickerCtrl( s_StartSizer_sbSizer18.GetStaticBox(), wx.ID_ANY, u"./", u"选择目标目录", wx.DefaultPosition, wx.DefaultSize, wx.DIRP_DEFAULT_STYLE )
ss_Dest_chooser_Sizer_in_bSizer18.Add( self.m_Convertion_Destination_Picker_dirPicker1, 1, wx.ALL|wx.EXPAND, 5 )
ss_Midi_Convert_distPath_bSizer17.Add( ss_Dest_chooser_Sizer_in_bSizer18, 0, wx.ALL|wx.EXPAND, 5 )
self.m_Check_Every_Their_Path_checkBox7 = wx.CheckBox( s_StartSizer_sbSizer18.GetStaticBox(), wx.ID_ANY, u"输出到每个文件所在目录", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_Check_Every_Their_Path_checkBox7.SetValue(True)
ss_Midi_Convert_distPath_bSizer17.Add( self.m_Check_Every_Their_Path_checkBox7, 0, wx.ALL, 5 )
s_StartSizer_sbSizer18.Add( ss_Midi_Convert_distPath_bSizer17, 1, wx.EXPAND, 5 )
self.m_start_button2 = wx.Button( s_StartSizer_sbSizer18.GetStaticBox(), wx.ID_ANY, u"开始转换", wx.DefaultPosition, wx.DefaultSize, 0 )
s_StartSizer_sbSizer18.Add( self.m_start_button2, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
main_page_sizer.Add( s_StartSizer_sbSizer18, 1, wx.ALL|wx.EXPAND, 5 )
self.SetSizer( main_page_sizer )
self.Layout()
# Connect Events
self.m_ChooseMidiTips_staticText3.Bind( wx.EVT_LEFT_DCLICK, self.MidiEasterEgg )
self.m_done_then_remove_checkBox6.Bind( wx.EVT_CHECKBOX, self.on_Done_Then_Remove_Clicked )
self.m_midiFilesList_listBox2.Bind( wx.EVT_LISTBOX, self.onFileListUpdated )
self.m_midiFilesList_listBox2.Bind( wx.EVT_LISTBOX_DCLICK, self.onFileDoubleClicked )
self.m_midiBroseButton_button21.Bind( wx.EVT_BUTTON, self.openFile )
self.m_midiChooser_Clear_button3.Bind( wx.EVT_BUTTON, self.on_Chooer_Clear_Button_Pressed )
self.m_outformatChoice_choice1.Bind( wx.EVT_CHOICE, self.onOutputFormatChosen )
self.m_playerChoice_choice2.Bind( wx.EVT_CHOICE, self.onPlayerChosen )
self.m_volumn_slider.Bind( wx.EVT_SCROLL, self.onVolumeScrolling )
self.m_volumn_spinCtrlDouble1.Bind( wx.EVT_SPINCTRLDOUBLE, self.onVolumeSpinChanged )
self.m_speed_slider.Bind( wx.EVT_SCROLL, self.onSpeedScrolling )
self.m_speed_spinCtrlDouble.Bind( wx.EVT_SPINCTRLDOUBLE, self.onSpeedSpinChanged )
self.m_progressBarEnablingCheckBox1.Bind( wx.EVT_CHECKBOX, self.onProgressbarChecked )
self.m_ScoreboardNameEntering_textCtrl9.Bind( wx.EVT_TEXT, self.onScoreboredNameUpdating )
self.m_IsAutoResetScoreboard_checkBox2.Bind( wx.EVT_CHECKBOX, self.onAutoResetScoreboardChecked )
self.m_PlayerSelectorEntering_comboBox1.Bind( wx.EVT_TEXT, self.onPlayerSelectorUpdating )
self.m_StructureHeight_slider7.Bind( wx.EVT_SCROLL, self.onStructureMaxHeightScrolling )
self.m_enteringStructureMaxHeight_spinCtrl1.Bind( wx.EVT_SPINCTRL, self.onStructureMaxHeightSpinChanged )
self.m_EnteringBDXfileSignName_textCtrl12.Bind( wx.EVT_TEXT, self.onBDXfileSignNameUpdating )
self.m_tip_Change_Dest_staticText7.Bind( wx.EVT_LEFT_DCLICK, self.on_Change_to_Default_Path )
self.m_Convertion_Destination_Picker_dirPicker1.Bind( wx.EVT_DIRPICKER_CHANGED, self.on_Convert_Dest_Changed )
self.m_Check_Every_Their_Path_checkBox7.Bind( wx.EVT_CHECKBOX, self.On_Their_Path_Checked )
self.m_start_button2.Bind( wx.EVT_BUTTON, self.onStartButtonPressed )
def __del__( self ):
pass
# Virtual event handlers, override them in your derived class
def MidiEasterEgg( self, event ):
event.Skip()
def on_Done_Then_Remove_Clicked( self, event ):
event.Skip()
def onFileListUpdated( self, event ):
event.Skip()
def onFileDoubleClicked( self, event ):
event.Skip()
def openFile( self, event ):
event.Skip()
def on_Chooer_Clear_Button_Pressed( self, event ):
event.Skip()
def onOutputFormatChosen( self, event ):
event.Skip()
def onPlayerChosen( self, event ):
event.Skip()
def onVolumeScrolling( self, event ):
event.Skip()
def onVolumeSpinChanged( self, event ):
event.Skip()
def onSpeedScrolling( self, event ):
event.Skip()
def onSpeedSpinChanged( self, event ):
event.Skip()
def onProgressbarChecked( self, event ):
event.Skip()
def onScoreboredNameUpdating( self, event ):
event.Skip()
def onAutoResetScoreboardChecked( self, event ):
event.Skip()
def onPlayerSelectorUpdating( self, event ):
event.Skip()
def onStructureMaxHeightScrolling( self, event ):
event.Skip()
def onStructureMaxHeightSpinChanged( self, event ):
event.Skip()
def onBDXfileSignNameUpdating( self, event ):
event.Skip()
def on_Change_to_Default_Path( self, event ):
event.Skip()
def on_Convert_Dest_Changed( self, event ):
event.Skip()
def On_Their_Path_Checked( self, event ):
event.Skip()
def onStartButtonPressed( self, event ):
event.Skip()
###########################################################################
## Class SettingPagePannel
###########################################################################
class SettingPagePannel ( wx.Panel ):
def __init__( self, parent, id = wx.ID_ANY, pos = wx.DefaultPosition, size = wx.Size( 565,540 ), style = wx.TAB_TRAVERSAL, name = wx.EmptyString ):
wx.Panel.__init__ ( self, parent, id = id, pos = pos, size = size, style = style, name = name )
setting_page_sizer = wx.BoxSizer( wx.VERTICAL )
self.setting_notebook = wx.Notebook( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.NB_FIXEDWIDTH|wx.NB_MULTILINE|wx.NB_RIGHT )
self.setting_notebook.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "@OPPOSans R" ) )
self.setting_notebook.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOW ) )
self.setting_page1 = wx.Panel( self.setting_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
self.setting_page1.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
setting_page1_box_sizer = wx.BoxSizer( wx.VERTICAL )
sss_customProgressBarSizer_wSizer6 = wx.WrapSizer( wx.HORIZONTAL, wx.WRAPSIZER_DEFAULT_FLAGS )
setting_page1_progressbar_style = wx.StaticBoxSizer( wx.StaticBox( self.setting_page1, wx.ID_ANY, u"进度条" ), wx.HORIZONTAL )
ssss_basicProgressStylePattle_sbSizer9 = wx.StaticBoxSizer( wx.StaticBox( setting_page1_progressbar_style.GetStaticBox(), wx.ID_ANY, u"基本样式组" ), wx.VERTICAL )
self.m_BasicProgressBarStyleEntering_textCtrl4 = wx.TextCtrl( ssss_basicProgressStylePattle_sbSizer9.GetStaticBox(), wx.ID_ANY, u"%%N [ %%s/%^s %%% __________ %%t|%^t ]", wx.DefaultPosition, wx.DefaultSize, wx.TE_LEFT|wx.TE_NO_VSCROLL )
ssss_basicProgressStylePattle_sbSizer9.Add( self.m_BasicProgressBarStyleEntering_textCtrl4, 0, wx.ALL|wx.EXPAND, 5 )
setting_page1_progressbar_style.Add( ssss_basicProgressStylePattle_sbSizer9, 1, wx.ALL|wx.EXPAND, 5 )
ssss_UnplayedPartProgressbarPattle_sbSizer10 = wx.StaticBoxSizer( wx.StaticBox( setting_page1_progressbar_style.GetStaticBox(), wx.ID_ANY, u"未播放之样式" ), wx.VERTICAL )
self.m_unplayedProgressbarStyleEntering_textCtrl5 = wx.TextCtrl( ssss_UnplayedPartProgressbarPattle_sbSizer10.GetStaticBox(), wx.ID_ANY, u"§7=§r", wx.DefaultPosition, wx.DefaultSize, wx.TE_LEFT|wx.TE_NO_VSCROLL )
ssss_UnplayedPartProgressbarPattle_sbSizer10.Add( self.m_unplayedProgressbarStyleEntering_textCtrl5, 0, wx.ALL, 5 )
setting_page1_progressbar_style.Add( ssss_UnplayedPartProgressbarPattle_sbSizer10, 1, wx.ALL|wx.EXPAND, 5 )
ssss_PlayedPartProgressbarPattle_sbSizer11 = wx.StaticBoxSizer( wx.StaticBox( setting_page1_progressbar_style.GetStaticBox(), wx.ID_ANY, u"已播放之样式" ), wx.VERTICAL )
self.m_playedProgressbarStyleEntering_textCtrl5 = wx.TextCtrl( ssss_PlayedPartProgressbarPattle_sbSizer11.GetStaticBox(), wx.ID_ANY, u"§e=§r", wx.DefaultPosition, wx.DefaultSize, wx.TE_LEFT|wx.TE_NO_VSCROLL )
ssss_PlayedPartProgressbarPattle_sbSizer11.Add( self.m_playedProgressbarStyleEntering_textCtrl5, 0, wx.ALL, 5 )
setting_page1_progressbar_style.Add( ssss_PlayedPartProgressbarPattle_sbSizer11, 1, wx.ALL|wx.EXPAND, 5 )
sss_customProgressBarSizer_wSizer6.Add( setting_page1_progressbar_style, 1, wx.ALL|wx.EXPAND, 5 )
setting_page1_experiment_style = wx.StaticBoxSizer( wx.StaticBox( self.setting_page1, wx.ID_ANY, u"实验性功能" ), wx.HORIZONTAL )
self.m_enable_experiment_checkBox = wx.CheckBox( setting_page1_experiment_style.GetStaticBox(), wx.ID_ANY, u"启用实验性功能", wx.DefaultPosition, wx.DefaultSize, 0 )
setting_page1_experiment_style.Add( self.m_enable_experiment_checkBox, 1, wx.ALL|wx.EXPAND, 5 )
experiment_type_choiceChoices = [ u"常规转换", u"长音插值", u"同刻偏移" ]
self.experiment_type_choice = wx.Choice( setting_page1_experiment_style.GetStaticBox(), wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, experiment_type_choiceChoices, 0 )
self.experiment_type_choice.SetSelection( 0 )
setting_page1_experiment_style.Add( self.experiment_type_choice, 2, wx.ALL|wx.EXPAND, 5 )
self.m_ignore_midi_error_checkBox = wx.CheckBox( setting_page1_experiment_style.GetStaticBox(), wx.ID_ANY, u"忽略MIDI错误", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_ignore_midi_error_checkBox.SetValue(True)
setting_page1_experiment_style.Add( self.m_ignore_midi_error_checkBox, 1, wx.ALL, 5 )
sss_customProgressBarSizer_wSizer6.Add( setting_page1_experiment_style, 1, wx.ALL|wx.EXPAND, 5 )
setting_page1_box_sizer.Add( sss_customProgressBarSizer_wSizer6, 1, wx.ALL|wx.EXPAND, 5 )
self.setting_page1.SetSizer( setting_page1_box_sizer )
self.setting_page1.Layout()
setting_page1_box_sizer.Fit( self.setting_page1 )
self.setting_notebook.AddPage( self.setting_page1, u"基本信息", True )
self.setting_page2 = wx.Panel( self.setting_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
self.setting_page2.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, wx.EmptyString ) )
setting_page2_box_sizer = wx.BoxSizer( wx.VERTICAL )
m_pitched_instrument_table_choiceChoices = [ u"“偷吃”的对照表", u"“经典”对照表" ]
self.m_pitched_instrument_table_choice = wx.Choice( self.setting_page2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_pitched_instrument_table_choiceChoices, 0 )
self.m_pitched_instrument_table_choice.SetSelection( 0 )
self.m_pitched_instrument_table_choice.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
setting_page2_box_sizer.Add( self.m_pitched_instrument_table_choice, 0, wx.ALL|wx.EXPAND, 5 )
self.m_pitched_notes_table_propertyGrid1 = pg.PropertyGrid(self.setting_page2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.propgrid.PG_BOLD_MODIFIED|wx.propgrid.PG_DEFAULT_STYLE)
self.m_pitched_notes_table_propertyGrid1.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
self.m_propertyGridItem1 = self.m_pitched_notes_table_propertyGrid1.Append( pg.StringProperty( u"乐音乐器1", u"乐音乐器1" ) )
self.m_propertyGridItem2 = self.m_pitched_notes_table_propertyGrid1.Append( pg.StringProperty( u"乐音乐器2", u"乐音乐器2" ) )
setting_page2_box_sizer.Add( self.m_pitched_notes_table_propertyGrid1, 1, wx.ALL|wx.EXPAND, 5 )
self.setting_page2.SetSizer( setting_page2_box_sizer )
self.setting_page2.Layout()
setting_page2_box_sizer.Fit( self.setting_page2 )
self.setting_notebook.AddPage( self.setting_page2, u"乐音乐器对照表", False )
self.setting_page3 = wx.Panel( self.setting_notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
setting_page3_box_sizer = wx.BoxSizer( wx.VERTICAL )
m_percussion_instrument_table_choice1Choices = [ u"“偷吃”的对照表", u"“经典”对照表" ]
self.m_percussion_instrument_table_choice1 = wx.Choice( self.setting_page3, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_percussion_instrument_table_choice1Choices, 0 )
self.m_percussion_instrument_table_choice1.SetSelection( 0 )
self.m_percussion_instrument_table_choice1.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
setting_page3_box_sizer.Add( self.m_percussion_instrument_table_choice1, 0, wx.ALL|wx.EXPAND, 5 )
self.m_percussion_notes_table_propertyGrid11 = pg.PropertyGrid(self.setting_page3, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.propgrid.PG_BOLD_MODIFIED|wx.propgrid.PG_DEFAULT_STYLE)
self.m_percussion_notes_table_propertyGrid11.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "OPPOSans R" ) )
self.m_propertyGridItem11 = self.m_percussion_notes_table_propertyGrid11.Append( pg.StringProperty( u"打击乐器1", u"打击乐器1" ) )
self.m_propertyGridItem21 = self.m_percussion_notes_table_propertyGrid11.Append( pg.StringProperty( u"打击乐器2", u"打击乐器2" ) )
setting_page3_box_sizer.Add( self.m_percussion_notes_table_propertyGrid11, 1, wx.ALL|wx.EXPAND, 5 )
self.setting_page3.SetSizer( setting_page3_box_sizer )
self.setting_page3.Layout()
setting_page3_box_sizer.Fit( self.setting_page3 )
self.setting_notebook.AddPage( self.setting_page3, u"打击乐器对照表", False )
setting_page_sizer.Add( self.setting_notebook, 1, wx.EXPAND |wx.ALL, 5 )
self.SetSizer( setting_page_sizer )
self.Layout()
# Connect Events
self.m_BasicProgressBarStyleEntering_textCtrl4.Bind( wx.EVT_TEXT, self.onProgressbarBasicStyleUpdating )
self.m_unplayedProgressbarStyleEntering_textCtrl5.Bind( wx.EVT_TEXT, self.onProgressbarUnplayedStyleUpdating )
self.m_playedProgressbarStyleEntering_textCtrl5.Bind( wx.EVT_TEXT, self.onProgressbarPlayedStyleUpdating )
self.m_enable_experiment_checkBox.Bind( wx.EVT_CHECKBOX, self.onExperimentEnableUpdating )
self.experiment_type_choice.Bind( wx.EVT_CHOICE, self.onConvertMethodUpdating )
self.m_ignore_midi_error_checkBox.Bind( wx.EVT_CHECKBOX, self.onMidiFaultIgnoranceChecking )
self.m_pitched_instrument_table_choice.Bind( wx.EVT_CHOICE, self.onPitchedInstListChanging )
self.m_pitched_notes_table_propertyGrid1.Bind( pg.EVT_PG_CHANGED, self.onPitchedInstTableChanged )
self.m_pitched_notes_table_propertyGrid1.Bind( pg.EVT_PG_CHANGING, self.onPitchedInstTableChanging )
self.m_percussion_instrument_table_choice1.Bind( wx.EVT_CHOICE, self.onPercussionInstListChanging )
self.m_percussion_notes_table_propertyGrid11.Bind( pg.EVT_PG_CHANGED, self.onPercussionInstTableChanged )
self.m_percussion_notes_table_propertyGrid11.Bind( pg.EVT_PG_CHANGING, self.onPercussionInstTableChanging )
def __del__( self ):
pass
# Virtual event handlers, override them in your derived class
def onProgressbarBasicStyleUpdating( self, event ):
event.Skip()
def onProgressbarUnplayedStyleUpdating( self, event ):
event.Skip()
def onProgressbarPlayedStyleUpdating( self, event ):
event.Skip()
def onExperimentEnableUpdating( self, event ):
event.Skip()
def onConvertMethodUpdating( self, event ):
event.Skip()
def onMidiFaultIgnoranceChecking( self, event ):
event.Skip()
def onPitchedInstListChanging( self, event ):
event.Skip()
def onPitchedInstTableChanged( self, event ):
event.Skip()
def onPitchedInstTableChanging( self, event ):
event.Skip()
def onPercussionInstListChanging( self, event ):
event.Skip()
def onPercussionInstTableChanged( self, event ):
event.Skip()
def onPercussionInstTableChanging( self, event ):
event.Skip()

View File

@ -1,23 +0,0 @@
# -*- conding: utf8 -*-
import os
m = 0
for path, dir_list, file_list in os.walk(r"./"):
for file_name in file_list:
if file_name.endswith('.py'):
file = os.path.join(path, file_name)
print("得到文件名:" + str(file))
for i in open(file, 'r', encoding="utf-8"):
code = i.strip()
if code.startswith('#'):
pass
elif code:
print("\t" + code)
m += 1
else:
pass
input("\n最终代码行数为:" + str(m))