Notematic Player
Notematic Player 是一款 Minecraft Java 版插件,作为 Notematic Studio 的配套玩家端工具。它可以将工作室导出的 .json 或 .mcfunction 格式的自定义音符盒音乐序列直接播放给玩家,或在世界中的特定位置播放。除了标准的音符盒声音外,它还可以直接播放任何游戏内的 /playsound 音频(包括自定义资源包的声音)。
功能特性
- 自定义音乐播放: 播放自定义的音符盒编排曲目。支持公共和私有文件夹,仅限管理员访问控制。
- 内置 MIDI 转换器: 使用
/notematic create 命令在游戏内直接下载并转换 MIDI 文件。
- 每位玩家的独立音量: 每位玩家都可以通过
/notematic volume <val> 调整自己的个人收听音量(按 UUID 保存设置)。
- 离线同步: 如果玩家断开连接,播放会在虚拟状态下继续计时,并在他们重新加入时恢复同步。
- 唱片机持久循环: 基于位置的循环播放会在服务器重启或崩溃后保持持久化。
- Notematic Studio 配套: 直接播放从 Notematic Studio MIDI 转换工具导出的文件。
官方插件
一款基于 Notematic Player 引擎构建的官方子插件。它使用数字信号处理 (DSP) 来分析文本转语音音频,提取共振峰频率,并将它们动态映射到 Minecraft 的声音系统中,使音符盒能够实时“说话”。
- 实时游戏内语音: 通过
/<command> <prompt> 使用音符盒大声说话。
- 6 个八度音域: 智能地将重叠的频率映射到 5 种音符盒乐器(低音、吉他、竖琴、长笛、钟)上,从而绕过 Minecraft 默认的 2 个八度限制。
- 100% 服务端运行: 玩家无需安装模组或资源包。完全兼容原版客户端。
命令与权限
| 命令 |
权限 |
简短描述 |
/notematic [help] |
notematic.use |
显示插件信息、状态和命令菜单。 |
/notematic play <song> [target] [loop] |
notematic.use
notematic.play.location (用于 at ...)
notematic.play.loop (用于 loop) |
为你自己、目标玩家、所有玩家、3D 位置上的特定地点或通过移动收音机播放歌曲。 |
/notematic stop [#ID | song | player] [at <x> <y> <z>] |
notematic.use |
停止正在进行的播放(通过 ID、歌曲、玩家或坐标)。 |
/notematic seek <#ID | song | player> <value> |
notematic.use |
在播放中向前、向后跳转或跳转到绝对时间。 |
/notematic pause [#ID | song | player] [at <x> <y> <z>] |
notematic.use |
暂停正在进行的播放。 |
/notematic resume [#ID | song | player] [at <x> <y> <z>] |
notematic.use |
恢复暂停的播放。 |
/notematic volume <value> |
notematic.use |
设置您自己的个人收听舒适音量(0-100%)。 |
/notematic volume #ID <value> |
notematic.use |
为特定的活跃播放实例设置临时音量倍数。 |
/notematic volume song <name> <value> |
notematic.admin |
设置歌曲的全局音量倍数(仅限管理员)。 |
/notematic list |
notematic.use |
列出所有已加载的公共(如果是管理员则包括私有)歌曲(名称可点击以播放)。 |
/notematic active |
notematic.use |
显示当前正在播放的所有歌曲及其实时状态。 |
/notematic commands [true | false] |
notematic.admin |
全局切换或设置玩家命令使用情况(仅限管理员)。 |
/notematic reload |
notematic.admin |
停止所有活跃歌曲并重新加载歌曲文件夹(仅限管理员)。 |
/notematic create <name> <url> [opts] |
notematic.create |
异步下载并转换 MIDI 文件。 |
/notematic rename <old> <new> |
notematic.admin |
重命名磁盘上和缓存中的歌曲文件(仅限管理员)。 |
/notematic admin <action> ... |
notematic.admin |
管理伪管理员(仅限管理员)。 |
/notematic blacklist <action> ... |
notematic.admin |
管理玩家命令黑名单(仅限管理员)。 |
查看详细命令说明与示例
Play 命令
开始播放歌曲。播放可以针对你自己、其他玩家、所有在线玩家、物理 3D 位置,或者作为跟随你的便携式收音机。
- 语法变体:
/notematic play <song> — 为自己播放。
/notematic play <song> [player] — 为特定玩家播放(需要管理员权限)。
/notematic play <song> <@a | * | all> — 为所有在线玩家播放(需要管理员权限)。
/notematic play <song> at <x> <y> <z> [radius] [volume] [loop] — 在特定坐标处播放。声音按位置播放。支持相对 ~ 坐标。
/notematic play <song> radio [radius] [volume] [loop] — 播放位置音乐,实时跟踪承载玩家的坐标。
- 示例:
/notematic play test_song
/notematic play test_song loop (无限循环)
/notematic play test_song at ~ ~ ~ 15 50% loop (在你所在位置循环,15 格聆听半径,50% 音量)
/notematic play test_song radio 32 (便携式音箱跟随你,32 格聆听半径)
停止命令
停止正在进行的播放。按以下顺序动态解析:
- 唯一 ID (
#ID): 停止特定实例(例如 /notematic stop #3)。
- 歌曲名称: 停止该歌曲的所有活跃播放。
- 玩家名称: 停止指定玩家监听的所有播放。
- 示例:
/notematic stop
/notematic stop #12
/notematic stop test_song
/notematic stop at ~ ~ ~ (在当前坐标停止基于位置的播放)
跳转命令
向前、向后或跳转到绝对时间点进行播放定位。
- 相对跳转: 例如
+10s(前进 10 秒)、-5s(后退 5 秒)、+200t(前进 200 刻)。
- 绝对跳转: 例如
30s(跳转至 30 秒标记处)、150t(跳转至第 150 刻)。
- 注意:循环播放使用取模运算进行环绕处理。
音量控制
- 个人音量 (
/notematic volume <val>): 设置舒适的聆听级别。通过 UUID 保存在 player_volumes.yml 中。
- 实例音量 (
/notematic volume #ID <val>): 设置特定播放实例的临时音量倍数。
- 全局音量 (
/notematic volume song <name> <val>): 设置某首歌曲的基础音量级别。存储在 volumes.yml 中。
- 音量叠加公式: 最终音符音量计算方式为:
baseNoteVolume * songVolumeMultiplier * personalPlayerVolume。
MIDI 创建
异步下载并转换 MIDI 文件。默认采用 stitching(拼接)方法和 nolimit(无刻速限制),并将文件保存到公共目录。
- 选项:
stitching(默认):采用拼接方法。绕过 Minecraft 标准的 2 个八度音程限制。当 MIDI 音符过高或过低时,插件会自动切换/拼接乐器声音(如低音、吉他、竖琴、长笛、钟),以覆盖完整的 6 个八度音程范围。
standard:遵循 Minecraft 标准的 2 个八度音程限制(超出范围的音符会被钳制)。
nolimit(默认):绕过标准红石刻速限制。快节奏歌曲严格按照其 MIDI 速度映射表的速率运行(最高可达游戏引擎 50ms 的刻速限制)。
limit:将刻速限制为 100ms(标准红石刻速)。
public(默认):将歌曲保存在公共文件夹 (songs/public/) 中,以便服务器上的任何人都可以播放。
private:将歌曲保存在私有文件夹 (songs/private/) 中,仅限管理员/Ops 访问。
- 示例:
/notematic create Pirate_Theme https://example.com/song.mid
/notematic create oldschool https://example.com/song.mid standard private
查找与托管 MIDI 链接:
- BitMidi: 在 BitMidi.com 上查找免费 MIDI 文件(例如
https://bitmidi.com/scotsong-mid)。右键点击 Download MIDI 按钮并复制链接地址。
- Google Drive: 将你的 MIDI 文件上传到 Google Drive 并设置为“任何拥有链接的人均可查看”。复制分享链接(例如
),并使用直接链接生成器如 [Lonedev's Google Drive Direct Link Generator](https://lonedev6.github.io/gddl/) 获取直接下载链接(例如 )。
- GitHub: 将你的 MIDI 上传到公共仓库。在 GitHub 上导航到该文件并点击 Raw 按钮(或右键点击)并复制链接,以获取原始 URL。
重命名歌曲
重命名磁盘上的歌曲文件(包括公共和私有目录),并更新所有内存和基本音量映射。(需要管理员权限)。
- 示例:
/notematic rename old_song super_cool_song
伪管理员管理
授予普通玩家 Notematic Player 命令的管理特权,而无需服务器级别的操作员状态 (OP)。(需要真实管理员权限)。
- 示例:
/notematic admin add Cayde26
命令黑名单
阻止特定玩家使用任何 Notematic 命令。黑名单在服务器重启后依然有效。(需要管理员权限)。
- 示例:
/notematic blacklist add Steve
/notematic blacklist list (显示所有被拉黑的玩家,并提供可点击的 GUI 以移除他们)
兼容性与平台
Notematic Player 完全在服务端运行,这意味着原版客户端无需安装任何模组即可听到音乐。它原生兼容以下平台上的 1.20.6 和 1.21 - 26.2.x:
- Paper(推荐)
- Purpur
- Spigot
- Bukkit
音乐文件格式与组织 (.json / .mcfunction)
将音乐文件放置在 plugins/NotematicPlayer/songs/ 目录下。
- 公共歌曲 (
/songs/ 或 /songs/public/): 任何人可以通过 /notematic list 和播放命令访问。
- 私有歌曲 (
/songs/private/): 仅 OP/管理员(或拥有 notematic.admin 权限的玩家)可访问。
JSON 格式
{
"tempo": 1.0,
"notes": [
{
"instrument": "harp",
"note": 1.4142,
"volume": 0.8,
"when": 0
},
{
"instrument": "bass",
"note": 0.7071,
"volume": 0.6,
"when": 5
}
]
}
tempo:速度倍增器(双倍)。1.0 表示正常速度播放。
notes:按 when 排序的音符事件数组。
instrument:乐器名称(例如 harp, piano, bass, bell, flute, guitar, pling, bit, banjo)。你也可以通过在键名中包含 ., : 或 / 来使用任何游戏内的 /playsound 标识符(例如 minecraft:entity.cow.ambient, minecraft:block.bell.use 或自定义资源包声音)。
note:从 0.5 到 2.0 的音高乘数。
volume:(可选)特定于音符的音量,范围为 0.0 到 1.0。
when:相对于起始时间的刻延迟。
数据包格式
如果你将 .mcfunction 文件放入歌曲文件夹,插件会扫描存储修改以解析 JSON:
data modify storage music sheet set value {"tempo":1,"notes":[{"instrument":"harp","note":1.4142,"when":0}, ...]}
开发者 API 参考
从 Bukkit 的插件管理器中获取插件实例:
import me.cayde26.notematicPlayer.NotematicPlayer;
import org.bukkit.Bukkit;
NotematicPlayer api = (NotematicPlayer) Bukkit.getPluginManager().getPlugin("NotematicPlayer");
if (api != null && api.isEnabled()) {
// 为一名玩家播放一首歌曲,位置感知且无聊天消息
api.playSong(player, "mysong", false, true);
// 停止该玩家的所有活跃播放
api.stopSong(player);
// 获取/设置玩家的个人音量乘数
double playerVol = api.getPlayerVolume(player);
api.setPlayerVolume(player, 0.85);
}
可用的 API 方法
播放控制
boolean playSong(Player player, String songName)
boolean playSong(Player player, String songName, boolean showChatMessage)
boolean playSong(Player player, String songName, boolean showChatMessage, boolean positional)
boolean playSong(Player player, String songName, boolean showChatMessage, boolean positional, String initiator)
boolean playSongForAll(String songName)
boolean playSongForAll(String songName, boolean showChatMessage)
boolean playSongForAll(String songName, boolean showChatMessage, boolean positional)
boolean playSongForAll(String songName, boolean showChatMessage, boolean positional, String initiator)
void stopSong(Player player)
void stopSong(Player player, String songName)
void stopAllSongs()
void pauseSong(Player player)
void pauseSong(Player player, String songName)
void resumeSong(Player player)
void resumeSong(Player player, String songName)
void pauseAllSongs()
void resumeAllSongs()
状态与查询
boolean isPlaying(Player player)
boolean isPaused(Player player)
boolean songExists(String songName)
List<SongPlayback> getActivePlaybacks()
音量调整
double getSongVolume(String songName)
boolean setSongVolume(String songName, double multiplier)
double getPlayerVolume(Player player)
void setPlayerVolume(Player player, double volumeMultiplier)
Notematic Player
Notematic Player is a Minecraft Java plugin designed as the companion player for Notematic Studio. It plays custom note block music sequences exported from the studio in .json or .mcfunction formats directly to players or positionally in the world. Beyond standard note block sounds, it can also play any in-game /playsound audio (including custom resource pack sounds) directly.
Features
- Custom Music Playback: Play custom note block arrangements. Supports public and private folders for admin-only access control.
- In-Plugin MIDI Converter: Download and convert MIDI files on the fly directly inside the game using
/notematic create.
- Per-Player Personal Volume: Every player can adjust their own personal listening volume via
/notematic volume <val> (saved by UUID).
- Offline Sync: If a player disconnects, the playback ticks virtually and resumes in sync when they rejoin.
- Jukebox Persistent Loops: Location-based looping playbacks persist across server restarts and crashes.
- Notematic Studio Companion: Plays files exported directly from the Notematic Studio MIDI converter utility.
Official Addons
An official sub-addon built on top of Notematic Player's engine. It uses Digital Signal Processing (DSP) to analyze Text-to-Speech audio, extract formant frequencies, and dynamically map them to Minecraft's sound system, allowing note blocks to "talk" in real-time.
- Real-time In-Game Speech: Speak aloud using note blocks via
/<command> <prompt>.
- 6-Octave Voice Range: Intelligently maps overlapping frequencies across 5 note block instruments (Bass, Guitar, Harp, Flute, Bell) to bypass Minecraft's default 2-octave limit.
- 100% Server-Side: No mods or resource packs required by players. Fully compatible with vanilla clients.
Commands & Permissions
| Command |
Permissions |
Short Description |
/notematic [help] |
notematic.use |
Displays plugin info, status, and commands menu. |
/notematic play <song> [target] [loop] |
notematic.use
notematic.play.location (for at ...)
notematic.play.loop (for loop) |
Plays a song for yourself, a target player, everyone, positionally at a 3D location, or via a moving radio. |
/notematic stop [#ID | song | player] [at <x> <y> <z>] |
notematic.use |
Stops active playbacks (by ID, song, player, or coordinate). |
/notematic seek <#ID | song | player> <value> |
notematic.use |
Seeks forward, backward, or to an absolute time in a playback. |
/notematic pause [#ID | song | player] [at <x> <y> <z>] |
notematic.use |
Pauses active playbacks. |
/notematic resume [#ID | song | player] [at <x> <y> <z>] |
notematic.use |
Resumes paused playbacks. |
/notematic volume <value> |
notematic.use |
Sets your own personal listening comfort volume (0-100%). |
/notematic volume #ID <value> |
notematic.use |
Sets a temporary volume multiplier for a specific active playback instance. |
/notematic volume song <name> <value> |
notematic.admin |
Sets a song's global volume multiplier (Admin only). |
/notematic list |
notematic.use |
Lists all loaded public (and private if admin) songs (names are clickable to play). |
/notematic active |
notematic.use |
Shows all currently playing songs with real-time status. |
/notematic commands [true | false] |
notematic.admin |
Toggles or sets player command usage globally (Admin only). |
/notematic reload |
notematic.admin |
Stops all active songs and reloads the song folder (Admin only). |
/notematic create <name> <url> [opts] |
notematic.create |
Downloads and converts a MIDI file asynchronously. |
/notematic rename <old> <new> |
notematic.admin |
Renames a song file on disk and in the cache (Admin only). |
/notematic admin <action> ... |
notematic.admin |
Manages pseudo-admins (Admin only). |
/notematic blacklist <action> ... |
notematic.admin |
Manages player command blacklist (Admin only). |
View Detailed Command Instructions & Examples
Play Command
Starts playing a song. Playback can target yourself, other players, all online players, a physical 3D location, or as a portable radio following you.
- Syntax variations:
/notematic play <song> — Play for yourself.
/notematic play <song> [player] — Play for a specific player (Admin required).
/notematic play <song> <@a | * | all> — Play for all online players (Admin required).
/notematic play <song> at <x> <y> <z> [radius] [volume] [loop] — Play at specific coordinates. Sounds play positionally. Supports relative ~ coordinates.
/notematic play <song> radio [radius] [volume] [loop] — Plays positional music that tracks the carrier player's coordinates in real-time.
- Examples:
/notematic play test_song
/notematic play test_song loop (looping infinitely)
/notematic play test_song at ~ ~ ~ 15 50% loop (looping at your position, 15 block hearing radius, 50% volume)
/notematic play test_song radio 32 (portable boombox following you with a 32-block hearing radius)
Stop Command
Stops active playbacks. Resolved dynamically in search order:
- Unique ID (
#ID): Stops a specific instance (e.g. /notematic stop #3).
- Song Name: Stops active playbacks of that song.
- Player Name: Stops playbacks listening on that player.
- Examples:
/notematic stop
/notematic stop #12
/notematic stop test_song
/notematic stop at ~ ~ ~ (Stop location-based playbacks at current coordinates)
Seek Command
Seeks playbacks forward, backward, or to an absolute time.
- Relative Seek: e.g.,
+10s (forward 10s), -5s (back 5s), +200t (forward 200 ticks).
- Absolute Seek: e.g.,
30s (jump to 30s mark), 150t (jump to tick 150).
- Note: Looping playbacks wrap around using modulo math.
Volume Control
- Personal Volume (
/notematic volume <val>): Sets comfort listening level. Saved by UUID in player_volumes.yml.
- Instance Volume (
/notematic volume #ID <val>): Sets temporary volume multiplier of a specific playback instance.
- Global Volume (
/notematic volume song <name> <val>): Sets base volume level for a song. Stored in volumes.yml.
- Volume Stacking Formula: The final note volume is calculated as:
baseNoteVolume * songVolumeMultiplier * personalPlayerVolume.
MIDI Creation
Downloads and converts a MIDI file asynchronously. It defaults to the stitching (Makeshift Hack) approach and nolimit (no ticking speed limit), saving files to the public directory.
- Options:
stitching (default): Makeshift Hack approach. Bypasses Minecraft's standard 2-octave limit. When a MIDI note is too high or too low, the plugin automatically switches/stitches instrument sounds (e.g. Bass, Guitar, Harp, Flute, Bell) to cover a full 6-octave range.
standard: Standard Minecraft 2-octave limits (notes outside the range are clamped).
nolimit (default): Bypasses standard redstone ticking limits. Fast songs tick exactly at their MIDI tempo map speed (up to the 50ms game engine tick limit).
limit: Clamps ticking speed to 100ms (standard Redstone tick speed).
public (default): Saves the song in the public folder (songs/public/) so anyone on the server can play it.
private: Saves the song in the private folder (songs/private/) for admins/Ops only.
- Examples:
/notematic create Pirate_Theme https://example.com/song.mid
/notematic create oldschool https://example.com/song.mid standard private
Finding & Hosting MIDI Links:
- BitMidi: Find free MIDI files on BitMidi.com (e.g.,
https://bitmidi.com/scotsong-mid). Right-click the Download MIDI button and copy the link address.
- Google Drive: Upload your MIDI file to Google Drive and share it so "Anyone with the link can view". Copy the shareable link (e.g.,
), and use a direct link generator like [Lonedev's Google Drive Direct Link Generator](https://lonedev6.github.io/gddl/) to get a direct download link (e.g., ).
- GitHub: Upload your MIDI to a public repository. Navigate to the file on GitHub and click the Raw button (or right-click it) and copy the link to get the direct raw URL.
Rename Songs
Renames a song file on disk (both public and private directories) and updates all memory and base volume mappings. (Requires Admin).
- Example:
/notematic rename old_song super_cool_song
Pseudo-Admins Management
Grants administrative privileges for Notematic Player commands to standard players without needing server-level operator status (OP). (Requires true Admin).
- Example:
/notematic admin add Cayde26
Command Blacklist
Blocks specific players from using any Notematic commands. The blacklist persists across server restarts. (Requires Admin).
- Examples:
/notematic blacklist add Steve
/notematic blacklist list (Shows all blacklisted players with a clickable GUI to remove them)
Compatibility & Platforms
Notematic Player runs entirely server-sided, meaning vanilla clients do not need to install any mods to hear the music. It is natively compatible with 1.20.6 and 1.21 - 26.2.x on:
- Paper (Recommended)
- Purpur
- Spigot
- Bukkit
Music File Formats & Organization (.json / .mcfunction)
Place your music files in plugins/NotematicPlayer/songs/.
- Public Songs (
/songs/ or /songs/public/): Accessible to anyone via /notematic list and play commands.
- Private Songs (
/songs/private/): Only accessible to OPs/admins (or players with notematic.admin).
JSON Format
{
"tempo": 1.0,
"notes": [
{
"instrument": "harp",
"note": 1.4142,
"volume": 0.8,
"when": 0
},
{
"instrument": "bass",
"note": 0.7071,
"volume": 0.6,
"when": 5
}
]
}
tempo: Speed multiplier (double). 1.0 plays at normal speed.
notes: Array of note events, sorted by when.
instrument: Instrument name (e.g. harp, piano, bass, bell, flute, guitar, pling, bit, banjo). You can also use any in-game /playsound identifier (e.g., minecraft:entity.cow.ambient, minecraft:block.bell.use, or custom resource pack sounds) by specifying a key containing a ., :, or /.
note: Pitch multiplier from 0.5 to 2.0.
volume: (Optional) Note-specific volume from 0.0 to 1.0.
when: Tick delay relative to the start.
Datapack Format
If you drop an .mcfunction file into the songs folder, the plugin scans for storage modifications to parse the JSON:
data modify storage music sheet set value {"tempo":1,"notes":[{"instrument":"harp","note":1.4142,"when":0}, ...]}
Developer API Reference
Retrieve the plugin instance from Bukkit's plugin manager:
import me.cayde26.notematicPlayer.NotematicPlayer;
import org.bukkit.Bukkit;
NotematicPlayer api = (NotematicPlayer) Bukkit.getPluginManager().getPlugin("NotematicPlayer");
if (api != null && api.isEnabled()) {
// Play a song positionally for a player without chat messages
api.playSong(player, "mysong", false, true);
// Stop active playbacks for a player
api.stopSong(player);
// Get/set a player's personal volume multiplier
double playerVol = api.getPlayerVolume(player);
api.setPlayerVolume(player, 0.85);
}
Available API Methods
Playback Control
boolean playSong(Player player, String songName)
boolean playSong(Player player, String songName, boolean showChatMessage)
boolean playSong(Player player, String songName, boolean showChatMessage, boolean positional)
boolean playSong(Player player, String songName, boolean showChatMessage, boolean positional, String initiator)
boolean playSongForAll(String songName)
boolean playSongForAll(String songName, boolean showChatMessage)
boolean playSongForAll(String songName, boolean showChatMessage, boolean positional)
boolean playSongForAll(String songName, boolean showChatMessage, boolean positional, String initiator)
void stopSong(Player player)
void stopSong(Player player, String songName)
void stopAllSongs()
void pauseSong(Player player)
void pauseSong(Player player, String songName)
void resumeSong(Player player)
void resumeSong(Player player, String songName)
void pauseAllSongs()
void resumeAllSongs()
Status & Query
boolean isPlaying(Player player)
boolean isPaused(Player player)
boolean songExists(String songName)
List<SongPlayback> getActivePlaybacks()
Volume Adjustments
double getSongVolume(String songName)
boolean setSongVolume(String songName, double multiplier)
double getPlayerVolume(Player player)
void setPlayerVolume(Player player, double volumeMultiplier)
评论 0
登录后参与评分
还没有评论,来抢沙发吧