LiveMusicalInstruments
简介
一款 Minecraft 插件,允许你现场演奏电子乐器并将表演实时广播给其他玩家。
注意:
该插件不适用于大多数共享 Minecraft 主机提供商,可能需要一些基本的计算机技能(运行 Python 脚本、配置路由器、编辑 JSON 文件)。
该插件最初是为个人使用而开发的,现在已公开,并可根据你自己的设备(目前仅支持鼓)和音频套件进行配置。
由于信息需要从你的电子设备传输到 Minecraft 服务器,因此在演奏和听到声音之间可能会出现一些延迟。
由于 Minecraft 不允许音频流媒体传输,因此改用 MIDI,并结合资源包内的音频套件(默认已包含一套鼓组)。
如果用户有需求,未来的更新可能会增加对其他乐器的支持。
下载
LiveMusicalInstruments.jar 插件 [在 Modrinth 上下载] [在 GitHub 上下载]
为了正常工作,此插件需要:
LiveMusicalInstrumentsPack.zip 服务端资源包 [下载]
- 第一个脚本
ListDevices.py,用于检测你的 MIDI 连接模块的确切名称 [下载]
- 第二个脚本
LiveMidiToMinecraft.py,用于捕获并向插件发送 MIDI 数据(已在 Windows 10 上测试) [下载]
- Python 用于运行上述两个脚本 [下载]
安装
该插件会打开一个 WebSocket 服务器以接收来自脚本的 MIDI 数据。因此,你需要配置路由器,在端口 3000 TCP 上创建一个 NAT/PAT FTP Data 规则。
- 通过 MIDI 将设备连接到你的电脑。
- 运行脚本
ListDevices.py 以检查是否检测到你的设备并获取其确切名称。
- 在你的路由器上,为端口 3000 TCP 创建 NAT/PAT FTP Data 规则。
- 在文本编辑器中打开脚本
LiveMidiToMinecraft.py 并配置以下内容:
- 你的 Minecraft 服务器的公共 IP 地址,后跟
:3000
- 你的 Minecraft 用户名(以便声音从游戏内的你的玩家处传播)
- 在步骤 2 中获取的 MIDI 设备名称
默认情况下,插件配置为 Alesis Crimson II 鼓组。你可以通过编辑 ǸOTE_MAP 来配置自己的设备(仅修改数字,不要修改名称)。如有需要,还可以自定义其他参数。
- 将
LiveMusicalInstruments.jar 安装到你的 Minecraft 服务器的 plugins 文件夹中,并启动服务器一次以在 plugins/LiveMusicalInstruments/ 中生成配置文件。
如有需要请进行编辑(更改后重启服务器)。
- 将
LiveMusicalInstrumentsPack.zip 资源包下载到你的 .minecraft/resourcepacks/ 文件夹中。
虽然已有默认套件,但若要自定义套件:
- 在你的资源包中,于
assets/minecraft/sounds/drums/ 下,按照与 drum_kit_default 相同的结构和命名约定创建你自己的文件夹。
- 然后,在
assets/minecraft/sounds.json 中,参照 drum_kit_default 示例添加你的自定义音频文件。
- 在
config.yml 中配置你的自定义套件。
- 在 Minecraft 中运行
/live start drums,然后启动 LiveMidiToMinecraft.py。
Minecraft 聊天栏中应出现一条消息,确认你已连接并准备好演奏。
(所有玩家都必须安装该资源包才能听到你的演奏。)
运行 /live stop drums 停止演奏。
如果出现指示 WebSocket 服务器仍在运行的错误,请重启服务器并正确关闭 WebSocket。
LiveMusicalInstruments
About
Minecraft plugin that lets you play electronic instruments live and broadcast the performance to players in real time.
Note:
This plugin is not intended for most shared Minecraft hosting providers and may require some basic computer skills (running a Python script, configuring your router, editing a JSON file).
The plugin, originally developed for personal use, is now public and configurable for your own equipment (currently only drums are supported) and your own audio kit.
Some latency may occur between playing and hearing the audio, due to the transfer of information from your electronic device to the Minecraft server.
Since Minecraft doesn't allow audio streaming, MIDI is used instead, combined with an audio kit inside a resource pack (a default drum kit is already included).
Future updates may include support for additional instruments if requested by users.
Download
LiveMusicalInstruments.jar plugin [Download on Modrinth] [Download on GitHub]
To work properly, this plugin requires:
- A
LiveMusicalInstrumentsPack.zip server resource pack [Download]
- A first
ListDevices.py script to detect the exact name of your MIDI-connected module [Download]
- A second
LiveMidiToMinecraft.py script to capture and send MIDI data to the plugin (tested on Windows 10) [Download]
- Python to run both scripts [Download]
Installation
The plugin opens a Web Socket server to receive MIDI data from the script. You'll therefore need to configure your router to create a NAT/PAT FTP Data rule on port 3000 TCP.
- Connect your device to your PC via MIDI.
- Run the script
ListDevices.py to check if your device is detected and to get its exact name.
- On your router, create a NAT/PAT FTP Data rule for port 3000 TCP.
- Open the script
LiveMidiToMinecraft.py in a text editor and configure the following:
- The public IP of your Minecraft server with
:3000
- Your Minecraft username (so the sound propagates from your player in-game)
- The name of your MIDI device retrieved in step 2
By default, the plugin is configured for an Alesis Crimson II drum kit. You can configure your own device by editing ǸOTE_MAP (only modify the numbers, not the names). Other parameters can also be customized if needed.
- Install the
LiveMusicalInstruments.jar into the plugins folder of your Minecraft server and start your server once to generate the config file in plugins/LiveMusicalInstruments/.
Edit if needed (restart the server after changes).
- Download the
LiveMusicalInstrumentsPack.zip resource pack in your .minecraft/resourcepacks/ folder.
There is already a default kit but,
For custom kits:
- In your resource pack, under
assets/minecraft/sounds/drums/, create your own folder following the same structure and naming convention as drum_kit_default.
- Then, in
assets/minecraft/sounds.json, add your custom audio files by following the drum_kit_default example.
- Configure your custom kit in
config.yml.
- Run in Minecraft
/live start drums, then launch LiveMidiToMinecraft.py.
A message should appear in Minecraft chat confirming that you are connected and ready to play.
(All players must have the resource pack installed in order to hear you perform.)
/live stop drums to stop.
If an error appears indicating that the WebSocket server is still running, restart the server and close the WebSocket properly.
评论 0
登录后参与评分
还没有评论,来抢沙发吧