This commit is contained in:
2025-08-24 00:11:01 +08:00
parent b796a363d8
commit c056eb1fcb
4 changed files with 18 additions and 12 deletions

View File

@ -22,7 +22,7 @@ The Licensor of Musicreater("this project") is Eilles, bgArray.
# 若需转载或借鉴 许可声明请查看仓库目录下的 License.md
__version__ = "2.4.2"
__version__ = "2.4.2.1"
__vername__ = "音符附加信息升级"
__author__ = (
("金羿", "Eilles"),
@ -62,6 +62,7 @@ __all__ = [
"MC_EILLES_RTBETA_INSTRUMENT_REPLACE_TABLE",
# Midi 与 游戏 的对照表
"MM_INSTRUMENT_RANGE_TABLE",
"MM_INSTRUMENT_DEVIATION_TABLE",
"MM_CLASSIC_PITCHED_INSTRUMENT_TABLE",
"MM_CLASSIC_PERCUSSION_INSTRUMENT_TABLE",
"MM_TOUCH_PITCHED_INSTRUMENT_TABLE",
@ -131,6 +132,7 @@ from .constants import (
MC_PITCHED_INSTRUMENT_LIST,
# MIDI 到 我的世界 表
MM_INSTRUMENT_RANGE_TABLE,
MM_INSTRUMENT_DEVIATION_TABLE,
MM_CLASSIC_PITCHED_INSTRUMENT_TABLE,
MM_CLASSIC_PERCUSSION_INSTRUMENT_TABLE,
MM_TOUCH_PITCHED_INSTRUMENT_TABLE,

View File

@ -874,14 +874,17 @@ class FutureMidiConvertM4(MidiConvert):
totalCount = int(_note.duration / _apply_time_division)
if (
totalCount == 0
or (_note.get_info("PITCH") > 2 and _note.sound_name != "note.bass")
if totalCount == 0 or (
_note.get_info("PITCH") > 1.89 and _note.sound_name != "note.bass"
):
from rich import print as prt
prt("[INFO] 音符太短或音调太高,无法生成插值")
prt(_note)
# 喂喂,这是测试用的,别发版啊!!!
# from rich import print as prt
# prt("[INFO] 音符太短或音调太高,无法生成插值")
# prt(_note)
return [
_note,
]
@ -905,7 +908,7 @@ class FutureMidiConvertM4(MidiConvert):
distance=_note.sound_distance + _i * _distance_slide,
azimuth=(
_note.sound_azimuth[0],
_note.sound_azimuth[1] + 5 * random.random(),
_note.sound_azimuth[1] + 10 * (random.random() - 0.5),
),
extra_information=_note.extra_info,
)
@ -952,7 +955,7 @@ class FutureMidiConvertM4(MidiConvert):
if not note.percussive:
notes_list.extend(
self._linear_note(note, 2 * note.get_info("PITCH"))
self._linear_note(note, 2.75 / note.get_info("PITCH"))
)
else:
notes_list.append(note)

View File

@ -395,7 +395,8 @@ class MineNote:
for i in range(k):
self.extra_info[key[i]] = value[i]
else:
raise TypeError("参数类型错误")
# 提供简单报错就行了,如果放一堆 if 语句,降低处理速度
raise TypeError("参数类型错误;键:`{}` 值:`{}`".format(key, value))
def get_info(self, key: str) -> Any:
"""获取附加信息"""

View File

@ -34,7 +34,7 @@
[![GitHub Repo stars](https://img.shields.io/github/stars/TriM-Organization/Musicreater?color=white&logo=GitHub&style=plastic)](https://github.com/TriM-Organization/Musicreater/stargazers)
[![GitHub Repo Forks](https://img.shields.io/github/forks/TriM-Organization/Musicreater?color=white&logo=GitHub&style=plastic)](https://github.com/TriM-Organization/Musicreater/forks)
简体中文 🇨🇳 | [English🇬🇧](README_EN.md)
简体中文🇨🇳 | [English🇬🇧](README_EN.md)
## 介绍 🚀
@ -74,7 +74,7 @@
## 作者 ✒
**金羿 Eilles**我的世界基岩版指令作者个人开发者B 站不知名 UP 江西老表
**金羿 Eilles**我的世界基岩版指令作者个人开发者B 站不知名 UP
**诸葛亮与八卦阵 bgArray**我的世界基岩版玩家喜欢编程和音乐深圳学生