mirror of
https://github.com/TriM-Organization/Musicreater.git
synced 2025-09-05 03:46:22 +00:00
This commit is contained in:
@ -22,7 +22,7 @@ The Licensor of Musicreater("this project") is Eilles, bgArray.
|
|||||||
# 若需转载或借鉴 许可声明请查看仓库目录下的 License.md
|
# 若需转载或借鉴 许可声明请查看仓库目录下的 License.md
|
||||||
|
|
||||||
|
|
||||||
__version__ = "2.4.2"
|
__version__ = "2.4.2.1"
|
||||||
__vername__ = "音符附加信息升级"
|
__vername__ = "音符附加信息升级"
|
||||||
__author__ = (
|
__author__ = (
|
||||||
("金羿", "Eilles"),
|
("金羿", "Eilles"),
|
||||||
@ -62,6 +62,7 @@ __all__ = [
|
|||||||
"MC_EILLES_RTBETA_INSTRUMENT_REPLACE_TABLE",
|
"MC_EILLES_RTBETA_INSTRUMENT_REPLACE_TABLE",
|
||||||
# Midi 与 游戏 的对照表
|
# Midi 与 游戏 的对照表
|
||||||
"MM_INSTRUMENT_RANGE_TABLE",
|
"MM_INSTRUMENT_RANGE_TABLE",
|
||||||
|
"MM_INSTRUMENT_DEVIATION_TABLE",
|
||||||
"MM_CLASSIC_PITCHED_INSTRUMENT_TABLE",
|
"MM_CLASSIC_PITCHED_INSTRUMENT_TABLE",
|
||||||
"MM_CLASSIC_PERCUSSION_INSTRUMENT_TABLE",
|
"MM_CLASSIC_PERCUSSION_INSTRUMENT_TABLE",
|
||||||
"MM_TOUCH_PITCHED_INSTRUMENT_TABLE",
|
"MM_TOUCH_PITCHED_INSTRUMENT_TABLE",
|
||||||
@ -131,6 +132,7 @@ from .constants import (
|
|||||||
MC_PITCHED_INSTRUMENT_LIST,
|
MC_PITCHED_INSTRUMENT_LIST,
|
||||||
# MIDI 到 我的世界 表
|
# MIDI 到 我的世界 表
|
||||||
MM_INSTRUMENT_RANGE_TABLE,
|
MM_INSTRUMENT_RANGE_TABLE,
|
||||||
|
MM_INSTRUMENT_DEVIATION_TABLE,
|
||||||
MM_CLASSIC_PITCHED_INSTRUMENT_TABLE,
|
MM_CLASSIC_PITCHED_INSTRUMENT_TABLE,
|
||||||
MM_CLASSIC_PERCUSSION_INSTRUMENT_TABLE,
|
MM_CLASSIC_PERCUSSION_INSTRUMENT_TABLE,
|
||||||
MM_TOUCH_PITCHED_INSTRUMENT_TABLE,
|
MM_TOUCH_PITCHED_INSTRUMENT_TABLE,
|
||||||
|
@ -874,14 +874,17 @@ class FutureMidiConvertM4(MidiConvert):
|
|||||||
|
|
||||||
totalCount = int(_note.duration / _apply_time_division)
|
totalCount = int(_note.duration / _apply_time_division)
|
||||||
|
|
||||||
if (
|
if totalCount == 0 or (
|
||||||
totalCount == 0
|
_note.get_info("PITCH") > 1.89 and _note.sound_name != "note.bass"
|
||||||
or (_note.get_info("PITCH") > 2 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 [
|
return [
|
||||||
_note,
|
_note,
|
||||||
]
|
]
|
||||||
@ -905,7 +908,7 @@ class FutureMidiConvertM4(MidiConvert):
|
|||||||
distance=_note.sound_distance + _i * _distance_slide,
|
distance=_note.sound_distance + _i * _distance_slide,
|
||||||
azimuth=(
|
azimuth=(
|
||||||
_note.sound_azimuth[0],
|
_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,
|
extra_information=_note.extra_info,
|
||||||
)
|
)
|
||||||
@ -952,7 +955,7 @@ class FutureMidiConvertM4(MidiConvert):
|
|||||||
|
|
||||||
if not note.percussive:
|
if not note.percussive:
|
||||||
notes_list.extend(
|
notes_list.extend(
|
||||||
self._linear_note(note, 2 * note.get_info("PITCH"))
|
self._linear_note(note, 2.75 / note.get_info("PITCH"))
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
notes_list.append(note)
|
notes_list.append(note)
|
||||||
|
@ -395,7 +395,8 @@ class MineNote:
|
|||||||
for i in range(k):
|
for i in range(k):
|
||||||
self.extra_info[key[i]] = value[i]
|
self.extra_info[key[i]] = value[i]
|
||||||
else:
|
else:
|
||||||
raise TypeError("参数类型错误")
|
# 提供简单报错就行了,如果放一堆 if 语句,降低处理速度
|
||||||
|
raise TypeError("参数类型错误;键:`{}` 值:`{}`".format(key, value))
|
||||||
|
|
||||||
def get_info(self, key: str) -> Any:
|
def get_info(self, key: str) -> Any:
|
||||||
"""获取附加信息"""
|
"""获取附加信息"""
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
[](https://github.com/TriM-Organization/Musicreater/stargazers)
|
[](https://github.com/TriM-Organization/Musicreater/stargazers)
|
||||||
[](https://github.com/TriM-Organization/Musicreater/forks)
|
[](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**:我的世界基岩版玩家,喜欢编程和音乐,深圳学生。
|
**诸葛亮与八卦阵 bgArray**:我的世界基岩版玩家,喜欢编程和音乐,深圳学生。
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user