更新乐器对照表

This commit is contained in:
EillesWan 2023-10-22 12:37:53 +08:00
parent 72dfdfeb34
commit 0b0328bc44
32 changed files with 127 additions and 99 deletions

View File

@ -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"),

View File

@ -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",),
}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

13
docs/API.md Normal file
View File

@ -0,0 +1,13 @@
<h1 align="center">· Musicreater</h1>
<p align="center">
<img width="128" height="128" src="https://s1.ax1x.com/2022/05/06/Ouhghj.md.png" >
</p>
**此为开发相关文档内容包括库的简单调用所生成文件结构的详细说明特殊参数的详细解释**
# [main.py](../Musicreater/main.py)
## [类] MidiConvert
### [类函数] from_midi_file

View File

@ -4,7 +4,7 @@
<img width="128" height="128" src="https://s1.ax1x.com/2022/05/06/Ouhghj.md.png" >
</p>
**此为开发相关文档内容包括库的调用所生成文件结构的详细说明特殊参数的详细解释**
**此为开发相关文档内容包括库的简单调用所生成文件结构的详细说明特殊参数的详细解释**
# 库的简单调用
@ -89,7 +89,7 @@
progressbar_style, # 进度条样式组(详见下方)
)
# 同上面生成播放指令的理,进度条指令也存储至对象内
# 同上面生成播放指令的理,进度条指令也存储至对象内
print(
"进度条指令如下:\n{}".format(
cvt_mid.progress_bar_command

View File

@ -8,6 +8,8 @@
**_注意本文档中的对照表版权归属于音·创作者并按照本仓库根目录下 LICENSE.md 中规定开源_**
原表格请见[constant.py](../Musicreater/constants.py#176)
**_使用时请遵循协议规定_**
- 版权所有 © 2023 · 开发者