diff --git a/Musicreater/__init__.py b/Musicreater/__init__.py index b028a20..f85a5fa 100644 --- a/Musicreater/__init__.py +++ b/Musicreater/__init__.py @@ -9,7 +9,7 @@ A free open source library used for dealing with **Minecraft** digital musics. Copyright © 2025 Eilles & bgArray 音·创(“本项目”)的协议颁发者为 金羿、诸葛亮与八卦阵 -The Licensor of Musicreater("this project") is Eilles Wan, bgArray. +The Licensor of Musicreater("this project") is Eilles, bgArray. 本项目根据 第一版 汉钰律许可协议(“本协议”)授权。 任何人皆可从以下地址获得本协议副本:https://gitee.com/EillesWan/YulvLicenses。 @@ -22,8 +22,8 @@ The Licensor of Musicreater("this project") is Eilles Wan, bgArray. # 若需转载或借鉴 许可声明请查看仓库目录下的 License.md -__version__ = "2.3.0.1" -__vername__ = "FSQ完全流式音符读写适配" +__version__ = "2.3.0.2" +__vername__ = "FSQ 完全流式音符读写适配,修复插件的兼容性问题" __author__ = ( ("金羿", "Eilles"), ("诸葛亮与八卦阵", "bgArray"), diff --git a/Musicreater/experiment.py b/Musicreater/experiment.py index 7640a90..dda37b1 100644 --- a/Musicreater/experiment.py +++ b/Musicreater/experiment.py @@ -18,15 +18,15 @@ Terms & Conditions: License.md in the root directory from .exceptions import * -from .subclass import * -from .utils import * from .main import ( - MidiConvert, MM_CLASSIC_PERCUSSION_INSTRUMENT_TABLE, MM_CLASSIC_PITCHED_INSTRUMENT_TABLE, + MidiConvert, mido, ) -from .types import Tuple, List, Dict, ChannelType +from .subclass import * +from .types import ChannelType, Dict, List, Tuple +from .utils import * class FutureMidiConvertJavaE(MidiConvert): diff --git a/Musicreater/magicmain.py b/Musicreater/magicmain.py index 7bf67b9..891f2b3 100644 --- a/Musicreater/magicmain.py +++ b/Musicreater/magicmain.py @@ -12,7 +12,7 @@ # 音·创 开发交流群 861684859 # Email TriM-Organization@hotmail.com -# 版权所有 金羿("Eilles Wan") & 诸葛亮与八卦阵("bgArray") & 鸣凤鸽子("MingFengPigeon") +# 版权所有 金羿("Eilles") & 诸葛亮与八卦阵("bgArray") & 鸣凤鸽子("MingFengPigeon") # 若需转载或借鉴 许可声明请查看仓库目录下的 License.md @@ -183,6 +183,7 @@ if __name__ == "__main__": # ============================ from typing import Literal + from ..constants import x, y, z @@ -198,7 +199,7 @@ def delay_to_note_blocks( :return 是否生成成功 """ - from TrimMCStruct import Structure, Block + from TrimMCStruct import Block, Structure struct = Structure( (_sideLength, max_height, _sideLength), # 声明结构大小 diff --git a/Musicreater/main.py b/Musicreater/main.py index bb07787..a02363b 100644 --- a/Musicreater/main.py +++ b/Musicreater/main.py @@ -11,7 +11,7 @@ A free open source library used for dealing with **Minecraft** digital musics. Copyright © 2025 Eilles & bgArray 音·创(“本项目”)的协议颁发者为 金羿、诸葛亮与八卦阵 -The Licensor of Musicreater("this project") is Eilles Wan, bgArray. +The Licensor of Musicreater("this project") is Eilles, bgArray. 本项目根据 第一版 汉钰律许可协议(“本协议”)授权。 任何人皆可从以下地址获得本协议副本:https://gitee.com/EillesWan/YulvLicenses。 @@ -30,8 +30,8 @@ The Licensor of Musicreater("this project") is Eilles Wan, bgArray. # 赶快呼叫 程序员!Let's Go! 直ぐに呼びましょプログラマ レッツゴー! Hurry to call the programmer! Let's Go! -import os import math +import os from itertools import chain import mido diff --git a/Musicreater/plugin/__init__.py b/Musicreater/plugin/__init__.py index c50758a..db599e8 100644 --- a/Musicreater/plugin/__init__.py +++ b/Musicreater/plugin/__init__.py @@ -41,7 +41,7 @@ __all__ = [ # BDX 常量 "BDX_MOVE_KEY", ] -__author__ = (("金羿", "Eilles Wan"), ("诸葛亮与八卦阵", "bgArray")) +__author__ = (("金羿", "Eilles"), ("诸葛亮与八卦阵", "bgArray")) # from .main import ConvertConfig diff --git a/Musicreater/plugin/addonpack/__init__.py b/Musicreater/plugin/addonpack/__init__.py index 28b92af..dea2752 100644 --- a/Musicreater/plugin/addonpack/__init__.py +++ b/Musicreater/plugin/addonpack/__init__.py @@ -20,7 +20,7 @@ __all__ = [ "to_addon_pack_in_repeater", "to_addon_pack_in_repeater_divided_by_instrument", ] -__author__ = (("金羿", "Eilles Wan"),) +__author__ = (("金羿", "Eilles"),) from .main import ( to_addon_pack_in_delay, diff --git a/Musicreater/plugin/addonpack/main.py b/Musicreater/plugin/addonpack/main.py index 4c96fed..f3bf657 100644 --- a/Musicreater/plugin/addonpack/main.py +++ b/Musicreater/plugin/addonpack/main.py @@ -14,16 +14,15 @@ Terms & Conditions: License.md in the root directory import json import os import shutil -from typing import Tuple +from typing import Literal, Optional, Tuple from ...main import MidiConvert -from ..archive import behavior_mcpack_manifest, compress_zipfile from ...subclass import ProgressBarStyle -from ...types import Optional, Literal +from ..archive import behavior_mcpack_manifest, compress_zipfile from ..mcstructure import ( - Structure, COMPABILITY_VERSION_117, COMPABILITY_VERSION_119, + Structure, commands_to_redstone_delay_structure, commands_to_structure, form_command_block_in_NBT_struct, diff --git a/Musicreater/plugin/bdxfile/__init__.py b/Musicreater/plugin/bdxfile/__init__.py index 3ff2cd1..d5231ce 100644 --- a/Musicreater/plugin/bdxfile/__init__.py +++ b/Musicreater/plugin/bdxfile/__init__.py @@ -15,6 +15,6 @@ Terms & Conditions: License.md in the root directory __all__ = ["to_BDX_file_in_score", "to_BDX_file_in_delay"] -__author__ = (("金羿", "Eilles Wan"),) +__author__ = (("金羿", "Eilles"),) from .main import to_BDX_file_in_delay, to_BDX_file_in_score diff --git a/Musicreater/plugin/bdxfile/main.py b/Musicreater/plugin/bdxfile/main.py index 30b24a0..68070e7 100644 --- a/Musicreater/plugin/bdxfile/main.py +++ b/Musicreater/plugin/bdxfile/main.py @@ -13,12 +13,12 @@ Terms & Conditions: License.md in the root directory import os +from typing import Optional import brotli from ...main import MidiConvert from ...subclass import MineCommand, ProgressBarStyle -from ...types import Optional from ..bdx import ( bdx_move, commands_to_BDX_bytes, diff --git a/Musicreater/plugin/mcstructfile/__init__.py b/Musicreater/plugin/mcstructfile/__init__.py index 8fba567..2516e0c 100644 --- a/Musicreater/plugin/mcstructfile/__init__.py +++ b/Musicreater/plugin/mcstructfile/__init__.py @@ -20,7 +20,7 @@ __all__ = [ "to_mcstructure_file_in_score", "to_mcstructure_files_in_repeater_divided_by_instruments", ] -__author__ = (("金羿", "Eilles Wan"),) +__author__ = (("金羿", "Eilles"),) from .main import ( to_mcstructure_file_in_delay, diff --git a/Musicreater/plugin/schematic/__init__.py b/Musicreater/plugin/schematic/__init__.py index 288e27e..ee296e9 100644 --- a/Musicreater/plugin/schematic/__init__.py +++ b/Musicreater/plugin/schematic/__init__.py @@ -16,7 +16,7 @@ Terms & Conditions: License.md in the root directory __all__ = [ ] -__author__ = (("金羿", "Eilles Wan"),) +__author__ = (("金羿", "Eilles"),) from .main import * diff --git a/Musicreater/plugin/websocket/__init__.py b/Musicreater/plugin/websocket/__init__.py index 091b880..ba9e7e1 100644 --- a/Musicreater/plugin/websocket/__init__.py +++ b/Musicreater/plugin/websocket/__init__.py @@ -15,7 +15,7 @@ Terms & Conditions: License.md in the root directory __all__ = [] -__author__ = (("金羿", "Eilles Wan"),) +__author__ = (("金羿", "Eilles"),) from .main import * diff --git a/Musicreater/plugin/websocket/main.py b/Musicreater/plugin/websocket/main.py index b169311..608af29 100644 --- a/Musicreater/plugin/websocket/main.py +++ b/Musicreater/plugin/websocket/main.py @@ -12,16 +12,15 @@ Terms & Conditions: License.md in the root directory # 若需转载或借鉴 许可声明请查看仓库目录下的 License.md -import fcwslib import asyncio -import uuid import time +import uuid +from typing import List, Literal, Optional, Tuple + +import fcwslib from ...main import MidiConvert -from ...subclass import ProgressBarStyle -from ...types import Optional, Literal, Tuple, List - -from ...subclass import MineCommand +from ...subclass import MineCommand, ProgressBarStyle def to_websocket_server( @@ -107,7 +106,10 @@ def to_websocket_server( callback=self.cmd_feedback, ) delay_of_now += 1 - if delay_of_now >= (cmd := musics[music_to_play][0][now_played_cmd]).delay: + if ( + delay_of_now + >= (cmd := musics[music_to_play][0][now_played_cmd]).delay + ): await self.send_command( cmd.command_text.replace(replacement, whom_to_play), callback=self.cmd_feedback, diff --git a/Musicreater/utils.py b/Musicreater/utils.py index 66cec0c..582c7f6 100644 --- a/Musicreater/utils.py +++ b/Musicreater/utils.py @@ -21,30 +21,28 @@ import random # from io import BytesIO from typing import ( Any, - Dict, - Tuple, - Optional, - Callable, - Literal, - Union, - List, - Generator, BinaryIO, + Callable, + Dict, + Generator, + List, + Literal, + Optional, + Tuple, + Union, ) -from xxhash import xxh32, xxh3_64, xxh3_128 +from xxhash import xxh3_64, xxh3_128, xxh32 from .constants import ( MC_INSTRUMENT_BLOCKS_TABLE, - MM_INSTRUMENT_DEVIATION_TABLE, MC_PITCHED_INSTRUMENT_LIST, + MM_INSTRUMENT_DEVIATION_TABLE, MM_INSTRUMENT_RANGE_TABLE, ) -from .subclass import MineNote, mctick2timestr - -from .types import MidiInstrumentTableType, MineNoteChannelType - from .exceptions import MusicSequenceDecodeError +from .subclass import MineNote, mctick2timestr +from .types import MidiInstrumentTableType, MineNoteChannelType def empty_midi_channels( diff --git a/let_future_java.py b/let_future_java.py index d3d8f58..bb6f56d 100644 --- a/let_future_java.py +++ b/let_future_java.py @@ -8,10 +8,8 @@ Terms & Conditions: License.md in the root directory import os import shutil - from typing import Optional, Tuple - import Musicreater.experiment from Musicreater.plugin.archive import compress_zipfile from Musicreater.utils import guess_deviation, is_in_diapason diff --git a/resources/msctDevAuthors.txt b/resources/msctDevAuthors.txt index 926617e..a38f893 100644 --- a/resources/msctDevAuthors.txt +++ b/resources/msctDevAuthors.txt @@ -9,7 +9,7 @@ zh-CN 金羿 zh-TW 金羿 zh-ME 金羿羿喵 zh-HK 金 羿 -en-GB Eilles Wan +en-GB Eilles en-US EillesWan 启诸葛亮与八卦阵 diff --git a/resources/poem.txt b/resources/poem.txt index d71b8ac..f3a40d9 100644 --- a/resources/poem.txt +++ b/resources/poem.txt @@ -43,5 +43,5 @@ > > Just let the wonderful music of peace surround the world > -> ---- Eilles Wan +> ---- Eilles > 7/5 2022 \ No newline at end of file diff --git a/resources/test/enfasted_list_merging_test.py b/resources/test/enfasted_list_merging_test.py index ad5c231..b666eb7 100644 --- a/resources/test/enfasted_list_merging_test.py +++ b/resources/test/enfasted_list_merging_test.py @@ -1,10 +1,11 @@ +import random import time from itertools import chain -import random +from multiprocessing import Pool, Process, freeze_support + from rich.console import Console from rich.progress import Progress from rich.table import Table -from multiprocessing import freeze_support, Pool, Process console = Console() diff --git a/resources/test/list_merging_text.py b/resources/test/list_merging_text.py index f816efb..fc28db3 100644 --- a/resources/test/list_merging_text.py +++ b/resources/test/list_merging_text.py @@ -1,6 +1,6 @@ +import random import time from itertools import chain -import random print("生成序列中") diff --git a/resources/test/volumn_function_fit.py b/resources/test/volumn_function_fit.py index 8b16b32..e5d71ac 100644 --- a/resources/test/volumn_function_fit.py +++ b/resources/test/volumn_function_fit.py @@ -1,6 +1,6 @@ +import matplotlib.pyplot as plt import numpy as np from scipy.optimize import curve_fit -import matplotlib.pyplot as plt def q_function1(x, a, a2, c1,): diff --git a/resources/test/volumn_function_test.py b/resources/test/volumn_function_test.py index 2185c95..aae76b9 100644 --- a/resources/test/volumn_function_test.py +++ b/resources/test/volumn_function_test.py @@ -1,6 +1,7 @@ import matplotlib.pyplot as plt import numpy as np + # 定义对数函数 def q_function1(vol): # return -23.65060754864053*((x+508.2130392724084)**0.8433764630986903) + 7.257078620637543 * (x+407.86870598508153) + 1585.6201108739122