mirror of
https://github.com/TriM-Organization/Musicreater.git
synced 2026-04-17 06:08:00 +00:00
小修小补
This commit is contained in:
@@ -631,4 +631,4 @@ class LibraryPluginBase(TopPluginBase, ABC):
|
||||
)
|
||||
|
||||
# 怎么?
|
||||
# 插件的彼此依赖就不需要什么调用了吧
|
||||
# 插件的依赖项就不需要什么调用了吧
|
||||
|
||||
@@ -25,7 +25,7 @@ def enumerated_stuffcopy_dictionary(
|
||||
enumeration_times: int = 17, staff: T = {}
|
||||
) -> Dict[int, T]:
|
||||
"""
|
||||
生成一个字典,其中键从0到enumeration_times-1,值是staff的拷贝
|
||||
生成一个字典,其中键从 `0` 到 `enumeration_times-1`,值是 `staff` 的拷贝
|
||||
"""
|
||||
# 这告诉我们,你不能忽略任何一个复制的序列,因为它真的,我哭死,折磨我一整天,全在这个bug上了
|
||||
# 上面的这指的是 copy.deepcopy —— 金羿 来自 20260210
|
||||
|
||||
@@ -126,6 +126,11 @@ class SoundAtmos:
|
||||
dk1 * round(cos(radians(self.sound_azimuth[0])), 8),
|
||||
)
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return "SoundAtmos(d={}, rV={}, rH={})".format(
|
||||
self.sound_distance, *self.sound_azimuth
|
||||
)
|
||||
|
||||
|
||||
@dataclass(init=False)
|
||||
class SingleNote:
|
||||
@@ -445,7 +450,7 @@ class SingleTrack(List[SingleNote]):
|
||||
track_instrument: str = "",
|
||||
precise_time: bool = True,
|
||||
percussion: bool = False,
|
||||
sound_direction: SoundAtmos = SoundAtmos(),
|
||||
sound_direction: Optional[SoundAtmos] = None,
|
||||
extra_information: Dict[str, Any] = {},
|
||||
):
|
||||
self.name = track_name
|
||||
@@ -460,7 +465,8 @@ class SingleTrack(List[SingleNote]):
|
||||
self.is_percussive = percussion
|
||||
"""是否为打击乐器"""
|
||||
|
||||
self.sound_position = sound_direction
|
||||
# 如果不这样的话,所有的新的 SingleTrack 类都会有一个共同的声像方位
|
||||
self.sound_position = sound_direction if sound_direction else SoundAtmos()
|
||||
"""声像方位"""
|
||||
|
||||
self.extra_info = extra_information if extra_information else {}
|
||||
|
||||
Reference in New Issue
Block a user