From 0b0328bc441fb39b8e69296a968a93f5fa9081f0 Mon Sep 17 00:00:00 2001 From: EillesWan Date: Sun, 22 Oct 2023 12:37:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=B9=90=E5=99=A8=E5=AF=B9?= =?UTF-8?q?=E7=85=A7=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Musicreater/__init__.py | 6 +- Musicreater/constants.py | 132 ++++++++++---------- Musicreater/exceptions.py | 2 +- Musicreater/experiment.py | 2 +- Musicreater/main.py | 11 +- Musicreater/plugin/__init__.py | 2 +- Musicreater/plugin/addonpack/__init__.py | 2 +- Musicreater/plugin/addonpack/main.py | 2 +- Musicreater/plugin/archive.py | 2 +- Musicreater/plugin/bdx.py | 2 +- Musicreater/plugin/bdxfile/__init__.py | 2 +- Musicreater/plugin/bdxfile/main.py | 2 +- Musicreater/plugin/common.py | 2 +- Musicreater/plugin/main.py | 2 +- Musicreater/plugin/mcstructfile/__init__.py | 2 +- Musicreater/plugin/mcstructfile/main.py | 2 +- Musicreater/plugin/mcstructure.py | 2 +- Musicreater/plugin/noteblock.py | 2 +- Musicreater/plugin/schematic.py | 2 +- Musicreater/plugin/schematic/__init__.py | 2 +- Musicreater/plugin/schematic/main.py | 2 +- Musicreater/plugin/websocket.py | 2 +- Musicreater/plugin/websocket/__init__.py | 2 +- Musicreater/plugin/websocket/main.py | 2 +- Musicreater/previous.py | 2 +- Musicreater/subclass.py | 10 +- Musicreater/types.py | 2 +- Musicreater/utils.py | 2 +- docs/API.md | 13 ++ docs/库的生成与功能文档.md | 4 +- docs/转换乐器对照表.md | 2 + resources/{poem.txt => poem.md} | 0 32 files changed, 127 insertions(+), 99 deletions(-) create mode 100644 docs/API.md rename resources/{poem.txt => poem.md} (100%) diff --git a/Musicreater/__init__.py b/Musicreater/__init__.py index 233f14d..9567565 100644 --- a/Musicreater/__init__.py +++ b/Musicreater/__init__.py @@ -12,13 +12,13 @@ Copyright © 2023 all the developers of Musicreater Terms & Conditions: License.md in the root directory """ -# 睿穆组织 开发交流群 861684859 +# 睿乐组织 开发交流群 861684859 # Email TriM-Organization@hotmail.com # 若需转载或借鉴 许可声明请查看仓库目录下的 License.md -__version__ = "1.6.0" -__vername__ = "切换ChannelType类型为NoteChannelType类型" +__version__ = "1.6.1" +__vername__ = "更新乐器对照表" __author__ = ( ("金羿", "Eilles Wan"), ("诸葛亮与八卦阵", "bgArray"), diff --git a/Musicreater/constants.py b/Musicreater/constants.py index 0567fd2..50a72af 100644 --- a/Musicreater/constants.py +++ b/Musicreater/constants.py @@ -12,7 +12,7 @@ Copyright © 2023 all the developers of Musicreater Terms & Conditions: License.md in the root directory """ -# 睿穆组织 开发交流群 861684859 +# 睿乐组织 开发交流群 861684859 # Email TriM-Organization@hotmail.com # 若需转载或借鉴 许可声明请查看仓库目录下的 License.md @@ -184,23 +184,23 @@ PITCHED_INSTRUMENT_TABLE: Dict[int, Tuple[str, int]] = { 4: ("note.pling", 6), 5: ("note.pling", 6), 6: ("note.guitar", 7), - 7: ("note.harp", 6), - 8: ("note.bell", 4), # 打击乐器无音域 - 9: ("note.bell", 4), + 7: ("note.guitar", 7), + 8: ("note.iron_xylophone", 8), + 9: ("note.bell", 4), # 打击乐器无音域 10: ("note.iron_xylophone", 6), 11: ("note.iron_xylophone", 6), 12: ("note.iron_xylophone", 6), 13: ("note.xylophone", 4), 14: ("note.chime", 4), - 15: ("note.harp", 6), - 16: ("note.bass", 8), - 17: ("note.harp", 6), + 15: ("note.banjo", 6), + 16: ("note.xylophone", 6), + 17: ("note.iron_xylophone", 6), 18: ("note.flute", 5), - 19: ("note.harp", 6), - 20: ("note.harp", 6), + 19: ("note.flute", 5), + 20: ("note.flute", 5), 21: ("note.flute", 5), 22: ("note.flute", 5), - 23: ("note.guitar", 7), + 23: ("note.flute", 5), 24: ("note.guitar", 7), 25: ("note.guitar", 7), 26: ("note.guitar", 7), @@ -220,19 +220,19 @@ PITCHED_INSTRUMENT_TABLE: Dict[int, Tuple[str, int]] = { 40: ("note.flute", 5), 41: ("note.flute", 5), 42: ("note.flute", 5), - 43: ("note.flute", 5), - 44: ("note.iron_xylophone", 6), - 45: ("note.guitar", 7), + 43: ("note.bass", 8), + 44: ("note.flute", 5), + 45: ("note.iron_xylophone", 6), 46: ("note.harp", 6), - 47: ("note.bd", 7), - 48: ("note.guitar", 7), - 49: ("note.guitar", 7), - 50: ("note.bit", 6), - 51: ("note.bit", 6), - 52: ("note.flute", 5), - 53: ("note.flute", 5), - 54: ("note.flute", 5), - 55: ("note.flute", 5), + 47: ("note.snare", 7), + 48: ("note.flute", 5), + 49: ("note.flute", 5), + 50: ("note.flute", 5), + 51: ("note.flute", 5), + 52: ("note.didgeridoo", 5), + 53: ("note.flute", 5), # 合唱“啊”音 + 54: ("note.flute", 5), # 人声“嘟”音 + 55: ("mob.zombie.wood", 7), # 合成人声 56: ("note.flute", 5), 57: ("note.flute", 5), 58: ("note.flute", 5), @@ -253,73 +253,73 @@ PITCHED_INSTRUMENT_TABLE: Dict[int, Tuple[str, int]] = { 73: ("note.flute", 5), 74: ("note.flute", 5), 75: ("note.flute", 5), - 76: ("note.harp", 6), - 77: ("note.harp", 6), + 76: ("note.iron_xylophone", 6), + 77: ("note.iron_xylophone", 6), 78: ("note.flute", 5), - 79: ("note.harp", 6), + 79: ("note.flute", 5), 80: ("note.bit", 6), 81: ("note.bit", 6), - 82: ("note.bit", 6), - 83: ("note.bit", 6), - 84: ("note.bit", 6), - 85: ("note.bit", 6), - 86: ("note.bit", 6), - 87: ("note.bit", 6), + 82: ("note.flute", 5), + 83: ("note.flute", 5), + 84: ("note.guitar", 7), + 85: ("note.flute", 5), + 86: ("note.bass", 8), + 87: ("note.bass", 8), 88: ("note.bit", 6), - 89: ("note.bit", 6), + 89: ("note.flute", 5), 90: ("note.bit", 6), - 91: ("note.bit", 6), - 92: ("note.bit", 6), - 93: ("note.bit", 6), - 94: ("note.bit", 6), + 91: ("note.flute", 5), + 92: ("note.bell", 4), + 93: ("note.guitar", 7), + 94: ("note.flute", 5), 95: ("note.bit", 6), - 96: ("note.bit", 6), - 97: ("note.bit", 6), - 98: ("note.bit", 6), - 99: ("note.bit", 6), - 100: ("note.bit", 6), - 101: ("note.bit", 6), - 102: ("note.bit", 6), - 103: ("note.bit", 6), - 104: ("note.harp", 6), + 96: ("note.bit", 6), # 雨声 + 97: ("note.flute", 5), + 98: ("note.bell", 4), + 99: ("note.bit", 6), # 大气 + 100: ("note.bit", 6), # 明亮 + 101: ("note.bit", 6), # 鬼怪 + 102: ("note.bit", 6), # 回声 + 103: ("note.bit", 6), # 科幻 + 104: ("note.iron_xylophone", 6), 105: ("note.banjo", 6), 106: ("note.harp", 6), 107: ("note.harp", 6), 108: ("note.bell", 4), 109: ("note.flute", 5), 110: ("note.flute", 5), - 111: ("note.guitar", 7), + 111: ("note.flute", 5), 112: ("note.bell", 4), - 113: ("note.bell", 4), + 113: ("note.xylophone", 4), 114: ("note.flute", 5), - 115: ("note.cow_bell", 5), - 116: ("note.bd", 7), # 打击乐器无音域 - 117: ("note.bass", 8), - 118: ("note.bit", 6), + 115: ("note.hat", 7), # 打击乐器无音域 + 116: ("note.snare", 7), # 打击乐器无音域 + 117: ("note.snare", 7), # 打击乐器无音域 + 118: ("note.bd", 7), # 打击乐器无音域 119: ("firework.blast", 7), # 打击乐器无音域 - 120: ("note.guitar", 7), - 121: ("note.harp", 6), - 122: ("note.harp", 6), - 123: ("note.harp", 6), - 124: ("note.harp", 6), - 125: ("note.hat", 7), # 打击乐器无音域 + 120: ("note.guitar", 7), # 吉他还把杂音 + 121: ("note.harp", 6), # 呼吸声 + 122: ("note.harp", 6), # 海浪声 + 123: ("note.harp", 6), # 鸟鸣 + 124: ("note.bit", 6), + 125: ("note.hat", 7), # 直升机 126: ("firework.twinkle", 7), # 打击乐器无音域 - 127: ("note.snare", 7), # 打击乐器无音域 + 127: ("mob.zombie.wood", 7), # 打击乐器无音域 } PERCUSSION_INSTRUMENT_TABLE: Dict[int, Tuple[str, int]] = { - 34: ("note.bd", 7), + 34: ("note.hat", 7), 35: ("note.bd", 7), - 36: ("note.hat", 7), + 36: ("note.bd", 7), 37: ("note.snare", 7), 38: ("note.snare", 7), 39: ("fire.ignite", 7), - 40: ("note.hat", 7), - 41: ("note.snare", 7), + 40: ("note.snare", 7), + 41: ("note.hat", 7), 42: ("note.hat", 7), - 43: ("note.snare", 7), - 44: ("note.snare", 7), - 45: ("note.bell", 4), + 43: ("firework.blast", 7), + 44: ("note.hat", 7), + 45: ("note.snare", 4), 46: ("note.snare", 7), 47: ("note.snare", 7), 48: ("note.bell", 4), @@ -365,6 +365,7 @@ PERCUSSION_INSTRUMENT_LIST: List[str] = [ "firework.blast", "firework.twinkle", "fire.ignite", + "mob.zombie.wood", ] INSTRUMENT_BLOCKS_TABLE: Dict[str, Tuple[str, ...]] = { @@ -390,6 +391,7 @@ INSTRUMENT_BLOCKS_TABLE: Dict[str, Tuple[str, ...]] = { "firework.blast": ("sandstone",), "firework.twinkle": ("red_sandstone",), "fire.ignite": ("concrete_powder",), + "mob.zombie.wood": ("sand",), } diff --git a/Musicreater/exceptions.py b/Musicreater/exceptions.py index 5016e40..8550f75 100644 --- a/Musicreater/exceptions.py +++ b/Musicreater/exceptions.py @@ -12,7 +12,7 @@ Copyright © 2023 all the developers of Musicreater Terms & Conditions: License.md in the root directory """ -# 睿穆组织 开发交流群 861684859 +# 睿乐组织 开发交流群 861684859 # Email TriM-Organization@hotmail.com # 若需转载或借鉴 许可声明请查看仓库目录下的 License.md diff --git a/Musicreater/experiment.py b/Musicreater/experiment.py index 786ea3a..26771fa 100644 --- a/Musicreater/experiment.py +++ b/Musicreater/experiment.py @@ -12,7 +12,7 @@ Copyright © 2023 all the developers of Musicreater Terms & Conditions: License.md in the root directory """ -# 睿穆组织 开发交流群 861684859 +# 睿乐组织 开发交流群 861684859 # Email TriM-Organization@hotmail.com # 若需转载或借鉴 许可声明请查看仓库目录下的 License.md diff --git a/Musicreater/main.py b/Musicreater/main.py index c5f3f69..619f51c 100644 --- a/Musicreater/main.py +++ b/Musicreater/main.py @@ -550,7 +550,11 @@ class MidiConvert: ) else: if ignore_mismatch_error: - print("[WARRING] MIDI格式错误 音符不匹配 {} 无法在上文中找到与之匹配的音符开音消息".format(msg)) + print( + "[WARRING] MIDI格式错误 音符不匹配 {} 无法在上文中找到与之匹配的音符开音消息".format( + msg + ) + ) else: raise NoteOnOffMismatchError( "当前的MIDI很可能有损坏之嫌……", msg, "无法在上文中找到与之匹配的音符开音消息。" @@ -601,7 +605,7 @@ class MidiConvert: """ if speed == 0: - raise ZeroSpeedError("播放速度仅可为正实数") + raise ZeroSpeedError("播放速度仅可为(0,1]范围内的正实数") max_volume = 1 if max_volume > 1 else (0.001 if max_volume <= 0 else max_volume) command_channels = [] @@ -669,7 +673,7 @@ class MidiConvert: """ if speed == 0: - raise ZeroSpeedError("播放速度仅可为正实数") + raise ZeroSpeedError("播放速度仅可为(0,1]范围内的正实数") max_volume = 1 if max_volume > 1 else (0.001 if max_volume <= 0 else max_volume) notes_list: List[SingleNote] = [] @@ -679,6 +683,7 @@ class MidiConvert: notes_list.extend(channel) notes_list.sort(key=lambda a: a.start_time) + self.music_command_list = [] multi = max_multi = 0 delaytime_previous = 0 diff --git a/Musicreater/plugin/__init__.py b/Musicreater/plugin/__init__.py index 1de904b..1b9a73e 100644 --- a/Musicreater/plugin/__init__.py +++ b/Musicreater/plugin/__init__.py @@ -9,7 +9,7 @@ Copyright © 2023 all the developers of Musicreater Terms & Conditions: License.md in the root directory """ -# 睿穆组织 开发交流群 861684859 +# 睿乐组织 开发交流群 861684859 # Email TriM-Organization@hotmail.com # 若需转载或借鉴 许可声明请查看仓库目录下的 License.md diff --git a/Musicreater/plugin/addonpack/__init__.py b/Musicreater/plugin/addonpack/__init__.py index ac1f20f..5364a40 100644 --- a/Musicreater/plugin/addonpack/__init__.py +++ b/Musicreater/plugin/addonpack/__init__.py @@ -9,7 +9,7 @@ Copyright © 2023 all the developers of Musicreater Terms & Conditions: License.md in the root directory """ -# 睿穆组织 开发交流群 861684859 +# 睿乐组织 开发交流群 861684859 # Email TriM-Organization@hotmail.com # 若需转载或借鉴 许可声明请查看仓库目录下的 License.md diff --git a/Musicreater/plugin/addonpack/main.py b/Musicreater/plugin/addonpack/main.py index df4924d..0fc5fdb 100644 --- a/Musicreater/plugin/addonpack/main.py +++ b/Musicreater/plugin/addonpack/main.py @@ -7,7 +7,7 @@ Copyright © 2023 all the developers of Musicreater Terms & Conditions: License.md in the root directory """ -# 睿穆组织 开发交流群 861684859 +# 睿乐组织 开发交流群 861684859 # Email TriM-Organization@hotmail.com # 若需转载或借鉴 许可声明请查看仓库目录下的 License.md diff --git a/Musicreater/plugin/archive.py b/Musicreater/plugin/archive.py index 50298c1..d13fd2f 100644 --- a/Musicreater/plugin/archive.py +++ b/Musicreater/plugin/archive.py @@ -12,7 +12,7 @@ Copyright © 2023 all the developers of Musicreater Terms & Conditions: License.md in the root directory """ -# 睿穆组织 开发交流群 861684859 +# 睿乐组织 开发交流群 861684859 # Email TriM-Organization@hotmail.com # 若需转载或借鉴 许可声明请查看仓库目录下的 License.md diff --git a/Musicreater/plugin/bdx.py b/Musicreater/plugin/bdx.py index 46b4a11..6089b0b 100644 --- a/Musicreater/plugin/bdx.py +++ b/Musicreater/plugin/bdx.py @@ -11,7 +11,7 @@ Copyright © 2023 all the developers of Musicreater Terms & Conditions: License.md in the root directory """ -# 睿穆组织 开发交流群 861684859 +# 睿乐组织 开发交流群 861684859 # Email TriM-Organization@hotmail.com # 若需转载或借鉴 许可声明请查看仓库目录下的 License.md diff --git a/Musicreater/plugin/bdxfile/__init__.py b/Musicreater/plugin/bdxfile/__init__.py index cbf6661..87b38ca 100644 --- a/Musicreater/plugin/bdxfile/__init__.py +++ b/Musicreater/plugin/bdxfile/__init__.py @@ -9,7 +9,7 @@ Copyright © 2023 all the developers of Musicreater Terms & Conditions: License.md in the root directory """ -# 睿穆组织 开发交流群 861684859 +# 睿乐组织 开发交流群 861684859 # Email TriM-Organization@hotmail.com # 若需转载或借鉴 许可声明请查看仓库目录下的 License.md diff --git a/Musicreater/plugin/bdxfile/main.py b/Musicreater/plugin/bdxfile/main.py index cd1881a..1665dde 100644 --- a/Musicreater/plugin/bdxfile/main.py +++ b/Musicreater/plugin/bdxfile/main.py @@ -7,7 +7,7 @@ Copyright © 2023 all the developers of Musicreater Terms & Conditions: License.md in the root directory """ -# 睿穆组织 开发交流群 861684859 +# 睿乐组织 开发交流群 861684859 # Email TriM-Organization@hotmail.com # 若需转载或借鉴 许可声明请查看仓库目录下的 License.md diff --git a/Musicreater/plugin/common.py b/Musicreater/plugin/common.py index 2aff4a6..16bea9a 100644 --- a/Musicreater/plugin/common.py +++ b/Musicreater/plugin/common.py @@ -11,7 +11,7 @@ Copyright © 2023 all the developers of Musicreater Terms & Conditions: License.md in the root directory """ -# 睿穆组织 开发交流群 861684859 +# 睿乐组织 开发交流群 861684859 # Email TriM-Organization@hotmail.com # 若需转载或借鉴 许可声明请查看仓库目录下的 License.md diff --git a/Musicreater/plugin/main.py b/Musicreater/plugin/main.py index 3fa234c..8b726ae 100644 --- a/Musicreater/plugin/main.py +++ b/Musicreater/plugin/main.py @@ -11,7 +11,7 @@ Copyright © 2023 all the developers of Musicreater Terms & Conditions: License.md in the root directory """ -# 睿穆组织 开发交流群 861684859 +# 睿乐组织 开发交流群 861684859 # Email TriM-Organization@hotmail.com # 若需转载或借鉴 许可声明请查看仓库目录下的 License.md diff --git a/Musicreater/plugin/mcstructfile/__init__.py b/Musicreater/plugin/mcstructfile/__init__.py index 25a8c2d..91b826f 100644 --- a/Musicreater/plugin/mcstructfile/__init__.py +++ b/Musicreater/plugin/mcstructfile/__init__.py @@ -9,7 +9,7 @@ Copyright © 2023 all the developers of Musicreater Terms & Conditions: License.md in the root directory """ -# 睿穆组织 开发交流群 861684859 +# 睿乐组织 开发交流群 861684859 # Email TriM-Organization@hotmail.com # 若需转载或借鉴 许可声明请查看仓库目录下的 License.md diff --git a/Musicreater/plugin/mcstructfile/main.py b/Musicreater/plugin/mcstructfile/main.py index 74cedf1..057e522 100644 --- a/Musicreater/plugin/mcstructfile/main.py +++ b/Musicreater/plugin/mcstructfile/main.py @@ -7,7 +7,7 @@ Copyright © 2023 all the developers of Musicreater Terms & Conditions: License.md in the root directory """ -# 睿穆组织 开发交流群 861684859 +# 睿乐组织 开发交流群 861684859 # Email TriM-Organization@hotmail.com # 若需转载或借鉴 许可声明请查看仓库目录下的 License.md diff --git a/Musicreater/plugin/mcstructure.py b/Musicreater/plugin/mcstructure.py index be0a2ae..46e3483 100644 --- a/Musicreater/plugin/mcstructure.py +++ b/Musicreater/plugin/mcstructure.py @@ -11,7 +11,7 @@ Copyright © 2023 all the developers of Musicreater Terms & Conditions: License.md in the root directory """ -# 睿穆组织 开发交流群 861684859 +# 睿乐组织 开发交流群 861684859 # Email TriM-Organization@hotmail.com # 若需转载或借鉴 许可声明请查看仓库目录下的 License.md diff --git a/Musicreater/plugin/noteblock.py b/Musicreater/plugin/noteblock.py index 77d1134..14c05b7 100644 --- a/Musicreater/plugin/noteblock.py +++ b/Musicreater/plugin/noteblock.py @@ -11,7 +11,7 @@ Copyright © 2023 all the developers of Musicreater Terms & Conditions: License.md in the root directory """ -# 睿穆组织 开发交流群 861684859 +# 睿乐组织 开发交流群 861684859 # Email TriM-Organization@hotmail.com # 若需转载或借鉴 许可声明请查看仓库目录下的 License.md diff --git a/Musicreater/plugin/schematic.py b/Musicreater/plugin/schematic.py index 9ed465c..9d55c64 100644 --- a/Musicreater/plugin/schematic.py +++ b/Musicreater/plugin/schematic.py @@ -11,7 +11,7 @@ Copyright © 2023 all the developers of Musicreater Terms & Conditions: License.md in the root directory """ -# 睿穆组织 开发交流群 861684859 +# 睿乐组织 开发交流群 861684859 # Email TriM-Organization@hotmail.com # 若需转载或借鉴 许可声明请查看仓库目录下的 License.md diff --git a/Musicreater/plugin/schematic/__init__.py b/Musicreater/plugin/schematic/__init__.py index edef3bd..125d634 100644 --- a/Musicreater/plugin/schematic/__init__.py +++ b/Musicreater/plugin/schematic/__init__.py @@ -9,7 +9,7 @@ Copyright © 2023 all the developers of Musicreater Terms & Conditions: License.md in the root directory """ -# 睿穆组织 开发交流群 861684859 +# 睿乐组织 开发交流群 861684859 # Email TriM-Organization@hotmail.com # 若需转载或借鉴 许可声明请查看仓库目录下的 License.md diff --git a/Musicreater/plugin/schematic/main.py b/Musicreater/plugin/schematic/main.py index 728ab9b..e6d0982 100644 --- a/Musicreater/plugin/schematic/main.py +++ b/Musicreater/plugin/schematic/main.py @@ -7,7 +7,7 @@ Copyright © 2023 all the developers of Musicreater Terms & Conditions: License.md in the root directory """ -# 睿穆组织 开发交流群 861684859 +# 睿乐组织 开发交流群 861684859 # Email TriM-Organization@hotmail.com # 若需转载或借鉴 许可声明请查看仓库目录下的 License.md diff --git a/Musicreater/plugin/websocket.py b/Musicreater/plugin/websocket.py index 8bfcd69..e37b357 100644 --- a/Musicreater/plugin/websocket.py +++ b/Musicreater/plugin/websocket.py @@ -11,7 +11,7 @@ Copyright © 2023 all the developers of Musicreater Terms & Conditions: License.md in the root directory """ -# 睿穆组织 开发交流群 861684859 +# 睿乐组织 开发交流群 861684859 # Email TriM-Organization@hotmail.com # 若需转载或借鉴 许可声明请查看仓库目录下的 License.md diff --git a/Musicreater/plugin/websocket/__init__.py b/Musicreater/plugin/websocket/__init__.py index 8f4670a..c8d5185 100644 --- a/Musicreater/plugin/websocket/__init__.py +++ b/Musicreater/plugin/websocket/__init__.py @@ -9,7 +9,7 @@ Copyright © 2023 all the developers of Musicreater Terms & Conditions: License.md in the root directory """ -# 睿穆组织 开发交流群 861684859 +# 睿乐组织 开发交流群 861684859 # Email TriM-Organization@hotmail.com # 若需转载或借鉴 许可声明请查看仓库目录下的 License.md diff --git a/Musicreater/plugin/websocket/main.py b/Musicreater/plugin/websocket/main.py index 25ffd41..2286d88 100644 --- a/Musicreater/plugin/websocket/main.py +++ b/Musicreater/plugin/websocket/main.py @@ -7,7 +7,7 @@ Copyright © 2023 all the developers of Musicreater Terms & Conditions: License.md in the root directory """ -# 睿穆组织 开发交流群 861684859 +# 睿乐组织 开发交流群 861684859 # Email TriM-Organization@hotmail.com # 若需转载或借鉴 许可声明请查看仓库目录下的 License.md diff --git a/Musicreater/previous.py b/Musicreater/previous.py index f7cd7cf..5c48fee 100644 --- a/Musicreater/previous.py +++ b/Musicreater/previous.py @@ -11,7 +11,7 @@ Copyright © 2023 all the developers of Musicreater Terms & Conditions: License.md in the root directory """ -# 睿穆组织 开发交流群 861684859 +# 睿乐组织 开发交流群 861684859 # Email TriM-Organization@hotmail.com # 若需转载或借鉴 许可声明请查看仓库目录下的 License.md diff --git a/Musicreater/subclass.py b/Musicreater/subclass.py index 545c917..c1bf07f 100644 --- a/Musicreater/subclass.py +++ b/Musicreater/subclass.py @@ -12,7 +12,7 @@ Copyright © 2023 all the developers of Musicreater Terms & Conditions: License.md in the root directory """ -# 睿穆组织 开发交流群 861684859 +# 睿乐组织 开发交流群 861684859 # Email TriM-Organization@hotmail.com # 若需转载或借鉴 许可声明请查看仓库目录下的 License.md @@ -150,7 +150,13 @@ class SingleNote: return False return self.__str__() == other.__str__() - def to_command(self, volume_percentage) -> str: + def to_command(self, volume_percentage: float = 1) -> str: + """ + 将音符转为播放的指令 + :param volume_percentage:int 音量占比(0,1] + + :return str指令 + """ self.mc_sound_ID, _X = ( perc_inst_to_soundID_withX(self.inst) if self.percussive diff --git a/Musicreater/types.py b/Musicreater/types.py index 30053b4..d489ad3 100644 --- a/Musicreater/types.py +++ b/Musicreater/types.py @@ -12,7 +12,7 @@ Copyright © 2023 all the developers of Musicreater Terms & Conditions: License.md in the root directory """ -# 睿穆组织 开发交流群 861684859 +# 睿乐组织 开发交流群 861684859 # Email TriM-Organization@hotmail.com # 若需转载或借鉴 许可声明请查看仓库目录下的 License.md diff --git a/Musicreater/utils.py b/Musicreater/utils.py index e6eabba..cc486db 100644 --- a/Musicreater/utils.py +++ b/Musicreater/utils.py @@ -11,7 +11,7 @@ Copyright © 2023 all the developers of Musicreater Terms & Conditions: License.md in the root directory """ -# 睿穆组织 开发交流群 861684859 +# 睿乐组织 开发交流群 861684859 # Email TriM-Organization@hotmail.com # 若需转载或借鉴 许可声明请查看仓库目录下的 License.md diff --git a/docs/API.md b/docs/API.md new file mode 100644 index 0000000..203d26b --- /dev/null +++ b/docs/API.md @@ -0,0 +1,13 @@ +

音·创 Musicreater

+ +

+ +

+ +**此为开发相关文档,内容包括:库的简单调用、所生成文件结构的详细说明、特殊参数的详细解释** + +# [main.py](../Musicreater/main.py) + +## [类] MidiConvert + +### [类函数] from_midi_file \ No newline at end of file diff --git a/docs/库的生成与功能文档.md b/docs/库的生成与功能文档.md index 40fa90f..1f671d8 100644 --- a/docs/库的生成与功能文档.md +++ b/docs/库的生成与功能文档.md @@ -4,7 +4,7 @@

-**此为开发相关文档,内容包括:库的调用、所生成文件结构的详细说明、特殊参数的详细解释** +**此为开发相关文档,内容包括:库的简单调用、所生成文件结构的详细说明、特殊参数的详细解释** # 库的简单调用 @@ -89,7 +89,7 @@ progressbar_style, # 进度条样式组(详见下方) ) - # 同上面生成播放指令的理,进度条指令也混存储至对象内 + # 同上面生成播放指令的理,进度条指令也会存储至对象内 print( "进度条指令如下:\n{}".format( cvt_mid.progress_bar_command diff --git a/docs/转换乐器对照表.md b/docs/转换乐器对照表.md index e1db325..88ca822 100644 --- a/docs/转换乐器对照表.md +++ b/docs/转换乐器对照表.md @@ -8,6 +8,8 @@ **_注意!本文档中的对照表,版权归属于音·创作者,并按照本仓库根目录下 LICENSE.md 中规定开源_** +原表格请见[constant.py](../Musicreater/constants.py#176) + **_使用时请遵循协议规定_** - 版权所有 © 2023 音·创 开发者 diff --git a/resources/poem.txt b/resources/poem.md similarity index 100% rename from resources/poem.txt rename to resources/poem.md