diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..eaf91e2 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/Musicreater.iml b/.idea/Musicreater.iml new file mode 100644 index 0000000..d9e6024 --- /dev/null +++ b/.idea/Musicreater.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..a2a5d19 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,46 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..8d93904 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..b125bed --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..9661ac7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Musicreater.py b/Musicreater.py index c4704e5..8e5c990 100644 --- a/Musicreater.py +++ b/Musicreater.py @@ -1182,7 +1182,7 @@ def __main__(): return dire = [int(dire.split(' ')[0]), int(dire.split(' ')[1]), int(dire.split(' ')[2])] except ValueError: # 测试完为ValueError,故修改语法 - tkinter.messagebox.showerror(title=READABLETEXT[0], message=READABLETEXT[120]) + tkinter.messagebox.showerror(title=READABLETEXT[0], message=READABLETEXT[117]) continue break Outdire = tkinter.filedialog.askdirectory(title=READABLETEXT[29], initialdir=r'./') @@ -1253,7 +1253,7 @@ def __main__(): return dire = [int(dire.split(' ')[0]), int(dire.split(' ')[1]), int(dire.split(' ')[2])] except ValueError: # 测试完为ValueError,故修改语法 - tkinter.messagebox.showerror(title=READABLETEXT[0], message=READABLETEXT[120]) + tkinter.messagebox.showerror(title=READABLETEXT[0], message=READABLETEXT[117]) continue break diff --git a/languages/__pycache__/__init__.cpython-39.pyc b/languages/__pycache__/__init__.cpython-39.pyc index 8e57f6d..56d137b 100644 Binary files a/languages/__pycache__/__init__.cpython-39.pyc and b/languages/__pycache__/__init__.cpython-39.pyc differ diff --git a/languages/__pycache__/lang.cpython-39.pyc b/languages/__pycache__/lang.cpython-39.pyc index 6437691..9172cf5 100644 Binary files a/languages/__pycache__/lang.cpython-39.pyc and b/languages/__pycache__/lang.cpython-39.pyc differ diff --git a/languages/__pycache__/zhCN.cpython-39.pyc b/languages/__pycache__/zhCN.cpython-39.pyc index c462bca..ab259c0 100644 Binary files a/languages/__pycache__/zhCN.cpython-39.pyc and b/languages/__pycache__/zhCN.cpython-39.pyc differ diff --git a/languages/enGB.py b/languages/enGB.py index 5a444ca..676dd43 100644 --- a/languages/enGB.py +++ b/languages/enGB.py @@ -116,40 +116,40 @@ READABLETEXT = { # 103:"", # 104:"", - 105: "找不到或无法读取文件😢:{}", - 106: "您当前的项目已修改但未存储,是否先保存当前项目?", - 107: "项目已经存储至:{}", - 108: "音·创工程文件", - 109: "任意类型", - 110: "函数音创工程文件", - 111: "MMFM0.0.6版本工程文件", - 112: "全部类型", - 113: "钢琴声音的音频文件", - 114: "Midi文件", - 115: "文本文件", - 116: "请输入坐标:", - 117: "您输入的格式有误,请重新输入!", - 118: "我的世界指令函数文件", - 119: "请输入执行链生成坐标:", - 120: "您输入的格式有误,请重新输入。", + 105: "Error with finding or reading file😢:{}", + 106: "Project is unsaved, save before close?", + 107: "Saved in: {}", + 108: "Musicreater Project", + 109: "Any Type", + 110: "NoteFunCreater Project", + 111: "MMFM (V0.0.6) Project", + 112: "All Types", + 113: ".MP3 file(piano sound)", + 114: "Midi file", + 115: "Text file", + 116: "Position Inpution", + 117: "Format Error❌, please Reinput!", + 118: ".MCFUNCTION", + 119: "The position of the ChainCB for execution:", + # 120: "", 121: "您的函数文件不大于一万条指令,无需进行分割操作。", 122: "请输入执行链生成相对坐标:", - 123: "FastBuilder结构文件", - 124: "转换结束!\n{}", + 123: "FastBuilder Structure", + 124: "Done!\n{}", 125: "一秒,音乐走几拍?", 126: "按下确认后,在游戏中使用connect指令连接localhost:8080,即可播放", 127: "请输入区域选择的开始坐标:", 128: "请输入区域选择的结束坐标:", 129: "所选区块导出时是否需要保留空气方块?", 130: "音·创结构文件", - 131: "文件已生成\n{}", - 132: "文件无法生成\n{}\n{}", - 133: "本功能尚未开发。", - 134: "您的称呼", - 135: "您的联系方式", - 136: "您对问题的描述", - 137: "在程序结束后将清除日志及临时文件信息。", - 138: "在程序结束后将不会清除日志及临时文件信息。", + 131: "Done😃\n{}", + 132: "Failed❌\n{}\n{}", + 133: "Have not developed yet...", + 134: "Your name", + 135: "Your contact", + 136: "Your description of Problem", + 137: "Log file will be cleared when you exit.", + 138: "Log file will NOT be cleared when you exit.", 139: "修改包名", 140: "修改音乐标题", 141: "修改玩家选择器\n注意!要加上中括号“[]”", @@ -158,5 +158,23 @@ READABLETEXT = { 144: "修改本音轨所用乐器", 145: "您输入的乐器并非游戏内置乐器,是否继续用您输入的字符作为乐器?", 146: "修改本音轨生成的文件名", + # -----2022.1.25更新 + 147: "生成新文件至...", + 148: "从midi导入音轨且用新方法解析", + 149: "Open New: Musicreater Project...", + 150: "保存为新项目", + 151: "另存为新项...", + 152: "(开发调试)关闭本次日志记录", + 153: "生成新函数包至...", + 154: "生成新函数附加包文件至...", + 155: "生成新函数附加包文件,并将神羽资源包以散包形式放置至...", + 156: "[神羽资源包位置选择]:选择文件夹...", + 157: "没有路径文件(.rpposi文件),请仔细阅读Readme或先试用:帮助与疑问->[神羽资源包位置选择]:选择文件夹... 方法添加路径文件吧!", + 158: "有路径文件(.rpposi文件),但路径指示错误,请仔细阅读Readme或先用:帮助与疑问->[神羽资源包位置选择]:选择文件夹... 更改路径!", + 159: "更改路径文件(.rpposi文件)成功!!", + 160: "从midi导入音轨且用类方法解析", + 161: "打开 类方法: 音·创项目...", + 162: "保存为类方法项目", + 163: "另存为类方法项...", } diff --git a/languages/zhCN.py b/languages/zhCN.py index 5021bfe..937a0ca 100644 --- a/languages/zhCN.py +++ b/languages/zhCN.py @@ -119,7 +119,7 @@ READABLETEXT = { 105: "找不到或无法读取文件😢:{}", 106: "您当前的项目已修改但未存储,是否先保存当前项目?", 107: "项目已经存储至:{}", - 108: ["音·创工程文件", "新:音·创工程文件", "音·创测试文件"], + 108: "音·创工程文件", 109: "任意类型", 110: "函数音创工程文件", 111: "MMFM0.0.6版本工程文件", @@ -128,10 +128,10 @@ READABLETEXT = { 114: "Midi文件", 115: "文本文件", 116: "请输入坐标:", - 117: "您输入的格式有误,请重新输入!", + 117: "您输入的格式有误❌,请重新输入!", 118: "我的世界指令函数文件", 119: "请输入执行链生成坐标:", - 120: "您输入的格式有误,请重新输入。", + # 120: "", 121: "您的函数文件不大于一万条指令,无需进行分割操作。", 122: "请输入执行链生成相对坐标:", 123: "FastBuilder结构文件", diff --git a/msctspt/__pycache__/__init__.cpython-39.pyc b/msctspt/__pycache__/__init__.cpython-39.pyc index 35e5198..42f9871 100644 Binary files a/msctspt/__pycache__/__init__.cpython-39.pyc and b/msctspt/__pycache__/__init__.cpython-39.pyc differ diff --git a/msctspt/__pycache__/bugReporter.cpython-39.pyc b/msctspt/__pycache__/bugReporter.cpython-39.pyc index e7caaa2..c6740f9 100644 Binary files a/msctspt/__pycache__/bugReporter.cpython-39.pyc and b/msctspt/__pycache__/bugReporter.cpython-39.pyc differ diff --git a/msctspt/__pycache__/threadOpera.cpython-39.pyc b/msctspt/__pycache__/threadOpera.cpython-39.pyc index b8aa54e..0c4e9c3 100644 Binary files a/msctspt/__pycache__/threadOpera.cpython-39.pyc and b/msctspt/__pycache__/threadOpera.cpython-39.pyc differ diff --git a/msctspt/transfer.py b/msctspt/transfer.py index d44bca4..051cc3b 100644 --- a/msctspt/transfer.py +++ b/msctspt/transfer.py @@ -72,14 +72,14 @@ def formCmdBlock(direction: list, command: str, particularValue: int, impluse: i } -def note2bdx(filePath: str, dire: list, Notes: list, ScoreboardName: str, Instrument: str, PlayerSelect: str = '', - isProsess: bool = False, height: int = 200): +def note2bdx(filePath: str, dire: list, Notes: list, ScoreboardName: str, Instrument: str, + PlayerSelect: str = '', isProsess: bool = False, height: int = 200): """使用方法同Note2Cmd :param 参数说明: filePath: 生成.bdx文件的位置 dire: 指令方块在地图中生成的起始位置(相对位置) Notes: 以 list[ list[ float我的世界playsound指令音调 , float延续时常(单位s) ] ] 格式存储的音符列表 - 例如Musicreater.py的(dataset[0]['musics'][NowMusic]['notes']) + 例如Musicreater.py的(dataset[0]['musics'][NowMusic]['notes']) ScoreboardName: 用于执行的计分板名称 Instrument: 播放的乐器 PlayerSelect: 执行的玩家选择器 @@ -124,6 +124,23 @@ def note2bdx(filePath: str, dire: list, Notes: list, ScoreboardName: str, Instru return BdxConverter(filePath, 'Build by RyounMusicreater', blocks) +def music2BDX(filePath: str, dire: list, Notes: list, ScoreboardName: str, Instrument: str, + PlayerSelect: str = '', isProsess: bool = False, height: int = 200): + """使用方法同Note2Cmd + :param 参数说明: + filePath: 生成.bdx文件的位置 + dire: 指令方块在地图中生成的起始位置(相对位置) + Notes: 以 list[ list[ float我的世界playsound指令音调 , float延续时常(单位s) ] ] 格式存储的音符列表 + 例如Musicreater.py的(dataset[0]['musics'][NowMusic]['notes']) + ScoreboardName: 用于执行的计分板名称 + Instrument: 播放的乐器 + PlayerSelect: 执行的玩家选择器 + isProsess: 是否显示进度条(会很卡) + height: 生成结构的最高高度 + :return 返回一个BdxConverter类(实际上没研究过),同时在指定位置生成.bdx文件""" + pass + + def note2webs(Notes: list, Instrument: str, speed: float = 5.0, PlayerSelect: str = '', isProsess: bool = False): """传入音符,在oaclhost:8080上建立websocket服务器以供我的世界connect/wssever指令连接 :param 参数说明: @@ -162,7 +179,7 @@ def note2webs(Notes: list, Instrument: str, speed: float = 5.0, PlayerSelect: st def note2RSworld(world: str, startpos: list, notes: list, instrument: str, speed: float = 2.5, - posadder: list = [1, 0, 0], baseblock: str = 'stone'): # -> bool + posadder: iterable = (1, 0, 0), baseblock: str = 'stone'): # -> bool """传入音符,生成以音符盒存储的红石音乐 :param 参数说明: world: 地图文件的路径 diff --git a/nmcsup/__pycache__/__init__.cpython-39.pyc b/nmcsup/__pycache__/__init__.cpython-39.pyc index 8cf72dc..05ad505 100644 Binary files a/nmcsup/__pycache__/__init__.cpython-39.pyc and b/nmcsup/__pycache__/__init__.cpython-39.pyc differ diff --git a/nmcsup/__pycache__/log.cpython-39.pyc b/nmcsup/__pycache__/log.cpython-39.pyc index 59b44c5..d009632 100644 Binary files a/nmcsup/__pycache__/log.cpython-39.pyc and b/nmcsup/__pycache__/log.cpython-39.pyc differ diff --git a/nmcsup/__pycache__/vers.cpython-39.pyc b/nmcsup/__pycache__/vers.cpython-39.pyc index dd0ae25..75e1685 100644 Binary files a/nmcsup/__pycache__/vers.cpython-39.pyc and b/nmcsup/__pycache__/vers.cpython-39.pyc differ