MCMidi
MCMidi 是一个 Minecraft Fabric 模组,允许你在游戏中以高品质音效播放 MIDI 文件,并支持实时可视化。
功能
-
MIDI 播放:在 Minecraft 客户端中直接播放
.midi或.mid文件。 -
自定义 SoundFont:支持
.sf2SoundFont 文件,以自定义乐器音色。 -
实时可视化:专用的“Midi 控制中心”,包含多个可视化选项卡:
- 详情:实时 MIDI 消息日志、BPM 和播放位置。
- 节点:活动 MIDI 节点的可视化表示。(未实现。)
- 钢琴:显示活动音符的虚拟钢琴卷帘。(未实现。)
-
波形可视化:动态波形显示。(尚未实现。)
-
游戏内配置:与 Mod Menu 和 Cloth Config 集成,可无缝调整设置。
-
客户端命令:通过控制台命令快速控制播放。
命令用法
使用以下客户端命令管理 MIDI 播放:
/midi play <filename>:从本地库中播放一个 MIDI 文件。/midi stop:停止当前的 MIDI 播放。
使用方法
- 准备文件:
- 将
.midi或.mid文件放入 Minecraft 实例文件夹中的midi/musics/目录。 - (可选)将
.sf2SoundFont 文件放入midi/soundfonts/目录。
- 将
- 启动 Minecraft:按
,(默认按键绑定)打开 Midi Control Center。 - 配置设置:从主菜单打开模组菜单,找到 MCMidi,点击齿轮图标以调整音量或选择自定义 SoundFont。
已实现的架构
MCMidi 的设计注重模块化与可维护性:
- 依赖注入:使用抽象的
IConfigManager来处理配置,避免全局静态状态。 - 抽象标签页系统:利用
KarasunikiLib的ITabBar和ITabContent接口,提供灵活且可扩展的用户界面。 - 解耦的 MIDI 引擎:采用
IMidiEngine接口,使模组未来能够支持不同的 MIDI 驱动程序或外部设备。
依赖项
此模组需要以下库:
- Fabric API
- KarasunikiLib
- Cloth Config API
- Mod Menu(可选,建议用于配置界面)
贡献
欢迎贡献!如果您有建议、错误报告,或希望提交拉取请求,请遵循以下步骤:
- 克隆此仓库,并从
master分支创建你的分支。 - 提交你的更改,并确保提交信息清晰明了。
- 确保代码能够成功构建并通过所有现有检查。
- 提交拉取请求(Pull Request),并附上对更改内容的描述。
对于重大更改,请先创建一个 Issue 以讨论你希望做出的修改。
许可证
本项目采用 MIT 许可证授权。详情请参阅 LICENSE。
MCMidi
MCMidi is a Minecraft Fabric mod that allows you to play MIDI files in-game with high-quality sound and real-time visualization.
Features
- MIDI Playback: Play
.midior.midfiles directly within your Minecraft client. - Custom SoundFonts: Support for
.sf2SoundFont files to customize your instrument sounds. - Real-time Visualization: A dedicated "Midi Control Center" with multiple visualization tabs:
- Detail: Real-time MIDI message log, BPM, and playback position.
- Nodes: Visual representation of active MIDI nodes. (Not implemented.)
- Piano: A virtual piano roll showing active notes.(Not implemented.)
- Waveform: Dynamic waveform visualization. (Not implemented.)
- In-Game Configuration: Integrates with Mod Menu and Cloth Config for seamless setting adjustments.
- Client-Side Commands: Quick control over playback using console commands.
Command Usage
Manage your MIDI playback using the following client-side commands:
/midi play <filename>: Plays a MIDI file from your local library./midi stop: Stops the current MIDI playback.
How to Use
- Prepare your files:
- Place your
.midior.midfiles in themidi/musics/directory within your Minecraft instance folder. - (Optional) Place your
.sf2SoundFont files in themidi/soundfonts/directory.
- Place your
- Launch Minecraft: Open the Midi Control Center by pressing
,(default keybind). - Configure Settings: Open the Mod Menu from the main menu, find MCMidi, and click the gear icon to adjust volume or select a custom SoundFont.
Implemented Architecture
MCMidi is built with a focus on modularity and maintainability:
- Dependency Injection: Uses an abstracted
IConfigManagerto handle configuration without global static state. - Abstracted Tab System: Leverages
KarasunikiLib'sITabBarandITabContentinterfaces to provide a flexible and extensible UI. - Decoupled MIDI Engine: Uses the
IMidiEngineinterface, allowing the mod to support different MIDI drivers or external devices in the future.
Dependencies
This mod requires the following libraries:
- Fabric API
- KarasunikiLib
- Cloth Config API
- Mod Menu (Optional, recommended for configuration UI)
Contribution
Contributions are welcome! If you have suggestions, bug reports, or would like to submit a pull request, please follow these steps:
- Fork this repository and create your branch from
master. - Make your changes with clear commit messages.
- Ensure your code builds and passes any existing checks.
- Submit a pull request with a description of your changes.
For major changes, please open an issue first to discuss what you would like to change.
License
This project is licensed under the MIT License. See LICENSE for details.
下载 MCMidi
下载 MCMidi
下载 MCMidi
下载 MCMidi
下载 MCMidi
下载 MCMidi
下载 MCMidi
下载 MCMidi
下载 MCMidi
下载 MCMidi
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
AE2:一款流行的自动化与存储模组
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧