Compare commits

...

5 Commits

Author SHA1 Message Date
Eilles de2c39969a 音乐合成插件:采样率参数名称精确化 2026-07-26 20:20:01 +08:00
Eilles 6a0d21d16c 拷贝音轨带名字 2026-07-26 04:51:56 +08:00
Eilles 07d39ca333 基岩版小数位是有有效位控制的,放那么多没用 2026-07-26 03:37:11 +08:00
Eilles 0f19edb4bd 注释更正 2026-07-25 11:31:55 +08:00
Eilles 8e1afb507d 修改项目描述,使之更符合当下开发现状 2026-07-23 01:55:22 +08:00
10 changed files with 30 additions and 24 deletions
+3 -2
View File
@@ -2,10 +2,11 @@
"""
音·创
是一款免费开源的《我的世界》数字音频支持库。
是一款免费开源、高性能、插件化的《我的世界》数字音频支持库。
Musicreater (音·创)
A cost free and open-source library for handling with **Minecraft** digital music.
A cost free, open-source, blazing fast and plugin-
supported library for editing _Minecraft_ digital music.
版权所有 © 2026 睿乐组织
Copyright © 2026 TriM-Organization
+1 -1
View File
@@ -219,7 +219,7 @@ class PluginMetaInformation(ABC):
"""插件版本号"""
type: PluginTypes
"""插件类型"""
license: str = "MIT License"
license: str
"""插件发布时采用的许可协议"""
dependencies: Sequence[str] = tuple()
"""插件是否对其他插件存在依赖"""
@@ -74,7 +74,7 @@ class PcmConversionConfig(PluginConfig):
"""
没看懂这个参数的意思
"""
sample_rate: int = 44100
target_sample_rate: int = 44100
"""
目标输出的采样率
"""
@@ -122,7 +122,7 @@ class NoteDataConvert2PcmPlugin(MusicOutputPluginBase):
resource_folder=config.assets_path,
synthesis_mode=config.synthesis_mode,
overlay_mode=config.overlay_mode,
sample_rate=config.sample_rate,
target_sample_rate=config.target_sample_rate,
value_get_method=config.value_get_method,
pitch_accuracy_decimals=config.pitch_accuracy_decimals,
music_volume=config.global_volume,
@@ -141,7 +141,7 @@ class NoteDataConvert2PcmPlugin(MusicOutputPluginBase):
resource_folder=config.assets_path,
synthesis_mode=config.synthesis_mode,
overlay_mode=config.overlay_mode,
sample_rate=config.sample_rate,
target_sample_rate=config.target_sample_rate,
value_get_method=config.value_get_method,
pitch_accuracy_decimals=config.pitch_accuracy_decimals,
music_volume=config.global_volume,
@@ -91,7 +91,7 @@ class MusicPreview:
resource_folder: Path,
synthesis_mode: Literal[0, 1, 2, 3, 4] = 1,
overlay_mode: Literal[1, 2] = 1,
sample_rate: int = 44100,
target_sample_rate: int = 44100,
value_get_method: Literal[0, 1] = 1,
pitch_accuracy_decimals: int = 0,
music_volume: float = 1,
@@ -100,7 +100,7 @@ class MusicPreview:
self.mode = synthesis_mode
self.overlay_mode_c = overlay_mode
self.output_sample_rate = sample_rate
self.output_sample_rate = target_sample_rate
self.get_value_method = value_get_method
self.resources_path = resource_folder
@@ -526,7 +526,7 @@ class NoteDataConvert2CommandPlugin(LibraryPluginBase):
.replace("(", r"{")
.replace(")", r"}")
)
+ "playsound {} @s ^{} ^{} ^{} 3.0 {} {}".format(
+ "playsound {} @s ^{:.4f} ^{:.4f} ^{:.4f} 3.0 {:.6f} {}".format(
track.instrument,
*relative_coordinates,
1.0 if note.percussive else mc_pitch,
@@ -603,7 +603,7 @@ class NoteDataConvert2CommandPlugin(LibraryPluginBase):
MineCommand(
command=(
execute_command_head.format(player_selector)
+ "playsound {} @s ^{} ^{} ^{} 3.0 {} {}".format(
+ "playsound {} @s ^{:.4f} ^{:.4f} ^{:.4f} 3.0 {:.6f} {}".format(
note.instrument,
*relative_coordinates,
1.0 if note.percussive else mc_pitch,
@@ -630,7 +630,8 @@ class NoteDataConvert2CommandPlugin(LibraryPluginBase):
if music_command_list:
return (
music_command_list,
last_note.start_tick + last_note.duration_tick,
last_note.start_tick # pyright: ignore[reportPossiblyUnboundVariable]
+ last_note.duration_tick, # pyright: ignore[reportPossiblyUnboundVariable]
max_multi + 1,
)
else:
+3 -2
View File
@@ -529,7 +529,7 @@ class SingleTrack(List[SingleNote]):
"""该音轨是否启用"""
instrument: Instrument
"""乐器ID"""
"""该音轨所用的乐器"""
is_high_time_precision: bool
"""该音轨是否使用高精度时间"""
@@ -596,7 +596,7 @@ class SingleTrack(List[SingleNote]):
self.instrument = (
track_instrument if track_instrument else DefaultInstrument.HARP.value
)
"""乐器ID"""
"""该音轨所用之乐器"""
self.is_high_time_precision = precise_time
"""是否使用高精度时间"""
@@ -759,6 +759,7 @@ class SingleTrack(List[SingleNote]):
if self.is_high_time_precision
else [x for x in self if start_time <= x.start_time <= end_time]
),
track_name="副本 "+self.name,
track_instrument=self.instrument.copy(),
precise_time=self.is_high_time_precision,
percussion=self.is_percussive,
+3 -2
View File
@@ -3,10 +3,11 @@
"""
音·创
是一款免费开源的《我的世界》数字音频支持库。
是一款免费开源、高性能、插件化的《我的世界》数字音频支持库。
Musicreater (音·创)
A cost free and open-source library for handling with **Minecraft** digital music.
A cost free, open-source, blazing fast and plugin-
supported library for editing _Minecraft_ digital music.
版权所有 © 2026 睿乐组织
Copyright © 2026 TriM-Organization
+5 -4
View File
@@ -45,15 +45,16 @@
欢迎加群[861684859](https://jq.qq.com/?_wv=1027&k=hpeRxrYr)
> **注意** 本仓库内的项目仅仅是支持库其用户为基岩版音乐相关软件的开发者
>
> 面向常规用户的 **基岩版音乐转换工具** 请参阅[伶伦转换器](../../../Linglun-Converter)已停止更新
>
> **注意** 本仓库内的项目仅仅是支持库其用户为基岩版音乐相关软件的开发者 \
> 面向常规用户的 **基岩版音乐转换工具** 请参阅[伶伦转换器](../../../Linglun-Converter)已停止更新 \
> 我们也正在开发面向高级用户的 **基岩版音乐编辑工具**数字音频工作站[伶伦](../../../LinglunStudio)
## 安装 🔳
> 理论适用版本Python 3.8 \
> 实际开发版本Python 3.10
使用 pypi 直接安装
- ```bash
+5 -4
View File
@@ -43,15 +43,16 @@ Musicreater is a cost free, open-source, highly optimized library designed for e
Welcome to join our QQ group: [861684859](https://jq.qq.com/?_wv=1027&k=hpeRxrYr)
> **NOTICE** The project inside this repository is only a supportive library, which is mainly for the developers of music related software for _Minecraft: Bedrock Edition_.
>
> The _Bedrock Edition music convertor_ which is for common users is in [Linglun Converter](../../../Linglun-Converter). [Archived]
>
> **NOTICE** The project inside this repository is only a supportive library, which is mainly for the developers of music related software for _Minecraft: Bedrock Edition_. \
> The _Bedrock Edition music convertor_ which is for common users is in [Linglun Converter](../../../Linglun-Converter). [Archived] \
> We are also developing a _BE music editor_, a new _Minecraft_ digital audio workstation(DAW): [Linglun](../../../LinglunStudio)
## Installation 🔳
> Supported Version: Python 3.8 \
> Development Under: Python 3.10
- Via pypi
```bash
+1 -1
View File
@@ -18,7 +18,7 @@
{ name = "金羿Eilles", email = "EillesWan@outlook.com" },
]
description = "A free open source library used for dealing with **Minecraft** digital musics."
description = "A blazing fast and plugin-supported library for editing _Minecraft_ digital music."
readme = "README_EN.md"
license = { file = "LICENSE.md" }