更新便于使用的预览程序

This commit is contained in:
EillesWan 2022-06-07 23:43:14 +08:00
parent 3f0f714a7c
commit 2340741bb9
8 changed files with 313 additions and 55 deletions

143
.gitignore vendored Normal file
View File

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

View File

@ -17,31 +17,6 @@
简体中文🇨🇳 | [English🇬🇧](README_EN.md)
> 是谁把科技的领域布满政治的火药
>
> 是谁把纯净的蓝天染上暗淡的沉灰
>
> 中国人民无不热爱自己伟大的祖国
>
> 我们不会忘记屈辱历史留下的惨痛
>
> 我们希望世界和平
>
> 我们希望获得世界的尊重
>
> 愿世上再也没有战争
>
> 无论是热还是冷
>
> 无论是经济还是政治
>
> 让美妙的和平的优雅的音乐响彻世界
>
> ——金羿
> 2022 5 7
## 介绍🚀
音·创 Musicreater 是一款免费开源的 **《我的世界:基岩版》** 音乐制作软件

View File

@ -18,30 +18,6 @@
[简体中文🇨🇳](README.md) | English🇬🇧
> Who has dropped political gunpowder into the technology
>
> Who has dyed clear blue sky into the dark grey
>
> All Chinese people love our great homeland
>
> We *WILL* remember the remain pain of the humiliating history
>
> We love the whole world but in peace
>
> We love everyone but under respect
>
> It is to be hoped that the war ends forever
>
> Whatever it is cold or hot
>
> Whatever it is economical or political
>
> Just let the wonderful music of peace surround the world
>
> ---- Eilles Wan
> 7/5 2022
**Notice that the language support of *README* may be a little SLOW.**
## Introduction🚀

Binary file not shown.

Binary file not shown.

103
demo_convert.py Normal file
View File

@ -0,0 +1,103 @@
# -*- coding: utf-8 -*-
from main import *
import os
convertion = midiConvert()
while True:
midipath = input('请输入midi文件路径')
if os.path.exists(midipath):
break
else:
print('文件不存在,请重新输入')
outpath = input('请输入输出路径:')
while True:
try:
outFormat = int(input('请输入输出格式(0:mcpack|1:BDX结构)'))
if outFormat == 0:
isAutoReset = input('是否自动重置计分板(1|0)')
if isAutoReset != '':
isAutoReset = bool(int(isAutoReset))
isProgress = input('是否开启进度条(1|0)')
if isProgress != '':
isProgress = bool(int(isProgress))
sbname = input('请输入计分板名称:')
volume = input('请输入音量0-1')
if volume != '':
volume = float(volume)
speed = input('请输入速度倍率:')
if speed != '':
speed = float(speed)
elif outFormat == 1:
author = input('请输入作者:')
isProgress = input('是否开启进度条(1|0)')
if isProgress != '':
isProgress = bool(int(isProgress))
maxHeight = input('请输入指令结构最大生成高度:')
if maxHeight != '':
maxHeight = int(maxHeight)
sbname = input('请输入计分板名称:')
volume = input('请输入音量0-1')
if volume != '':
volume = float(volume)
speed = input('请输入速度倍率:')
if speed != '':
speed = float(speed)
isAutoReset = input('是否自动重置计分板(1|0)')
if isAutoReset != '':
isAutoReset = bool(int(isAutoReset))
break
except:
print('输入错误,请重新输入')
if os.path.isdir(midipath):
for i in os.listdir(midipath):
if i.endswith('.mid'):
convertion.convert(midipath + '/' + i, outpath + '/' + i[:-4] + '.mcpack')
if outFormat == 0:
convertion.tomcpack(
1,
isAutoReset if isAutoReset != '' else bool(int(input('是否自动重置计分板(1|0)'))),
isProgress if isProgress != '' else bool(int(input('是否开启进度条(1|0)'))),
sbname if sbname != '' else input('请输入计分板名称:'),
volume if volume != '' else float(input('请输入音量0-1')),
speed if speed != '' else float(input('请输入速度倍率:')),
)
elif outFormat == 1:
convertion.toBDXfile(
1,
author if author != '' else input('请输入作者:'),
isProgress if isProgress != '' else bool(int(input('是否开启进度条(1|0)'))),
maxHeight if maxHeight != '' else int(input('请输入指令结构最大生成高度:')),
sbname if sbname != '' else input('请输入计分板名称:'),
volume if volume != '' else float(input('请输入音量0-1')),
speed if speed != '' else float(input('请输入速度倍率:')),
isAutoReset if isAutoReset != '' else bool(int(input('是否自动重置计分板(1|0)'))),
)
else:
convertion.convert(midipath, outpath)
if outFormat == 0:
convertion.tomcpack(
1,
isAutoReset if isAutoReset != '' else bool(int(input('是否自动重置计分板(1|0)'))),
isProgress if isProgress != '' else bool(int(input('是否开启进度条(1|0)'))),
sbname if sbname != '' else input('请输入计分板名称:'),
volume if volume != '' else float(input('请输入音量0-1')),
speed if speed != '' else float(input('请输入速度倍率:')),
)
elif outFormat == 1:
convertion.toBDXfile(
1,
author if author != '' else input('请输入作者:'),
isProgress if isProgress != '' else bool(int(input('是否开启进度条(1|0)'))),
maxHeight if maxHeight != '' else int(input('请输入指令结构最大生成高度:')),
sbname if sbname != '' else input('请输入计分板名称:'),
volume if volume != '' else float(input('请输入音量0-1')),
speed if speed != '' else float(input('请输入速度倍率:')),
isAutoReset if isAutoReset != '' else bool(int(input('是否自动重置计分板(1|0)'))),
)

26
main.py
View File

@ -1,20 +1,34 @@
# -*- coding:utf-8 -*-
# -*- coding: utf-8 -*-
'''
Copyright © 2022 Team-Ryoun 金羿("Eilles Wan") & 诸葛亮与八卦阵("bgArray")
Licensed under the Apache License, Version 2.0 (the "License");
# 音·创 开发交流群 861684859
# Email EillesWan2006@163.com W-YI_DoctorYI@outlook.com EillesWan@outlook.com
# 版权所有 金羿("Eilles Wan") & 诸葛亮与八卦阵("bgArray") & 鸣凤鸽子("MingFengPigeon")
# 若需转载或借鉴 请依照 Apache 2.0 许可证进行许可
"""
· (Musicreater)
一款免费开源的 我的世界基岩版 音乐制作软件
注意除了此源文件以外任何属于此仓库以及此项目的文件均依照Apache许可证进行许可
Musicreater (·)
A free opensource software which is used for creating all kinds of musics in Minecraft
Note! Except for this source file, all the files in this repository and this project are licensed under Apache License 2.0
Copyright 2022 all the developers of Musicreater
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,
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.
'''
"""
import os

47
poem.txt Normal file
View File

@ -0,0 +1,47 @@
> 是谁把科技的领域布满政治的火药
>
> 是谁把纯净的蓝天染上暗淡的沉灰
>
> 中国人民无不热爱自己伟大的祖国
>
> 我们不会忘记屈辱历史留下的惨痛
>
> 我们希望世界和平
>
> 我们希望获得世界的尊重
>
> 愿世上再也没有战争
>
> 无论是热还是冷
>
> 无论是经济还是政治
>
> 让美妙的和平的优雅的音乐响彻世界
>
> ——金羿
> 2022 5 7
> Who has dropped political gunpowder into the technology
>
> Who has dyed clear blue sky into the dark grey
>
> All Chinese people love our great homeland
>
> We *WILL* remember the remain pain of the humiliating history
>
> We love the whole world but in peace
>
> We love everyone but under respect
>
> It is to be hoped that the war ends forever
>
> Whatever it is cold or hot
>
> Whatever it is economical or political
>
> Just let the wonderful music of peace surround the world
>
> ---- Eilles Wan
> 7/5 2022