mirror of
https://github.com/TriM-Organization/Musicreater.git
synced 2026-01-14 15:51:52 +00:00
Compare commits
32 Commits
v0.1.5.1-D
...
v0.2.0.0-D
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
887394570b | ||
|
|
c62806d470 | ||
|
|
d21c26d632 | ||
|
|
26ec42a71d | ||
|
|
245e2fa1ec | ||
|
|
e70fc806be | ||
|
|
72a3715722 | ||
|
|
fd3d27d596 | ||
|
|
3d283bfded | ||
|
|
7d9b63b9fe | ||
|
|
82850a3d74 | ||
|
|
629cfa402b | ||
|
|
0818957f51 | ||
|
|
954a30f722 | ||
|
|
96e6bc2f7a | ||
|
|
ca0e56e771 | ||
|
|
8fe71dbe0d | ||
|
|
97f334789e | ||
|
|
d2a6ce2529 | ||
|
|
066e0b0cac | ||
|
|
052142ac08 | ||
|
|
59c481f6da | ||
|
|
53c17f0328 | ||
|
|
ed28fc4866 | ||
|
|
320114533d | ||
|
|
aa210ac678 | ||
|
|
c4dd7b1ce8 | ||
|
|
99509be48c | ||
|
|
073ae827ab | ||
|
|
58b312554d | ||
|
|
55eeddb108 | ||
|
|
9d4a75cd41 |
3
.idea/.gitignore
generated
vendored
3
.idea/.gitignore
generated
vendored
@@ -1,3 +0,0 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
12
.idea/Musicreater.iml
generated
12
.idea/Musicreater.iml
generated
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
<component name="PyDocumentationSettings">
|
||||
<option name="format" value="PLAIN" />
|
||||
<option name="myDocStringFormat" value="Plain" />
|
||||
</component>
|
||||
</module>
|
||||
46
.idea/inspectionProfiles/Project_Default.xml
generated
46
.idea/inspectionProfiles/Project_Default.xml
generated
@@ -1,46 +0,0 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="LongLine" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PyArgumentEqualDefaultInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PyAugmentAssignmentInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PyClassicStyleClassInspection" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PyCompatibilityInspection" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<option name="ourVersions">
|
||||
<value>
|
||||
<list size="1">
|
||||
<item index="0" class="java.lang.String" itemvalue="3.10" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PyMandatoryEncodingInspection" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PyMissingTypeHintsInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PyPep8Inspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
||||
<option name="ignoredErrors">
|
||||
<list>
|
||||
<option value="E501" />
|
||||
</list>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PyPep8NamingInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
||||
<option name="ignoredErrors">
|
||||
<list>
|
||||
<option value="N802" />
|
||||
<option value="N803" />
|
||||
<option value="N806" />
|
||||
<option value="N813" />
|
||||
<option value="N801" />
|
||||
</list>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PyUnresolvedReferencesInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ignoredIdentifiers">
|
||||
<list>
|
||||
<option value="list.__getitem__" />
|
||||
<option value="list.split" />
|
||||
</list>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
||||
6
.idea/inspectionProfiles/profiles_settings.xml
generated
6
.idea/inspectionProfiles/profiles_settings.xml
generated
@@ -1,6 +0,0 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
||||
4
.idea/misc.xml
generated
4
.idea/misc.xml
generated
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9" project-jdk-type="Python SDK" />
|
||||
</project>
|
||||
8
.idea/modules.xml
generated
8
.idea/modules.xml
generated
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/Musicreater.iml" filepath="$PROJECT_DIR$/.idea/Musicreater.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/vcs.xml
generated
6
.idea/vcs.xml
generated
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
BIN
AutoInstaller/MSCT Auto Installer.exe
Normal file
BIN
AutoInstaller/MSCT Auto Installer.exe
Normal file
Binary file not shown.
221
AutoInstaller/MSCT Auto Installer.py
Normal file
221
AutoInstaller/MSCT Auto Installer.py
Normal file
@@ -0,0 +1,221 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
# W-YI 金羿
|
||||
# QQ 2647547478
|
||||
# 音·创 开发交流群 861684859
|
||||
# Email EillesWan2006@163.com W-YI_DoctorYI@outlook.com EillesWan@outlook.com
|
||||
# 版权所有 Team-Ryoun 金羿("Eilles Wan")
|
||||
# 若需转载或借鉴 请附作者
|
||||
|
||||
|
||||
"""
|
||||
音·创自动安装器 (Musicreater Auto Installer)
|
||||
对音·创的自动安装提供支持的独立软件
|
||||
Musicreater Auto Installer (音·创自动安装器)
|
||||
A software that used for installing Musicreater automatically
|
||||
|
||||
Copyright 2022 Team-Ryoun
|
||||
|
||||
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.
|
||||
"""
|
||||
|
||||
# 代码写的并非十分的漂亮,还请大佬多多包涵;本软件源代码依照Apache软件协议公开
|
||||
|
||||
|
||||
# 下面为正文
|
||||
|
||||
|
||||
from sys import platform
|
||||
from platform import architecture
|
||||
import urllib.request
|
||||
import zipfile
|
||||
from os import system as srun
|
||||
from os import walk, rename, remove, path, chdir, listdir
|
||||
from shutil import rmtree, move
|
||||
|
||||
|
||||
if platform == "win32":
|
||||
|
||||
nowpath = __file__[: len(__file__) - __file__[len(__file__) :: -1].index('\\')]
|
||||
|
||||
if srun('python -V'):
|
||||
|
||||
print('\033[7m{}\033[0m'.format("正在下载python\nDownloading Python"))
|
||||
|
||||
try:
|
||||
urllib.request.urlretrieve(
|
||||
"https://www.python.org/ftp/python/3.8.10/python-3.8.10.exe"
|
||||
if architecture()[0] == "32bit"
|
||||
else "https://www.python.org/ftp/python/3.8.10/python-3.8.10-amd64.exe",
|
||||
"./pythonInstaller.exe",
|
||||
)
|
||||
# urllib.request.urlretrieve("https://www.python.org/ftp/python/3.8.10/python-3.8.10.exe","./pythonInstaller.exe")
|
||||
except Exception as E:
|
||||
input(str(E) + "\n自动下载失败,按下回车取消")
|
||||
exit()
|
||||
|
||||
print('正在安装python\nInstalling Python')
|
||||
|
||||
# open('install.bat','w').write(f'.\\pythonInstaller.exe /passive InstallAllUsers=0 TargetDir="{nowpath}python38" DefaultJustForMeTargetDir="{nowpath}python38" AssociateFiles=0 CompileAll=1 PrependPath=0 Shortcuts=0 Include_doc=0 Include_launcher=0 InstallLauncherAllUsers=0 Include_test=0 Include_tools=0')
|
||||
|
||||
srun(
|
||||
f'.\\pythonInstaller.exe /passive InstallAllUsers=1 AssociateFiles=1 CompileAll=1 PrependPath=1 Shortcuts=1 Include_doc=0 Include_exe=1 Include_pip=1 Include_lib=1 Include_tcltk=1 Include_launcher=1 InstallLauncherAllUsers=1 Include_test=0 Include_tools=0'
|
||||
)
|
||||
|
||||
remove('./pythonInstaller.exe')
|
||||
|
||||
# print('\033[7m{}\033[0m'.format("正在下载pip安装工具\nDownloading get-pip tool"))
|
||||
|
||||
# try:
|
||||
# urllib.request.urlretrieve(
|
||||
# "https://bootstrap.pypa.io/get-pip.py", "./python38/get-pip.py"
|
||||
# )
|
||||
# except Exception as E:
|
||||
# input(str(E) + "\n自动下载失败,按下回车取消")
|
||||
# exit()
|
||||
|
||||
# print('\033[7m{}\033[0m'.format("正在下载pip\nDownloading pip"))
|
||||
|
||||
# chdir('./python38')
|
||||
# srun(r'".\python.exe get-pip.py')
|
||||
|
||||
# print('\033[7m{}\033[0m'.format('正在安装pip\nInstalling pip'))
|
||||
|
||||
# for dire in listdir('./Lib/site-packages/'):
|
||||
# move('./Lib/site-packages/'+dire,'./'+dire)
|
||||
|
||||
# print('\033[7m{}\033[0m'.format("完成!"))
|
||||
|
||||
# chdir('../')
|
||||
|
||||
try:
|
||||
choseurl = int(
|
||||
input(
|
||||
'\033[7m{}\033[0m'.format(
|
||||
"""请选择 音·创 下载源,默认为0
|
||||
Please choose a download source of Musicreater(default 0)
|
||||
[0] 私有服务器<暂无> | Private Server<Haven't been built>
|
||||
[1] Gitee
|
||||
[2] Github\n:"""
|
||||
)
|
||||
)
|
||||
)
|
||||
except Exception as E:
|
||||
print('\033[7m{}\033[0m'.format(str(E) + "\n将使用默认源\nUsing default source"))
|
||||
choseurl = 0
|
||||
|
||||
myurl = ""
|
||||
Giteeurl = "https://gitee.com/EillesWan/Musicreater/repository/blazearchive/master.zip?Expires=1647771436&Signature=%2BkqLHwmvzScCd4cPQDP0LHLpqeZUxOrOv17QpRy%2FTzs%3D"
|
||||
Githuburl = (
|
||||
"https://codeload.github.com/EillesWan/Musicreater/zip/refs/heads/master"
|
||||
)
|
||||
|
||||
url = (
|
||||
myurl
|
||||
if choseurl == 0
|
||||
else Giteeurl
|
||||
if choseurl == 1
|
||||
else Githuburl
|
||||
if choseurl == 2
|
||||
else myurl
|
||||
)
|
||||
|
||||
print('\033[7m{}\033[0m'.format("正在下载音·创\nDownloading Musicreater"))
|
||||
|
||||
try:
|
||||
urllib.request.urlretrieve(url, "./master.zip")
|
||||
except Exception as E:
|
||||
input('\033[0{}\033[0m'.format(str(E) + "\n自动下载失败,按下回车取消"))
|
||||
exit()
|
||||
|
||||
print('\033[7m{}\033[0m'.format("安装音·创\nInstalling Musicreater"))
|
||||
|
||||
zipfile.ZipFile("./master.zip", "r").extractall()
|
||||
|
||||
remove("./master.zip")
|
||||
|
||||
try:
|
||||
rmtree("./Musicreater")
|
||||
except:
|
||||
pass
|
||||
|
||||
rename("./Musicreater-master/", "./Musicreater/")
|
||||
|
||||
elif platform == 'linux':
|
||||
srun("sudo apt-get install python3")
|
||||
srun("sudo apt-get install python3-pip")
|
||||
srun("sudo apt-get install git")
|
||||
try:
|
||||
choseurl = int(
|
||||
input(
|
||||
'\033[0{}\033[0m'.format(
|
||||
"""请选择 音·创 下载源,默认为1
|
||||
Please choose a download source of Musicreater(default 1)
|
||||
[1] Gitee
|
||||
[2] Github\n:"""
|
||||
)
|
||||
)
|
||||
)
|
||||
except Exception as E:
|
||||
print(str(E) + "\n将使用默认源\nUsing default source")
|
||||
choseurl = 1
|
||||
|
||||
url = (
|
||||
"https://gitee.com/EillesWan/Musicreater.git"
|
||||
if choseurl == 1
|
||||
else "https://github.com/EillesWan/Musicreater.git"
|
||||
if choseurl == 2
|
||||
else "https://gitee.com/EillesWan/Musicreater.git"
|
||||
)
|
||||
srun(f"sudo git clone {url}")
|
||||
|
||||
|
||||
print('\033[7m{}\033[0m'.format("编译音·创\nCompiling Musicreater"))
|
||||
|
||||
if platform == "linux":
|
||||
srun("python3 -O -m compileall -b ./Musicreater/")
|
||||
elif platform == "win32":
|
||||
srun("python -O -m compileall -b ./Musicreater/")
|
||||
|
||||
for parent, dirnames, filenames in walk("./Musicreater"):
|
||||
for filename in filenames:
|
||||
if filename[-3:] == ".py":
|
||||
fn = path.join(parent, filename)
|
||||
remove(fn)
|
||||
print(f"删除文件 {fn}")
|
||||
for dirname in dirnames:
|
||||
if dirname == "__pycache__":
|
||||
pn = path.join(parent, dirname)
|
||||
rmtree(pn)
|
||||
print(f"删除目录 {pn}")
|
||||
|
||||
|
||||
print(
|
||||
'\033[7m{}\033[0m'.format(
|
||||
"""您可以开始使用音·创了
|
||||
我们将在后台为您安装各项支持库
|
||||
您可以运行Musicreater文件夹中的Musicreater.pyc文件来运行音·创
|
||||
|
||||
You can use Musicreater now,
|
||||
We will setup the libraries ineed for you in background,
|
||||
You can now open Musicreater.PYC in the directory of ./Musicreater to run Musicreater
|
||||
"""
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
if platform == "linux":
|
||||
srun("python3 ./Musicreater/补全库.pyc")
|
||||
elif platform == "win32":
|
||||
srun("python ./Musicreater/补全库.pyc")
|
||||
14
LICENSE
14
LICENSE
@@ -92,16 +92,16 @@
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License and
|
||||
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
|
||||
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
|
||||
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
|
||||
@@ -109,8 +109,8 @@
|
||||
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,
|
||||
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
|
||||
@@ -176,9 +176,9 @@
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
|
||||
Copyright 2022 Eilles Wan (金羿)
|
||||
Copyright 2022 Team-Ryoun 金羿("Eilles Wan") & 诸葛亮与八卦阵("bgArray")
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License")
|
||||
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
|
||||
|
||||
|
||||
69
Musicreater.New.py
Normal file
69
Musicreater.New.py
Normal file
@@ -0,0 +1,69 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
# W-YI 金羿
|
||||
# QQ 2647547478
|
||||
# 音·创 开发交流群 861684859
|
||||
# Email EillesWan2006@163.com W-YI_DoctorYI@outlook.com EillesWan@outlook.com
|
||||
# 版权所有 Team-Ryoun 金羿("Eilles Wan") & 诸葛亮与八卦阵("bgArray")
|
||||
# 若需转载或借鉴 请附作者
|
||||
|
||||
|
||||
"""
|
||||
音·创 (Musicreater)
|
||||
一款免费开源的 《我的世界:基岩版》 音乐制作软件
|
||||
Musicreater (音·创)
|
||||
A free opensource software which is used for creating all kinds of musics in Minecraft
|
||||
|
||||
Copyright 2022 Team-Ryoun
|
||||
|
||||
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.
|
||||
"""
|
||||
|
||||
# 代码写的并非十分的漂亮,还请大佬多多包涵;本软件源代码依照Apache软件协议公开
|
||||
|
||||
|
||||
# 下面为正文
|
||||
|
||||
|
||||
|
||||
from msctspt.bugReporter import version
|
||||
|
||||
__ver__ = f'{version.version[1]} {version.version[0]}'
|
||||
__author__ = '金羿Eilles'
|
||||
|
||||
from msctLib.display import *
|
||||
|
||||
from msctLib.function import *
|
||||
|
||||
from msctLib.data import uniteIO
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def __main__():
|
||||
|
||||
disp()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
__main__()
|
||||
@@ -1,19 +1,23 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ! python3
|
||||
|
||||
|
||||
# W-YI 金羿
|
||||
# QQ 2647547478
|
||||
# 音·创 开发交流群 861684859
|
||||
# Email EillesWan2006@163.com W-YI_DoctorYI@outlook.com EillesWan@outlook.com
|
||||
# 版权所有 Team-Ryoun 金羿
|
||||
# 版权所有 Team-Ryoun 金羿("Eilles Wan") & 诸葛亮与八卦阵("bgArray")
|
||||
# 若需转载或借鉴 请附作者
|
||||
|
||||
|
||||
"""
|
||||
Copyright 2022 Eilles Wan (金羿)
|
||||
音·创 (Musicreater)
|
||||
一款免费开源的 《我的世界:基岩版》 音乐制作软件
|
||||
Musicreater (音·创)
|
||||
A free opensource software which is used for creating all kinds of musics in Minecraft
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the 'License')
|
||||
Copyright 2022 Team-Ryoun
|
||||
|
||||
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
|
||||
|
||||
@@ -61,10 +65,8 @@ from msctspt.threadOpera import NewThread
|
||||
from nmcsup.vers import VER
|
||||
|
||||
__version__ = VER[1] + VER[0]
|
||||
__author__ = 'W-YI (金羿)'
|
||||
dire = ""
|
||||
begp = ""
|
||||
endp = ""
|
||||
__author__ = '金羿Eilles & 诸葛亮与八卦阵bgArray'
|
||||
|
||||
|
||||
print('建立变量,存入内存,载入字典常量函数')
|
||||
|
||||
@@ -1468,6 +1470,7 @@ def __main__():
|
||||
|
||||
root.title(READABLETEXT[41].format(__version__))
|
||||
root.geometry('900x900') # 像素
|
||||
root.iconbitmap('./resources/musicreater.ico', './resources/musicreater.ico')
|
||||
|
||||
print('完成!')
|
||||
|
||||
@@ -1765,7 +1768,7 @@ def __main__():
|
||||
tk.Button(UpLeftFrame, text=READABLETEXT[96], command=ResetSetting).pack()
|
||||
# 装入窗口
|
||||
UpLeftFrame.pack(side='left')
|
||||
|
||||
|
||||
# 中间的框容器
|
||||
UpMidleFrame = tk.Frame(UpFrame, bg='blue')
|
||||
# 列表
|
||||
|
||||
29
README.md
29
README.md
@@ -1,15 +1,23 @@
|
||||
# 音·创 Musicreater
|
||||
|
||||
[](https://choosealicense.com/licenses/apache-2.0/)
|
||||
[](https://space.bilibili.com/397369002/)
|
||||
[](https://space.bilibili.com/604072474)
|
||||
[](https://github.com/psf/black)
|
||||
|
||||
|
||||
|
||||
### 介绍
|
||||
音·创 Musicreater 是由金羿(*W-YI*)开发的一款 **《我的世界:基岩版》** 音乐生成辅助软件
|
||||
|
||||
音·创 Musicreater 是由凌天之云创新应用软件开发团队开发的一款免费开源的 **《我的世界:基岩版》** 音乐制作软件
|
||||
|
||||
欢迎加群:861684859
|
||||
|
||||
### 作者
|
||||
|
||||
金羿 (Eilles):主要作者,开发了音·创主体,及其前身“函数音乐生成器”、“世界音创”。
|
||||
金羿 Eilles:我的世界基岩版指令师,个人开发者,B站不知名UP主,在校高中生。
|
||||
|
||||
bgArray “诸葛亮与八卦阵”:修复bug,改进代码美观度,增加新功能,更改数据格式等。
|
||||
诸葛亮与八卦阵 bgArray:我的世界基岩版玩家,喜欢编程和音乐,深圳初一学生。
|
||||
|
||||
### 软件架构
|
||||
|
||||
@@ -17,19 +25,21 @@ bgArray “诸葛亮与八卦阵”:修复bug,改进代码美观度,增加
|
||||
|
||||
支持 Windows7+ 以及各个支持 Python3.8 的 Linux
|
||||
|
||||
***各位开发人员注意!!!多语言支持请使用`READABLETEXT`常量输出文字!!!如需补充,请在简体中文的语言文件(zhCN.py)中补充!!!***
|
||||
***各位开发人员注意!!!多语言支持请使用函数`_`加载文字!!!如需补充,请在简体中文的语言文件(zh-CN.lang)中补充!!!***
|
||||
|
||||
|
||||
### 安装教程
|
||||
|
||||
正在到来。
|
||||
下载音·创自动安装器,将其放在你希望安装音·创的位置,运行后将自动安装。
|
||||
|
||||
提示:下载源最好选择2GitHub。
|
||||
|
||||
### 从源代码运行教程
|
||||
|
||||
#### Windows7+
|
||||
|
||||
0. [Gitee下载(需要登陆)](https://gitee.com/EillesWan/Musicreater/repository/archive/master.zip)
|
||||
[Github下载(慢)](https://github.com/EillesWan/Musicreater/archive/refs/heads/master.zip)本程序源代码
|
||||
0. [Gitee下载(需要登陆)](https://gitee.com/EillesWan/Musicreater)
|
||||
[Github下载(慢)](https://github.com/EillesWan/Musicreater)本程序源代码
|
||||
1. 安装Python 3.8.10
|
||||
[下载64位Python安装包](https://www.python.org/ftp/python/3.8.10/python-3.8.10-amd64.exe)
|
||||
[下载32位Python安装包](https://www.python.org/ftp/python/3.8.10/python-3.8.10.exe)
|
||||
@@ -89,8 +99,9 @@ python3 Musicreater.py
|
||||
3. 感谢由 Charlie_Ping “查理平” 带来的bdx转换功能
|
||||
4. 感谢由 CMA_2401PT 带来的 BDXWorkShop 供本程序对于bdx操作的指导
|
||||
5. 感谢由 Miracle Plume “神羽” \<QQshenyu40403\>带来的羽音缭绕基岩版音色资源包
|
||||
6. 感谢广大群友为此程序提供的测试等支持
|
||||
7. 若您对我们有所贡献但您的名字没有显示在此列表中,请联系我!
|
||||
6. 感谢 Arthur Morgan 对本程序的排错提出了最大的支持
|
||||
7. 感谢广大群友为此程序提供的测试等支持
|
||||
8. 若您对我们有所贡献但您的名字没有显示在此列表中,请联系我!
|
||||
|
||||
|
||||
### 作者\<*金羿*\>(W-YI)联系方式
|
||||
|
||||
28
README_en.md
28
README_en.md
@@ -1,11 +1,17 @@
|
||||
# Musicreater
|
||||
|
||||
[](https://choosealicense.com/licenses/apache-2.0/)
|
||||
[](https://space.bilibili.com/397369002/)
|
||||
[](https://space.bilibili.com/604072474)
|
||||
[](https://github.com/psf/black)
|
||||
|
||||
### Introduction
|
||||
|
||||
Musicreater(音·创) is an Eilles(*W-YI*)'s app that is used for creating musics in **Minecraft: Bedrock Edition**.
|
||||
|
||||
Welcome to join our QQ group: 861684859
|
||||
|
||||
###Author
|
||||
### Author
|
||||
|
||||
Eilles (金羿):The main author, who developed the most and especially the principal parts of Musicreater, and its predecessors, which has been called as "*Minecraft Function Music Maker*", "*Note Fun Creater*", "*Note World Creater*"(now ,they are united as ***Musicreater***!)
|
||||
|
||||
@@ -22,7 +28,10 @@ Support Windows7+ && Linux (that supports Python3.8)
|
||||
|
||||
### Installation
|
||||
|
||||
Comming soon...
|
||||
Download the *[MSCT Auto Installer]()*, put it in a directory that you want to install *Musicreater* into.
|
||||
Then run the auto installer and it will help you to install the *Musicreator*
|
||||
|
||||
Tips: You'd better choose the 2GitHub download source
|
||||
|
||||
### Run with Source Code
|
||||
|
||||
@@ -83,14 +92,15 @@ Musicreater - > function (package) - > the following four new functions
|
||||
|
||||
### Thanks
|
||||
|
||||
1. Thank [Fuckcraft](https://github.com/fuckcraft) (“鸣凤鸽子” ,etc) for the function of Creating the Websocket Server for Minecraft: Bedrock Edition.
|
||||
1. Thank [Fuckcraft](https://github.com/fuckcraft) *(“鸣凤鸽子” ,etc)* for the function of Creating the Websocket Server for Minecraft: Bedrock Edition.
|
||||
- *!! They have given me the rights to directly copy the lib into Musicreater*
|
||||
2. Thank 昀梦\<QQ1515399885\> for finding and correcting the bugs in the commands that *Musicreater* Created.
|
||||
3. Thank Charlie_Ping “查理平” for bdx convert funtion.
|
||||
4. Thank CMA_2401PT for BDXWorkShop as the .bdx structure's operation guide.
|
||||
5. Thank Miracle Plume “神羽” \<QQshenyu40403\> for the Miracle Plume Bedrock Edition Audio Resource Pack
|
||||
6. Thanks for a lot of groupmates who support me and help me to test the program.
|
||||
7. If you have give me some help but u haven't been in the list, please contact me.
|
||||
2. Thank *昀梦*\<QQ1515399885\> for finding and correcting the bugs in the commands that *Musicreater* Created.
|
||||
3. Thank *Charlie_Ping “查理平”* for bdx convert funtion.
|
||||
4. Thank *CMA_2401PT* for BDXWorkShop as the .bdx structure's operation guide.
|
||||
5. Thank *Miracle Plume “神羽”* \<QQshenyu40403\> for the Miracle Plume Bedrock Edition Audio Resource Pack
|
||||
6. Thank *Arthur Morgan* for his/her biggest support for the debugging of Musicreater
|
||||
7. Thanks for a lot of groupmates who support me and help me to test the program.
|
||||
8. If you have give me some help but u haven't been in the list, please contact me.
|
||||
|
||||
|
||||
### Contact *Eilles(W-YI)*(金羿)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
bgArrayLib/__pycache__/instrumentConstant.cpython-38.pyc
Normal file
BIN
bgArrayLib/__pycache__/instrumentConstant.cpython-38.pyc
Normal file
Binary file not shown.
BIN
bgArrayLib/__pycache__/instrumentConstant.cpython-39.pyc
Normal file
BIN
bgArrayLib/__pycache__/instrumentConstant.cpython-39.pyc
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,12 +1,22 @@
|
||||
import mido
|
||||
import numpy
|
||||
|
||||
'''
|
||||
bpm
|
||||
bites per minutes
|
||||
每分钟的拍数
|
||||
'''
|
||||
|
||||
def mt2gt(mt, tpb_a, bpm_a):
|
||||
return round(mt / tpb_a / bpm_a * 60)
|
||||
|
||||
|
||||
def get(mid:mido.MidiFile):
|
||||
def get(mid:mido.MidiFile) -> int:
|
||||
'''传入一个 MidiFile, 返回其音乐的bpm
|
||||
:param mid : mido.MidFile
|
||||
mido库识别的midi文件数据
|
||||
:return bpm : int
|
||||
'''
|
||||
# mid = mido.MidiFile(mf)
|
||||
long = mid.length
|
||||
tpb = mid.ticks_per_beat
|
||||
|
||||
24
bgArrayLib/instrumentConstant.py
Normal file
24
bgArrayLib/instrumentConstant.py
Normal file
@@ -0,0 +1,24 @@
|
||||
instrument_list = {'0': 'harp', '1': 'harp', '2': 'pling', '3': 'harp', '4': 'pling', '5': 'pling', '6': 'harp',
|
||||
'7': 'harp',
|
||||
'8': 'share', '9': 'harp', '10': 'didgeridoo', '11': 'harp', '12': 'xylophone', '13': 'chime',
|
||||
'14': 'harp', '15': 'harp', '16': 'bass', '17': 'harp', '18': 'harp', '19': 'harp', '20': 'harp',
|
||||
'21': 'harp', '22': 'harp', '23': 'guitar', '24': 'guitar', '25': 'guitar', '26': 'guitar',
|
||||
'27': 'guitar', '28': 'guitar', '29': 'guitar', '30': 'guitar', '31': 'bass', '32': 'bass',
|
||||
'33': 'bass',
|
||||
'34': 'bass', '35': 'bass', '36': 'bass', '37': 'bass', '38': 'bass', '39': 'bass', '40': 'harp',
|
||||
'41': 'harp', '42': 'harp', '43': 'harp', '44': 'iron_xylophone', '45': 'guitar', '46': 'harp',
|
||||
'47': 'harp', '48': 'guitar', '49': 'guitar', '50': 'bit', '51': 'bit', '52': 'harp', '53': 'harp',
|
||||
'54': 'bit', '55': 'flute', '56': 'flute', '57': 'flute', '58': 'flute', '59': 'flute',
|
||||
'60': 'flute',
|
||||
'61': 'flute', '62': 'flute', '63': 'flute', '64': 'bit', '65': 'bit', '66': 'bit', '67': 'bit',
|
||||
'68': 'flute', '69': 'harp', '70': 'harp', '71': 'flute', '72': 'flute', '73': 'flute', '74': 'harp',
|
||||
'75': 'flute', '76': 'harp', '77': 'harp', '78': 'harp', '79': 'harp', '80': 'bit', '81': 'bit',
|
||||
'82': 'bit', '83': 'bit', '84': 'bit', '85': 'bit', '86': 'bit', '87': 'bit', '88': 'bit',
|
||||
'89': 'bit',
|
||||
'90': 'bit', '91': 'bit', '92': 'bit', '93': 'bit', '94': 'bit', '95': 'bit', '96': 'bit',
|
||||
'97': 'bit',
|
||||
'98': 'bit', '99': 'bit', '100': 'bit', '101': 'bit', '102': 'bit', '103': 'bit', '104': 'harp',
|
||||
'105': 'banjo', '106': 'harp', '107': 'harp', '108': 'harp', '109': 'harp', '110': 'harp',
|
||||
'111': 'guitar', '112': 'harp', '113': 'bell', '114': 'harp', '115': 'cow_bell', '116': 'basedrum',
|
||||
'117': 'bass', '118': 'bit', '119': 'basedrum', '120': 'guitar', '121': 'harp', '122': 'harp',
|
||||
'123': 'harp', '124': 'harp', '125': 'hat', '126': 'basedrum', '127': 'snare'}
|
||||
@@ -1,148 +1,148 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
from nmcsup.log import log
|
||||
import pickle
|
||||
|
||||
|
||||
class Note:
|
||||
def __init__(self, channel, pitch, velocity, time, time_position, instrument):
|
||||
self.channel = channel
|
||||
self.pitch = pitch
|
||||
self.velocity = velocity
|
||||
self.delay = time
|
||||
self.time_position = time_position
|
||||
self.instrument = instrument
|
||||
self.CD = "d"
|
||||
|
||||
def get_CD(self, start, end):
|
||||
if end - start > 1.00:
|
||||
self.CD = "c"
|
||||
else:
|
||||
self.CD = "d"
|
||||
|
||||
|
||||
def midiNewReader(midfile: str):
|
||||
import mido
|
||||
# from msctspt.threadOpera import NewThread
|
||||
from bgArrayLib.bpm import get
|
||||
|
||||
def Time(mt, tpb_a, bpm_a):
|
||||
return round(mt / tpb_a / bpm_a * 60 * 20)
|
||||
|
||||
Notes = []
|
||||
tracks = []
|
||||
note_list = []
|
||||
close = []
|
||||
on = []
|
||||
off = []
|
||||
instruments = []
|
||||
isPercussion = False
|
||||
try:
|
||||
mid = mido.MidiFile(midfile)
|
||||
except Exception:
|
||||
log("找不到文件或无法读取文件" + midfile)
|
||||
return False
|
||||
tpb = mid.ticks_per_beat
|
||||
bpm = get(mid)
|
||||
# 解析
|
||||
# def loadMidi(track1):
|
||||
for track in mid.tracks:
|
||||
overallTime = 0.0
|
||||
instrument = 0
|
||||
for i in track:
|
||||
overallTime += i.time
|
||||
try:
|
||||
if i.channel != 9:
|
||||
# try:
|
||||
# log("event_type(事件): " + str(i.type) + " channel(音轨): " + str(i.channel) +
|
||||
# " note/pitch(音高): " +
|
||||
# str(i[2]) +
|
||||
# " velocity(力度): " + str(i.velocity) + " time(间隔时间): " + str(i.time) +
|
||||
# " overallTime/globalTime/timePosition: " + str(overallTime) + " \n")
|
||||
# except AttributeError:
|
||||
# log("event_type(事件): " + str(i.type) + " thing(内容):" + str(i) + " \n")
|
||||
if 'program_change' in str(i):
|
||||
instrument = i.program
|
||||
if instrument > 119: # 音色不够
|
||||
pass
|
||||
else:
|
||||
instruments.append(i.program)
|
||||
if 'note_on' in str(i) and i.velocity > 0:
|
||||
print(i)
|
||||
# print(i.note)
|
||||
# print([Note(i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm), instrument)])
|
||||
tracks.append(
|
||||
[Note(i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm), instrument)])
|
||||
note_list.append(
|
||||
[i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm), instrument])
|
||||
on.append([i.note, Time(overallTime, tpb, bpm)])
|
||||
# return [Note(i.channel, i, i.velocity, i.time, Time(overallTime, tpb, bpm))]
|
||||
if 'note_off' in str(i) or 'note_on' in str(i) and i.velocity == 0:
|
||||
# print(i)
|
||||
# print([Note(i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm))])
|
||||
close.append(
|
||||
[Note(i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm), instrument)])
|
||||
off.append([i.note, Time(overallTime, tpb, bpm)])
|
||||
# return [Note(i.channel, i, i.velocity, i.time, Time(overallTime, tpb, bpm))]
|
||||
except AttributeError:
|
||||
pass
|
||||
if 'note_on' in str(i) and i.channel == 9:
|
||||
if 'note_on' in str(i) and i.velocity > 0:
|
||||
print(i)
|
||||
# print(i.note)
|
||||
# print([Note(i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm), -1)])
|
||||
tracks.append([Note(i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm), -1)])
|
||||
note_list.append([i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm), -1])
|
||||
on.append([i.note, Time(overallTime, tpb, bpm)])
|
||||
isPercussion = True
|
||||
# return [Note(i.channel, i, i.velocity, i.time, Time(overallTime, tpb, bpm))]
|
||||
Notes.append(tracks)
|
||||
if instruments is []:
|
||||
instruments.append(0)
|
||||
instruments = list(set(instruments))
|
||||
with open("1.pkl", 'wb') as b:
|
||||
pickle.dump([instruments, isPercussion], b)
|
||||
|
||||
# for j, track in enumerate(mid.tracks):
|
||||
# th = NewThread(loadMidi, (track,))
|
||||
# th.start()
|
||||
# Notes.append(th.getResult())
|
||||
|
||||
# print(Notes)
|
||||
print(Notes.__len__())
|
||||
# print(note_list)
|
||||
print(instruments)
|
||||
return Notes
|
||||
# return [Notes, note_list]
|
||||
|
||||
|
||||
def midiClassReader(midfile: str):
|
||||
import mido
|
||||
from bgArrayLib.bpm import get
|
||||
|
||||
def Time(mt, tpb_a, bpm_a):
|
||||
return round(mt / tpb_a / bpm_a * 60 * 20)
|
||||
|
||||
Notes = []
|
||||
tracks = []
|
||||
try:
|
||||
mid = mido.MidiFile(filename=midfile,clip=True)
|
||||
except Exception:
|
||||
log("找不到文件或无法读取文件" + midfile)
|
||||
return False
|
||||
log("midi已经载入了。")
|
||||
tpb = mid.ticks_per_beat
|
||||
bpm = get(mid)
|
||||
for track in mid.tracks:
|
||||
overallTime = 0.0
|
||||
instrument = 0
|
||||
for i in track:
|
||||
overallTime += i.time
|
||||
if 'note_on' in str(i) and i.velocity > 0:
|
||||
print(i)
|
||||
tracks.append(
|
||||
[Note(i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm), instrument)])
|
||||
Notes.append(tracks)
|
||||
print(Notes.__len__())
|
||||
return Notes
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
from nmcsup.log import log
|
||||
import pickle
|
||||
|
||||
|
||||
class Note:
|
||||
def __init__(self, channel, pitch, velocity, time, time_position, instrument):
|
||||
self.channel = channel
|
||||
self.pitch = pitch
|
||||
self.velocity = velocity
|
||||
self.delay = time
|
||||
self.time_position = time_position
|
||||
self.instrument = instrument
|
||||
self.CD = "d"
|
||||
|
||||
def get_CD(self, start, end):
|
||||
if end - start > 1.00:
|
||||
self.CD = "c"
|
||||
else:
|
||||
self.CD = "d"
|
||||
|
||||
|
||||
def midiNewReader(midfile: str):
|
||||
import mido
|
||||
# from msctspt.threadOpera import NewThread
|
||||
from bgArrayLib.bpm import get
|
||||
|
||||
def Time(mt, tpb_a, bpm_a):
|
||||
return round(mt / tpb_a / bpm_a * 60 * 20)
|
||||
|
||||
Notes = []
|
||||
tracks = []
|
||||
note_list = []
|
||||
close = []
|
||||
on = []
|
||||
off = []
|
||||
instruments = []
|
||||
isPercussion = False
|
||||
try:
|
||||
mid = mido.MidiFile(midfile)
|
||||
except Exception:
|
||||
log("找不到文件或无法读取文件" + midfile)
|
||||
return False
|
||||
tpb = mid.ticks_per_beat
|
||||
bpm = get(mid)
|
||||
# 解析
|
||||
# def loadMidi(track1):
|
||||
for track in mid.tracks:
|
||||
overallTime = 0.0
|
||||
instrument = 0
|
||||
for i in track:
|
||||
overallTime += i.time
|
||||
try:
|
||||
if i.channel != 9:
|
||||
# try:
|
||||
# log("event_type(事件): " + str(i.type) + " channel(音轨): " + str(i.channel) +
|
||||
# " note/pitch(音高): " +
|
||||
# str(i[2]) +
|
||||
# " velocity(力度): " + str(i.velocity) + " time(间隔时间): " + str(i.time) +
|
||||
# " overallTime/globalTime/timePosition: " + str(overallTime) + " \n")
|
||||
# except AttributeError:
|
||||
# log("event_type(事件): " + str(i.type) + " thing(内容):" + str(i) + " \n")
|
||||
if 'program_change' in str(i):
|
||||
instrument = i.program
|
||||
if instrument > 119: # 音色不够
|
||||
pass
|
||||
else:
|
||||
instruments.append(i.program)
|
||||
if 'note_on' in str(i) and i.velocity > 0:
|
||||
print(i)
|
||||
# print(i.note)
|
||||
# print([Note(i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm), instrument)])
|
||||
tracks.append(
|
||||
[Note(i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm), instrument)])
|
||||
note_list.append(
|
||||
[i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm), instrument])
|
||||
on.append([i.note, Time(overallTime, tpb, bpm)])
|
||||
# return [Note(i.channel, i, i.velocity, i.time, Time(overallTime, tpb, bpm))]
|
||||
if 'note_off' in str(i) or 'note_on' in str(i) and i.velocity == 0:
|
||||
# print(i)
|
||||
# print([Note(i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm))])
|
||||
close.append(
|
||||
[Note(i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm), instrument)])
|
||||
off.append([i.note, Time(overallTime, tpb, bpm)])
|
||||
# return [Note(i.channel, i, i.velocity, i.time, Time(overallTime, tpb, bpm))]
|
||||
except AttributeError:
|
||||
pass
|
||||
if 'note_on' in str(i) and i.channel == 9:
|
||||
if 'note_on' in str(i) and i.velocity > 0:
|
||||
print(i)
|
||||
# print(i.note)
|
||||
# print([Note(i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm), -1)])
|
||||
tracks.append([Note(i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm), -1)])
|
||||
note_list.append([i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm), -1])
|
||||
on.append([i.note, Time(overallTime, tpb, bpm)])
|
||||
isPercussion = True
|
||||
# return [Note(i.channel, i, i.velocity, i.time, Time(overallTime, tpb, bpm))]
|
||||
Notes.append(tracks)
|
||||
if instruments is []:
|
||||
instruments.append(0)
|
||||
instruments = list(set(instruments))
|
||||
with open("1.pkl", 'wb') as b:
|
||||
pickle.dump([instruments, isPercussion], b)
|
||||
|
||||
# for j, track in enumerate(mid.tracks):
|
||||
# th = NewThread(loadMidi, (track,))
|
||||
# th.start()
|
||||
# Notes.append(th.getResult())
|
||||
|
||||
# print(Notes)
|
||||
print(Notes.__len__())
|
||||
# print(note_list)
|
||||
print(instruments)
|
||||
return Notes
|
||||
# return [Notes, note_list]
|
||||
|
||||
|
||||
def midiClassReader(midfile: str):
|
||||
import mido
|
||||
from bgArrayLib.bpm import get
|
||||
|
||||
def Time(mt, tpb_a, bpm_a):
|
||||
return round(mt / tpb_a / bpm_a * 60 * 20)
|
||||
|
||||
Notes = []
|
||||
tracks = []
|
||||
try:
|
||||
mid = mido.MidiFile(filename=midfile,clip=True)
|
||||
except Exception:
|
||||
log("找不到文件或无法读取文件" + midfile)
|
||||
return False
|
||||
log("midi已经载入了。")
|
||||
tpb = mid.ticks_per_beat
|
||||
bpm = get(mid)
|
||||
for track in mid.tracks:
|
||||
overallTime = 0.0
|
||||
instrument = 0
|
||||
for i in track:
|
||||
overallTime += i.time
|
||||
if 'note_on' in str(i) and i.velocity > 0:
|
||||
print(i)
|
||||
tracks.append(
|
||||
[Note(i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm), instrument)])
|
||||
Notes.append(tracks)
|
||||
print(Notes.__len__())
|
||||
return Notes
|
||||
|
||||
BIN
fcwslib/版权声明.png
Normal file
BIN
fcwslib/版权声明.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 67 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
5
languages/autosave.tmp.txt
Normal file
5
languages/autosave.tmp.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
zh-CN
|
||||
简体中文 中国大陆
|
||||
Simplified Chinese, Chinese Mainland
|
||||
简体中文 中国大陆
|
||||
|
||||
@@ -1,18 +1,21 @@
|
||||
# -*- coding:utf-8 -*-
|
||||
'''此功能已废弃'''
|
||||
|
||||
|
||||
|
||||
|
||||
# W-YI 金羿
|
||||
# QQ 2647547478
|
||||
# 音·创 开发交流群 861684859
|
||||
# Email EillesWan2006@163.com W-YI_DoctorYI@outlook.com EillesWan@outlook.com
|
||||
# 版权所有 Team-Ryoun 金羿
|
||||
# 版权所有 Team-Ryoun 金羿("Eilles Wan") & 诸葛亮与八卦阵("bgArray")
|
||||
# 若需转载或借鉴 请附作者
|
||||
|
||||
|
||||
"""
|
||||
Copyright 2022 Eilles Wan (金羿)
|
||||
Copyright 2022 Team-Ryoun 金羿("Eilles Wan") & 诸葛亮与八卦阵("bgArray")
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the 'License')
|
||||
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
|
||||
|
||||
|
||||
@@ -1,20 +1,203 @@
|
||||
# -*- coding:utf-8 -*-
|
||||
'''对于音·创的语言支持兼语言文件编辑器'''
|
||||
|
||||
"""
|
||||
Copyright 2022 Team-Ryoun
|
||||
|
||||
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.
|
||||
"""
|
||||
|
||||
DEFAULTLANGUAGE = 'zh-CN'
|
||||
|
||||
LANGUAGELIST = {
|
||||
# 第一个是语言的中文名称和地区
|
||||
# 第二个是语言的英文名称和地区
|
||||
# 第三个是语言的本地名称和地区
|
||||
'zh-CN': (
|
||||
"简体中文 中国大陆",
|
||||
"Simplified Chinese, China Mainland",
|
||||
"Simplified Chinese - China Mainland",
|
||||
"简体中文 中国大陆",
|
||||
),
|
||||
'zh-TW': (
|
||||
"繁体中文 中国台湾省",
|
||||
"Traditional Chinese - Taiwan, China",
|
||||
"正體中文,中国台灣省",
|
||||
),
|
||||
# 'zh-HK': (
|
||||
# "繁体中文 香港",
|
||||
# "Traditional Chinese - the Hong Kong Special Administrative Region",
|
||||
# "繁體中文,香港特別行政區",
|
||||
# ),
|
||||
# 'zh-MO': (
|
||||
# "繁体中文 澳门",
|
||||
# "Traditional Chinese - the Macao Special Administrative Region",
|
||||
# "繁體中文,澳門特別行政區",
|
||||
# ),
|
||||
'en-GB': (
|
||||
"英式英语 大不列颠",
|
||||
"British English, Great Britain",
|
||||
"英语 英国",
|
||||
"British English - the United Kingdom",
|
||||
"British English - the United Kingdom",
|
||||
),
|
||||
'zh-ME' : (
|
||||
"喵喵文 中国大陆",
|
||||
"Meow Catsese - China Mainland"
|
||||
"喵喵喵~ 祖国喵~"
|
||||
)
|
||||
}
|
||||
|
||||
if DEFAULTLANGUAGE == 'zh-CN':
|
||||
# 对于旧版本音·创的语言支持
|
||||
# 重构之后将停止使用
|
||||
try:
|
||||
from languages.zhCN import READABLETEXT
|
||||
elif DEFAULTLANGUAGE == 'en-GB':
|
||||
from languages.enGB import READABLETEXT
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
from msctLib.log import log
|
||||
|
||||
def __loadLanguage(languageFilename: str):
|
||||
with open(languageFilename, 'r', encoding='utf-8') as languageFile:
|
||||
_text = {}
|
||||
for line in languageFile:
|
||||
if line.startswith('#'):
|
||||
continue
|
||||
line = line.split(' ', 1)
|
||||
_text[line[0]] = line[1].replace('\n', '')
|
||||
langkeys = _text.keys()
|
||||
with open(languageFilename.replace(languageFilename[-10:-5], 'zh-CN'), 'r', encoding='utf-8') as defaultLangFile:
|
||||
for line in defaultLangFile:
|
||||
if line.startswith('#'):
|
||||
continue
|
||||
line = line.split(' ', 1)
|
||||
if not line[0] in langkeys:
|
||||
_text[line[0]] = line[1].replace('\n', '')
|
||||
from msctLib.log import log
|
||||
log(f'丢失对于 {line[0]} 的本地化文本', 'WARRING')
|
||||
langkeys = _text.keys()
|
||||
return _text
|
||||
|
||||
|
||||
if not DEFAULTLANGUAGE == 'zh-CN':
|
||||
if DEFAULTLANGUAGE in LANGUAGELIST.keys():
|
||||
_TEXT = __loadLanguage('./languages/' + DEFAULTLANGUAGE + '.lang')
|
||||
else:
|
||||
raise KeyError(f'无法打开默认语言{DEFAULTLANGUAGE}')
|
||||
|
||||
|
||||
def wordTranslate(singleWord: str, debug: bool = False):
|
||||
import requests
|
||||
try:
|
||||
return \
|
||||
requests.post('https://fanyi.baidu.com/sug', data={'kw': f'{singleWord}'}).json()['data'][0]['v'].split(
|
||||
'; ')[0]
|
||||
except:
|
||||
log(f"无法翻译文本{singleWord}", level='WARRING', isPrinted=debug)
|
||||
return None
|
||||
|
||||
|
||||
def _(text: str, debug: bool = False):
|
||||
try:
|
||||
return _TEXT[text]
|
||||
except:
|
||||
if debug:
|
||||
raise KeyError(f'无法找到翻译文本{text}')
|
||||
else:
|
||||
log(f'无法找到本地化文本{text}','ERROR')
|
||||
return ''
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# 启动语言编辑器
|
||||
import tkinter as tk
|
||||
from tkinter.filedialog import askopenfilename as askfilen
|
||||
|
||||
LANGNAME = _('LANGLOCALNAME')
|
||||
|
||||
|
||||
def _changeDefaultLang():
|
||||
global _TEXT
|
||||
global DEFAULTLANGUAGE
|
||||
|
||||
fileName = askfilen(title='选择所翻译的语言文件', initialdir=r'./',
|
||||
filetypes=[('音·创语言文件', '.lang'), ('所有文件', '*')],
|
||||
defaultextension='.lang',
|
||||
initialfile='.lang')
|
||||
_TEXT = __loadLanguage(fileName)
|
||||
DEFAULTLANGUAGE = _('LANGKEY')
|
||||
LANGNAME = _('LANGLOCALNAME')
|
||||
|
||||
orignText = ''
|
||||
transText = ''
|
||||
for i, j in _TEXT.items():
|
||||
orignText += i + '\n'
|
||||
transText += j + '\n'
|
||||
|
||||
Origntextbar.insert('end', orignText)
|
||||
Translatetextbar.insert('end', transText)
|
||||
|
||||
global setlangbutton
|
||||
setlangbutton['text'] = f'对标语言{LANGNAME}'
|
||||
|
||||
|
||||
def _autoSave(event=None):
|
||||
with open('autosave.tmp.txt', 'w', encoding='utf-8') as f:
|
||||
f.write(Translatetextbar.get(1.0, 'end'))
|
||||
print(str(event))
|
||||
|
||||
|
||||
root = tk.Tk()
|
||||
|
||||
root.geometry('600x500')
|
||||
|
||||
root.bind("<Motion>", _autoSave)
|
||||
|
||||
nowText = ''
|
||||
|
||||
Orignrame = tk.Frame(root, bd=2)
|
||||
Translaterame = tk.Frame(root, bd=2)
|
||||
|
||||
Orignscrollbar = tk.Scrollbar(Orignrame)
|
||||
Origntextbar = tk.Text(Orignrame, width=35, height=40)
|
||||
|
||||
Translatetextbar = tk.Text(Translaterame, width=40, height=37, undo=True)
|
||||
Translatescrollbar = tk.Scrollbar(Translaterame)
|
||||
|
||||
def ctrlZ():
|
||||
Translatetextbar.edit_undo()
|
||||
Translatetextbar.bind("<Control-z>", ctrlZ)
|
||||
|
||||
def ctrlY():
|
||||
Translatetextbar.edit_redo()
|
||||
Translatetextbar.bind("<Control-y>", ctrlY)
|
||||
|
||||
tk.Button(Translaterame, text='保存', command=_autoSave).pack(side='bottom', fill='x')
|
||||
|
||||
tk.Label(Orignrame, text='中文原文').pack(side='top')
|
||||
Origntextbar.pack(side='left', fill='y')
|
||||
Orignscrollbar.pack(side='left', fill='y')
|
||||
|
||||
setlangbutton = tk.Button(Translaterame, text=f'对标语言{LANGNAME}', command=_changeDefaultLang)
|
||||
setlangbutton.pack(side='top')
|
||||
Translatescrollbar.pack(side='right', fill='y')
|
||||
Translatetextbar.pack(side='right', fill='y')
|
||||
|
||||
Orignscrollbar.config(command=Origntextbar.yview)
|
||||
Origntextbar.config(yscrollcommand=Orignscrollbar.set)
|
||||
|
||||
Translatescrollbar.config(command=Translatetextbar.yview)
|
||||
Translatetextbar.config(yscrollcommand=Translatescrollbar.set)
|
||||
|
||||
Orignrame.pack(side='left')
|
||||
Translaterame.pack(side='right')
|
||||
|
||||
tk.mainloop()
|
||||
|
||||
16
languages/zh-CN.lang
Normal file
16
languages/zh-CN.lang
Normal file
@@ -0,0 +1,16 @@
|
||||
# 音·创 本地化语言文件
|
||||
# 使用 空格 把键与对应文本隔开
|
||||
# 使用 井字符 在每一行的开头编写注释
|
||||
# 注意!井字符请开头放,切勿含有空格
|
||||
# 也切勿在正文结尾放!
|
||||
LANGKEY zh-CN
|
||||
LANGCHINESENAME 简体中文 中国大陆
|
||||
LANGENGLIFHNAME Simplified Chinese, Chinese Mainland
|
||||
LANGLOCALNAME 简体中文 中国大陆
|
||||
MSCT 音·创
|
||||
F音创 音·创 Musicreater
|
||||
关于 音·创 - 关于
|
||||
凌云pairs 凌天之云创新我的世界开发团队\n×\n凌天之云创新计算机应用软件开发团队
|
||||
开发者 - 开发人员 -
|
||||
译者 - 翻译人员 -
|
||||
确定 确定
|
||||
17
languages/zh-ME.lang
Normal file
17
languages/zh-ME.lang
Normal file
@@ -0,0 +1,17 @@
|
||||
# 音创创喵的 本地化语言文件
|
||||
# 使用 空格 把键与对应文本隔开
|
||||
# 使用 井字符 在每一行的开头编写注释
|
||||
# 注意!井字符请开头放,切勿含有空格
|
||||
# 也切勿在正文结尾放!
|
||||
LANGKEY zh-ME
|
||||
LANGCHINESENAME 喵喵文 中国大陆
|
||||
LANGENGLIFHNAME Meow Catsese, China Mainland
|
||||
LANGLOCALNAME 喵喵喵~ 祖国喵~
|
||||
TRANSLATERS 金羿,Email EillesWan@outlook.com,QQ 2647547478
|
||||
MSCT 音创创喵~
|
||||
F音创 音·创 Musicreater
|
||||
关于 音创创喵的主人们
|
||||
凌云pairs 凌天之云创新我的世界开发团队\n×\n凌天之云创新计算机应用软件开发团队
|
||||
开发者 ~ 主人们 ~
|
||||
译者 ~ 爸爸妈妈们 ~
|
||||
确定 好哒~
|
||||
BIN
msctLib/UI设计图.pdn
Normal file
BIN
msctLib/UI设计图.pdn
Normal file
Binary file not shown.
BIN
msctLib/UI设计图.png
Normal file
BIN
msctLib/UI设计图.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
0
msctLib/__init__.py
Normal file
0
msctLib/__init__.py
Normal file
BIN
msctLib/__pycache__/__init__.cpython-38.pyc
Normal file
BIN
msctLib/__pycache__/__init__.cpython-38.pyc
Normal file
Binary file not shown.
BIN
msctLib/__pycache__/data.cpython-38.pyc
Normal file
BIN
msctLib/__pycache__/data.cpython-38.pyc
Normal file
Binary file not shown.
BIN
msctLib/__pycache__/display.cpython-38.pyc
Normal file
BIN
msctLib/__pycache__/display.cpython-38.pyc
Normal file
Binary file not shown.
BIN
msctLib/__pycache__/function.cpython-38.pyc
Normal file
BIN
msctLib/__pycache__/function.cpython-38.pyc
Normal file
Binary file not shown.
BIN
msctLib/__pycache__/log.cpython-38.pyc
Normal file
BIN
msctLib/__pycache__/log.cpython-38.pyc
Normal file
Binary file not shown.
BIN
msctLib/bugExecution.exe
Normal file
BIN
msctLib/bugExecution.exe
Normal file
Binary file not shown.
50
msctLib/buildIN.py
Normal file
50
msctLib/buildIN.py
Normal file
@@ -0,0 +1,50 @@
|
||||
# -*- coding: UTF-8 -*-
|
||||
"""音·创的核心内置组件功能集合"""
|
||||
|
||||
|
||||
|
||||
class version:
|
||||
libraries = (
|
||||
'mido', 'amulet', 'amulet-core', 'amulet-nbt', 'piano_transcription_inference', 'pypinyin',
|
||||
'pyinstaller', 'py7zr','websockets', 'torch', 'requests'
|
||||
)
|
||||
"""当前所需库"""
|
||||
|
||||
version = ('0.2.0', 'Delta',)
|
||||
"""当前版本"""
|
||||
|
||||
def __init__(self) -> None:
|
||||
|
||||
self.libraries = version.libraries
|
||||
"""当前所需库"""
|
||||
|
||||
self.version = version.version
|
||||
"""当前版本"""
|
||||
|
||||
|
||||
def installLibraries(self,index:str = 'https://pypi.tuna.tsinghua.edu.cn/simple'):
|
||||
"""安装全部开发用库"""
|
||||
from sys import platform
|
||||
import os
|
||||
if platform == 'win32':
|
||||
import shutil
|
||||
try:
|
||||
shutil.rmtree(os.getenv('APPDATA') + '\\Musicreater\\')
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
for i in self.libraries:
|
||||
print("安装库:" + i)
|
||||
os.system(f"python -m pip install {i} -i {index}")
|
||||
elif platform == 'linux':
|
||||
os.system("sudo apt-get install python3-pip")
|
||||
os.system("sudo apt-get install python3-tk")
|
||||
os.system("sudo apt-get install python3-tkinter")
|
||||
for i in self.libraries:
|
||||
print("安装库:" + i)
|
||||
os.system(f"sudo python3 -m pip install {i} -i {index}")
|
||||
|
||||
|
||||
def __call__(self):
|
||||
'''直接安装库,顺便返回一下当前版本'''
|
||||
self.installLibraries()
|
||||
return self.version
|
||||
151
msctLib/data.py
Normal file
151
msctLib/data.py
Normal file
@@ -0,0 +1,151 @@
|
||||
# -*- coding:utf-8 -*-
|
||||
|
||||
|
||||
import pickle
|
||||
import json
|
||||
from typing import Any, Iterable
|
||||
|
||||
|
||||
|
||||
|
||||
class pickleIO:
|
||||
|
||||
def __init__(self,fileName:str,data: Any = None) -> None:
|
||||
'''简单的pickle操作功能'''
|
||||
self.file = fileName
|
||||
if data:
|
||||
self._data = data
|
||||
else:
|
||||
with open (self.file, 'rb') as f:
|
||||
self._data = pickle.load(f)
|
||||
|
||||
def __call__(self, *args: Any, **kwds: Any) -> Any:
|
||||
return self.data
|
||||
|
||||
def write(self):
|
||||
'''将数据写入pickle'''
|
||||
with open (self.file, 'wb') as f:
|
||||
pickle.dump(self._data, f)
|
||||
|
||||
|
||||
def load(self) -> Any:
|
||||
'''从文件读取数据'''
|
||||
with open (self.file, 'rb') as f:
|
||||
self._data = pickle.load(f)
|
||||
return self.data
|
||||
|
||||
@property
|
||||
def data(self):
|
||||
'''返回数据值'''
|
||||
if self._data is None:
|
||||
raise ValueError('无可用值载入或值为None')
|
||||
else:
|
||||
return self._data
|
||||
|
||||
|
||||
|
||||
class jsonIO:
|
||||
|
||||
def __init__(self,fileName:str,data: Any = None) -> None:
|
||||
'''简单的json操作功能'''
|
||||
self.file = fileName
|
||||
if data:
|
||||
self._data = data
|
||||
else:
|
||||
with open (self.file, 'r', encoding='utf-8') as f:
|
||||
self._data = json.load(f)
|
||||
|
||||
def __call__(self, *args: Any, **kwds: Any) -> Any:
|
||||
return self.data
|
||||
|
||||
def write(self):
|
||||
'''将数据写入json'''
|
||||
with open (self.file, 'w', encoding='utf-8') as f:
|
||||
json.dump(self._data, f)
|
||||
|
||||
|
||||
def load(self) -> Any:
|
||||
'''从文件读取数据'''
|
||||
with open (self.file, 'r', encoding='utf-8') as f:
|
||||
self._data = json.load(f)
|
||||
return self.data
|
||||
|
||||
@property
|
||||
def data(self):
|
||||
'''返回数据值'''
|
||||
return self._data
|
||||
|
||||
|
||||
class uniteIO:
|
||||
|
||||
def __init__(self,fileName:str,fileType = None,data: Any = None) -> None:
|
||||
'''简单的文件数据IO操作功能'''
|
||||
self.filename = fileName
|
||||
if not fileType is None:
|
||||
self._type = fileType
|
||||
else:
|
||||
try:
|
||||
with open (self.filename, 'r', encoding='utf-8') as f:
|
||||
self._type = json
|
||||
except:
|
||||
with open (self.file, 'rb') as f:
|
||||
self._type = pickle
|
||||
|
||||
|
||||
|
||||
if not data is None:
|
||||
self._data = data
|
||||
else:
|
||||
self._data = self.load()
|
||||
|
||||
|
||||
def __call__(self, *args: Any, **kwds: Any) -> Any:
|
||||
return self.data
|
||||
|
||||
def write(self):
|
||||
'''将数据写入文件'''
|
||||
if self._type == json:
|
||||
self._wfile = open(self.filename, 'w', encoding='utf-8')
|
||||
elif self._type == pickle:
|
||||
self._wfile = open(self.file, 'wb')
|
||||
self._type.dump(self._data, self._wfile)
|
||||
|
||||
|
||||
def load(self) -> Any:
|
||||
'''从文件读取数据'''
|
||||
if self._type == json:
|
||||
self._rfile = open(self.filename, 'r', encoding='utf-8')
|
||||
elif self._type == pickle:
|
||||
self._rfile = open(self.file, 'rb')
|
||||
self._data = self._type.load(self._rfile)
|
||||
return self.data
|
||||
|
||||
@property
|
||||
def data(self):
|
||||
'''返回数据值'''
|
||||
return self._data
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
from sys import argv
|
||||
|
||||
if argv[1]:
|
||||
input(uniteIO(argv[1]).data)
|
||||
297
msctLib/display.py
Normal file
297
msctLib/display.py
Normal file
@@ -0,0 +1,297 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
'''音·创的GUI窗口界面显示库
|
||||
:若要使用其他界面显示,请详见:
|
||||
:开发说明|指南'''
|
||||
|
||||
|
||||
import tkinter as tk
|
||||
import tkinter.simpledialog as sdialog
|
||||
import tkinter.filedialog as fdialog
|
||||
from msctLib.log import log
|
||||
|
||||
|
||||
DEFAULTBLUE = (0, 137, 242)
|
||||
WEAKBLUE = (0, 161, 231)
|
||||
LIGHTBLUE = (38, 226, 255)
|
||||
RED = (255, 52, 50)
|
||||
PURPLE = (171, 112, 255)
|
||||
GREEN = (0, 255, 33)
|
||||
WHITE = (242, 244, 246)
|
||||
BLACK = (18, 17, 16)
|
||||
|
||||
|
||||
backgroundColor = WHITE
|
||||
frontgroundColor = BLACK
|
||||
loadingColor = DEFAULTBLUE
|
||||
errorColor = RED
|
||||
okColor = GREEN
|
||||
tipsColor = PURPLE
|
||||
|
||||
# 注:UI界面字体、代码字体
|
||||
fontPattern = ('DengXian Light', 'Fira Code')
|
||||
|
||||
|
||||
class disp:
|
||||
'''音·创 的基本Tk窗口显示库'''
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
root: tk.Tk = tk.Tk(),
|
||||
debug: bool = False,
|
||||
title: str = '音·创',
|
||||
geometry: str = '0x0',
|
||||
iconbitmap: tuple = ('', ''),
|
||||
menuWidget: dict = {},
|
||||
wordView: str = '音·创 Musicreater',
|
||||
buttons: list = [],
|
||||
settingBox: list = [],
|
||||
notemap: list = [],
|
||||
) -> None:
|
||||
'''使用参数建立基本的 音·创 窗口
|
||||
:param root 根窗口
|
||||
:param debug 是否将日志输出到控制台
|
||||
:param title 窗口标题
|
||||
wordview: str #言论部分显示的字样
|
||||
button: list = [ # 操作按钮部分
|
||||
dict = {
|
||||
按钮名称 : tuple(按钮图标,执行函数)
|
||||
},
|
||||
],
|
||||
settingbox: list = [ # 设置部分显示的字样及其对应的设置函数
|
||||
(
|
||||
设置名称:str,
|
||||
值类型:tuple,
|
||||
显示内容:str,
|
||||
设置操作函数:<function>,
|
||||
)
|
||||
],
|
||||
map: list = [ # 一首曲目的音符数据
|
||||
音符数据
|
||||
]
|
||||
'''
|
||||
|
||||
self.root = root
|
||||
self.title = title
|
||||
self.geometry = geometry
|
||||
self.menuWidget = menuWidget
|
||||
self.wordView = wordView
|
||||
self.buttons = buttons
|
||||
self.settingBox = settingBox
|
||||
self.notemap = notemap
|
||||
|
||||
self.setTitle(title, debug)
|
||||
self.setGeometry(geometry, debug)
|
||||
self.setIcon(*iconbitmap, debug=debug)
|
||||
|
||||
self.setMenu(menuWidget)
|
||||
|
||||
self.initWidget(wordView, buttons, settingBox, notemap)
|
||||
|
||||
# 设定函数部分
|
||||
def setTitle(self, title: str = '', debug: bool = False) -> None:
|
||||
'''设置窗口标题'''
|
||||
self.root.title = title
|
||||
if debug:
|
||||
log(f"设置窗口标题{title}")
|
||||
|
||||
def setGeometry(self, geometry: str = '0x0', debug: bool = False) -> None:
|
||||
'''设置窗口大小'''
|
||||
self.root.geometry(geometry)
|
||||
if debug:
|
||||
log(f"设置窗口大小{geometry}")
|
||||
|
||||
def setIcon(
|
||||
self, bitmap: str = './musicreater.ico', default: str = '', debug: bool = False
|
||||
) -> None:
|
||||
'''设置窗口图标
|
||||
注意,default参数仅在Windows下有效,其意为将所有没有图标的窗口设置默认图标
|
||||
如果在非Windows环境使用default参数,一个Error将被升起'''
|
||||
if not debug:
|
||||
try:
|
||||
if default:
|
||||
self.root.iconbitmap(bitmap, default)
|
||||
log(f'设置图标为{bitmap},默认为{default}')
|
||||
else:
|
||||
self.root.iconbitmap(bitmap)
|
||||
log(f'设置图标为{bitmap}')
|
||||
return True
|
||||
except Exception as e:
|
||||
log(str(e), 'ERROR')
|
||||
return False
|
||||
else:
|
||||
self.root.iconbitmap(bitmap, default)
|
||||
return
|
||||
|
||||
def setMenu(self, menuWidgets: dict = {}, debug: bool = False) -> None:
|
||||
'''设置根菜单'''
|
||||
if not menuWidgets:
|
||||
# 如果传入空参数则返回当前菜单
|
||||
try:
|
||||
return self.RootMenu
|
||||
except Exception as E:
|
||||
if debug:
|
||||
raise E
|
||||
else:
|
||||
log('无法读取菜单信息', 'WARRING')
|
||||
# 如果不是空参数则新建菜单
|
||||
self.RootMenu = {}
|
||||
self.mainMenuBar = tk.Menu(self.root)
|
||||
for menuName, menuCmd in menuWidgets.items():
|
||||
# 取得一个菜单名和一堆菜单函数及其显示名称
|
||||
menu = tk.Menu(self.mainMenuBar, tearoff=0)
|
||||
for cmdName, cmdFunc in menuCmd.items():
|
||||
if cmdName:
|
||||
menu.add_command(label=cmdName, command=cmdFunc)
|
||||
else:
|
||||
menu.add_separator()
|
||||
self.mainMenuBar.add_cascade(label=menuName, menu=menu)
|
||||
self.RootMenu[menuName] = menu
|
||||
self.root.config(menu=self.mainMenuBar)
|
||||
|
||||
def addMenu(self, menuRoot: str = '', menuLabel: str = '', menuCommand=None):
|
||||
'''增加一个菜单项
|
||||
:param menuRoot : str
|
||||
菜单的根菜单,即所属的菜单上的文字
|
||||
:param menuLabel : str
|
||||
所需要增加的项目显示的文字
|
||||
:param menuCommand : <function>
|
||||
'''
|
||||
if menuRoot in self.RootMenu.keys:
|
||||
# 如果已经有父菜单
|
||||
if menuLabel:
|
||||
# 增加菜单指令
|
||||
self.RootMenu[menuRoot].add_command(
|
||||
label=menuLabel, command=menuCommand
|
||||
)
|
||||
else:
|
||||
# 增加分隔栏
|
||||
self.RootMenu[menuRoot].add_separator()
|
||||
else:
|
||||
# 没有父菜单则新增一个父菜单
|
||||
menu = tk.Menu(self.mainMenuBar, tearoff=False)
|
||||
if menuLabel:
|
||||
menu.add_command(label=menuLabel, command=menuCommand)
|
||||
else:
|
||||
menu.add_separator()
|
||||
self.mainMenuBar.add_cascade(label=menuRoot, menu=menu)
|
||||
self.RootMenu[menuRoot] = menu
|
||||
|
||||
def initWidget(
|
||||
self,
|
||||
wordView: str = '音·创 Musicreater',
|
||||
buttons: list = [],
|
||||
settingBox: list = [],
|
||||
notemap: list = [],
|
||||
) -> None:
|
||||
'''设置窗口小部件,分为:
|
||||
:言·论 WordView
|
||||
:快捷按钮面板 ButtonBar
|
||||
:设置框 SettingBar
|
||||
:音轨框 TrackBar
|
||||
:各个音轨的显示框 TrackFrame
|
||||
:信息显示版 InfoBar
|
||||
'''
|
||||
self._wordviewBar = tk.Label(self.root, bg='white', fg='black', text=wordView)
|
||||
|
||||
self.setWordView(wordView)
|
||||
|
||||
def setWordView(self, text: str) -> None:
|
||||
self._wordviewBar['text'] = text
|
||||
|
||||
# 预置函数部分
|
||||
def authorMenu(
|
||||
authors: tuple = (
|
||||
('金羿', 'Email EillesWan@outlook.com', 'QQ 2647547478'),
|
||||
('诸葛亮与八卦阵', 'QQ 474037765'),
|
||||
),
|
||||
translaters: tuple = None,
|
||||
):
|
||||
'''自定义作者界面'''
|
||||
from languages.lang import _
|
||||
from languages.lang import DEFAULTLANGUAGE
|
||||
from msctLib.buildIN import version
|
||||
|
||||
aabw = tk.Tk()
|
||||
aabw.title(_('关于'))
|
||||
aabw.geometry('550x600') # 像素
|
||||
tk.Label(aabw, text='', font=('', 15)).pack()
|
||||
tk.Label(aabw, text=_('F音创'), font=('', 35)).pack()
|
||||
tk.Label(
|
||||
aabw,
|
||||
text='{} {}'.format(version.version[1] + version.version[0]),
|
||||
font=('', 15),
|
||||
).pack()
|
||||
# pack 的side可以赋值为LEFT RTGHT TOP BOTTOM
|
||||
# grid 的row 是列数、column是行排,注意,这是针对空间控件本身大小来的,即是指向当前控件的第几个。
|
||||
# place的 x、y是(x,y)坐标
|
||||
tk.Label(
|
||||
aabw,
|
||||
image=tk.PhotoImage(file='./resources/RyounLogo.png'),
|
||||
width=200,
|
||||
height=200,
|
||||
).pack()
|
||||
tk.Label(aabw, text=_('凌云pairs'), font=('', 20)).pack()
|
||||
tk.Label(aabw, text='', font=('', 15)).pack()
|
||||
tk.Label(aabw, text=_('开发者'), font=('', 15)).pack()
|
||||
for i in authors:
|
||||
for j in i:
|
||||
tk.Label(
|
||||
aabw,
|
||||
text=j,
|
||||
font=(
|
||||
'',
|
||||
17 if i.index(j) == 0 else 15,
|
||||
'bold' if i.index(j) == 0 else '',
|
||||
),
|
||||
).pack()
|
||||
tk.Label(aabw, text='', font=('', 5)).pack()
|
||||
if DEFAULTLANGUAGE != 'zh-CN':
|
||||
tk.Label(aabw, text=_('译者'), font=('', 15)).pack()
|
||||
for i in _('TRANSLATERS').split(';'):
|
||||
for j in i.split(','):
|
||||
tk.Label(
|
||||
aabw,
|
||||
text=j,
|
||||
font=(
|
||||
'',
|
||||
17 if i.split(',').index(j) == 0 else 15,
|
||||
'bold' if i.split(',').index(j) == 0 else '',
|
||||
),
|
||||
).pack()
|
||||
|
||||
def exitAboutWindow():
|
||||
aabw.destroy()
|
||||
|
||||
tk.Button(aabw, text=_('确定'), command=exitAboutWindow).pack()
|
||||
|
||||
aabw.mainloop()
|
||||
|
||||
|
||||
class ProgressBar:
|
||||
def __init__(
|
||||
self,
|
||||
root: tk.Tk = tk.Tk(),
|
||||
style: tuple = (DEFAULTBLUE, BLACK, WHITE),
|
||||
type: bool = False,
|
||||
info: str = '',
|
||||
debug: bool = False,
|
||||
) -> None:
|
||||
'''建立一个进度条或者加载等待界面
|
||||
:param root : tk.Tk
|
||||
建立进度条的根窗口
|
||||
:param style : tuple
|
||||
设置主题颜色,第一个参数为进度条或者等待转圈圈的颜色,第二个参数为前景色,第三个是背景色
|
||||
:param type : bool
|
||||
类型,为 False 时为进度条,为 True 时为等待板
|
||||
:param info : str
|
||||
显示的附加信息
|
||||
:param debug : bool
|
||||
是否输出日志到控制台'''
|
||||
self.root = root
|
||||
|
||||
|
||||
if __name__ == '__mian__':
|
||||
import os
|
||||
|
||||
os.chdir('../')
|
||||
disp.authorMenu()
|
||||
6
msctLib/function.py
Normal file
6
msctLib/function.py
Normal file
@@ -0,0 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
'''音·创的内置功能库
|
||||
:若要加入其他功能,详见:
|
||||
:开发说明|指南'''
|
||||
|
||||
|
||||
82
msctLib/log.py
Normal file
82
msctLib/log.py
Normal file
@@ -0,0 +1,82 @@
|
||||
"""音·创的日志消息处理"""
|
||||
# 诸葛亮与八卦阵帮忙修改语法 日期:---2022年1月19日
|
||||
# 统计:致命(三级)错误:0个;警告(二级)错误:0个;语法(一级)错误:9个
|
||||
|
||||
# 对开发者说的话:
|
||||
#
|
||||
# 请不要修改这里的日志,日志是给开发者和专业人士看的
|
||||
# 而不是给普通用户看的,因此,没必要使用开发者自己也
|
||||
# 不习惯的日志系统,比如说,之前诸葛亮与八卦阵 (bgArray)
|
||||
# 用了 logging 库来改写我原来的日志支持,但是我反
|
||||
# 而找不到我想要的信息了,所以,日志系统给我们开发者
|
||||
# 自己看得好就可以了昂,真的别改了。而且,诸葛八卦改
|
||||
# 了之后并没有多好,喵喵喵,所以我就换回来了。我知道
|
||||
# logging 库比较常用,而且功能也好,但是我们毕竟没
|
||||
# 这个必要,就别用那个库了昂,球球了~
|
||||
# ——金羿 Eilles
|
||||
# 2022 03 09
|
||||
|
||||
# To ALL the developers who will change this part:
|
||||
#
|
||||
# Please do NOT change anything in this file!
|
||||
# The log file is only for developers or
|
||||
# someone who knows a lot about our program
|
||||
# to see, but not the common users. So it
|
||||
# is NOT NECESSARY to use a logging system
|
||||
# that we do not familiar or we do not like.
|
||||
# Take bgAray “诸葛亮与八卦阵” as a example,
|
||||
# he once change this `log.py` into
|
||||
# logging-library-based log support system.
|
||||
# But after the change had done, I could NOT
|
||||
# find useful infomation according to the
|
||||
# log file... So use this file but not to
|
||||
# make changes PLEASE!!! I know some libraries
|
||||
# like logging is usually better than the
|
||||
# simple system in this file and it is normal
|
||||
# to use but, I think it is not necessery,
|
||||
# so PLEASE DO NOT USE OTHER LIBs TO
|
||||
# OVERWRITE MY LIBRARY, THANKS.
|
||||
# ——Eilles 金羿
|
||||
# 03/09/2022
|
||||
|
||||
|
||||
|
||||
import datetime,os
|
||||
|
||||
#载入日志功能
|
||||
StrStartTime = str(datetime.datetime.now()).replace(':', '_')[:-7]
|
||||
'''字符串型的程序开始时间'''
|
||||
|
||||
|
||||
def log(info:str = '',level : str = 'INFO', isPrinted:bool = False):
|
||||
'''将信息连同当前时间载入日志
|
||||
:param info : str
|
||||
日志信息
|
||||
:param level : str['INFO','WARRING','ERROR','CRASH']
|
||||
或 int[ 1, 2, 3, 4 ]
|
||||
信息等级
|
||||
:param isPrinted : bool
|
||||
是否在控制台打印
|
||||
|
||||
:return bool
|
||||
表示是否完成任务'''
|
||||
|
||||
if type(level) == type(1):
|
||||
level = ['INFO','WARRING','ERROR','CRASH'][level-1]
|
||||
|
||||
try:
|
||||
|
||||
if not os.path.exists('./log/'):
|
||||
os.makedirs('./log/')
|
||||
|
||||
outputinfo = f'{str(datetime.datetime.now())[11:19]}-[{level}] {info}'
|
||||
|
||||
with open('./log/'+StrStartTime+'.msct.log', 'a',encoding='UTF-8') as f:
|
||||
f.write(outputinfo+'\n')
|
||||
|
||||
if isPrinted:
|
||||
print(outputinfo)
|
||||
|
||||
return True
|
||||
except:
|
||||
return False
|
||||
@@ -1,7 +1,14 @@
|
||||
# -*- coding:utf-8 -*-
|
||||
|
||||
|
||||
|
||||
DEFAULTBLUE = (0, 137, 242)
|
||||
WEAKBLUE = (0, 161, 231)
|
||||
LIGHTBLUE = (38, 226, 255)
|
||||
RED = (255, 52, 50)
|
||||
PURPLE = (171, 112, 255)
|
||||
GREEN = (0, 255, 33)
|
||||
WHITE = (242, 244, 246)
|
||||
BLACK = (18, 17, 16)
|
||||
|
||||
settings = {
|
||||
'language' : 'zh-CN',
|
||||
127
msctLib/开发说明兼指南.md
Normal file
127
msctLib/开发说明兼指南.md
Normal file
@@ -0,0 +1,127 @@
|
||||
开发说明\|指南
|
||||
==============
|
||||
|
||||
此文件旨在使后期欲参与开发之人员减轻其开发负担,同时也为了我们正在开发的人员详细说明功能与用法
|
||||
掌握开发指南之后,在调用函数等的过程中将会更加方便
|
||||
|
||||
文件结构
|
||||
--------
|
||||
|
||||
从主文件调用display.py以实现显示,调用functions.py以使用功能
|
||||
|
||||
functions.py中会调取./addon/目录下的全部功能文件,这些功能文件必须先由./addon/addons.pkl来预先定义好
|
||||
|
||||
详细说明
|
||||
--------
|
||||
|
||||
### msctLib
|
||||
|
||||
用于支持主要功能
|
||||
|
||||
#### display.py
|
||||
|
||||
1. class disp
|
||||
|
||||
- 参数
|
||||
|
||||
1. `**kwgs`对窗口的基础设定 `{ '组件名称' : 函数自设定 }` 例如:
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ python
|
||||
{
|
||||
'version': '0.0.1', # version指的是当前配置格式的版本
|
||||
'title': "音·创",
|
||||
'geometry': '1200x900',
|
||||
'iconbitmap': ('./resources/musicreater.ico', './resources/musicreater.ico'),
|
||||
'menu' : { #对setMenu有特殊说明
|
||||
'文件': {
|
||||
'新建': <function>,
|
||||
'打开': <function>,
|
||||
},
|
||||
},
|
||||
'widget': { #对窗口部件又详细说明
|
||||
'wordview':{
|
||||
'text':'言·论',
|
||||
},
|
||||
'settingbox':{}, #后文详细说明
|
||||
'tracklist':{},
|
||||
'operation':{},
|
||||
'map':{},
|
||||
},
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- 函数
|
||||
|
||||
1. `setMenu`对菜单的基础设定
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ python
|
||||
{
|
||||
菜单名 : {
|
||||
选项名 : 选项函数
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
注:
|
||||
`菜单名` : `str` 显示在菜单上的字符串
|
||||
`选项名` : `str` 显示在菜单选项上的字符串
|
||||
`选项函数` : `function` 菜单调取的函数(无返回值,无入参)
|
||||
当 `选项名` 的布尔值判定为 `False` 的时候,无论 `选项函数` 为何,皆插入一段分割线,但 `选项函数` 不得为空
|
||||
|
||||
2. `setWidget`对窗口部件的放置
|
||||
```python
|
||||
wordview: dict = { #言论部分显示的字样
|
||||
'text': str = 显示内容,
|
||||
# ... 即可用 tk.Label 的参数
|
||||
},
|
||||
button: list = [
|
||||
dict = {
|
||||
按钮名称 : tuple(按钮图标,执行函数)
|
||||
},
|
||||
],
|
||||
settingbox: list = [ #设置部分显示的字样及其对应的设置函数
|
||||
(
|
||||
设置名称:str,
|
||||
值类型:tuple,
|
||||
显示内容:str,
|
||||
设置操作函数:<function>,
|
||||
)
|
||||
],
|
||||
map: list = [
|
||||
音符数据
|
||||
]
|
||||
```
|
||||
注:
|
||||
|
||||
上文中,值类型可以是如下几个项
|
||||
1. `('str',)` 字符串类型,使用文本框输入数据
|
||||
2. `('bool',)` 布尔类型,使用复选框输入数据
|
||||
3. `('num',最小值:int,最大值:int,步长:int = 1)` 数值类型,使用数值滑动条输入数据
|
||||
4. `('list',列表项:list)` 单选类型,即列表中多选一,使用单选框输入数据
|
||||
|
||||
值得注意的是,在kwgs中修改的部件设置,可以在其变量中读取或热修改,对应的变量如下
|
||||
|
||||
| 参数 | 对应类中的变量 | 变量类型 | 说明 |
|
||||
|------------|------------------|---------------------------|---------------------|
|
||||
| wordview | wordview | str | 显示在 言·论 区域的文字 |
|
||||
| button | button | list[dict{}] | 操作按钮 |
|
||||
| settingbox | settings | list[ Any ] | 设置项目中的值 |
|
||||
| tracklist | tracknum | tuple(int,int) | 当前选择到的音轨与音轨总数|
|
||||
| map | notes | list[ class Note ] | 当前的音符列表 |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# 这里是全局设置
|
||||
'name' : str, #项目名,即包名
|
||||
'title': str, #音乐名称
|
||||
'repeation': bool, #是否开启重复播放
|
||||
'player_selection': str, #玩家选择器,用于选择播放的的玩家
|
||||
# 下面是音轨独立设置
|
||||
'track_name': str, #此音轨的名字
|
||||
'track_sbname': str, #此音轨所使用的计分板
|
||||
- 变量
|
||||
使用类中的变量可以对类中的内容进行实时修改
|
||||
49
msctplugin/pluginLoader.py
Normal file
49
msctplugin/pluginLoader.py
Normal file
@@ -0,0 +1,49 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
'''此文件为音·创的插件加载程序,为了满足各平台需求,使用的是CLI界面'''
|
||||
|
||||
# W-YI 金羿
|
||||
# QQ 2647547478
|
||||
# 音·创 开发交流群 861684859
|
||||
# Email EillesWan2006@163.com W-YI_DoctorYI@outlook.com EillesWan@outlook.com
|
||||
# 版权所有 Team-Ryoun 金羿
|
||||
# 若需转载或借鉴 请附作者
|
||||
|
||||
|
||||
"""
|
||||
Copyright 2022 Eilles Wan (金羿)
|
||||
|
||||
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.
|
||||
"""
|
||||
|
||||
# 代码写的并非十分的漂亮,还请大佬多多包涵;本软件源代码依照Apache软件协议公开
|
||||
|
||||
|
||||
# 下面为正文
|
||||
|
||||
|
||||
print("""
|
||||
音·创 插件管理
|
||||
Musicreater PLUGINS Management
|
||||
""")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -4,14 +4,10 @@ import brotli
|
||||
'''感谢由 Charlie_Ping “查理平” 带来的bdx转换代码'''
|
||||
|
||||
|
||||
# 诸葛亮与八卦阵帮忙修改语法 日期:---2022年1月19日
|
||||
# 统计:致命(三级)错误:0个;警告(二级)错误:0个;语法(一级)错误:7个
|
||||
|
||||
|
||||
class BdxConverter:
|
||||
__header = "BD@"
|
||||
__bin_header = b"BDX"
|
||||
__generator_author = b"&Charlie_Ping"
|
||||
__generator_author = b"&Musicreater"
|
||||
|
||||
keys = {
|
||||
# x--, x++, addSmallX(-128~127), addX(-32768~32767), addBigX(-2147483648~2147483647)
|
||||
@@ -46,17 +42,15 @@ class BdxConverter:
|
||||
:return: list 给出的所有方块种类名称
|
||||
"""
|
||||
block_type = set()
|
||||
for block_ in self.blocks:
|
||||
block_type.add(block_["block_name"])
|
||||
for block in self.blocks:
|
||||
block_type.add(block["block_name"])
|
||||
block_type = list(block_type)
|
||||
return block_type
|
||||
|
||||
@property
|
||||
def create_and_upload_file(self):
|
||||
"""
|
||||
(瞎用property? 害怕
|
||||
创建一个bdx文件
|
||||
要close!
|
||||
:return: 一个文件对象
|
||||
"""
|
||||
_dir = os.path.dirname(self.file_path)
|
||||
@@ -77,8 +71,8 @@ class BdxConverter:
|
||||
with open(self.file_path, "ab+") as f:
|
||||
f.write(brotli.compress(_bytes))
|
||||
f.close()
|
||||
return
|
||||
|
||||
return open(self.file_path,'a+')
|
||||
|
||||
def upload_blocks(self):
|
||||
"""
|
||||
计算差值
|
||||
@@ -88,17 +82,21 @@ class BdxConverter:
|
||||
:return:
|
||||
"""
|
||||
_types = b""
|
||||
for block_ in self.blocks:
|
||||
|
||||
|
||||
for block in self.blocks:
|
||||
# print(f"当前方块:{block['block_name']}, 位置: {block['direction']}]")
|
||||
diff = self.move_pointer(self.direction, block_["direction"])
|
||||
diff = self.move_pointer(self.direction, block["direction"])
|
||||
_types += diff
|
||||
if block_["block_name"] in ["command_block",
|
||||
"chain_command_block",
|
||||
"repeating_command_block"]:
|
||||
_types += self.obtain_command_block(block_)
|
||||
if block["block_name"] in ["command_block",
|
||||
"chain_command_block",
|
||||
"repeating_command_block"]:
|
||||
_types += self.obtain_command_block(block)
|
||||
else:
|
||||
_types += self.obtain_universal_block(block_)
|
||||
self.direction = block_["direction"]
|
||||
_types += self.obtain_universal_block(block)
|
||||
self.direction = block["direction"]
|
||||
|
||||
|
||||
return _types
|
||||
|
||||
def move_pointer(self, direction: list, new_direction):
|
||||
@@ -153,21 +151,21 @@ class BdxConverter:
|
||||
return pointer_type + num_byte
|
||||
return pointer_type
|
||||
|
||||
def obtain_universal_block(self, block1):
|
||||
def obtain_universal_block(self, block):
|
||||
"""
|
||||
给定一个方块, 返回此方块在这个bdx中的id和方块data
|
||||
:param block1: {block_name: str,particular_value: int}
|
||||
:param block: {block_name: str,particular_value: int}
|
||||
:return: bytes
|
||||
"""
|
||||
block_id = b"\x07" + self.block_type.index(block1["block_name"]).to_bytes(2, byteorder="big", signed=False)
|
||||
particular_value = block1["particular_value"].to_bytes(2, byteorder="big", signed=False)
|
||||
block_id = b"\x07" + self.block_type.index(block["block_name"]).to_bytes(2, byteorder="big", signed=False)
|
||||
particular_value = block["particular_value"].to_bytes(2, byteorder="big", signed=False)
|
||||
block_header = block_id + particular_value
|
||||
return block_header
|
||||
|
||||
def obtain_command_block(self, block1):
|
||||
def obtain_command_block(self, block):
|
||||
"""
|
||||
给定一个命令方块,返回命令方块各种数据
|
||||
:param block1: {
|
||||
:param block: {
|
||||
"direction": [x: int, y: int, z: int]
|
||||
"block_name": str,
|
||||
"particular_value": int,
|
||||
@@ -184,24 +182,23 @@ class BdxConverter:
|
||||
:return: bytes of command_block
|
||||
"""
|
||||
|
||||
block_id = b"\x1b" + self.block_type.index(block1["block_name"]).to_bytes(2, byteorder="big", signed=False)
|
||||
particular_value = block1["particular_value"].to_bytes(2, byteorder="big", signed=False)
|
||||
block_id = b"\x1b" + self.block_type.index(block["block_name"]).to_bytes(2, byteorder="big", signed=False)
|
||||
particular_value = block["particular_value"].to_bytes(2, byteorder="big", signed=False)
|
||||
block_header = block_id + particular_value
|
||||
for i in [
|
||||
block1["impluse"].to_bytes(4, byteorder="big", signed=False),
|
||||
bytes(block1["command"], encoding="utf-8") + b"\x00",
|
||||
bytes(block1["customName"], encoding="utf-8") + b"\x00",
|
||||
bytes(block1["lastOutput"], encoding="utf-8") + b"\x00",
|
||||
block1["tickdelay"].to_bytes(4, byteorder="big", signed=True),
|
||||
block1["executeOnFirstTick"].to_bytes(1, byteorder="big"),
|
||||
block1["trackOutput"].to_bytes(1, byteorder="big"),
|
||||
block1["conditional"].to_bytes(1, byteorder="big"),
|
||||
block1["needRedstone"].to_bytes(1, byteorder="big")
|
||||
block["impluse"].to_bytes(4, byteorder="big", signed=False),
|
||||
bytes(block["command"], encoding="utf-8") + b"\x00",
|
||||
bytes(block["customName"], encoding="utf-8") + b"\x00",
|
||||
bytes(block["lastOutput"], encoding="utf-8") + b"\x00",
|
||||
block["tickdelay"].to_bytes(4, byteorder="big", signed=True),
|
||||
block["executeOnFirstTick"].to_bytes(1, byteorder="big"),
|
||||
block["trackOutput"].to_bytes(1, byteorder="big"),
|
||||
block["conditional"].to_bytes(1, byteorder="big"),
|
||||
block["needRedstone"].to_bytes(1, byteorder="big")
|
||||
]:
|
||||
block_header += i
|
||||
return block_header
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
block = [{"direction": [-1, -1, -1], "block_name": "concrete", "particular_value": 5},
|
||||
{"direction": [1, 5, 1], "block_name": "stained_glass", "particular_value": 7},
|
||||
@@ -218,4 +215,4 @@ if __name__ == '__main__':
|
||||
},
|
||||
{"direction": [3, 4, 1], "block_name": "concrete", "particular_value": 6},
|
||||
{"direction": [-123412133, 4, 1], "block_name": "concrete", "particular_value": 7}]
|
||||
bdx = BdxConverter("./test02.bdx", "Charlie_Ping", block)
|
||||
bdx = BdxConverter("./test02.bdx", "Charlie_Ping",block)
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
# 诸葛亮与八卦阵帮忙修改语法 日期:---2022年1月19日
|
||||
# 统计:致命(三级)错误:0个;警告(二级)错误:1个;语法(一级)错误:72个
|
||||
import os
|
||||
import zipfile
|
||||
|
||||
|
||||
def makeZip(sourceDir, outFilename, compression=8, exceptFile=None):
|
||||
import zipfile
|
||||
"""使用compression指定的算法打包目录为zip文件\n
|
||||
默认算法为DEFLATED(8),可用算法如下:\n
|
||||
STORED = 0\n
|
||||
@@ -93,17 +93,17 @@ class report:
|
||||
class version:
|
||||
libraries = (
|
||||
'mido', 'amulet', 'amulet-core', 'amulet-nbt', 'piano_transcription_inference', 'pypinyin',
|
||||
'pyinstaller','py7zr','websockets', 'torch'
|
||||
'pyinstaller', 'py7zr','websockets', 'torch', 'requests'
|
||||
)
|
||||
"""当前所需库,有一些是开发用的,用户不需要安装"""
|
||||
"""当前所需库"""
|
||||
|
||||
version = ('0.1.5.1', 'Delta',)
|
||||
version = ('0.2.0', 'Delta',)
|
||||
"""当前版本"""
|
||||
|
||||
def __init__(self) -> None:
|
||||
|
||||
self.libraries = version.libraries
|
||||
"""当前所需库,有一些是开发用的,用户不需要安装"""
|
||||
"""当前所需库"""
|
||||
|
||||
self.version = version.version
|
||||
"""当前版本"""
|
||||
|
||||
@@ -92,7 +92,6 @@ def funSplit(bigFile, maxCmdLen: int = 10000):
|
||||
return parts
|
||||
|
||||
|
||||
# 注意!播放器应该为个人独立播放器,此处bug需要修改
|
||||
def makeFuncFiles(musicset, path='./'):
|
||||
"""在指定目录下生成函数文件"""
|
||||
from nmcsup.trans import Note2Cmd
|
||||
@@ -139,6 +138,20 @@ def makeFuncFiles(musicset, path='./'):
|
||||
log("完成============================")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def makeFunDir(musicset, path='./'):
|
||||
"""在指定目录下生成函数包文件夹"""
|
||||
import os
|
||||
@@ -178,37 +191,38 @@ def makeFunDir(musicset, path='./'):
|
||||
log("完成============================")
|
||||
|
||||
|
||||
def makeNewFuncFiles(musicset, path='./'):
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def makeNewFuncFiles(musicset, path='./', isProsess:bool = False):
|
||||
"""在指定目录下生成函数文件"""
|
||||
from msctspt.transfer import newList_conversion_SinglePlayer
|
||||
commands = []
|
||||
starts = []
|
||||
starts.__len__()
|
||||
starts.append("scoreboard objectives add " + musicset['musics'][0]['set']['ScoreboardName'] + " dummy\n")
|
||||
starts.append("summon armor_stand " + musicset['musics'][0]['set']['EntityName'] + '\n')
|
||||
starts.append("scoreboard objectives setdisplay sidebar " + musicset['musics'][0]['set']['ScoreboardName'] + '\n')
|
||||
starts.append("scoreboard players set @e[type=armor_stand, name=\"" + musicset['musics'][0]['set']['EntityName'] +
|
||||
"\"] " + musicset['musics'][0]['set']['ScoreboardName'] + " 0" + '\n')
|
||||
# starts.append("summon armor_stand " + musicset['musics'][0]['set']['EntityName'] + '\n')
|
||||
# starts.append("scoreboard objectives setdisplay sidebar " + musicset['musics'][0]['set']['ScoreboardName'] + '\n')
|
||||
# starts.append("scoreboard players set @e[type=armor_stand, name=\"" + musicset['musics'][0]['set']['EntityName'] +"\"] " + musicset['musics'][0]['set']['ScoreboardName'] + " 0" + '\n')
|
||||
|
||||
log("=========================正在在此处生成文件:" + path)
|
||||
commands.append("scoreboard players add @e[name=\"" + musicset['musics'][0]['set']['EntityName'] + "\"] " +
|
||||
musicset['musics'][0]['set']['ScoreboardName'] + " 1\n")
|
||||
|
||||
# commands.append("scoreboard players add @e[name=\"" + musicset['musics'][0]['set']['EntityName'] + "\"] " + musicset['musics'][0]['set']['ScoreboardName'] + " 1\n")
|
||||
maxlen = -1
|
||||
for i in range(len(musicset['musics'])):
|
||||
log('写入第' + str(i) + '个数据')
|
||||
# commands.append("execute @e[name=\"" + musicset['musics'][i]['set']['EntityName'] + "\",scores={" +
|
||||
# musicset['musics'][i]['set']['ScoreboardName'] + "=1..10}] ~~~ title @a" + musicset['mainset']
|
||||
# [
|
||||
# 'PlayerSelect'] + " title " + musicset['mainset']['MusicTitle'] + "\n")
|
||||
# commands.append("execute @e[name=\"" + musicset['musics'][i]['set']['EntityName'] + "\",scores={" +
|
||||
# musicset['musics'][i]['set']['ScoreboardName'] + "=1..10}] ~~~ title @a" + musicset['mainset']
|
||||
# [
|
||||
# 'PlayerSelect'] + " subtitle 本函数乐曲由§b§l凌云§r§3函数音乐创建§r生成\n")
|
||||
|
||||
if len(musicset['musics'][i]['notes']) > maxlen:
|
||||
maxlen = len(musicset['musics'][i]['notes'])
|
||||
with open(path + musicset['mainset']['MusicTitle'] + '_Part' + str(i) + '.mcfunction', 'w',
|
||||
encoding='UTF-8') as f:
|
||||
f.writelines(newList_conversion_SinglePlayer(musicset['musics'][i]['notes'],
|
||||
musicset['musics'][i]['set']['ScoreboardName']))
|
||||
musicset['musics'][i]['set']['ScoreboardName'],
|
||||
musicset['musics'][i]['set']['Instrument']))
|
||||
if musicset['mainset']['IsRepeat']:
|
||||
log("增加重复语句")
|
||||
for i in range(len(musicset['musics'])):
|
||||
@@ -229,6 +243,19 @@ def makeNewFuncFiles(musicset, path='./'):
|
||||
log("完成============================")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def makeNewFunDir(musicset, path='./'):
|
||||
"""在指定目录下生成函数包文件夹"""
|
||||
import os
|
||||
@@ -299,7 +326,6 @@ def makeClassFuncFiles(musicset, path='./'):
|
||||
encoding='UTF-8') as f:
|
||||
f.writelines(classList_conversion_SinglePlayer(musicset['musics'][i]['notes'],
|
||||
musicset['musics'][i]['set']['ScoreboardName'],
|
||||
musicset['musics'][i]['set']['Instrument'],
|
||||
musicset['mainset']['PlayerSelect'],
|
||||
True))
|
||||
if musicset['mainset']['IsRepeat']:
|
||||
|
||||
@@ -10,14 +10,14 @@ class NewThread(threading.Thread):
|
||||
super(NewThread, self).__init__()
|
||||
self.func = func
|
||||
self.args = args
|
||||
self.result = None
|
||||
|
||||
def run(self):
|
||||
self.result = self.func(*self.args)
|
||||
|
||||
def getResult(self):
|
||||
threading.Thread.join(self) # 等待线程执行完毕
|
||||
try:
|
||||
return self.result
|
||||
except Exception:
|
||||
return None
|
||||
return self.result
|
||||
|
||||
#
|
||||
# ————————————————
|
||||
|
||||
@@ -25,10 +25,11 @@ def hans2pinyin(hans, style=3):
|
||||
return final
|
||||
|
||||
|
||||
def classList_conversion_SinglePlayer(List: list, ScoreboardName: str, Instrument: str, playerSelection: str = '',
|
||||
def classList_conversion_SinglePlayer(List: list, ScoreboardName: str, playerSelection: str = '',
|
||||
isProsess: bool = False) -> list:
|
||||
from bgArrayLib.compute import round_up
|
||||
from bgArrayLib.pitchStrConstant import pitch
|
||||
from bgArrayLib.instrumentConstant import instrument_list
|
||||
commands = []
|
||||
length = len(List)
|
||||
j = 1
|
||||
@@ -38,20 +39,18 @@ def classList_conversion_SinglePlayer(List: list, ScoreboardName: str, Instrumen
|
||||
print(i)
|
||||
print(type(i))
|
||||
try:
|
||||
if i.instrument > 119:
|
||||
pass
|
||||
else:
|
||||
commands.append(
|
||||
f"execute @a{playerSelection} ~ ~ ~ execute @s[scores={{{ScoreboardName}="
|
||||
f"{str(round_up(i.time_position)).replace('.0', '')}}}] ~ ~{127 - i.velocity} "
|
||||
f"~ playsound note.{instrument_list.get(str(i.instrument))} @s ~ ~ ~ "
|
||||
f"1000 {pitch.get(str(i.pitch))} 1000\n")
|
||||
if isProsess:
|
||||
commands.append(
|
||||
f"execute @a{playerSelection} ~ ~ ~ execute @s[scores={{{ScoreboardName}="
|
||||
f"{str(round_up(i.time_position)).replace('.0', '')}}}] ~ ~{127 - i.velocity} "
|
||||
f"~ playsound {Instrument} @s ~ ~ ~ 1000 {pitch.get(str(i.pitch))} 1000\n")
|
||||
if isProsess:
|
||||
commands.append(
|
||||
f"execute @a{playerSelection} ~ ~ ~ execute @s[scores={{{ScoreboardName}="
|
||||
f"{str(round_up(i.time_position)).replace('.0', '')}}}] ~ ~ ~ "
|
||||
f"title @s actionbar §e▶ 播放中: §a{j}/{length} || {int(j / length * 1000) / 10}\n")
|
||||
j += 1
|
||||
except:
|
||||
f"{str(round_up(i.time_position)).replace('.0', '')}}}] ~ ~ ~ "
|
||||
f"title @s actionbar §e▶ 播放中: §a{j}/{length} || {int(j / length * 1000) / 10}\n")
|
||||
j += 1
|
||||
except Exception:
|
||||
pass
|
||||
# a += List[i][1]
|
||||
# commands.append("\n\n# 凌云我的世界开发团队 x 凌云软件开发团队 : W-YI(金羿)\n")
|
||||
@@ -223,23 +222,17 @@ def note2bdx(filePath: str, dire: list, Notes: list, ScoreboardName: str, Instru
|
||||
height: 生成结构的最高高度
|
||||
:return 返回一个BdxConverter类,同时在指定位置生成.bdx文件"""
|
||||
|
||||
# from msctspt.transfer import formCmdBlock
|
||||
from nmcsup.trans import Note2Cmd
|
||||
from msctspt.bdxOpera_CP import BdxConverter
|
||||
cmd = Note2Cmd(Notes, ScoreboardName, Instrument, PlayerSelect, isProsess)
|
||||
cdl = []
|
||||
# 此处是处理一下,防止有注释
|
||||
|
||||
for i in cmd:
|
||||
# e = True
|
||||
try:
|
||||
if '#' in i:
|
||||
if (i[:i.index('#')].replace(' ', '') != '\n') and (i[:i.index('#')].replace(' ', '') != ''):
|
||||
cdl.append(i[:i.index('#')])
|
||||
# e = False
|
||||
except: # ValueError
|
||||
else:
|
||||
cdl.append(i)
|
||||
# finally:
|
||||
# if e is True:
|
||||
# cdl.append(i)
|
||||
i = 0
|
||||
down = False
|
||||
blocks = [formCmdBlock(dire, cdl.pop(0), 1, 1)]
|
||||
@@ -261,7 +254,8 @@ def note2bdx(filePath: str, dire: list, Notes: list, ScoreboardName: str, Instru
|
||||
return BdxConverter(filePath, 'Build by RyounMusicreater', blocks)
|
||||
|
||||
|
||||
def music2BDX(filePath: str, direction: Iterable, music: dict, isProsess: bool = False, height: int = 200,
|
||||
|
||||
def music2cmdBlocks(direction: Iterable, music: dict, isProsess: bool = False, height: int = 200,
|
||||
isSquare: bool = False):
|
||||
"""使用方法同Note2Cmd
|
||||
:param 参数说明:
|
||||
@@ -271,22 +265,23 @@ def music2BDX(filePath: str, direction: Iterable, music: dict, isProsess: bool =
|
||||
isProsess: 是否显示进度条(会很卡)
|
||||
height: 生成结构的最高高度
|
||||
isSquare: 生成的结构是否需要遵循生成正方形原则
|
||||
:return 返回一个BdxConverter类,同时在指定位置生成.bdx文件"""
|
||||
from msctspt.bdxOpera_CP import BdxConverter
|
||||
:return 返回一个列表,其中包含了音乐生成的所有的指令方块数据"""
|
||||
from msctspt.threadOpera import NewThread
|
||||
|
||||
blocks = []
|
||||
allblocks = []
|
||||
'''需要放置的方块'''
|
||||
baseDire = direction
|
||||
|
||||
direction = list(direction)
|
||||
|
||||
for track in music['musics']:
|
||||
def trackDealing(direction,track):
|
||||
blocks = []
|
||||
cmdList = classList_conversion_SinglePlayer(track['notes'], track['set']['ScoreboardName'],
|
||||
music['mainset']['PlayerSelect'], isProsess)
|
||||
if len(cmdList) == 0:
|
||||
continue
|
||||
return
|
||||
elif cmdList is []:
|
||||
continue
|
||||
return
|
||||
dire = direction
|
||||
down = False
|
||||
'''当前是否为向下的阶段?'''
|
||||
@@ -307,7 +302,6 @@ def music2BDX(filePath: str, direction: Iterable, music: dict, isProsess: bool =
|
||||
for cmd in cmdList:
|
||||
blocks.append(formCmdBlock(dire, cmd, 5 if (down is False and dire[1] == height + direction[1]) or (
|
||||
down and dire[1] == direction + 1) else 0 if down else 1, 2, needRedstone=False))
|
||||
|
||||
if down:
|
||||
if dire[1] > direction[1] + 1:
|
||||
dire[1] -= 1
|
||||
@@ -318,9 +312,43 @@ def music2BDX(filePath: str, direction: Iterable, music: dict, isProsess: bool =
|
||||
if (down is False and dire[1] == height + direction[1]) or (down and dire[1] == direction + 1):
|
||||
down = not down
|
||||
dire[0] += 1
|
||||
return blocks
|
||||
|
||||
threads = []
|
||||
for track in music['musics']:
|
||||
threads.append(NewThread(trackDealing,(direction,track)))
|
||||
threads[threads.__len__()-1].start()
|
||||
direction[2] += 2
|
||||
|
||||
return BdxConverter(filePath, 'Build by Ryoun Musicreater', blocks)
|
||||
for th in threads:
|
||||
allblocks += th.getResult()
|
||||
|
||||
return allblocks
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def music2BDX(filePath: str, direction: Iterable, music: dict, isProsess: bool = False, height: int = 200,
|
||||
isSquare: bool = False):
|
||||
"""使用方法同Note2Cmd
|
||||
:param 参数说明:
|
||||
filePath: 生成.bdx文件的位置
|
||||
dire: 指令方块在地图中生成的起始位置(相对位置)
|
||||
music: 详见 Musicreater.py - dataset[0]
|
||||
isProsess: 是否显示进度条(会很卡)
|
||||
height: 生成结构的最高高度
|
||||
isSquare: 生成的结构是否需要遵循生成正方形原则
|
||||
:return 返回一个BdxConverter类,同时在指定位置生成.bdx文件"""
|
||||
from msctspt.bdxOpera_CP import BdxConverter
|
||||
return BdxConverter(filePath, 'Build by Ryoun Musicreater', music2cmdBlocks(direction,music,isProsess,height,isSquare)
|
||||
)
|
||||
|
||||
|
||||
def note2webs(Notes: list, Instrument: str, speed: float = 5.0, PlayerSelect: str = '', isProsess: bool = False):
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,227 +1,250 @@
|
||||
音·创(Musicreater)是由金羿(W-YI)开发的一款《我的世界》基岩版音乐生成辅助软件
|
||||
本软件源代码依照Apache软件协议公开。
|
||||
|
||||
Copyright © W-YI 2022
|
||||
|
||||
本软件是金羿前作函数音创和世界音创的集合版本,同时增加了大量功能更新。
|
||||
|
||||
|
||||
To-Do
|
||||
1.可以导出自定义的结构文件用于存储要导入地图中的结构
|
||||
2.进度条
|
||||
3.可以将音乐写入音符盒(红乐)
|
||||
|
||||
5.支持自动给音符盒绑定更多的音色
|
||||
6.可以由.schematic文件导入地图,亦可反向处理
|
||||
|
||||
8.支持自定义创建websockeet服务器播放音乐(感谢由 Fuckcraft <https://github.com/fuckcraft> “鸣凤鸽子”等 带来的我的世界websocket服务器功能)
|
||||
9.支持使用红石播放音乐
|
||||
10.支持采用延时的播放器
|
||||
11.支持使用bdx导出结构
|
||||
12.支持采用tp的方法播放
|
||||
13.支持识别曲谱图片解析音乐
|
||||
14.支持使用瀑布流的方式播放音乐
|
||||
|
||||
|
||||
17.支持自动搜寻地图目录位置(网易&微软)
|
||||
++++++
|
||||
4.修改UI界面使之适应当前功能
|
||||
7.制作软件下载器使用户更直观地操作
|
||||
15.
|
||||
16.
|
||||
|
||||
|
||||
|
||||
|
||||
新更新日志
|
||||
|
||||
|
||||
Delta 0.1.5.1
|
||||
2022 2 1 农历大年初一
|
||||
1.修复了部分midi文件无法读取的错误
|
||||
|
||||
Delta 0.1.5
|
||||
2022 2 1 农历大年初一
|
||||
1.修复所有用户在使用过程中可遇到的bug
|
||||
|
||||
Delta 0.1.1
|
||||
2022 1 30
|
||||
1.新增设置调用方案,但未使用
|
||||
2.新增整个音乐生成单个BDX的功能,但必须用新方法解析
|
||||
3.发现陈年旧bug:在msctspt.funcOpera中makeFuncFiles生成的指令格式不对
|
||||
4.在nmcsup.trans中新增classList_conversion_SinglePlayer使用对于每个玩家的独立播放器
|
||||
|
||||
Delta 0.1.0
|
||||
2022 1 27
|
||||
1.完成了多音色的支持,但仍需修改
|
||||
|
||||
Delta 0.0.2
|
||||
2022 1 19
|
||||
1.纠正几乎所有语法
|
||||
|
||||
Delta 0.0.1
|
||||
2022 1 3
|
||||
1.新增对翻译字符串的支持
|
||||
2.把所有需要翻译的字符串用双引号字符串表示,其余全是单引号字符串
|
||||
2.2.累死我了,我错了我错了,饶了我吧,以后一定遵守代码规范
|
||||
3.新增多语言支持。
|
||||
|
||||
|
||||
Delta 0.0.0
|
||||
2022 1 2
|
||||
1.重新采用Tk作为窗口库
|
||||
2.优化界面布局
|
||||
3.修改部分按钮无响应的bug
|
||||
4.新增启动时的Saying
|
||||
5.删除命令行模式
|
||||
6.更新README文件,并增添英文README
|
||||
|
||||
|
||||
Gamma 0.0.0
|
||||
2021 12 26~2021 12 31
|
||||
1.使用BeeWare作为窗口库
|
||||
2.兼容安卓,但是安卓上无法运行
|
||||
3.兼容窗口化系统,但是无法实现正常功能
|
||||
4.引申大量bug
|
||||
|
||||
|
||||
Beta 0.0.4.3
|
||||
2021 11 3~2021 12 26
|
||||
1.不断改进包以及代码可读性
|
||||
2.修正部分源码错误
|
||||
3.修正部分格式错误
|
||||
4.加强对Linux系统的支持
|
||||
5.新增命令行模式
|
||||
6.代码中新增大量注释
|
||||
|
||||
|
||||
Beta 0.0.4 ~ Beta 0.0.4.2
|
||||
2021 11 20 ~ 2021 11 21
|
||||
1.完全支持Linux系统
|
||||
2.支持以.RyStruct导出结构
|
||||
3.修复大量bug
|
||||
4.支持拖拽打开(参数1为.msct文件)
|
||||
|
||||
|
||||
Beta 0.0.3.1~0.0.3.5
|
||||
2021 11 1~2021 11 2
|
||||
1.更新部分提示信息使之更加科学
|
||||
2.强制性限制不得使用非Win32平台打开此程序
|
||||
3.支持在Windwos7上使用此程序(发现错误并解决:DLL缺失MSVCP140.dll)
|
||||
4.开始对结构导出进行部分支持
|
||||
5.发现红乐写入的错误,正在排查修复
|
||||
|
||||
|
||||
|
||||
|
||||
Beta 0.0.3
|
||||
2021 10 29 ~ 2021 10 31
|
||||
1.修改部分窗口排版
|
||||
2.修复指令载入地图的结构的错误
|
||||
3.修复指令生成出现的指令错误(感谢 昀梦<QQ1515399885> 找出bug并指正)
|
||||
4.支持生成红石音乐(以音符盒存储的音乐),并写入地图
|
||||
5.修复了生成指令音乐导致的错误
|
||||
6.修复bdx文件y轴过长导致无法生成完毕的错误,现在bdx的y轴为200格
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Beta 0.0.2
|
||||
2021 10 25
|
||||
1.修复了邮件发送错误报告无法生成压缩包的问题
|
||||
2.修复了导入音轨时无法获得进程返回值的问题
|
||||
3.修复了.bdx文件生成时无法选择文件的问题
|
||||
4.修复了生成指令音乐(计分板)没有起始方块的问题
|
||||
5.新增了创建Websocket的功能,可以在localhost:8080创建websocket服务器播放音乐(感谢由 Fuckcraft <https://gitee.com/fuckcraft> “鸣凤鸽子”等 带来的我的世界websocket服务器功能(fcwslib) )
|
||||
6.解决了打包成可执行文件时无法正常退出的问题
|
||||
|
||||
|
||||
|
||||
Beta 0.0.1
|
||||
2021 10月
|
||||
1.支持生成.bdx文件(感谢由 Charlie_Ping “查理平” 带来的bdx转换功能)
|
||||
2.逐步增强对安卓系统的支持
|
||||
3.逐步放弃对Windows的强行要求
|
||||
4.逐步提升性能,增加多线程
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Alpha部分更新日志
|
||||
|
||||
Alpha 0.0.0
|
||||
2021 8 20
|
||||
1.集合了 函数音创0.1.4.1 与 世界音创Beta0.0.1 的功能于本应用
|
||||
2.新增了可以生成 .mcpack 包的方法
|
||||
|
||||
Alpha 0.0.1
|
||||
2021 8 25
|
||||
1.新增两个彩蛋(就是函数音创命令行模式的彩蛋
|
||||
|
||||
Alpha 0.0.1.1
|
||||
2021 8 25
|
||||
1.修复大量已知问题
|
||||
2.修复了部分彩蛋bug,但是程序仍然不会正常退出
|
||||
3.菜单界面优化
|
||||
|
||||
Alpha 0.0.1.2
|
||||
2021.8.29
|
||||
1.修复大量已知问题
|
||||
2.现在可以操作指令文件了
|
||||
3.窗口界面优化
|
||||
|
||||
Alpha 0.0.2
|
||||
2021 9 5
|
||||
1.修复部分已知问题
|
||||
2.指令链导入之时仅生成链式方块且允许折转
|
||||
3.[Dev]正在逐步支持结构导出
|
||||
|
||||
Alpha 0.0.3
|
||||
2021 9 7
|
||||
1.修复指令链转入世界的摆放错误
|
||||
2.指令存储的音乐(包括函数)支持不同玩家不同的播放
|
||||
3.支持播放进度条
|
||||
4.删除彩蛋任务栏图标
|
||||
4.[Dev]已确定导出结构格式
|
||||
|
||||
Alpha 0.0.3.1
|
||||
2021 9 11
|
||||
1.取消输入玩家选择器时不会出现bug了
|
||||
2.删除日志文件修改为删除临时文件
|
||||
3.可以删除用于确认档案存在的文件了
|
||||
|
||||
Alpha 0.0.4
|
||||
2021 10 4-5
|
||||
1.可以将大函数导入世界(以一条链执行多个函数的方式)
|
||||
2.关闭了试听音乐的功能,但是保留其函数于funOpera.py中
|
||||
3.修改部分代码,减少更多bug
|
||||
4.发现指令链转入世界的摆放错误,但是没改正
|
||||
|
||||
1.0.3
|
||||
2021 10 5-6
|
||||
1.解决一些已知问题
|
||||
2.解决了文件读取造成的字符编码问题
|
||||
3.使用PyPinyin库将汉字转化为拼音首字母
|
||||
|
||||
Alpha 0.0.4.1
|
||||
2021 10 9
|
||||
1.将清除日志功能设置为结束后统一清除,避免了清除过程中文件占用导致的问题
|
||||
|
||||
Alpha 0.0.5
|
||||
2021 10 10
|
||||
1.支持使用邮件方式发送错误报告(日志)
|
||||
|
||||
Alpha 0.0.5.1
|
||||
1.修复了邮件发送错误报告无法发送的问题
|
||||
2.修复了打包成.exe文件之后无法正常退出的问题
|
||||
|
||||
|
||||
|
||||
|
||||
音·创(Musicreater)是由金羿(W-YI)开发的一款《我的世界》基岩版音乐生成辅助软件
|
||||
本软件源代码依照Apache 2.0软件协议公开。
|
||||
|
||||
Copyright © W-YI 2022
|
||||
|
||||
本软件是金羿前作函数音创和世界音创的集合版本,同时增加了大量功能更新。
|
||||
|
||||
|
||||
To-Do
|
||||
1.可以导出自定义的结构文件用于存储要导入地图中的结构
|
||||
2.进度条
|
||||
3.可以将音乐写入音符盒(红乐)
|
||||
4.修改UI界面使之适应当前功能
|
||||
5.支持自动给音符盒绑定更多的音色
|
||||
6.可以由.schematic文件导入地图,亦可反向处理
|
||||
7.制作软件下载器使用户更直观地操作
|
||||
8.支持自定义创建websockeet服务器播放音乐(感谢由 Fuckcraft <https://github.com/fuckcraft> “鸣凤鸽子”等 带来的我的世界websocket服务器功能)
|
||||
9.支持使用红石播放音乐
|
||||
10.支持采用延时的播放器
|
||||
11.支持使用bdx导出结构
|
||||
12.支持采用tp的方法播放
|
||||
13.支持识别曲谱(简谱)图片解析音乐
|
||||
14.支持使用瀑布流的方式播放音乐
|
||||
15.支持读入Everyone Piano的曲谱文件(.eop)
|
||||
16.支持读入Musescore的通用曲谱文件,即musicXML(.mscz、.mscx)
|
||||
17.支持自动搜寻地图目录位置(网易&微软)
|
||||
18.支持读入JPword曲谱文件(.jpd)
|
||||
19.新的UI设计,以及UI主题文件
|
||||
20.以小节为单位做音符播放时间对标
|
||||
|
||||
===============
|
||||
2022 年度挑战
|
||||
1.重构代码使全部变量皆使用类存储
|
||||
2.修改UI界面
|
||||
3.增加进度条
|
||||
4.修复生成bug
|
||||
===============
|
||||
|
||||
|
||||
新更新日志
|
||||
|
||||
Delta 0.2.0
|
||||
2022 2 10 ~ 2022 3
|
||||
1.进行了大量的代码重构,使之更加易于开发
|
||||
2.对功能进行了精简优化,能够更加方便的开发新功能
|
||||
3.完善程序的一些外观与性能优化,使用了更多多线程板块
|
||||
4.在读取和写入的时候加入进度条,会实时反馈当前的加载进度
|
||||
5.能够使用可视化界面进行音乐的基本编辑
|
||||
6.提高用户感受,修复已知问题
|
||||
7.增强个性化设置,令用户能够用其所感
|
||||
8.更新读我文档,使之更用户化
|
||||
9.面对用户的操作加强
|
||||
10.新增下载器,无需用户从源代码安装
|
||||
|
||||
|
||||
Delta 0.1.5.2
|
||||
2022 2 1 农历大年初一
|
||||
0.程序图标完善
|
||||
1.修复了解析指令导致的错误
|
||||
2.注意!bug没有改完,也从未改完。
|
||||
|
||||
Delta 0.1.5.1
|
||||
2022 2 1 农历大年初一
|
||||
1.修复了部分midi文件无法读取的错误
|
||||
|
||||
Delta 0.1.5
|
||||
2022 2 1 农历大年初一
|
||||
1.修复所有用户在使用过程中可遇到的bug
|
||||
|
||||
Delta 0.1.1
|
||||
2022 1 30
|
||||
1.新增设置调用方案,但未使用
|
||||
2.新增整个音乐生成单个BDX的功能,但必须用新方法解析
|
||||
3.发现陈年旧bug:在msctspt.funcOpera中makeFuncFiles生成的指令格式不对
|
||||
4.在nmcsup.trans中新增classList_conversion_SinglePlayer使用对于每个玩家的独立播放器
|
||||
|
||||
Delta 0.1.0
|
||||
2022 1 27
|
||||
1.完成了多音色的支持,但仍需修改
|
||||
|
||||
Delta 0.0.2
|
||||
2022 1 19
|
||||
1.纠正几乎所有语法
|
||||
|
||||
Delta 0.0.1
|
||||
2022 1 3
|
||||
1.新增对翻译字符串的支持
|
||||
2.把所有需要翻译的字符串用双引号字符串表示,其余全是单引号字符串
|
||||
2.2.累死我了,我错了我错了,饶了我吧,以后一定遵守代码规范
|
||||
3.新增多语言支持。
|
||||
|
||||
|
||||
Delta 0.0.0
|
||||
2022 1 2
|
||||
1.重新采用Tk作为窗口库
|
||||
2.优化界面布局
|
||||
3.修改部分按钮无响应的bug
|
||||
4.新增启动时的Saying
|
||||
5.删除命令行模式
|
||||
6.更新README文件,并增添英文README
|
||||
|
||||
|
||||
Gamma 0.0.0
|
||||
2021 12 26~2021 12 31
|
||||
1.使用BeeWare作为窗口库
|
||||
2.兼容安卓,但是安卓上无法运行
|
||||
3.兼容窗口化系统,但是无法实现正常功能
|
||||
4.引申大量bug
|
||||
|
||||
|
||||
Beta 0.0.4.3
|
||||
2021 11 3~2021 12 26
|
||||
1.不断改进包以及代码可读性
|
||||
2.修正部分源码错误
|
||||
3.修正部分格式错误
|
||||
4.加强对Linux系统的支持
|
||||
5.新增命令行模式
|
||||
6.代码中新增大量注释
|
||||
|
||||
|
||||
Beta 0.0.4 ~ Beta 0.0.4.2
|
||||
2021 11 20 ~ 2021 11 21
|
||||
1.完全支持Linux系统
|
||||
2.支持以.RyStruct导出结构
|
||||
3.修复大量bug
|
||||
4.支持拖拽打开(参数1为.msct文件)
|
||||
|
||||
|
||||
Beta 0.0.3.1~0.0.3.5
|
||||
2021 11 1~2021 11 2
|
||||
1.更新部分提示信息使之更加科学
|
||||
2.强制性限制不得使用非Win32平台打开此程序
|
||||
3.支持在Windwos7上使用此程序(发现错误并解决:DLL缺失MSVCP140.dll)
|
||||
4.开始对结构导出进行部分支持
|
||||
5.发现红乐写入的错误,正在排查修复
|
||||
|
||||
|
||||
|
||||
|
||||
Beta 0.0.3
|
||||
2021 10 29 ~ 2021 10 31
|
||||
1.修改部分窗口排版
|
||||
2.修复指令载入地图的结构的错误
|
||||
3.修复指令生成出现的指令错误(感谢 昀梦<QQ1515399885> 找出bug并指正)
|
||||
4.支持生成红石音乐(以音符盒存储的音乐),并写入地图
|
||||
5.修复了生成指令音乐导致的错误
|
||||
6.修复bdx文件y轴过长导致无法生成完毕的错误,现在bdx的y轴为200格
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Beta 0.0.2
|
||||
2021 10 25
|
||||
1.修复了邮件发送错误报告无法生成压缩包的问题
|
||||
2.修复了导入音轨时无法获得进程返回值的问题
|
||||
3.修复了.bdx文件生成时无法选择文件的问题
|
||||
4.修复了生成指令音乐(计分板)没有起始方块的问题
|
||||
5.新增了创建Websocket的功能,可以在localhost:8080创建websocket服务器播放音乐(感谢由 Fuckcraft <https://gitee.com/fuckcraft> “鸣凤鸽子”等 带来的我的世界websocket服务器功能(fcwslib) )
|
||||
6.解决了打包成可执行文件时无法正常退出的问题
|
||||
|
||||
|
||||
|
||||
Beta 0.0.1
|
||||
2021 10月
|
||||
1.支持生成.bdx文件(感谢由 Charlie_Ping “查理平” 带来的bdx转换功能)
|
||||
2.逐步增强对安卓系统的支持
|
||||
3.逐步放弃对Windows的强行要求
|
||||
4.逐步提升性能,增加多线程
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Alpha部分更新日志
|
||||
|
||||
Alpha 0.0.0
|
||||
2021 8 20
|
||||
1.集合了 函数音创0.1.4.1 与 世界音创Beta0.0.1 的功能于本应用
|
||||
2.新增了可以生成 .mcpack 包的方法
|
||||
|
||||
Alpha 0.0.1
|
||||
2021 8 25
|
||||
1.新增两个彩蛋(就是函数音创命令行模式的彩蛋
|
||||
|
||||
Alpha 0.0.1.1
|
||||
2021 8 25
|
||||
1.修复大量已知问题
|
||||
2.修复了部分彩蛋bug,但是程序仍然不会正常退出
|
||||
3.菜单界面优化
|
||||
|
||||
Alpha 0.0.1.2
|
||||
2021.8.29
|
||||
1.修复大量已知问题
|
||||
2.现在可以操作指令文件了
|
||||
3.窗口界面优化
|
||||
|
||||
Alpha 0.0.2
|
||||
2021 9 5
|
||||
1.修复部分已知问题
|
||||
2.指令链导入之时仅生成链式方块且允许折转
|
||||
3.[Dev]正在逐步支持结构导出
|
||||
|
||||
Alpha 0.0.3
|
||||
2021 9 7
|
||||
1.修复指令链转入世界的摆放错误
|
||||
2.指令存储的音乐(包括函数)支持不同玩家不同的播放
|
||||
3.支持播放进度条
|
||||
4.删除彩蛋任务栏图标
|
||||
4.[Dev]已确定导出结构格式
|
||||
|
||||
Alpha 0.0.3.1
|
||||
2021 9 11
|
||||
1.取消输入玩家选择器时不会出现bug了
|
||||
2.删除日志文件修改为删除临时文件
|
||||
3.可以删除用于确认档案存在的文件了
|
||||
|
||||
Alpha 0.0.4
|
||||
2021 10 4-5
|
||||
1.可以将大函数导入世界(以一条链执行多个函数的方式)
|
||||
2.关闭了试听音乐的功能,但是保留其函数于funOpera.py中
|
||||
3.修改部分代码,减少更多bug
|
||||
4.发现指令链转入世界的摆放错误,但是没改正
|
||||
|
||||
1.0.3
|
||||
2021 10 5-6
|
||||
1.解决一些已知问题
|
||||
2.解决了文件读取造成的字符编码问题
|
||||
3.使用PyPinyin库将汉字转化为拼音首字母
|
||||
|
||||
Alpha 0.0.4.1
|
||||
2021 10 9
|
||||
1.将清除日志功能设置为结束后统一清除,避免了清除过程中文件占用导致的问题
|
||||
|
||||
Alpha 0.0.5
|
||||
2021 10 10
|
||||
1.支持使用邮件方式发送错误报告(日志)
|
||||
|
||||
Alpha 0.0.5.1
|
||||
1.修复了邮件发送错误报告无法发送的问题
|
||||
2.修复了打包成.exe文件之后无法正常退出的问题
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
BIN
resources/RyounLogo.png
Normal file
BIN
resources/RyounLogo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 86 KiB |
BIN
resources/donationCode.png
Normal file
BIN
resources/donationCode.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 129 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 441 KiB |
@@ -1,43 +1,101 @@
|
||||
生命灵动 当用激情跃起奋发之力
|
||||
奇偶数阵
|
||||
学海无涯 应用爱意徜徉
|
||||
在生命的起源寻找灵魂的慰藉
|
||||
纪念那一段辉煌灿烂的青春年华
|
||||
以梦想为驱使 创造属于自己的未来
|
||||
集青春之力 绽放爱意之花
|
||||
那个曾与我相伴的人 依稀在我的心头留恋
|
||||
你是我灵魂中绽放出最艳丽的花朵
|
||||
心之所向 意之所属
|
||||
一个蛋从外面被敲开,注定被吃掉\n但从里面啄开,没准是只鹰 ——长津湖
|
||||
音·创
|
||||
辉煌的、璀璨的、无边无际、铺天盖地的晚霞\n洒下斑驳的金光,染红了整片山河
|
||||
《赫兰圣殿》
|
||||
风,摇曳着,轻抚着他的脸颊\n半壁残阳正留恋着人世最后一抹温暖
|
||||
清晨的阳光将吹散人间的雾霭 照亮每一寸土壤
|
||||
远方的山川 总会踏着白雾前来
|
||||
梦中的世界 总被现实相依存
|
||||
敌人都是自己树立的\n生存的道路上想要披荆斩棘,那就得学会化敌为友
|
||||
有光之处必有影 有影之处必有光
|
||||
一生所恋 相伴相随
|
||||
你的眼眸是剔透的晶灯 散发着醉人心扉的清光
|
||||
海波激出透人心脾的欢呼
|
||||
英雄何必要站在光中?\n深入黑暗,我自发光。
|
||||
如果我们有三生三世的时间\n那我们将渡过三百乘以三百六十个潮涨潮落
|
||||
善善不能用 恶恶不能去
|
||||
知行合一,格物致知;远沂博索,夕惕若厉;\n蕙心执质,嘉言懿行;怀瑾握瑜,心若芷萱。
|
||||
纪念 追忆 那段不平凡的青春
|
||||
守望黑夜的人,切莫忘记黎明的光彩 ——原神
|
||||
与邪佞战斗的人,切莫失掉正直的心 ——原神
|
||||
我的心 时刻系着祖国的山河
|
||||
生命 灵动
|
||||
坚如寒冰 烈似骄阳
|
||||
上了战场就是英雄 ——长津湖
|
||||
冰与火 恨与爱 静与情
|
||||
有些枪必须开,有些可以不开 ——长津湖
|
||||
夕阳西下,余辉将尽,夜幕降临,寒风凛冽 ——原神
|
||||
愿风擦拭你的双眼,让你看清真相 ——原神
|
||||
心愿之结晶 而何能之宝贵
|
||||
神明,正倾诉着他辉煌的过去……
|
||||
一切过程与结果都不重要 重要的是热爱与真情
|
||||
给大家带来笑容 这就是我存在的使命
|
||||
不忘本源 牢记故地
|
||||
生命灵动 当用激情跃起奋发之力
|
||||
奇偶数阵
|
||||
学海无涯 应用爱意徜徉
|
||||
在生命的起源寻找灵魂的慰藉
|
||||
纪念那一段辉煌灿烂的青春年华
|
||||
以梦想为驱使 创造属于自己的未来
|
||||
集青春之力 绽放爱意之花
|
||||
那个曾与我相伴的人 依稀在我的心头留恋
|
||||
你是我灵魂中绽放出最艳丽的花朵
|
||||
心之所向 意之所属
|
||||
一个蛋从外面被敲开,注定被吃掉\n但从里面啄开,没准是只鹰 ——长津湖
|
||||
音·创
|
||||
辉煌的、璀璨的、无边无际、铺天盖地的晚霞\n洒下斑驳的金光,染红了整片山河
|
||||
《赫兰圣殿》
|
||||
风,摇曳着,轻抚着他的脸颊\n半壁残阳正留恋着人世最后一抹温暖
|
||||
清晨的阳光将吹散人间的雾霭 照亮每一寸土壤
|
||||
远方的山川 总会踏着白雾前来
|
||||
梦中的世界 总被现实相依存
|
||||
敌人都是自己树立的\n生存的道路上想要披荆斩棘,那就得学会化敌为友
|
||||
有光之处必有影 有影之处必有光
|
||||
一生所恋 相伴相随
|
||||
你的眼眸是剔透的晶灯 散发着醉人心扉的清光
|
||||
海波激出透人心脾的欢呼
|
||||
英雄何必要站在光中?\n深入黑暗,我自发光。
|
||||
如果我们有三生三世的时间\n那我们将渡过三百乘以三百六十个潮涨潮落
|
||||
善善不能用 恶恶不能去
|
||||
知行合一,格物致知;远沂博索,夕惕若厉;\n蕙心执质,嘉言懿行;怀瑾握瑜,心若芷萱。
|
||||
纪念 追忆 那段不平凡的青春
|
||||
守望黑夜的人,切莫忘记黎明的光彩 ——原神
|
||||
与邪佞战斗的人,切莫失掉正直的心 ——原神
|
||||
我的心 时刻系着祖国的山河
|
||||
生命 灵动
|
||||
坚如寒冰 烈似骄阳
|
||||
上了战场就是英雄 ——长津湖
|
||||
冰与火 恨与爱 静与情
|
||||
有些枪必须开,有些可以不开 ——长津湖
|
||||
夕阳西下,余辉将尽\n夜幕降临,寒风凛冽 ——原神
|
||||
愿风擦拭你的双眼,让你看清真相 ——原神
|
||||
心愿之结晶 而何能之宝贵
|
||||
神明,正倾诉着他辉煌的过去……
|
||||
一切过程与结果都不重要 重要的是热爱与真情
|
||||
给大家带来笑容 这就是我存在的使命
|
||||
不忘本源 牢记故地
|
||||
一厢情愿即是真 心海浮沉即为灵
|
||||
听戏时要点最红的名伶,\n遛鸟时要买最名贵的画眉\n——此即人生 ——原神
|
||||
「精巧」是千年的积淀,而其背后皆存于「意义」
|
||||
世事无常,悲喜难料 ——原神
|
||||
金钱在死亡面前毫不重要
|
||||
风雨兄弟情
|
||||
微笑面对现实
|
||||
人于磨难中练就
|
||||
Long live the People's Republic of China.
|
||||
There is NO heroes, only honors.
|
||||
A man achieve with challenges.
|
||||
种果得果,等的就是这份收获的喜悦 ——原神
|
||||
事了拂衣去,深藏功与名
|
||||
万事开头虽难,倾注的情感也多;\n而欲永恒,仍需重新审视自身\n不小心处理,灵魂便留下裂纹无法挽回。
|
||||
历经历史的沉淀,留下希望的继承
|
||||
身为凡民,血脉脆弱,却也坚强
|
||||
民为本,社稷次之,君为轻 ——孟子
|
||||
不如归去
|
||||
你完成了你的职责,现在,去休息吧。
|
||||
一场长梦,梦醒之后,人就学会了诀别。
|
||||
你们——会祝福下一个时代吗? ——原神
|
||||
任何旅途中的旅伴同行,都会有分别的一日。 ——原神
|
||||
「永恒」最接近于天理 ——原神
|
||||
等旅途到达了终点,再考虑停留于何处吧。 ——原神
|
||||
人海中相遇,本是缘分。 ——原神
|
||||
凡缘朦朦仙缘滔
|
||||
因果红尘渺渺,烟消 ——原神
|
||||
未入尘世,而心远之
|
||||
灵心而静,莫问归期
|
||||
美酒宜人,宜人的却不只是美酒。 ——原神
|
||||
戏会落幕,人生却不会。 ——原神
|
||||
历史越久远,土地上的每一件事物就会承载更多价值。 ——原神
|
||||
深邃的灵魂唤起久远的回忆
|
||||
求索之人 当为奉之
|
||||
无论前路为星辰亦或深渊,皆需往而为之
|
||||
除了路途中的花与枫叶,还有心中的「道」 ——原神
|
||||
只有败北,才能感悟差距,才有机会成长 ——原神
|
||||
命运的邂逅,必定有其意义 ——原神
|
||||
万商云来,千船继至。\n百货迭出,诸海历览。\n ——原神
|
||||
现状越是难以置信,我们越是不能停下脚步。 ——原神
|
||||
古老的文明孕育着最美丽的传说 ——原神
|
||||
百川奔流 雨露不休
|
||||
梦,随着年月流逝而不断消散
|
||||
自由之风会指引前进的路,愿你与我们同行
|
||||
绯樱若解离别苦,自当常留驻。 ——原神
|
||||
犯错受罚,天经地义
|
||||
犯的错无法偿还,那便遭人嫉恨
|
||||
恨——埋藏在深深的地底,待到发出之时,直冲人心
|
||||
城市和风是有记忆的 ——原神
|
||||
传承,永远不变
|
||||
「由浅入深」,对万物的掌握皆是如此。 ——原神
|
||||
乘风破浪,勇往直前。
|
||||
时间的长河会见证过往的一切
|
||||
风沙的吹拂会证明遗失的散漠
|
||||
深冷的面具下埋藏着颤抖的心
|
||||
苦痛的旅程中盘错着举世的谎言
|
||||
欲落的花会告诉你我无尽的思念,而风会在此刻替我拥抱住你。 ——蝶<1361223398>
|
||||
仰望这深邃的夜空,明星洒下的光,总是无尽斑驳
|
||||
|
||||
7
查看代码数.py
7
查看代码数.py
@@ -12,10 +12,9 @@ for path, dir_list, file_list in os.walk(r"./"):
|
||||
print("得到文件名:" + str(file))
|
||||
for i in open(file, 'r', encoding="utf-8"):
|
||||
code = i.replace(' ', '').replace('\n', '')
|
||||
try:
|
||||
code -= code[code.index('#'):]
|
||||
except:
|
||||
pass
|
||||
|
||||
if code.startswith('#'):
|
||||
continue
|
||||
if code:
|
||||
print("\t" + code)
|
||||
m += 1
|
||||
|
||||
BIN
测试用/1.msct
BIN
测试用/1.msct
Binary file not shown.
BIN
测试用/【ff14双人大合奏】僵王处刑曲Brainiac Maniac.mid
Normal file
BIN
测试用/【ff14双人大合奏】僵王处刑曲Brainiac Maniac.mid
Normal file
Binary file not shown.
Reference in New Issue
Block a user