Audio Synth - 声音合成模块
Audio Synth 是一个 Minecraft Forge 模组,添加了一个能够合成并播放多种波形的自定义方块——Sound Synthesizer。它支持正弦波、方波、三角波、锯齿波及白噪声,具备频率调制、混合输出、独立音量控制、红石激活、基于距离的衰减以及简单的图形界面配置功能。全局音量可通过模组的配置屏幕进行调整,每个方块也可以设置独立的分贝增益。
✨ 特性
- ? 多种波形: 正弦波、方波、三角波、锯齿波、白噪声
- ? 频率调制: 支持 FM 合成,可调节调制深度和频率
- ? 混合输出: 可调节混合因子(保留用于扩展;当前版本使用单一波形)
- ? 独立音量控制: 每个方块的分贝增益调节(-60dB ~ +60dB)
- ? 范围衰减: 可配置的声音传播范围(以方块为单位);超出范围后无声,且在范围内随距离衰减音量
- ? 红石激活: 接收到红石信号时开始播放,信号丢失时停止
- ? GUI 配置: 右键点击方块打开配置界面,实时调整参数,点击“Apply”保存并关闭
- ⚙️ 全局音量: 通过模组配置屏幕(Mods → Audio Synth → Config)调整所有方块的全局音量倍增器
- ? 条件配方: 根据是否安装 Create 模组及其版本,自动适配三种不同的合成配方
- ? 线程安全: 音频播放运行在独立线程上,支持多个方块同时发声
? 依赖项
- Minecraft Forge 47.4.4+ (适用于 1.20.1)
- Create Mod (可选): 如果已安装,配方会根据其版本自动调整
注意:全局音量配置界面需要 Forge 的 Mods 菜单支持;无需额外模组。
? 安装方法
- 安装 Minecraft Forge 1.20.1。
- 下载本模组的
.jar 文件并将其放入 mods 文件夹。
- (可选)如果您希望使用其配方,请安装对应版本的 Create 模组。
- 启动游戏。
? 使用指南
获取方块
- 按照配方合成 Sound Synthesizer(见下文)。
放置与激活
- 放置后,右键点击以打开 GUI 并配置参数。
- 施加红石信号(例如拉杆、红石粉)以开始播放。
- 移除红石信号会停止播放。
GUI 参数
| 参数 |
描述 |
范围 |
| Frequency (Hz) |
基础频率 |
20 ~ 2000 |
| Waveform |
选择波形类型 |
Sine/Square/Triangle/Sawtooth/Noise |
| Mix Factor |
预留(当前固定为 0.5) |
0.0 ~ 1.0 |
| Modulation Depth |
频率调制深度 |
0.0 ~ 1.0 |
| Modulation Frequency (Hz) |
调制频率 |
0.1 ~ 20 |
| Range (blocks) |
声音传播范围 |
1 ~ 64 |
| Volume (dB) |
每个方块的独立音量增益 |
-60 ~ +60 |
全局音量配置
- 在主菜单中,点击 Mods → 选择 Audio Synth → 点击 Config。
- 使用滑块调整全局音量倍增器(0.0 ~ 2.0),点击“Done”保存。
? 合成配方
配方会根据是否安装 Create 模组及其版本自动适应。
情况 1:Create 版本 ≥ 6.0
- 配方类型: 无序合成 (Shapeless)
- 材料:
- 1 × Brass Casing (
create:brass_casing)
- 1 × Note Block (
minecraft:note_block)
- 1 × Pulse Timer (
create:pulse_timer)
- 1 × Electron Tube (
create:electron_tube)
情况 2:Create 版本 ≥ 0.5 且 < 6.0
- 配方类型: 无序合成 (Shapeless)
- 材料:
- 1 × Brass Casing (
create:brass_casing)
- 1 × Note Block (
minecraft:note_block)
- 1 × Electron Tube (
create:electron_tube)
- 1 × Pulse Extender (
create:pulse_extender)
- 2 × Pulse Repeaters (
create:pulse_repeater)
情况 3:未安装 Create 或版本 < 0.5
- 配方类型: 有序合成 (Shaped, 3×3)
- 图案:
G C G
R N R
G C G
- 材料:
- G = Gold Ingot (
minecraft:gold_ingot)
- R = Redstone Repeater (
minecraft:repeater)
- N = Note Block (
minecraft:note_block)
- C = Redstone Comparator (
minecraft:comparator)
- 产出: 1 × Sound Synthesizer
游戏会自动检测环境并加载正确的配方。JEI 等模组将显示相应的配方。
⚙️ 配置文件
客户端配置文件位于 .minecraft/config/audiosynth-client.toml:
[Audio Settings]
# 所有声音生成方块的全局音量倍增器 (0.0 - 2.0)
globalVolume = 1.0
可以通过 Mods 菜单中的 Config 按钮进行修改,或直接编辑该文件。
? 开发信息
- Mod ID:
audiosynth
- 主类:
top.hibermod.audiosynth.AudioSynth
- MCP Mappings: official 1.20.1
- Forge Version: 47.4.4
构建
使用 Gradle 进行构建:
./gradlew build
输出文件将在 build/libs/ 中。
? 许可证
本项目在 MIT License 下开源。详情请参阅 LICENSE 文件。
? 致谢
- 感谢 Forge 团队提供的模组开发框架
- 感谢 Create 模组提供的优秀机械组件
- 感谢所有使用和测试本模组的玩家
? 反馈与支持
如有问题或建议,请在项目的 GitHub Issues 页面提交。
享受你的声波实验! ?
Audio Synth - Sound Synthesizer Module
Audio Synth is a Minecraft Forge mod that adds a custom block capable of synthesizing and playing multiple waveforms—the Sound Synthesizer. It supports Sine, Square, Triangle, Sawtooth waves, and White Noise, featuring frequency modulation, mixed output, independent volume control, redstone activation, range-based attenuation, and a simple GUI configuration interface. Global volume can be adjusted via the mod's configuration screen, and each block can have its own decibel gain setting.
✨ Features
- ? Multiple Waveforms: Sine, Square, Triangle, Sawtooth, White Noise
- ? Frequency Modulation: Supports FM synthesis with adjustable modulation depth and frequency
- ? Mixed Output: Adjustable mix factor (reserved for extension; current version uses a single waveform)
- ? Independent Volume Control: Per-block decibel gain adjustment (-60dB ~ +60dB)
- ? Range Attenuation: Configurable sound propagation range (in blocks); silent beyond range, with distance-based volume falloff
- ? Redstone Activation: Starts playing upon receiving a redstone signal, stops when signal is lost
- ? GUI Configuration: Right-click the block to open the configuration interface, adjust parameters in real-time, click "Apply" to save and close
- ⚙️ Global Volume: Adjust the global volume multiplier for all blocks via the mod configuration screen (Mods → Audio Synth → Config)
- ? Conditional Recipes: Automatically adapts to three different crafting recipes based on whether the Create mod is installed and its version
- ? Thread Safety: Audio playback runs on independent threads, supporting simultaneous sound from multiple blocks
? Dependencies
- Minecraft Forge 47.4.4+ (for 1.20.1)
- Create Mod (Optional): If installed, the recipe adjusts automatically based on its version
Note: The global volume configuration screen requires Forge's Mods menu support; no additional mods are needed.
? Installation
- Install Minecraft Forge 1.20.1.
- Download the
.jar file for this mod and place it in the mods folder.
- (Optional) Install the corresponding version of the Create mod if you wish to use its recipes.
- Launch the game.
? Usage Guide
Obtaining the Block
- Craft the Sound Synthesizer according to its recipe (see below).
Placement and Activation
- After placement, right-click to open the GUI and configure parameters.
- Apply a redstone signal (e.g., lever, redstone dust) to start playback.
- Removing the redstone signal stops playback.
GUI Parameters
| Parameter |
Description |
Range |
| Frequency (Hz) |
Base frequency |
20 ~ 2000 |
| Waveform |
Select waveform type |
Sine/Square/Triangle/Sawtooth/Noise |
| Mix Factor |
Reserved (currently fixed at 0.5) |
0.0 ~ 1.0 |
| Modulation Depth |
Frequency modulation depth |
0.0 ~ 1.0 |
| Modulation Frequency (Hz) |
Modulation frequency |
0.1 ~ 20 |
| Range (blocks) |
Sound propagation range |
1 ~ 64 |
| Volume (dB) |
Per-block independent volume gain |
-60 ~ +60 |
Global Volume Configuration
- From the main menu, click Mods → Select Audio Synth → Click Config.
- Adjust the global volume multiplier using the slider (0.0 ~ 2.0), click "Done" to save.
? Crafting Recipes
The recipe automatically adapts based on whether the Create mod is installed and its version.
Case 1: Create version ≥ 6.0
- Recipe Type: Shapeless
- Materials:
- 1 × Brass Casing (
create:brass_casing)
- 1 × Note Block (
minecraft:note_block)
- 1 × Pulse Timer (
create:pulse_timer)
- 1 × Electron Tube (
create:electron_tube)
Case 2: Create version ≥ 0.5 and < 6.0
- Recipe Type: Shapeless
- Materials:
- 1 × Brass Casing (
create:brass_casing)
- 1 × Note Block (
minecraft:note_block)
- 1 × Electron Tube (
create:electron_tube)
- 1 × Pulse Extender (
create:pulse_extender)
- 2 × Pulse Repeaters (
create:pulse_repeater)
Case 3: Create not installed or version < 0.5
- Recipe Type: Shaped (3×3)
- Pattern:
G C G
R N R
G C G
- Materials:
- G = Gold Ingot (
minecraft:gold_ingot)
- R = Redstone Repeater (
minecraft:repeater)
- N = Note Block (
minecraft:note_block)
- C = Redstone Comparator (
minecraft:comparator)
- Output: 1 × Sound Synthesizer
The game automatically detects the environment and loads the correct recipe. Mods like JEI will display the corresponding recipe.
⚙️ Configuration File
The client configuration file is located at .minecraft/config/audiosynth-client.toml:
[Audio Settings]
# Global volume multiplier for all sound generator blocks (0.0 - 2.0)
globalVolume = 1.0
It can be modified via the Config button in the Mods menu or by directly editing the file.
? Development Information
- Mod ID:
audiosynth
- Main Class:
top.hibermod.audiosynth.AudioSynth
- MCP Mappings: official 1.20.1
- Forge Version: 47.4.4
Building
Use Gradle to build:
./gradlew build
The output will be in build/libs/.
? License
This project is open-sourced under the MIT License. See the LICENSE file for details.
? Acknowledgements
- Thanks to the Forge team for the mod development framework
- Thanks to the Create mod for its excellent mechanical components
- Thanks to all players who use and test this mod
? Feedback & Support
For questions or suggestions, please submit them on the project's GitHub Issues page.
Enjoy your sonic experiments! ?
评论 0
登录后参与评分
还没有评论,来抢沙发吧