mirror of
https://github.com/TriM-Organization/Musicreater.git
synced 2024-11-11 01:27:35 +08:00
准备与pkgver合并
This commit is contained in:
parent
87e80406a3
commit
75f94dab4c
@ -1,177 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
# 音·创 开发交流群 861684859
|
||||
# Email EillesWan2006@163.com W-YI_DoctorYI@outlook.com EillesWan@outlook.com
|
||||
# 版权所有 金羿("Eilles Wan") & 诸葛亮与八卦阵("bgArray") & 鸣凤鸽子("MingFengPigeon")
|
||||
# 若需转载或借鉴 许可声明请查看仓库目录下的 Lisence.md
|
||||
|
||||
|
||||
"""
|
||||
音·创 (Musicreater)
|
||||
一款免费开源的 《我的世界:基岩版》 音乐制作软件
|
||||
Musicreater (音·创)
|
||||
A free opensource software which is used for creating all kinds of musics in Minecraft
|
||||
|
||||
Copyright 2023 all the developers of Musicreater
|
||||
|
||||
开源相关声明请见 ./Lisence.md
|
||||
Terms & Conditions: ./Lisence.md
|
||||
"""
|
||||
|
||||
|
||||
|
||||
# 下面为正文
|
||||
|
||||
# 音·创 为梦而创,为爱远航
|
||||
|
||||
|
||||
|
||||
from msctLib.buildIN import version
|
||||
from languages.lang import _
|
||||
from msctLib.log import log
|
||||
import wx # 引入wxPython库
|
||||
|
||||
__ver__ = f'{version.version[1]} {version.version[0]}'
|
||||
__author__ = '金羿Eilles'
|
||||
|
||||
|
||||
|
||||
|
||||
class MainWindow(wx.Frame):
|
||||
"""We simply derive a new class of Frame."""
|
||||
def __init__(self, *args, **kargs):
|
||||
super(MainWindow, self).__init__(*args, **kargs)
|
||||
|
||||
|
||||
#创建位于窗口的底部的状态栏
|
||||
self.CreateStatusBar()
|
||||
|
||||
# 设置菜单
|
||||
filemenu = wx.Menu()
|
||||
|
||||
#wx.ID_ABOUT和wx.ID_EXIT是wxWidgets提供的标准ID
|
||||
filemenu.Append(wx.ID_ABOUT, _(u"关于"), _(u"h关于"))
|
||||
filemenu.AppendSeparator()
|
||||
filemenu.Append(wx.ID_EXIT, item=_(u"退出"), helpString=_(r'h退出') )
|
||||
|
||||
# 创建菜单栏
|
||||
menuBar = wx.MenuBar()
|
||||
menuBar.Append(filemenu, u"文件")
|
||||
self.SetMenuBar(menuBar)
|
||||
|
||||
# 创建图标
|
||||
icon = wx.Icon(name="./resources/msctIcon.png")
|
||||
self.SetIcon(icon)
|
||||
|
||||
self.Show(True)
|
||||
|
||||
def initArgs(
|
||||
self,
|
||||
debug: bool = False,
|
||||
menuWidget: dict = {},
|
||||
wordView: str = '音·创 Musicreater',
|
||||
buttons: list = [],
|
||||
settingBox: list = [],
|
||||
notemap: list = [],
|
||||
infobar: str = '就绪',
|
||||
) -> None:
|
||||
'''使用参数初始化一些基本的音·创窗口组件
|
||||
:param debug 是否将日志输出到控制台
|
||||
wordview: str #言论部分显示的字样
|
||||
button: list = [ # 操作按钮部分
|
||||
dict = {
|
||||
按钮名称 : tuple(按钮图标,执行函数)
|
||||
},
|
||||
],
|
||||
settingbox: list = [ # 设置部分显示的字样及其对应的设置函数
|
||||
(
|
||||
设置名称:str,
|
||||
值类型:tuple,
|
||||
显示内容:str,
|
||||
设置操作函数:<function>,
|
||||
)
|
||||
],
|
||||
map: list = [ # 一首曲目的音符数据
|
||||
音符数据
|
||||
]
|
||||
:param infobar str 显示信息用
|
||||
'''
|
||||
|
||||
if debug:
|
||||
log('载入参数')
|
||||
|
||||
# 载入参量 注意!图标将不被载入参数
|
||||
|
||||
|
||||
|
||||
self.menuWidgets = menuWidget
|
||||
'''菜单设定项'''
|
||||
|
||||
self.wordView = wordView
|
||||
'''言·论 所显示的文字'''
|
||||
|
||||
self.buttons = buttons
|
||||
'''快捷功能按钮'''
|
||||
|
||||
self.settingBox = settingBox
|
||||
'''设置框'''
|
||||
|
||||
self.notemap = notemap
|
||||
'''音符列表'''
|
||||
|
||||
self.infoBar = infobar
|
||||
'''信息显示版所显示的文字'''
|
||||
|
||||
self.debug = debug
|
||||
'''是否打开调试模式'''
|
||||
|
||||
|
||||
def setMenu(self) -> None:
|
||||
'''设置根菜单'''
|
||||
if not self.menuWidgets:
|
||||
# 如果传入空参数则返回当前菜单
|
||||
try:
|
||||
return self._RootMenu
|
||||
except Exception as E:
|
||||
if self.debug:
|
||||
raise E
|
||||
log('无法读取菜单信息', 'ERROR')
|
||||
# 如果不是空参数则新建菜单
|
||||
log('新建一个菜单')
|
||||
|
||||
self._RootMenu = {}
|
||||
self._mainMenuBar = wx.MenuBar()
|
||||
|
||||
# 取得一个菜单名和一堆菜单函数及其显示名称
|
||||
for menuName, menuCmd in self.menuWidgets.items():
|
||||
|
||||
# 新建一个菜单
|
||||
menu = wx.Menu()
|
||||
|
||||
# 循环得到菜单下的项目,并载入其中
|
||||
for cmdName, cmdFunc in menuCmd.items():
|
||||
if cmdName:
|
||||
menu.add_command(label=cmdName, command=cmdFunc)
|
||||
log('菜单项 -- ' + cmdName)
|
||||
else:
|
||||
menu.add_separator()
|
||||
log('分隔符 -- 分隔符')
|
||||
self._mainMenuBar.add_cascade(label=menuName, menu=menu)
|
||||
self._RootMenu[menuName] = menu
|
||||
log('计入一个菜单 -- ' + menuName)
|
||||
self.__root.config(menu=self._mainMenuBar)
|
||||
log('菜单设置完毕')
|
||||
|
||||
|
||||
|
||||
def __main__():
|
||||
app = wx.App(False)
|
||||
frame = MainWindow(None, id=wx.ID_ANY, title=f"{_('F音创')} {__ver__}", size=(1600, 900))
|
||||
|
||||
app.MainLoop()
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
__main__()
|
34
README.md
34
README.md
@ -129,43 +129,11 @@ python3 Musicreater.py
|
||||
|
||||
## 联系我们📞
|
||||
|
||||
### 作者\<*金羿*\>(Eilles)联系方式
|
||||
|
||||
1. QQ 2647547478
|
||||
2. 电邮 EillesWan2006@163.com W-YI_DoctorYI@outlook.com EillesWan@outlook.com
|
||||
3. 微信 WYI_DoctorYI
|
||||
|
||||
### 作者\<*诸葛亮与八卦阵*\>(bgArray) 联系方式
|
||||
|
||||
1. QQ 4740437765
|
||||
|
||||
## 待办事项⏲
|
||||
|
||||
* - [x] 支持自动安装
|
||||
* - [ ] 支持多语言
|
||||
* - [ ] 支持音乐编辑
|
||||
* - [ ] 窗口优化
|
||||
* - [ ] 1.支持插件功能
|
||||
* - [ ] 2.进度条
|
||||
* - [ ] 3.可以将音乐写入音符盒(红乐)
|
||||
* - [ ] 4.修改UI界面使之适应当前功能
|
||||
* - [ ] 5.支持自动给音符盒绑定更多的音色
|
||||
* - [ ] 6.可以由.schematic文件导入地图,亦可反向处理
|
||||
* - [ ] 7.制作软件下载器使用户更直观地操作
|
||||
* - [ ] 8.支持自定义创建websockeet服务器播放音乐
|
||||
* - [ ] 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.以小节为单位做音符播放时间对标
|
||||
|
||||
- [] 喵喵喵
|
||||
|
||||
|
||||
[Bilibili: 凌云金羿]: https://img.shields.io/badge/Bilibili-%E5%87%8C%E4%BA%91%E9%87%91%E7%BE%BF-00A1E7?style=for-the-badge
|
||||
|
@ -1,67 +0,0 @@
|
||||
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) -> int:
|
||||
'''传入一个 MidiFile, 返回其音乐的bpm
|
||||
:param mid : mido.MidFile
|
||||
mido库识别的midi文件数据
|
||||
:return bpm : int
|
||||
'''
|
||||
# mid = mido.MidiFile(mf)
|
||||
long = mid.length
|
||||
tpb = mid.ticks_per_beat
|
||||
bpm = 20
|
||||
gotV = 0
|
||||
|
||||
for track in mid.tracks:
|
||||
global_time = 0
|
||||
for msg in track:
|
||||
global_time += msg.time
|
||||
if msg.type == "note_on" and msg.velocity > 0:
|
||||
gotV = mt2gt(global_time, tpb, bpm)
|
||||
errorV = numpy.fabs(gotV - long)
|
||||
last_dic = {bpm: errorV}
|
||||
if last_dic.get(bpm) > errorV:
|
||||
last_dic = {bpm: errorV}
|
||||
bpm += 2
|
||||
|
||||
while True:
|
||||
for track in mid.tracks:
|
||||
global_time = 0
|
||||
for msg in track:
|
||||
global_time += msg.time
|
||||
if msg.type == "note_on" and msg.velocity > 0:
|
||||
gotV = mt2gt(global_time, tpb, bpm)
|
||||
errorV = numpy.fabs(gotV - long)
|
||||
try:
|
||||
if last_dic.get(bpm - 2) > errorV:
|
||||
last_dic = {bpm: errorV}
|
||||
except TypeError:
|
||||
pass
|
||||
bpm += 2
|
||||
if bpm >= 252:
|
||||
break
|
||||
print(list(last_dic.keys())[0])
|
||||
return list(last_dic.keys())[0]
|
||||
|
||||
|
||||
def compute(mid:mido.MidiFile):
|
||||
answer = 60000000/mid.ticks_per_beat
|
||||
print(answer)
|
||||
return answer
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
mid = mido.MidiFile(r"C:\Users\lc\Documents\MuseScore3\乐谱\乐谱\Bad style - Time back.mid")
|
||||
get(mid)
|
||||
compute(mid)
|
@ -1,40 +0,0 @@
|
||||
def round_up(num, power=0):
|
||||
"""
|
||||
实现精确四舍五入,包含正、负小数多种场景
|
||||
:param num: 需要四舍五入的小数
|
||||
:param power: 四舍五入位数,支持0-∞
|
||||
:return: 返回四舍五入后的结果
|
||||
"""
|
||||
try:
|
||||
print(1 / 0)
|
||||
except ZeroDivisionError:
|
||||
digit = 10 ** power
|
||||
num2 = float(int(num * digit))
|
||||
# 处理正数,power不为0的情况
|
||||
if num >= 0 and power != 0:
|
||||
tag = num * digit - num2 + 1 / (digit * 10)
|
||||
if tag >= 0.5:
|
||||
return (num2 + 1) / digit
|
||||
else:
|
||||
return num2 / digit
|
||||
# 处理正数,power为0取整的情况
|
||||
elif num >= 0 and power == 0:
|
||||
tag = num * digit - int(num)
|
||||
if tag >= 0.5:
|
||||
return (num2 + 1) / digit
|
||||
else:
|
||||
return num2 / digit
|
||||
# 处理负数,power为0取整的情况
|
||||
elif power == 0 and num < 0:
|
||||
tag = num * digit - int(num)
|
||||
if tag <= -0.5:
|
||||
return (num2 - 1) / digit
|
||||
else:
|
||||
return num2 / digit
|
||||
# 处理负数,power不为0的情况
|
||||
else:
|
||||
tag = num * digit - num2 - 1 / (digit * 10)
|
||||
if tag <= -0.5:
|
||||
return (num2 - 1) / digit
|
||||
else:
|
||||
return num2 / digit
|
@ -1,24 +0,0 @@
|
||||
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,92 +0,0 @@
|
||||
zip_name = {-1: '-1.Acoustic_Kit_打击乐.zip', 0: '0.Acoustic_Grand_Piano_大钢琴.zip', 1: '1.Bright_Acoustic_Piano_亮音大钢琴.zip',
|
||||
10: '10.Music_Box_八音盒.zip', 100: '100.FX_brightness_合成特效-亮音.zip', 101: '101.FX_goblins_合成特效-小妖.zip',
|
||||
102: '102.FX_echoes_合成特效-回声.zip', 103: '103.FX_sci-fi_合成特效-科幻.zip', 104: '104.Sitar_锡塔尔.zip',
|
||||
105: '105.Banjo_班卓.zip', 106: '106.Shamisen_三味线.zip', 107: '107.Koto_筝.zip', 108: '108.Kalimba_卡林巴.zip',
|
||||
109: '109.Bagpipe_风笛.zip', 11: '11.Vibraphone_电颤琴.zip', 110: '110.Fiddle_古提琴.zip', 111: '111.Shanai_唢呐.zip',
|
||||
112: '112.Tinkle_Bell_铃铛.zip', 113: '113.Agogo_拉丁打铃.zip', 114: '114.Steel_Drums_钢鼓.zip',
|
||||
115: '115.Woodblock_木块.zip', 116: '116.Taiko_Drum_太鼓.zip', 117: '117.Melodic_Tom_嗵鼓.zip',
|
||||
118: '118.Synth_Drum_合成鼓.zip', 119: '119.Reverse_Cymbal_镲波形反转.zip', 12: '12.Marimba_马林巴.zip',
|
||||
13: '13.Xylophone_木琴.zip', 14: '14.Tubular_Bells_管钟.zip', 15: '15.Dulcimer_扬琴.zip',
|
||||
16: '16.Drawbar_Organ_击杆风琴.zip', 17: '17.Percussive_Organ_打击型风琴.zip', 18: '18.Rock_Organ_摇滚风琴.zip',
|
||||
19: '19.Church_Organ_管风琴.zip', 2: '2.Electric_Grand_Piano_电子大钢琴.zip', 20: '20.Reed_Organ_簧风琴.zip',
|
||||
21: '21.Accordion_手风琴.zip', 22: '22.Harmonica_口琴.zip', 23: '23.Tango_Accordian_探戈手风琴.zip',
|
||||
24: '24.Acoustic_Guitar_(nylon)_尼龙弦吉他.zip', 25: '25.Acoustic_Guitar(steel)_钢弦吉他.zip',
|
||||
26: '26.Electric_Guitar_(jazz)_爵士乐电吉他.zip', 27: '27.Electric_Guitar_(clean)_清音电吉他.zip',
|
||||
28: '28.Electric_Guitar_(muted)_弱音电吉他.zip', 29: '29.Overdriven_Guitar_驱动音效吉他.zip',
|
||||
3: '3.Honky-Tonk_Piano_酒吧钢琴.zip', 30: '30.Distortion_Guitar_失真音效吉他.zip', 31: '31.Guitar_Harmonics_吉他泛音.zip',
|
||||
32: '32.Acoustic_Bass_原声贝司.zip', 33: '33.Electric_Bass(finger)_指拨电贝司.zip',
|
||||
34: '34.Electric_Bass(pick)_拨片拨电贝司.zip', 35: '35.Fretless_Bass_无品贝司.zip', 36: '36.Slap_Bass_A_击弦贝司A.zip',
|
||||
37: '37.Slap_Bass_B_击弦贝司B.zip', 38: '38.Synth_Bass_A_合成贝司A.zip', 39: '39.Synth_Bass_B_合成贝司B.zip',
|
||||
4: '4.Electric_Piano_1_电钢琴A.zip', 40: '40.Violin_小提琴.zip', 41: '41.Viola_中提琴.zip', 42: '42.Cello_大提琴.zip',
|
||||
43: '43.Contrabass_低音提琴.zip', 44: '44.Tremolo_Strings_弦乐震音.zip', 45: '45.Pizzicato_Strings_弦乐拨奏.zip',
|
||||
46: '46.Orchestral_Harp_竖琴.zip', 47: '47.Timpani_定音鼓.zip', 48: '48.String_Ensemble_A_弦乐合奏A.zip',
|
||||
49: '49.String_Ensemble_B_弦乐合奏B.zip', 5: '5.Electric_Piano_2_电钢琴B.zip', 50: '50.SynthStrings_A_合成弦乐A.zip',
|
||||
51: '51.SynthStrings_B_合成弦乐B.zip', 52: '52.Choir_Aahs_合唱“啊”音.zip', 53: '53.Voice_Oohs_人声“哦”音.zip',
|
||||
54: '54.Synth_Voice_合成人声.zip', 55: '55.Orchestra_Hit_乐队打击乐.zip', 56: '56.Trumpet_小号.zip',
|
||||
57: '57.Trombone_长号.zip', 58: '58.Tuba_大号.zip', 59: '59.Muted_Trumpet_弱音小号.zip',
|
||||
6: '6.Harpsichord_拨弦古钢琴.zip', 60: '60.French_Horn_圆号.zip', 61: '61.Brass_Section_铜管组.zip',
|
||||
62: '62.Synth_Brass_A_合成铜管A.zip', 63: '63.Synth_Brass_A_合成铜管B.zip', 64: '64.Soprano_Sax_高音萨克斯.zip',
|
||||
65: '65.Alto_Sax_中音萨克斯.zip', 66: '66.Tenor_Sax_次中音萨克斯.zip', 67: '67.Baritone_Sax_上低音萨克斯.zip',
|
||||
68: '68.Oboe_双簧管.zip', 69: '69.English_Horn_英国管.zip', 7: '7.Clavinet_击弦古钢琴.zip', 70: '70.Bassoon_大管.zip',
|
||||
71: '71.Clarinet_单簧管.zip', 72: '72.Piccolo_短笛.zip', 73: '73.Flute_长笛.zip', 74: '74.Recorder_竖笛.zip',
|
||||
75: '75.Pan_Flute_排笛.zip', 76: '76.Bottle_Blow_吹瓶口.zip', 77: '77.Skakuhachi_尺八.zip', 78: '78.Whistle_哨.zip',
|
||||
79: '79.Ocarina_洋埙.zip', 8: '8.Celesta_钢片琴.zip', 80: '80.Lead_square_合成主音-方波.zip',
|
||||
81: '81.Lead_sawtooth_合成主音-锯齿波.zip', 82: '82.Lead_calliope_lead_合成主音-汽笛风琴.zip',
|
||||
83: '83.Lead_chiff_lead_合成主音-吹管.zip', 84: '84.Lead_charang_合成主音5-吉他.zip', 85: '85.Lead_voice_合成主音-人声.zip',
|
||||
86: '86.Lead_fifths_合成主音-五度.zip', 87: '87.Lead_bass+lead_合成主音-低音加主音.zip', 88: '88.Pad_new_age_合成柔音-新时代.zip',
|
||||
89: '89.Pad_warm_合成柔音-暖音.zip', 9: '9.Glockenspiel_钟琴.zip', 90: '90.Pad_polysynth_合成柔音-复合成.zip',
|
||||
91: '91.Pad_choir_合成柔音-合唱.zip', 92: '92.Pad_bowed_合成柔音-弓弦.zip', 93: '93.Pad_metallic_合成柔音-金属.zip',
|
||||
94: '94.Pad_halo_合成柔音-光环.zip', 95: '95.Pad_sweep_合成柔音-扫弦.zip', 96: '96.FX_rain_合成特效-雨.zip',
|
||||
97: '97.FX_soundtrack_合成特效-音轨.zip', 98: '98.FX_crystal_合成特效-水晶.zip', 99: '99.FX_atmosphere_合成特效-大气.zip'}
|
||||
|
||||
mcpack_name = {-1: '-1.Acoustic_Kit_打击乐.mcpack', 0: '0.Acoustic_Grand_Piano_大钢琴.mcpack',
|
||||
1: '1.Bright_Acoustic_Piano_亮音大钢琴.mcpack', 10: '10.Music_Box_八音盒.mcpack',
|
||||
100: '100.FX_brightness_合成特效-亮音.mcpack', 101: '101.FX_goblins_合成特效-小妖.mcpack',
|
||||
102: '102.FX_echoes_合成特效-回声.mcpack', 103: '103.FX_sci-fi_合成特效-科幻.mcpack', 104: '104.Sitar_锡塔尔.mcpack',
|
||||
105: '105.Banjo_班卓.mcpack', 106: '106.Shamisen_三味线.mcpack', 107: '107.Koto_筝.mcpack',
|
||||
108: '108.Kalimba_卡林巴.mcpack', 109: '109.Bagpipe_风笛.mcpack', 11: '11.Vibraphone_电颤琴.mcpack',
|
||||
110: '110.Fiddle_古提琴.mcpack', 111: '111.Shanai_唢呐.mcpack', 112: '112.Tinkle_Bell_铃铛.mcpack',
|
||||
113: '113.Agogo_拉丁打铃.mcpack', 114: '114.Steel_Drums_钢鼓.mcpack', 115: '115.Woodblock_木块.mcpack',
|
||||
116: '116.Taiko_Drum_太鼓.mcpack', 117: '117.Melodic_Tom_嗵鼓.mcpack', 118: '118.Synth_Drum_合成鼓.mcpack',
|
||||
119: '119.Reverse_Cymbal_镲波形反转.mcpack', 12: '12.Marimba_马林巴.mcpack', 13: '13.Xylophone_木琴.mcpack',
|
||||
14: '14.Tubular_Bells_管钟.mcpack', 15: '15.Dulcimer_扬琴.mcpack', 16: '16.Drawbar_Organ_击杆风琴.mcpack',
|
||||
17: '17.Percussive_Organ_打击型风琴.mcpack', 18: '18.Rock_Organ_摇滚风琴.mcpack',
|
||||
19: '19.Church_Organ_管风琴.mcpack', 2: '2.Electric_Grand_Piano_电子大钢琴.mcpack',
|
||||
20: '20.Reed_Organ_簧风琴.mcpack', 21: '21.Accordion_手风琴.mcpack', 22: '22.Harmonica_口琴.mcpack',
|
||||
23: '23.Tango_Accordian_探戈手风琴.mcpack', 24: '24.Acoustic_Guitar_(nylon)_尼龙弦吉他.mcpack',
|
||||
25: '25.Acoustic_Guitar(steel)_钢弦吉他.mcpack', 26: '26.Electric_Guitar_(jazz)_爵士乐电吉他.mcpack',
|
||||
27: '27.Electric_Guitar_(clean)_清音电吉他.mcpack', 28: '28.Electric_Guitar_(muted)_弱音电吉他.mcpack',
|
||||
29: '29.Overdriven_Guitar_驱动音效吉他.mcpack', 3: '3.Honky-Tonk_Piano_酒吧钢琴.mcpack',
|
||||
30: '30.Distortion_Guitar_失真音效吉他.mcpack', 31: '31.Guitar_Harmonics_吉他泛音.mcpack',
|
||||
32: '32.Acoustic_Bass_原声贝司.mcpack', 33: '33.Electric_Bass(finger)_指拨电贝司.mcpack',
|
||||
34: '34.Electric_Bass(pick)_拨片拨电贝司.mcpack', 35: '35.Fretless_Bass_无品贝司.mcpack',
|
||||
36: '36.Slap_Bass_A_击弦贝司A.mcpack', 37: '37.Slap_Bass_B_击弦贝司B.mcpack', 38: '38.Synth_Bass_A_合成贝司A.mcpack',
|
||||
39: '39.Synth_Bass_B_合成贝司B.mcpack', 4: '4.Electric_Piano_1_电钢琴A.mcpack', 40: '40.Violin_小提琴.mcpack',
|
||||
41: '41.Viola_中提琴.mcpack', 42: '42.Cello_大提琴.mcpack', 43: '43.Contrabass_低音提琴.mcpack',
|
||||
44: '44.Tremolo_Strings_弦乐震音.mcpack', 45: '45.Pizzicato_Strings_弦乐拨奏.mcpack',
|
||||
46: '46.Orchestral_Harp_竖琴.mcpack', 47: '47.Timpani_定音鼓.mcpack', 48: '48.String_Ensemble_A_弦乐合奏A.mcpack',
|
||||
49: '49.String_Ensemble_B_弦乐合奏B.mcpack', 5: '5.Electric_Piano_2_电钢琴B.mcpack',
|
||||
50: '50.SynthStrings_A_合成弦乐A.mcpack', 51: '51.SynthStrings_B_合成弦乐B.mcpack',
|
||||
52: '52.Choir_Aahs_合唱“啊”音.mcpack', 53: '53.Voice_Oohs_人声“哦”音.mcpack', 54: '54.Synth_Voice_合成人声.mcpack',
|
||||
55: '55.Orchestra_Hit_乐队打击乐.mcpack', 56: '56.Trumpet_小号.mcpack', 57: '57.Trombone_长号.mcpack',
|
||||
58: '58.Tuba_大号.mcpack', 59: '59.Muted_Trumpet_弱音小号.mcpack', 6: '6.Harpsichord_拨弦古钢琴.mcpack',
|
||||
60: '60.French_Horn_圆号.mcpack', 61: '61.Brass_Section_铜管组.mcpack', 62: '62.Synth_Brass_A_合成铜管A.mcpack',
|
||||
63: '63.Synth_Brass_A_合成铜管B.mcpack', 64: '64.Soprano_Sax_高音萨克斯.mcpack', 65: '65.Alto_Sax_中音萨克斯.mcpack',
|
||||
66: '66.Tenor_Sax_次中音萨克斯.mcpack', 67: '67.Baritone_Sax_上低音萨克斯.mcpack', 68: '68.Oboe_双簧管.mcpack',
|
||||
69: '69.English_Horn_英国管.mcpack', 7: '7.Clavinet_击弦古钢琴.mcpack', 70: '70.Bassoon_大管.mcpack',
|
||||
71: '71.Clarinet_单簧管.mcpack', 72: '72.Piccolo_短笛.mcpack', 73: '73.Flute_长笛.mcpack',
|
||||
74: '74.Recorder_竖笛.mcpack', 75: '75.Pan_Flute_排笛.mcpack', 76: '76.Bottle_Blow_吹瓶口.mcpack',
|
||||
77: '77.Skakuhachi_尺八.mcpack', 78: '78.Whistle_哨.mcpack', 79: '79.Ocarina_洋埙.mcpack',
|
||||
8: '8.Celesta_钢片琴.mcpack', 80: '80.Lead_square_合成主音-方波.mcpack', 81: '81.Lead_sawtooth_合成主音-锯齿波.mcpack',
|
||||
82: '82.Lead_calliope_lead_合成主音-汽笛风琴.mcpack', 83: '83.Lead_chiff_lead_合成主音-吹管.mcpack',
|
||||
84: '84.Lead_charang_合成主音5-吉他.mcpack', 85: '85.Lead_voice_合成主音-人声.mcpack',
|
||||
86: '86.Lead_fifths_合成主音-五度.mcpack', 87: '87.Lead_bass+lead_合成主音-低音加主音.mcpack',
|
||||
88: '88.Pad_new_age_合成柔音-新时代.mcpack', 89: '89.Pad_warm_合成柔音-暖音.mcpack', 9: '9.Glockenspiel_钟琴.mcpack',
|
||||
90: '90.Pad_polysynth_合成柔音-复合成.mcpack', 91: '91.Pad_choir_合成柔音-合唱.mcpack',
|
||||
92: '92.Pad_bowed_合成柔音-弓弦.mcpack', 93: '93.Pad_metallic_合成柔音-金属.mcpack',
|
||||
94: '94.Pad_halo_合成柔音-光环.mcpack', 95: '95.Pad_sweep_合成柔音-扫弦.mcpack', 96: '96.FX_rain_合成特效-雨.mcpack',
|
||||
97: '97.FX_soundtrack_合成特效-音轨.mcpack', 98: '98.FX_crystal_合成特效-水晶.mcpack',
|
||||
99: '99.FX_atmosphere_合成特效-大气.mcpack'}
|
||||
|
||||
if __name__ == '__main__':
|
||||
print(zip_name[0])
|
@ -1,133 +0,0 @@
|
||||
pitch = {
|
||||
'0': '0.0220970869120796',
|
||||
'1': '0.0234110480761981',
|
||||
'2': '0.0248031414370031',
|
||||
'3': '0.0262780129766786',
|
||||
'4': '0.0278405849418856',
|
||||
'5': '0.0294960722713029',
|
||||
'6': '0.03125',
|
||||
'7': '0.033108221698728',
|
||||
'8': '0.0350769390096679',
|
||||
'9': '0.037162722343835',
|
||||
'10': '0.0393725328092148',
|
||||
'11': '0.0417137454428136',
|
||||
'12': '0.0441941738241592',
|
||||
'13': '0.0468220961523963',
|
||||
'14': '0.0496062828740062',
|
||||
'15': '0.0525560259533572',
|
||||
'16': '0.0556811698837712',
|
||||
'17': '0.0589921445426059',
|
||||
'18': '0.0625',
|
||||
'19': '0.066216443397456',
|
||||
'20': '0.0701538780193358',
|
||||
'21': '0.0743254446876701',
|
||||
'22': '0.0787450656184296',
|
||||
'23': '0.0834274908856271',
|
||||
'24': '0.0883883476483184',
|
||||
'25': '0.0936441923047926',
|
||||
'26': '0.0992125657480125',
|
||||
'27': '0.105112051906714',
|
||||
'28': '0.111362339767542',
|
||||
'29': '0.117984289085212',
|
||||
'30': '0.125',
|
||||
'31': '0.132432886794912',
|
||||
'32': '0.140307756038672',
|
||||
'33': '0.14865088937534',
|
||||
'34': '0.157490131236859',
|
||||
'35': '0.166854981771254',
|
||||
'36': '0.176776695296637',
|
||||
'37': '0.187288384609585',
|
||||
'38': '0.198425131496025',
|
||||
'39': '0.210224103813429',
|
||||
'40': '0.222724679535085',
|
||||
'41': '0.235968578170423',
|
||||
'42': '0.25',
|
||||
'43': '0.264865773589824',
|
||||
'44': '0.280615512077343',
|
||||
'45': '0.29730177875068',
|
||||
'46': '0.314980262473718',
|
||||
'47': '0.333709963542509',
|
||||
'48': '0.353553390593274',
|
||||
'49': '0.37457676921917',
|
||||
'50': '0.39685026299205',
|
||||
'51': '0.420448207626857',
|
||||
'52': '0.44544935907017',
|
||||
'53': '0.471937156340847',
|
||||
'54': '0.5',
|
||||
'55': '0.529731547179648',
|
||||
'56': '0.561231024154687',
|
||||
'57': '0.594603557501361',
|
||||
'58': '0.629960524947437',
|
||||
'59': '0.667419927085017',
|
||||
'60': '0.707106781186548',
|
||||
'61': '0.749153538438341',
|
||||
'62': '0.7937005259841',
|
||||
'63': '0.840896415253715',
|
||||
'64': '0.890898718140339',
|
||||
'65': '0.943874312681694',
|
||||
'66': '1',
|
||||
'67': '1.0594630943593',
|
||||
'68': '1.12246204830937',
|
||||
'69': '1.18920711500272',
|
||||
'70': '1.25992104989487',
|
||||
'71': '1.33483985417003',
|
||||
'72': '1.4142135623731',
|
||||
'73': '1.49830707687668',
|
||||
'74': '1.5874010519682',
|
||||
'75': '1.68179283050743',
|
||||
'76': '1.78179743628068',
|
||||
'77': '1.88774862536339',
|
||||
'78': '2',
|
||||
'79': '2.11892618871859',
|
||||
'80': '2.24492409661875',
|
||||
'81': '2.37841423000544',
|
||||
'82': '2.51984209978975',
|
||||
'83': '2.66967970834007',
|
||||
'84': '2.82842712474619',
|
||||
'85': '2.99661415375336',
|
||||
'86': '3.1748021039364',
|
||||
'87': '3.36358566101486',
|
||||
'88': '3.56359487256136',
|
||||
'89': '3.77549725072677',
|
||||
'90': '4',
|
||||
'91': '4.23785237743718',
|
||||
'92': '4.48984819323749',
|
||||
'93': '4.75682846001088',
|
||||
'94': '5.03968419957949',
|
||||
'95': '5.33935941668014',
|
||||
'96': '5.65685424949238',
|
||||
'97': '5.99322830750673',
|
||||
'98': '6.3496042078728',
|
||||
'99': '6.72717132202972',
|
||||
'100': '7.12718974512272',
|
||||
'101': '7.55099450145355',
|
||||
'102': '8',
|
||||
'103': '8.47570475487436',
|
||||
'104': '8.97969638647498',
|
||||
'105': '9.51365692002177',
|
||||
'106': '10.079368399159',
|
||||
'107': '10.6787188333603',
|
||||
'108': '11.3137084989848',
|
||||
'109': '11.9864566150135',
|
||||
'110': '12.6992084157456',
|
||||
'111': '13.4543426440594',
|
||||
'112': '14.2543794902454',
|
||||
'113': '15.1019890029071',
|
||||
'114': '16',
|
||||
'115': '16.9514095097487',
|
||||
'116': '17.95939277295',
|
||||
'117': '19.0273138400435',
|
||||
'118': '20.158736798318',
|
||||
'119': '21.3574376667206',
|
||||
'120': '22.6274169979695',
|
||||
'121': '23.9729132300269',
|
||||
'122': '25.3984168314912',
|
||||
'123': '26.9086852881189',
|
||||
'124': '28.5087589804909',
|
||||
'125': '30.2039780058142',
|
||||
'126': '32',
|
||||
'127': '33.9028190194974',
|
||||
'128': '35.9187855458999',
|
||||
'129': '38.0546276800871',
|
||||
'130': '40.3174735966359',
|
||||
'131': '42.7148753334411'}
|
@ -1,148 +0,0 @@
|
||||
# -*- 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
|
@ -1,131 +0,0 @@
|
||||
import os
|
||||
import pickle
|
||||
# import tkinter.filedialog
|
||||
# from namesConstant import zip_name
|
||||
# from namesConstant import mcpack_name
|
||||
import bgArrayLib.namesConstant
|
||||
import shutil
|
||||
zipN = bgArrayLib.namesConstant.zip_name
|
||||
mpN = bgArrayLib.namesConstant.mcpack_name
|
||||
|
||||
manifest = {
|
||||
"format_version": 1,
|
||||
"header": {
|
||||
"name": "羽音缭绕-midiout_25.5--音创使用",
|
||||
"description": "羽音缭绕-midiout_25.0--音创使用",
|
||||
"uuid": "c1adbda4-3b3e-4e5b-a57e-cde8ac80ee19",
|
||||
"version": [25, 5, 0]
|
||||
},
|
||||
"modules": [
|
||||
{
|
||||
"description": "羽音缭绕-midiout_25.0--音创使用",
|
||||
"type": "resources",
|
||||
"uuid": "c13455d5-b9f3-47f2-9706-c05ad86b3180 ",
|
||||
"version": [25, 5, 0]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
def resources_pathSetting(newPath: str = ""):
|
||||
if not os.path.isfile("./bgArrayLib/resourcesPath.rpposi") and newPath == "":
|
||||
return [False, 1] # 1:没有路径文件
|
||||
elif newPath != "": # not os.path.isfile("./bgArrayLib/resourcesPath.rpposi") and
|
||||
path = newPath
|
||||
print(path)
|
||||
with open("./bgArrayLib/resourcesPath.rpposi", 'w') as w:
|
||||
w.write(path)
|
||||
if "mcpack(国际版推荐)格式_25.0" in os.listdir(path) and "zip格式_25.0" in os.listdir(path):
|
||||
return [True, path, 1] # 1:都有
|
||||
elif "mcpack(国际版推荐)格式_25.0" in os.listdir(path) and "zip格式_25.0" not in os.listdir(path):
|
||||
return [True, path, 2] # 2:有pack
|
||||
elif "mcpack(国际版推荐)格式_25.0" not in os.listdir(path) and "zip格式_25.0" in os.listdir(path):
|
||||
return [True, path, 3] # 3:有zip
|
||||
else:
|
||||
return [False, 2] # 2:路径文件指示错误
|
||||
if os.path.isfile("./bgArrayLib/resourcesPath.rpposi") and newPath == "":
|
||||
with open("./bgArrayLib/resourcesPath.rpposi", 'r') as f:
|
||||
path = f.read()
|
||||
if "mcpack(国际版推荐)格式_25.0" in os.listdir(path) and "zip格式_25.0" in os.listdir(path):
|
||||
return [True, path, 1] # 1:都有
|
||||
elif "mcpack(国际版推荐)格式_25.0" in os.listdir(path) and "zip格式_25.0" not in os.listdir(path):
|
||||
return [True, path, 2] # 2:有pack
|
||||
elif "mcpack(国际版推荐)格式_25.0" not in os.listdir(path) and "zip格式_25.0" in os.listdir(path):
|
||||
return [True, path, 3] # 3:有zip
|
||||
else:
|
||||
return [False, 2] # 2:路径文件指示错误
|
||||
|
||||
|
||||
def choose_resources():
|
||||
global zipN
|
||||
global mpN
|
||||
back_list = []
|
||||
try:
|
||||
with open(r"1.pkl", 'rb') as rb:
|
||||
instrument = list(pickle.load(rb))
|
||||
print(instrument)
|
||||
except FileNotFoundError:
|
||||
try:
|
||||
with open(r"./nmcsup/1.pkl", 'rb') as rb:
|
||||
instrument = list(pickle.load(rb))
|
||||
print(instrument)
|
||||
except FileNotFoundError:
|
||||
return False
|
||||
path = resources_pathSetting()
|
||||
if path.__len__() == 2:
|
||||
return path
|
||||
else:
|
||||
dataT = path[2]
|
||||
pathT = path[1]
|
||||
if dataT == 1:
|
||||
if instrument[1] is True:
|
||||
index = zipN.get(-1)
|
||||
percussion_instrument = str(pathT) + "\\zip格式_25.0\\" + index
|
||||
# print(percussion_instrument)
|
||||
back_list.append(percussion_instrument)
|
||||
for i in instrument[0]:
|
||||
ins_p = str(pathT) + "\\zip格式_25.0\\" + str(zipN.get(i))
|
||||
# print(ins_p)
|
||||
back_list.append(ins_p)
|
||||
print(back_list)
|
||||
return back_list
|
||||
elif dataT == 2:
|
||||
if instrument[1] is True:
|
||||
index = mpN.get(-1)
|
||||
percussion_instrument = str(pathT) + "\\mcpack(国际版推荐)格式_25.0\\" + index
|
||||
# print(percussion_instrument)
|
||||
back_list.append(percussion_instrument)
|
||||
for i in instrument[0]:
|
||||
ins_p = str(pathT) + "\\mcpack(国际版推荐)格式_25.0\\" + str(mpN.get(i))
|
||||
# print(ins_p)
|
||||
back_list.append(ins_p)
|
||||
print(back_list)
|
||||
return back_list
|
||||
elif dataT == 3:
|
||||
if instrument[1] is True:
|
||||
index = zipN.get(-1)
|
||||
percussion_instrument = str(pathT) + "\\zip格式_25.0\\" + index
|
||||
# print(percussion_instrument)
|
||||
back_list.append(percussion_instrument)
|
||||
for i in instrument[0]:
|
||||
ins_p = str(pathT) + "\\zip格式_25.0\\" + str(zipN.get(i))
|
||||
# print(ins_p)
|
||||
back_list.append(ins_p)
|
||||
print(back_list)
|
||||
return back_list
|
||||
|
||||
|
||||
def scatteredPack(path):
|
||||
pack_list = choose_resources()
|
||||
print(pack_list)
|
||||
print(path)
|
||||
# os.close("L:/0WorldMusicCreater-MFMS new edition")
|
||||
# shutil.copy("L:\\shenyu\\音源的资源包\\羽音缭绕-midiout_25.0\\mcpack(国际版推荐)格式_25.0\\0.Acoustic_Grand_Piano_大钢琴.mcpack",
|
||||
# "L:/0WorldMusicCreater-MFMS new edition")
|
||||
for i in pack_list:
|
||||
shutil.copy(i, path)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# print(resources_pathSetting(r"L:\shenyu\音源的资源包\羽音缭绕-midiout_25.0"))
|
||||
choose_resources()
|
@ -1,13 +0,0 @@
|
||||
zh-ME
|
||||
喵喵文 中国大陆
|
||||
Meow Catsese, China Mainland
|
||||
喵喵喵~ 祖国喵~
|
||||
金羿,Email EillesWan@outlook.com,QQ 2647547478
|
||||
音创创喵~
|
||||
音·创 Musicreater
|
||||
音创创喵的主人们
|
||||
凌天之云创新我的世界开发团队\n×\n凌天之云创新计算机应用软件开发团队
|
||||
~ 主人们 ~
|
||||
~ 爸爸妈妈们 ~
|
||||
好哒~
|
||||
|
@ -1,101 +0,0 @@
|
||||
# -*- coding:utf-8 -*-
|
||||
'''对于音·创的语言支持兼语言文件编辑器'''
|
||||
|
||||
"""
|
||||
Copyright 2022 all the developers of Musicreater
|
||||
"""
|
||||
|
||||
DEFAULTLANGUAGE = 'zh-CN'
|
||||
|
||||
LANGUAGELIST = {
|
||||
# 第一个是语言的中文名称和地区
|
||||
# 第二个是语言的英文名称和地区
|
||||
# 第三个是语言的本地名称和地区
|
||||
'zh-CN': (
|
||||
"简体中文 中国大陆",
|
||||
"Simplified Chinese - China Mainland",
|
||||
"简体中文 中国大陆",
|
||||
),
|
||||
'zh-TW': (
|
||||
"繁体中文 中国台湾省",
|
||||
"Traditional Chinese - Taiwan Province, China",
|
||||
"正體中文,中国台灣省",
|
||||
),
|
||||
# 'zh-HK': (
|
||||
# "繁体中文 香港",
|
||||
# "Traditional Chinese - Hong Kong SAR",
|
||||
# "繁體中文,香港特別行政區",
|
||||
# ),
|
||||
# 'zh-MO': (
|
||||
# "繁体中文 澳门",
|
||||
# "Traditional Chinese - Macau SAR",
|
||||
# "繁體中文,澳門特別行政區",
|
||||
# ),
|
||||
'en-GB': (
|
||||
"英语 英国",
|
||||
"British English - the United Kingdom",
|
||||
"British English - the United Kingdom",
|
||||
),
|
||||
'zh-ME' : (
|
||||
"喵喵文 中国大陆",
|
||||
"Meow Catsnese - China Mainland"
|
||||
"喵喵喵~ 种花家~"
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
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()
|
||||
# print(_text)
|
||||
return _text
|
||||
|
||||
|
||||
|
||||
if DEFAULTLANGUAGE in LANGUAGELIST.keys():
|
||||
_TEXT = __loadLanguage('./languages/' + DEFAULTLANGUAGE + '.lang')
|
||||
else:
|
||||
log(f"无法打开当前本地化文本{DEFAULTLANGUAGE}", level='ERROR')
|
||||
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}','WARRING')
|
||||
return ''
|
||||
|
||||
|
@ -1,24 +0,0 @@
|
||||
# 音·创 本地化语言文件
|
||||
# 使用 空格 把键与对应文本隔开
|
||||
# 使用 井字符 在每一行的开头编写注释
|
||||
# 注意!井字符请开头放,切勿含有空格
|
||||
# 也切勿在正文结尾放!
|
||||
# 注意其他标注:
|
||||
# F 开头 表示其正式(官方场合用上的)名称
|
||||
# t 开头 表示其为窗口标题
|
||||
# h 开头 表示其为窗口底部状态提示字符
|
||||
LANGKEY zh-CN
|
||||
LANGCHINESENAME 简体中文 中国大陆
|
||||
LANGENGLISHNAME Simplified Chinese, Chinese Mainland
|
||||
LANGLOCALNAME 简体中文 中国大陆
|
||||
MSCT 音·创
|
||||
F音创 音·创 Musicreater
|
||||
t关于 音·创 - 关于
|
||||
开发者 - 开发人员 -
|
||||
译者 - 翻译人员 -
|
||||
确定 确定
|
||||
取消 取消
|
||||
关于 关于
|
||||
退出 退出
|
||||
h关于 音·创 与其作者
|
||||
h退出 退出 音·创
|
@ -1,25 +0,0 @@
|
||||
# 音·创 本地化语言文件
|
||||
# 使用 空格 把键与对应文本隔开
|
||||
# 使用 井字符 在每一行的开头编写注释
|
||||
# 注意!井字符请开头放,切勿含有空格
|
||||
# 也切勿在正文结尾放!
|
||||
# 注意其他标注:
|
||||
# F 开头 表示其正式名称
|
||||
# t 开头 表示其为窗口标题
|
||||
# h 开头 表示其为窗口底部状态提示字符
|
||||
LANGKEY zh-ME
|
||||
LANGCHINESENAME 喵喵文 中国大陆
|
||||
LANGENGLIFHNAME Meow Catsese, China Mainland
|
||||
LANGLOCALNAME 喵喵喵~ 祖国喵~
|
||||
TRANSLATERS 金羿,Email EillesWan@outlook.com,QQ 2647547478
|
||||
MSCT 音创创喵
|
||||
F音创 音·创 Musicreater
|
||||
t关于 创创的主人
|
||||
开发者 - 创创的爸妈 -
|
||||
译者 - 创创的老师 -
|
||||
确定 好哒
|
||||
取消 算啦
|
||||
关于 小窝
|
||||
退出 再见啦
|
||||
h关于 想认识音创创喵的父母老师嘛
|
||||
h退出 和音创创喵说再见
|
@ -1,74 +0,0 @@
|
||||
# -*- coding: UTF-8 -*-
|
||||
"""音·创的核心内置组件功能集合"""
|
||||
|
||||
def author_reader(path:str = './resources/msctDevAuthors.txt'):
|
||||
'''读入作者数据,格式需要按照署名文件中的指定格式,详见/resources/msctDevAuthors.txt
|
||||
:param path: 作者署名文件所在路径
|
||||
:return 指定的作者格式
|
||||
{
|
||||
'作者常用名':{
|
||||
'语言码' : '对应语言的名字',
|
||||
},
|
||||
}'''
|
||||
allAuthors = open(path,'r',encoding='utf-8').readlines()
|
||||
result = {}
|
||||
indexName = ''
|
||||
for line in allAuthors:
|
||||
line = line.replace('\n', '')
|
||||
if (not line.startswith('#')) and line:
|
||||
if line.startswith('启'):
|
||||
if indexName:
|
||||
result[indexName] = authorList
|
||||
indexName = line[line.index('启')+1:]
|
||||
authorList = {}
|
||||
continue
|
||||
line_c = ''
|
||||
for char in line:
|
||||
if not char == '#':
|
||||
line_c += char
|
||||
else:
|
||||
break
|
||||
authorList[line_c.split(' ', 1)[0]] = line_c.split(' ', 1)[1]
|
||||
result[indexName] = authorList
|
||||
return result
|
||||
|
||||
|
||||
|
||||
class version:
|
||||
libraries = (
|
||||
'wxPython', 'mido', 'amulet', 'amulet-core', 'amulet-nbt', 'piano_transcription_inference', 'pypinyin',
|
||||
'pyinstaller', 'py7zr','websockets', 'zhdate', 'requests',
|
||||
)
|
||||
"""当前所需库"""
|
||||
|
||||
version = ('0.3.0', '丁',)
|
||||
"""当前版本"""
|
||||
|
||||
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':
|
||||
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")
|
||||
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
151
msctLib/data.py
@ -1,151 +0,0 @@
|
||||
# -*- 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)
|
@ -1,6 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
'''音·创的内置功能库
|
||||
:若要加入其他功能,详见:
|
||||
:开发说明|指南'''
|
||||
|
||||
|
@ -1,82 +0,0 @@
|
||||
"""音·创的日志消息处理"""
|
||||
# 诸葛亮与八卦阵帮忙修改语法 日期:---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 = True):
|
||||
'''将信息连同当前时间载入日志
|
||||
:param info : str
|
||||
日志信息
|
||||
:param level : str['INFO','WARN','ERROR','CRASH']
|
||||
或 int[ 1, 2, 3, 4 ]
|
||||
信息等级
|
||||
:param isPrinted : bool
|
||||
是否在控制台打印
|
||||
|
||||
:return bool
|
||||
表示是否完成任务'''
|
||||
|
||||
if type(level) == type(1):
|
||||
level = ['INFO','WARN','ERROR','CRASH'][level-1]
|
||||
|
||||
try:
|
||||
|
||||
if not os.path.exists('./logs/'):
|
||||
os.makedirs('./logs/')
|
||||
|
||||
outputinfo = f'{str(datetime.datetime.now())[11:19]}-[{level}] {info}'
|
||||
|
||||
with open('./logs/'+StrStartTime+'.msct.log', 'a',encoding='UTF-8') as f:
|
||||
f.write(outputinfo+'\n')
|
||||
|
||||
if isPrinted:
|
||||
input(outputinfo)
|
||||
|
||||
return True
|
||||
except:
|
||||
return False
|
@ -1,32 +0,0 @@
|
||||
# -*- coding:utf-8 -*-
|
||||
|
||||
|
||||
DEFAULTBLUE = (0, 137, 242)
|
||||
# 0089F2
|
||||
WEAKBLUE = (0, 161, 231)
|
||||
# 00A1E7
|
||||
LIGHTBLUE = (38, 226, 255)
|
||||
# 26E2FF
|
||||
RED = (255, 52, 50)
|
||||
# FF3432
|
||||
PURPLE = (171, 112, 255)
|
||||
# AB70FF
|
||||
GREEN = (0, 255, 33)
|
||||
WHITE = (242, 244, 246)
|
||||
# F2F4F6
|
||||
BLACK = (18, 17, 16)
|
||||
# 121110
|
||||
|
||||
settings = {
|
||||
'language' : 'zh-CN',
|
||||
'theme' : {
|
||||
'' : '',
|
||||
},
|
||||
}
|
||||
|
||||
class msctSetting:
|
||||
def __init__(self,**settings) -> None:
|
||||
pass
|
||||
|
||||
def __call__(self, **kwds):
|
||||
pass
|
@ -1,259 +0,0 @@
|
||||
开发说明\|指南
|
||||
==============
|
||||
|
||||
***不要看了,这玩意没啥意义了。***
|
||||
|
||||
此文件旨在使后期欲参与开发之人员减轻其开发负担,同时也为了我们正在开发的人员详细说明功能与用法
|
||||
掌握开发指南之后,在调用函数等的过程中将会更加方便
|
||||
|
||||
文件结构
|
||||
--------
|
||||
|
||||
主文件存有多个显示函数,通过`./resources/config.json`来配置临时文件等选项
|
||||
通过`config.json`预制的`theme`项目所指引的文件来获得主题包、`language`项目来控制
|
||||
|
||||
详细说明
|
||||
--------
|
||||
|
||||
### 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. `infoBar`
|
||||
|
||||
信息显示栏,一个字符串,用于显示一些信息。
|
||||
|
||||
|
||||
2. `title`
|
||||
|
||||
窗口标题,字符串
|
||||
|
||||
|
||||
3. `menuWidgets`
|
||||
|
||||
对于窗口菜单的设定,其格式如下:
|
||||
```python
|
||||
menuWidgets: dist = { # 菜单项目
|
||||
str"菜单名" : dict{
|
||||
str"选项名"|None : (
|
||||
<function>选项函数,
|
||||
str"选项说明",
|
||||
)
|
||||
},
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
注:
|
||||
`菜单名` : `str` 显示在菜单上的字符串
|
||||
`选项名` : `str` 显示在菜单选项上的字符串
|
||||
`选项函数` : `function` 菜单调取的函数(无返回值,无入参)
|
||||
当 `选项名` 的布尔值判定为 `False` 的时候,无论 `选项函数` 为何,皆插入一段分割线,但 `选项函数` 不得为空
|
||||
|
||||
|
||||
4. `wordView`
|
||||
|
||||
显示在言论上的文字,字符串
|
||||
|
||||
|
||||
5. `buttons`
|
||||
|
||||
快捷功能按钮的列表,列表的元素为字典,字典的键是按钮的名称,值为一个元组,元组中含有两个元素,其中元组的第1个元素为按钮图标,是一个图片的路径;第2个元素为执行的函数,其值应当是一个函数对象。
|
||||
值得注意的是,每个字典中包含的按钮组件会分到一个组之中,两个组之间会使用分隔符分割
|
||||
|
||||
```python
|
||||
button: list = [
|
||||
dict{ # 操作按钮部分
|
||||
str"按钮名称" : tuple(
|
||||
按钮图标,
|
||||
执行函数
|
||||
),
|
||||
...
|
||||
},
|
||||
...
|
||||
],
|
||||
```
|
||||
|
||||
其中,如果执行图标找不到了或者无法读取了,就会使用“材质丢失”图标作为图标,当然也可以通过函数`setButtonBar`中的参数`defaultMissingTexturePath`来设置默认的在职丢失图标路径,同理,使用`separatorButtonTexturePath`可以设置默认的分割线路径……
|
||||
但是啊!但是!我虽然建议用不同的display库来达到不同的显示效果……但我没说你们都带一套自己的图标包撒!想要绘制图标包也很简单,我们之后应该会出图标包的加载工具(吧?)
|
||||
|
||||
|
||||
6. `settingBox`
|
||||
|
||||
设置框,用于设置音乐的基本属性,例如词作者,曲作者等,设置格式如下:
|
||||
|
||||
```python
|
||||
settingbox: list = [ #设置部分显示的字样及其对应的设置函数
|
||||
tuple(
|
||||
设置名称:str,
|
||||
值类型:tuple,
|
||||
显示内容:str,
|
||||
设置操作函数:<function>,
|
||||
),
|
||||
...
|
||||
]
|
||||
```
|
||||
|
||||
其中,值类型可以是如下几个项
|
||||
1. `('str',)` 字符串类型,使用文本框输入数据
|
||||
2. `('bool',)` 布尔类型,使用复选框输入数据
|
||||
3. `('num',最小值:float,最大值:float,步长:float = 1)` 数值类型,使用数值滑动条输入数据
|
||||
4. `('list',列表项:list)` 单选类型,即列表中多选一,使用单选框输入数据
|
||||
|
||||
其中,值操作函数需要有一个参数,用于传递用户提供的设置值。
|
||||
|
||||
|
||||
7. `notemap`
|
||||
|
||||
音符数据表,用于存储曲谱信息,存储格式如下
|
||||
|
||||
```python
|
||||
notemap: list = [ # 音轨列表
|
||||
dict{ # 单个音轨
|
||||
'instrument' : str"乐器",
|
||||
'velocity' : int 响度,
|
||||
# 这里理论上需要写一个小节多少个X分音符
|
||||
# 以及小节里的都是几分音符
|
||||
# 但是这个留给以后来支持
|
||||
int 小节编号 : [ # 一个小节
|
||||
tuple( # 一个音符
|
||||
时间 : int,
|
||||
持续 : int,
|
||||
乐器 : str,
|
||||
采样 : float,
|
||||
响度 : int,
|
||||
),
|
||||
...
|
||||
],
|
||||
...
|
||||
},
|
||||
...
|
||||
]
|
||||
```
|
||||
|
||||
其中,对于每个音符:
|
||||
1. 时间 单位:帧 当前音符开始时,距离当前小节开始所经过的帧数
|
||||
2. 持续 单位:帧 当前音符持续的帧数
|
||||
3. 乐器 当前音符使用的乐器,需要在乐器列表中有所注册
|
||||
4. 采样 当前音符在MC的采样音高(不含打击乐器)
|
||||
5. 响度 单位:格的-1次方 音符播放源距离播放者的距离的倒数
|
||||
|
||||
|
||||
- 函数
|
||||
|
||||
1. `setTitle`设置窗口标题
|
||||
|
||||
```python
|
||||
:param title: str 窗口标题
|
||||
```
|
||||
|
||||
修改了变量`self.title`之后需要执行此函数以切换标题,或者通过此函数修改窗口标题信息。
|
||||
|
||||
2. `setGeometry`设置窗口大小
|
||||
|
||||
```python
|
||||
:param geometry: str 窗口大小
|
||||
```
|
||||
|
||||
由于不希望您经常修改窗口大小,我就没有把窗口大小的变量放在类里面。只能通过这个函数来修改窗口大小。
|
||||
|
||||
3. `setIcon`设置窗口图标
|
||||
|
||||
```python
|
||||
:param bitmap: str 图标路径
|
||||
:param default: str 设置对于全局的默认图标路径
|
||||
:retuen bool 是否成功设置图标
|
||||
```
|
||||
|
||||
同上,我们不希望您经常修改窗口图标,所以没有把图标路径作为变量放在类里面。所以你只能通过这个函数修改窗口的图标。
|
||||
|
||||
值得注意的是,default参数仅在Windows下有效,如果在非Windows环境使用default参数,将会引发一个错误
|
||||
|
||||
4. `setMenu`设置窗口菜单
|
||||
|
||||
实例化此类之后会运行这个函数进行窗口根菜单配置,如果当前对象中没有菜单,则会对其依照类中的响应参数进行配置,如果有则返回菜单中的内容(一个字典,键为菜单名称)
|
||||
|
||||
2. `setWidget`对窗口部件的放置
|
||||
```python
|
||||
wordview: dict = { #言论部分显示的字样
|
||||
'text': str = 显示内容,
|
||||
# ... 即可用 tk.Label 的参数
|
||||
},
|
||||
button: list = [
|
||||
dict = {
|
||||
按钮名称 : tuple(按钮图标,执行函数)
|
||||
},
|
||||
],
|
||||
settingbox: list = [ #设置部分显示的字样及其对应的设置函数置操作函数:<function>,
|
||||
)
|
||||
],
|
||||
map: list = [
|
||||
音符数据
|
||||
]
|
||||
```
|
||||
注:
|
||||
|
||||
|
||||
值得注意的是,在kwgs中修改的部件设置,可以在其变量中读取或热修改,对应的变量如下
|
||||
|
||||
| 参数 | 对应类中的变量 | 变量类型 | 说明 |
|
||||
|------------|------------------|---------------------------|---------------------|
|
||||
| wordview | wordview | str | 显示在 言·论 区域的文字 |
|
||||
| button | button | list[dict{}] | 操作按钮 |
|
||||
| settingbox | settings | list[ Any ] | 设置项目中的值 |
|
||||
| tracklist | tracknum | tuple(int,int) | 当前选择到的音轨与音轨总数|
|
||||
| map | notes | list[ class Note ] | 当前的音符列表 |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#### ???
|
||||
|
||||
全曲的设置应该如下:
|
||||
```python
|
||||
标题 : str = '无名'
|
||||
副标题 : str = ''
|
||||
作曲 : str = '佚名'
|
||||
作词 : str = ''
|
||||
歌曲版权信息 : str = ''
|
||||
# bpm 暂时不需要
|
||||
|
||||
|
||||
```
|
@ -1,49 +0,0 @@
|
||||
# -*- 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
|
||||
""")
|
||||
|
||||
# 准备启用
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,74 +0,0 @@
|
||||
altgraph==0.17.2
|
||||
amulet==1.21.0
|
||||
amulet-core==1.9.4
|
||||
amulet-nbt==2.0.1
|
||||
appdirs==1.4.4
|
||||
audioread==2.1.9
|
||||
Brotli==1.0.9
|
||||
certifi==2022.6.15
|
||||
cffi==1.15.1
|
||||
charset-normalizer==2.1.0
|
||||
cycler==0.11.0
|
||||
decorator==5.1.1
|
||||
fonttools==4.34.4
|
||||
future==0.18.2
|
||||
idna==3.3
|
||||
importlib-metadata==4.12.0
|
||||
inflate64==0.3.0
|
||||
joblib==1.1.0
|
||||
jujubundlelib==0.5.7
|
||||
kiwisolver==1.4.4
|
||||
libcharmstore==0.0.9
|
||||
librosa==0.9.2
|
||||
llvmlite==0.39.0
|
||||
macaroonbakery==1.3.1
|
||||
matplotlib==3.5.2
|
||||
mido==1.2.10
|
||||
multivolumefile==0.2.3
|
||||
mutf8==1.0.6
|
||||
numba==0.56.0
|
||||
numpy==1.22.4
|
||||
packaging==21.3
|
||||
path==16.4.0
|
||||
path.py==12.5.0
|
||||
pefile==2022.5.30
|
||||
piano-transcription-inference==0.0.5
|
||||
Pillow==9.2.0
|
||||
pooch==1.6.0
|
||||
portalocker==2.5.1
|
||||
protobuf==3.20.1
|
||||
psutil==5.9.1
|
||||
py7zr==0.20.0
|
||||
pybcj==1.0.1
|
||||
pycparser==2.21
|
||||
pycryptodomex==3.15.0
|
||||
pyinstaller==5.3
|
||||
pyinstaller-hooks-contrib==2022.8
|
||||
pymacaroons==0.13.0
|
||||
PyMCTranslate==1.2.6
|
||||
PyNaCl==1.5.0
|
||||
pyparsing==3.0.9
|
||||
pypinyin==0.47.0
|
||||
pyppmd==0.18.3
|
||||
pyRFC3339==1.1
|
||||
python-dateutil==2.8.2
|
||||
pytz==2022.1
|
||||
pywin32==304
|
||||
pywin32-ctypes==0.2.0
|
||||
PyYAML==6.0
|
||||
pyzstd==0.15.3
|
||||
requests==2.28.1
|
||||
resampy==0.4.0
|
||||
scikit-learn==1.1.2
|
||||
scipy==1.9.0
|
||||
six==1.16.0
|
||||
SoundFile==0.10.3.post1
|
||||
texttable==1.6.4
|
||||
theblues==0.5.2
|
||||
threadpoolctl==3.1.0
|
||||
torchlibrosa==0.0.9
|
||||
urllib3==1.26.11
|
||||
websockets==10.3
|
||||
wxPython==4.2.0
|
||||
zhdate==0.1
|
||||
zipp==3.8.1
|
@ -1,247 +0,0 @@
|
||||
音·创(Musicreater)是由金羿(W-YI)开发的一款《我的世界》基岩版音乐生成辅助软件
|
||||
本软件源代码依照Apache 2.0软件协议公开。
|
||||
|
||||
Copyright © W-YI 2022
|
||||
|
||||
本软件是金羿前作函数音创和世界音创的集合版本,同时增加了大量功能更新。
|
||||
|
||||
|
||||
|
||||
===============
|
||||
2022 年度挑战
|
||||
1.重构代码使全部变量皆使用类存储
|
||||
2.修改UI界面
|
||||
3.增加进度条
|
||||
4.修复生成bug
|
||||
===============
|
||||
|
||||
|
||||
新更新日志
|
||||
|
||||
丁 0.3.0
|
||||
2022 6 7 ~ 2022
|
||||
0.放弃 Delta 0.2.0 的开发
|
||||
1.修改版本命名规则,将Alpha~Delta更换为甲乙丙丁,西文对应翻译不变
|
||||
2.To-Do详见读我文档
|
||||
3.对于所有开发人员的称呼优先采用中文称呼
|
||||
4.文档优先采用中文
|
||||
|
||||
Delta 0.2.0
|
||||
2022 2 10 ~ 2022 4 22
|
||||
1.进行了大量的代码重构,使之更加易于开发
|
||||
2.对功能进行了精简优化,能够更加方便的开发新功能
|
||||
3.完善程序的一些外观与性能优化,使用了更多多线程板块
|
||||
4.在读取和写入的时候加入进度条,会实时反馈当前的加载进度
|
||||
5.能够使用可视化界面进行音乐的基本编辑
|
||||
6.提高用户感受,修复已知问题
|
||||
7.增强个性化设置,令用户能够用其所感
|
||||
8.更新读我文档,使之更用户化
|
||||
9.面对用户的操作加强
|
||||
10.新增下载器,无需用户从源代码安装
|
||||
|
||||
|
||||
Delta 0.1.5
|
||||
2022 4 4
|
||||
0.新增金羿生日祝福
|
||||
1.修复诸多问题
|
||||
2.正在往0.2版本迭代更新
|
||||
3.预计半年之内可以发布新版本
|
||||
4.支持使用自动安装器下载安装
|
||||
5.
|
||||
|
||||
|
||||
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文件之后无法正常退出的问题
|
||||
|
||||
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 129 KiB |
@ -1,202 +0,0 @@
|
||||
生命灵动 当用激情跃起奋发之力
|
||||
奇偶数阵
|
||||
学海无涯 应用爱意徜徉
|
||||
在生命的起源寻找灵魂的慰藉
|
||||
纪念那一段辉煌灿烂的青春年华
|
||||
以梦想为驱使 创造属于自己的未来
|
||||
集青春之力 绽放爱意之花
|
||||
那个曾与我相伴的人 依稀在我的心头留恋
|
||||
你是我灵魂中绽放出最艳丽的花朵
|
||||
心之所向 意之所属
|
||||
一个蛋从外面被敲开,注定被吃掉,但从里面啄开,没准是只鹰 ——长津湖
|
||||
音·创
|
||||
辉煌的、璀璨的、无边无际、铺天盖地的晚霞——洒下斑驳的金光,染红了整片山河
|
||||
《赫兰圣殿》
|
||||
风,摇曳着,轻抚着他的脸颊,半壁残阳正留恋着人世最后一抹温暖
|
||||
清晨的阳光将吹散人间的雾霭 照亮每一寸土壤
|
||||
远方的山川 总会踏着白雾前来
|
||||
梦中的世界 总被现实相依存
|
||||
敌人都是自己树立的,生存的道路上想要披荆斩棘,那就得学会化敌为友
|
||||
有光之处必有影 有影之处必有光
|
||||
一生所恋 相伴相随
|
||||
你的眼眸是剔透的晶灯 散发着醉人心扉的清光
|
||||
海波激出透人心脾的欢呼
|
||||
英雄何必要站在光中?深入黑暗,我自发光。
|
||||
如果我们有三生三世的时间,那我们将渡过三百乘以三百六十个潮涨潮落
|
||||
善善不能用 恶恶不能去
|
||||
知行合一,格物致知;远沂博索,夕惕若厉;蕙心执质,嘉言懿行;怀瑾握瑜,心若芷萱。
|
||||
纪念 追忆 那段不平凡的青春
|
||||
守望黑夜的人,切莫忘记黎明的光彩 ——原神
|
||||
与邪佞战斗的人,切莫失掉正直的心 ——原神
|
||||
我的心 时刻系着祖国的山河
|
||||
生命 灵动
|
||||
坚如寒冰 烈似骄阳
|
||||
上了战场就是英雄 ——长津湖
|
||||
冰与火 恨与爱 静与情
|
||||
有些枪必须开,有些可以不开 ——长津湖
|
||||
夕阳西下,余辉将尽 夜幕降临,寒风凛冽 ——原神
|
||||
愿风擦拭你的双眼,让你看清真相 ——原神
|
||||
心愿之结晶 而何能之宝贵
|
||||
神明,正倾诉着他辉煌的过去……
|
||||
一切过程与结果都不重要 重要的是热爱与真情
|
||||
给大家带来笑容 这就是我存在的使命
|
||||
不忘本源 牢记故地
|
||||
一厢情愿即是真 心海浮沉即为灵
|
||||
听戏时要点最红的名伶,遛鸟时要买最名贵的画眉——此即人生 ——原神
|
||||
「精巧」是千年的积淀,而其背后皆存于「意义」
|
||||
世事无常,悲喜难料 ——原神
|
||||
金钱在死亡面前毫不重要
|
||||
风雨兄弟情
|
||||
微笑面对现实
|
||||
人于磨难中练就
|
||||
Long live the People's Republic of China.
|
||||
There is NO heroes, only honors.
|
||||
A man achieve with challenges.
|
||||
种果得果,等的就是这份收获的喜悦 ——原神
|
||||
事了拂衣去,深藏功与名
|
||||
万事开头虽难,倾注的情感也多;而欲永恒,仍需重新审视自身;不小心处理,灵魂便留下裂纹无法挽回。
|
||||
历经历史的沉淀,留下希望的继承
|
||||
身为凡民,血脉脆弱,却也坚强
|
||||
民为本,社稷次之,君为轻 ——孟子
|
||||
不如归去
|
||||
你完成了你的职责,现在,去休息吧。
|
||||
一场长梦,梦醒之后,人就学会了诀别。
|
||||
你们——会祝福下一个时代吗? ——原神
|
||||
任何旅途中的旅伴同行,都会有分别的一日。 ——原神
|
||||
「永恒」最接近于天理 ——原神
|
||||
等旅途到达了终点,再考虑停留于何处吧 ——原神
|
||||
人海中相遇,本是缘分。 ——原神
|
||||
凡缘朦朦仙缘滔
|
||||
因果红尘渺渺,烟消 ——原神
|
||||
未入尘世,而心远之
|
||||
灵心而静,莫问归期
|
||||
美酒宜人,宜人的却不只是美酒。 ——原神
|
||||
戏会落幕,人生却不会。 ——原神
|
||||
历史越久远,土地上的每一件事物就会承载更多价值。 ——原神
|
||||
深邃的灵魂唤起久远的回忆
|
||||
求索之人 当为奉之
|
||||
无论前路为星辰亦或深渊,皆需往而为之
|
||||
除了路途中的花与枫叶,还有心中的「道」 ——原神
|
||||
只有败北,才能感悟差距,才有机会成长 ——原神
|
||||
命运的邂逅,必定有其意义 ——原神
|
||||
万商云来,千船继至。百货迭出,诸海历览。 ——原神
|
||||
现状越是难以置信,我们越是不能停下脚步。 ——原神
|
||||
古老的文明孕育着最美丽的传说 ——原神
|
||||
百川奔流 雨露不休
|
||||
梦,随着年月流逝而不断消散
|
||||
自由之风会指引前进的路,愿你与我们同行
|
||||
绯樱若解离别苦,自当常留驻。 ——原神
|
||||
犯错受罚,天经地义
|
||||
犯的错无法偿还,那便遭人嫉恨
|
||||
恨——埋藏在深深的地底,待到发出之时,直冲人心
|
||||
城市和风是有记忆的 ——原神
|
||||
传承,永远不变
|
||||
「由浅入深」,对万物的掌握皆是如此。 ——原神
|
||||
乘风破浪,勇往直前。
|
||||
时间的长河会见证过往的一切
|
||||
风沙的吹拂会证明遗失的散漠
|
||||
深冷的面具下埋藏着颤抖的心
|
||||
苦痛的旅程中盘错着举世的谎言
|
||||
欲落的花会告诉你我无尽的思念,而风会在此刻替我拥抱住你。 ——蝶<1361223398>
|
||||
仰望这深邃的夜空,明星洒下的光,总是无尽斑驳
|
||||
欲知后事如何,唯有后世来分说 ——b站BV1jm4y1S76q
|
||||
曲高未必人不识,自有知音和清词 ——原神
|
||||
接引春雷焚身骨,化灰以养万类荣 ——原神
|
||||
浮世景色百千年依旧,人之在世却如白露与泡影 ——原神
|
||||
今古诸事,激荡中流,宏图待看新秀 ——原神
|
||||
烟花易逝,人情长存 ——原神
|
||||
正因为我们都是须臾之人,才更应该珍惜须臾的美好 ——原神
|
||||
如果说,生命的脚印终有一天会被时间的尘埃掩埋,那么我们就永远不能停下脚步 ——明日方舟
|
||||
只要不停下脚步,道路就会不断延伸。 ——某B站用户
|
||||
红色光芒从遥远的地平线上浮现,影月留给人间的黑暗逐渐退潮 ——明日方舟
|
||||
如果没有人有了解真相的意愿,那就算把真相撒播在街道上,也不会发芽的 ——明日方舟
|
||||
永远不要否定善行,道德和良知永远不会错 ——明日方舟
|
||||
唯独死亡不可避免,唯独生命不可辜负 ——少女前线
|
||||
人即像树,枝叶越向往明亮的天空,根须越深入幽暗的地底 ——尼采
|
||||
沉默不代表服从,生活在黑暗里,不代表放弃光明 ——少女前线
|
||||
但行前路终无悔,只盼万事在人为 ——废墟图书馆
|
||||
我忘却了所有悲剧,所见之处皆是奇迹 ——空洞骑士
|
||||
只要坚信自己的道路,就无所谓天气是晴是雨。 ——原神
|
||||
在这个真实的太过分的世界里,每个人都需要仰望星空 ——原神
|
||||
当你重新踏上旅途之后,一定要记得旅途本身的意义 ——原神
|
||||
识花鸟之一趣,照月风之长路 ——原神
|
||||
只要不失去你的崇高,整个世界都会向你敞开 ——原神
|
||||
每个人都是一个自己的精神支柱 ——GitHub Copliot
|
||||
I am a dreamer, but I am not a dreamer. ——GitHub Copliot
|
||||
The only thing that makes a dream impossible is the fear of failure. ——GitHubCopliot
|
||||
A dream is a wish that you have or something that you have dreamed of in your mind. ——GitHubCopliot
|
||||
It is not the strongest of the species that survives, nor the most intelligent, nor the fastest. ——GitHubCopliot
|
||||
To be a dreamer is to be a free spirit. ——GitHubCopliot
|
||||
To be or not to be is a question. ——莎士比亚
|
||||
即使身躯残破,也要在战场上拼杀到最后一刻,要战斗到流干最后一滴血为止。 ——原神
|
||||
朋友之间,也许就是要心知肚明才好 ——原神
|
||||
轻盈的风,偶尔也会变得沉重…虽然,只是凡人难以察觉的短短一瞬 ——原神
|
||||
我听过树的歌、乌云和雨的歌、遥远北方的青色飞龙悠远的吟唱,也听过我降落在地面上时,狐、兔,和地里的虫颤抖的协奏 ——原神
|
||||
无人来书写我们的故事,我们就是故事本身。
|
||||
故事的种子是生活与旅行 ——原神
|
||||
每个人的「生活(故事)」,都只属于自己… ——原神
|
||||
如果我们要再会,就在夕阳与海面相遇的地方再会吧。 ——原神
|
||||
到那时,再让我看看你如同钻石一般明净而璀璨的灵魂,是否蒙上了一缕尘埃吧。 ——原神
|
||||
水过时迁
|
||||
Waterrun Timepass
|
||||
人们都害怕生离死别,怕的是痛苦与遗憾 ——原神
|
||||
俗话说「旧的不去新的不来」,一个圆满的句号标志着一段新的旅途的开始 ——原神
|
||||
但即便是没有「月亮」的夜晚,一众星光也足以刺破「黑暗」与「谎言」。 ——原神
|
||||
风沙,是能被墙壁阻挡的吗? ——原神
|
||||
反正接触不到,也无须在意。 ——原神
|
||||
阳光能够养育许多东西,却解决不了藏在阴暗角落的问题 ——原神
|
||||
「特别」也是一种财富 ——原神
|
||||
我放弃了避世的路,不是因为那是不正确的,而是因为我找到了更好的路 ——原神
|
||||
日月之行 若出其中 星汉灿烂 若出其里 ——曹操
|
||||
尝有所思 斯事如磐 孰料浮世事 留驻难 ——原神
|
||||
若你困于无风之地,我将奏响高天之歌 ——原神
|
||||
天动万象 山海化形 荒地生星 璨如烈阳 ——原神
|
||||
欲买桂花同载酒 终不似 少年游 ——刘过
|
||||
若是悲伤无法回避,就用雷霆的微光照亮世间永恒 ——原神2022生日会
|
||||
「常道恢弘 鸣神永恒」 ——原神
|
||||
世间有七情六欲,却不曾有过迷途知返的觉悟 ——原神2022生日会
|
||||
去追寻便好,哪怕是须臾的光亮 ——原神
|
||||
“总有人走向黑暗烈火,因为背后伫立的是山海家园” ——B站BV1Ae4y1b7fA
|
||||
人民是历史的创造者
|
||||
可怜无定河边骨 犹是春闺梦里人 ——陈陶
|
||||
世间有七情六欲,却不曾有过迷途知返的觉悟 ——原神
|
||||
时间不会为他的执着驻足停留 ——原神
|
||||
天罡坠 严壮殪兮涯角刿。人不寐 愁难浇兮肝肠碎。 ——B站BV1Ae4y1b7fA
|
||||
“这是你的机会,你是我们最后的希望” ——原神
|
||||
到头来,终究是一场绚丽多彩的梦 ——B站BV1BY4y1K7gV
|
||||
羽衣常带烟霞色 不惹人间桃李花 ——B站BV1BY4y1K7gV
|
||||
巨松上那绽开的树皮,似乎就是父亲躯体上的累累伤痕 ——三体
|
||||
夕阳投进窗里的余晖,投在白墙上如一滩肮脏的血;外面孤独的橡树,不过是坟墓中伸出的枯骨 ——三体
|
||||
地上的水洼映着正在亮起来的天空。像一片片镜子 ——三体
|
||||
他感到周围陌生冰冷的一切,突然都充满了柔和温暖的阳光,他甚至没有意识到这阳光的来源,就像透过云层的太阳 ——三体
|
||||
我看到了我的爱恋,我飞到她的身边,我捧出给她的礼物,那是一小块凝固的时间 ——三体
|
||||
弱小和无知不是生存的障碍,傲慢才是。 ——三体
|
||||
宇宙就是一座黑暗森林,每个文明都是带枪的猎人,像幽灵般潜行于林间 ——三体
|
||||
世界上没有奇迹,但是坚定顽强的战士,却可以做出常人认为无法做到的事 ——《红岩》
|
||||
每个人都有他自己看待世界的方式 ——原神
|
||||
艺术为了每一个人而存在
|
||||
跳舞是从劳动中诞生的艺术,他并非来自于天上,而是一开始就属于人类 ——原神
|
||||
(舞蹈)是基于人的生活诞生的美丽之物,每当有喜悦或值得庆祝的事,人们就会起舞 ——原神
|
||||
魔非魔,道非道,善恶在人心 情非情,欲非欲,姻缘由天定 ——仙剑奇侠传
|
||||
越是光芒万丈的人,越容易燃尽自己的生命 ——B站BV1b84y1W7fb
|
||||
人类群星闪耀的光辉永不消逝 ——B站BV1b84y1W7fb
|
||||
老骥伏枥,志在千里;烈士暮年,壮心不已。 ——曹操
|
||||
即使梦总有一天会醒,人们还是会竭尽所能去感知梦里的每一秒 ——B站BV1HU4y1o7TW
|
||||
就算世界无童话,抱着想象实现它,就凭摘星的手臂,为地球每夜放烟花 ——卫兰
|
||||
哪怕最后会被摧毁,至少它存在过,我追逐过 ——B站BV1HU4y1o7TW
|
||||
游戏所表达的爱与浪漫,终归是现实世界美好一面的映射 ——B站BV1234y1C7o2
|
||||
踽踽独行 双人成行 ——B站BV1234y1C7o2
|
||||
醉卧沙场君莫笑,古来征战几人回? ——王翰
|
||||
在黎明还没到来之时,总要有人稍微照亮黑夜 ——BV1UY411P7en
|
||||
迟到的正义是对正义的亵渎 ——BV1UY411P7en
|
||||
世界上有太多孤独的人,都害怕迈出第一步 ——B站BV1qG4y187fq
|
||||
此时相望不相闻,愿逐月华流照君。 ——张若虚
|
||||
鸿雁长飞光不度,鱼龙潜跃水成文。 ——张若虚
|
||||
大鹏一日同风起,扶摇直上九万里。 ——李白
|
||||
只有自己的眼睛无法看清世界的时候,才需要别人的眼睛给自己带来光明。
|
||||
时间能慢慢过滤掉那些苦涩的杂质 ——原神
|
||||
回答没水平的问题,是对发问者的纵然 ——原神
|
||||
音乐勾起人的回忆,唤起历经的耀眼时光
|
||||
哪怕我们出身不同,哪怕每个人都有自己的故事…可生活中那些最平凡的点滴,走在城里的见闻…其实,都是一样的啊。 ——原神
|
||||
音乐是人们心中的记忆,能够超越时空连接起思念 ——原神
|
||||
时光永无止境…人生自在,靠的还是一颗坚定又澄澈的心。 ——原神
|
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 272 B |
30
作者的自我装逼.py
30
作者的自我装逼.py
@ -1,30 +0,0 @@
|
||||
|
||||
from time import sleep
|
||||
from msctLib.buildIN import author_reader
|
||||
from os import system
|
||||
|
||||
authors = author_reader()
|
||||
|
||||
def run(string):
|
||||
try:
|
||||
system(string)
|
||||
except:
|
||||
return
|
||||
|
||||
run('color 70')
|
||||
|
||||
for bigname,languages in authors.items():
|
||||
run('color 02')
|
||||
for i in bigname:
|
||||
print(i,end="",flush=True)
|
||||
sleep(0.1)
|
||||
run('color 70')
|
||||
print(' :')
|
||||
for language,author in languages.items():
|
||||
line = ' '+language+' > '+author
|
||||
for i in line:
|
||||
print(i,end="",flush=True)
|
||||
sleep(0.05)
|
||||
print()
|
||||
|
||||
input()
|
Loading…
Reference in New Issue
Block a user