Noteblocks Live

此插件允许使用音符盒声音实时播放 Midi、Noteblock Studio 以及自定义制作的歌曲。虽然用于播放自定义音乐很有趣,但它最实用的地方在于作为其他项目播放音乐的工具。
? 警告 - (早期开发阶段)
该插件仍处于早期开发阶段!!许多功能仍在规划中,且可能存在一些漏洞。我已经进行了大量测试,但仅靠我一个人。请报告任何发现的漏洞,并随时提出功能建议。
需求
⚠️ 资源包使用
为了获得最佳功能体验,需要安装资源包。默认情况下,该资源包将被放置在 Plugins 文件夹中,并通过 GitHub 为玩家加载。如果没有它,许多歌曲的音效将不正确。
如果您不希望使用它,或者希望将其单独集成到您自己的资源包中,可以在配置文件中禁用资源包加载功能。
✅ 功能与用途
- 在游戏中实时播放自定义歌曲
- 将歌曲添加到 /MCMidi/songs 文件夹
- 歌曲可以是 nbs 或 midi 文件;如果您有专为该插件制作的自定义歌曲,也可以使用 YML 或 TXT 文件。
- 歌曲可以放在文件夹中,插件仍能正常读取它们。
- 使用 /songs reload 命令更新服务器上加载的歌曲。
- 歌曲可以从实体、位置播放,或直接播放给玩家。
- 歌曲可以排队、循环和跳过。
- 每个歌曲播放器都可以单独调整音量。
完整的命令列表请参阅 此处
? 演示
Undertale - Asgore (NBS)
Deltarune - Cutie Mew Mew Magic (NBS)
Deltarune - VS Susie (Midi)
Deltarune - Petal Dance (Midi)
? 寻找歌曲
通常我在寻找歌曲时,首选是使用 NBS 歌曲,因为它们是为 Minecraft 音符盒制作的。我发现的最佳来源是
您也可以在 找到许多 Midi 歌曲。
虽然我建议使用 NBS,但市面上有很多 Midi 版本的歌曲,所以有时这是唯一的选择。
? 报告问题
若要报告漏洞、请求新功能或寻求其他帮助,欢迎加入 Discord,或在 GitHub 上创建 Issue。
此外,本插件的开发工作分散在漫长的时间段内。因此,部分说明可能存在错误,或者不如预期完善。如果对本插件的任何文档有任何疑问或缺失之处,请联系我。
? 目前支持的文件格式
- Midi
- NBS - 标记为音符盒兼容的 NBS 歌曲在禁用资源包的情况下也能正常工作。否则,需要资源包才能运行。
- YML - 使用下方的自定义音乐格式。每个条目将被读取为字符串,其中位置即为歌曲名称。
- TXT - 同样使用下方的自定义音乐格式。期望文件中包含单个字符串。歌曲标题将使用文件名。也支持 .nbl 扩展名。
? 自定义格式
用于编写音乐的自定义格式是一种简单的文本格式。每个音符的不同部分由分号分隔,音符之间由空格分隔。
格式如下:
[乐器];[八度];[音高];[升半音];[后暂停];[音量]
或
[乐器];[八度];[音高];[升半音];[后暂停]
最后一个分号及其后的音量是可选的,默认情况下将以全音量播放。
- 乐器就是游戏中的乐器名称。
- 八度是以默认值为基准的偏移量。比正常高一个八度为 1,低一个八度为 -1。
- 音高是音符的字母音调。
- 这是一个单字母,表示音符是否升半音。s 表示升半音,f(或其他任何字母)表示不升半音。
- 后暂停是指到下一个音符的时间(纳秒)。
- 同时演奏的两个音符,第一个列出的音符的后暂停时间为 0,第二个音符的暂停时间则是到下一个音符的时间。
- 音量是一个 0 到 1 之间的数字,表示音量大小。1 为全音量,0 为静音。
示例 - 竖琴上的 A 音:harp;0;a;f;0
示例 - 半音量的竖琴上的 A 音:harp;0;a;f;0;0.5
这是默认 Minecraft 乐器的标准用法。通过使用完整的音效键,可以使用额外的声音:
示例 - 默认的烟花爆炸音效(默认为 F 升音):minecraft:entity.firework_rocket.blast;0;f;s;0
使用 Minecraft 的音效键或资源包中的其他声音时,不能使用前缀 "custom:",因为该前缀保留用于已注册的自定义乐器。
自定义乐器
支持自定义乐器。如上所示,可以使用自定义声音,也可以使用自定义乐器实现。
自定义乐器工具仅旨在用于非常特定的用途,并且经过测试的程度远低于其他部分。建议在歌曲中直接使用上述完整的声音名称设置。
警告:自定义乐器系统最初是作为测试开发的。它未经充分测试,很可能存在漏洞和其他问题。如有任何问题,请联系我。
自定义乐器允许在游戏中拥有更高级的乐器。除了具备带有扩展范围的正常声音功能外,它还支持持续按住等特性,从而允许具有动态长度的声音。
了解更多关于自定义乐器实现的工作原理,请参阅 INSTRUMENTS.md
☐ 计划中的功能(潜在)
- 添加音乐淡出 / 过渡效果
- 添加仅在每首歌曲开始时显示的“正在播放”显示选项。
- 添加更深入的播放列表功能
- 添加暂停和取消暂停功能
- 添加用于调节歌曲音调高低的歌曲播放器控制功能
- 添加歌曲编辑功能
- 可能包括编辑音调、速度或替换乐器等功能
- 提供复制歌曲或编辑原始歌曲的模式
- 为简化操作,应将文件保存为自定义格式
- 添加游戏内下载功能
待办事项
- 进一步通用化歌曲播放器代码
- 进一步细分播放器类型以移除不必要的方法(即在单人模式播放器中添加和移除播放器方法)
- 将歌曲选择代码拆分为歌曲命令中的独立方法。
- 目前该代码被多次复用,而每个函数执行的都是相同的选择操作。
Noteblocks Live

This plugin allows for the playing of Midi, Noteblock Studio, and custom-made songs live using noteblock sounds. While it is fun to use for playing custom music, it is most useful as a tool for other projects to play music.
? WARNING - (EARLY DEVELOPMENT)
This plugin is in early development!! There are still many features planned, and there may be some bugs. I have done a lot of testing, but am only one person. Please report any bugs, and feel free to request features.
Requirements
⚠️ RESOURCE PACK USAGE
FOR BEST FUNCTIONALITY, A RESOURCE PACK IS REQUIRED. BY DEFAULT THIS WILL BE PUT IN THE PLUGINS FOLDER, AND LOADED FOR PLAYERS FROM GITHUB. MANY SONGS WONT SOUND RIGHT WITHOUT IT.
The pack loading can be disabled in the config if you would prefer not to use it, or want to integrate it into your own pack separately.
✅ Features and utility
- Play custom songs live in game
- Add songs to the /MCMidi/songs folder
- Songs can be nbs or midi files, and if you have a custom song made for the plugin, can use YML or TXT files.
- Songs can be in folders, the plugin will still be able to read them.
- Use /songs reload to update the songs loaded on the server.
- Songs can be played from an entity, from a location, or directly to players.
- Songs can be queued, looped, and skipped.
- Each song player can have its volume updated individually.
A full breakdown of commands can be found here
? Demos
Undertale - Asgore (NBS)
Deltarune - Cutie Mew Mew Magic (NBS)
Deltarune - VS Susie (Midi)
Deltarune - Petal Dance (Midi)
? Finding Songs
Usually when I am looking for a song, my go to is to use an NBS song, as they are made with minecraft noteblocks. The best place I have found for these is
You can also find many Midi songs at
While I suggest NBS, there are a lot more Midi renditions of songs out there, so sometimes it is the only option.
? Reporting issues
To report bugs, ask for features, or seek help in other ways, feel free to join the discord, or create an issue on the github.
Also, development of this plugin has been spread out over long periods of time. As such, some explanations may have mistakes, or be less than would be hoped for. Please reach out with any issues or gaps in any of the docs made for this plugin.
? Currently supported file formats
- Midi
- NBS - NBS songs marked as noteblock compatible will work with the resource pack disabled. Otherwise, the resource pack will be needed to function.
- YML - Uses the custom music format below. Each entry will be read as a string, with the location being the name of the song.
- TXT - Also uses the custom music format below. Expects a single string in the file. Song title will be the file name. Also works with the file extension .nbl
? Custom format
The custom format used for writing music is a simple text format. Different parts of each note are separated by semicolons, and notes are separated by spaces.
The format is as follows:
[instrument];[octave];[tone];[sharp];[postPause];[volume]
or
[instrument];[octave];[tone];[sharp];[postPause]
The last semicolon along with volume is optional, and will by default play at full volume.
- The instrument is just the instrument name in game.
- The octave is measured as a shift from the default. An octave above normal is 1, an octave below is -1.
- Tone is the letter tone of the note.
- This is a single letter for if the note is sharp or not. s for sharp, and f (or any other letter) for not sharp.
- The post pause is the time in nanoseconds until the next note.
- 2 notes played at the same time will have a 0 as the post pause for the first note listed, and the pause for the second one being the time to the next note.
- Volume is a number from 0 to 1 denoting volume. 1 is full volume, 0 is off.
Example - An A note on the harp: harp;0;a;f;0
Example - An A note on the harp at half volume: harp;0;a;f;0;0.5
This is the standard usage for the default minecraft instruments. Additional sounds are available by using the full sound key:
Example - The default fire rocket blast sound (default sound is f sharp): minecraft:entity.firework_rocket.blast;0;f;s;0
Using sound keys for minecraft, or other sounds in a resource pack cannot use the prefix "custom:", as that prefix is reserved for registered custom instruments.
Custom Instruments
Custom instruments are supported. Custom sounds can be used, as shown above, but custom instrument implementation can also be used.
The custom instrument tools are only meant for very specific usage, and has undergone far less testing than everything else. It is suggested to just use the above full sound name setup in songs.
WARNING: THE CUSTOM INSTRUMENT SYSTEM WAS MADE AS A TEST. IT IS UNDER TESTED, LIKELY PRONE TO BUGS AND OTHER ISSUES. PLEASE REACH OUT WITH ANY PROBLEMS.
Custom instruments allow for more advanced musical instruments in the game. While it adds the normal functionality of sounds with an extended range, it also supports things like held notes, allowing for sounds with dynamic lengths.
Learn more about how the custom instrument implementation works in INSTRUMENTS.md
☐ Planned features (potential)
- Add music fading / transitions
- Add a now playing display option which only shows at the start of each song.
- Add more in depth playlists
- Add pause and unpause
- Add a song player control to pitch a song up or down
- Make speed controls change pitch?
- Add song editing features
- Could include things like editing pitch, speed, or replacing instruments
- Have a mode to copy the song or edit the original
- Should save the file in the custom format for simplicity
- Add an in-game download feature
- Allow players to use a link or other method to pull songs and load them
ToDo
- Generalize more of the song player code
- Further split player types to remove unnecessary methods (i.e. add and remove player methods in single player players)
- Split the song player selection code into its own method in the song command.
- At the moment it is reused so many times, when each function does the same selection.
评论 0
登录后参与评分
还没有评论,来抢沙发吧