mirror of
https://github.com/TriM-Organization/Musicreater.git
synced 2026-07-26 18:22:26 +00:00
Compare commits
5 Commits
v3.0.0-beta
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
| de2c39969a | |||
| 6a0d21d16c | |||
| 07d39ca333 | |||
| 0f19edb4bd | |||
| 8e1afb507d |
@@ -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
|
||||
|
||||
@@ -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
@@ -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
@@ -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
|
||||
|
||||
@@ -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
@@ -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
@@ -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" }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user