跳到正文

Notematic Player Lite

作者:Cayde26

A lite version of Notematic Player that plays MIDI songs and custom audio directly from NBT storage using performant command macros.

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

Notematic Player Lite

Modrinth Downloads
Minecraft Version Support
Format

Notematic Player Lite is a 100% vanilla Minecraft Java Edition datapack designed as the lightweight companion player for Notematic Studio. It plays custom note block music sequences and text-to-speech vocoded audio directly to players in the world. Written entirely with vanilla Minecraft functions, NBT storage, and macro commands, it requires zero server plugins, mods, or resource packs to function, making it ideal for Singleplayer worlds, Minecraft Realms, or purely vanilla servers.

Features

  • 100% Vanilla & Server-Side: Runs on pure vanilla Minecraft. No plugins (like Paper/Spigot) or client-side mods required.
  • Notematic Studio Companion: Plays .mcfunction song sheets exported directly from the Notematic Studio MIDI converter and Vocoder.
  • Global Sound Broadcast: Broadcasts audio directly to players using /playsound so they can hear the music clearly from anywhere in the world.
  • NBT-Driven Playback Engine: Utilizes Minecraft storage and macro functions ($(instrument), $(note)) to dynamically trigger sounds with correct pitches and volumes.
  • Tempo Control: Reads custom tempo scaling values from the song sheet to dynamically speed up or slow down playbacks.
  • Silence Skipping: Automatically detects and skips leading silence at the start of a song, starting playback instantly.
  • Speech Vocoding Support: Fully supports playing vocoded speech note block sequences generated by Notematic Studio.

[!NOTE]

Looking for the full-featured server plugin version with positional audio, per-player personal volume controls, offline synchronization, and .json folder scanning? Check out the Spigot/Paper Notematic Player Plugin.


Datapack Functions

Since Notematic Player Lite is a datapack, control commands are run using the vanilla /function command:

| Function Command | Short Description |
| :— | :— |
| /function notematic_lite:songs/<song_name> | Plays a specific song from the bundled song library. |
| /function notematic_lite:stop | Stops the active playback and clears scheduled loop executions. |
| /function notematic_lite:setup | Manually runs the initialization setup and prints status confirmation. |


Adding Custom Songs & Speech

To add your own custom music or vocoded text-to-speech files:

  1. Convert your MIDI files or generate vocoded speech using Notematic Studio.
  2. Export/download the song as a .mcfunction file.
  3. Save the .mcfunction file in your world directory at: saves/<World Name>/datapacks/Notematic Player Lite/data/notematic_lite/function/songs/
  4. Run the /reload command in Minecraft.
  5. Play the song in-game with /function notematic_lite:songs/<song_name>.

Music File Formats & Technical Specification (.mcfunction)

Each song file is a simple .mcfunction script that populates the NBT storage with song data and triggers the player:

# Generated by Notematic Studio
data modify storage notematic_lite sheet set value {"tempo":1,"notes":[{"instrument":"harp","note":1.4142,"when":0},{"instrument":"bass","note":0.7071,"when":5}]}

# Play the song
function notematic_lite:play

NBT Storage Structure:

  • tempo: Tempo speed multiplier (double). 1 plays at standard tick speed.
  • notes: An array of note events, sorted chronologically by when.
  • instrument: Name of the instrument (e.g. harp, piano, bass, bell, flute, guitar, pling, bit, banjo). Can also be any in-game /playsound identifier (e.g., minecraft:entity.cow.ambient, minecraft:block.bell.use, or custom resource pack sounds).
  • note: The pitch multiplier from 0.5 to 2.0.
  • volume: (Optional) Note-specific volume from 0.0 to 1.0.
  • when: The tick delay relative to the start of the song.
Developer / Datapack Integration API

Other datapacks can easily interface with Notematic Player Lite to play music programmatically (e.g., for custom adventure map events, lobby music, or minigames).

Playing a Song

To play a song dynamically, write the song sheet JSON into the notematic_lite storage and call the play function:

# Load the music data into storage
data modify storage notematic_lite sheet set value {tempo:1, notes:[{instrument:"harp", note:1.0, when:0}]}

# Trigger the playback engine on the player executing the function
function notematic_lite:play

Stopping Playback

To stop any active playback from another datapack:

function notematic_lite:stop

常见问题

Notematic Player Lite 支持哪些 Minecraft 版本?

Notematic Player Lite 支持 Minecraft Java 版 1.21.9–26.2,共 7 个版本。下载时注意选择和你游戏版本一致的文件。

Notematic Player Lite 怎么安装?

新建世界时在「数据包」里把下载的 .zip 拖进去;已有的存档,把文件放进存档目录下的 datapacks 文件夹,进游戏输入 /reload 即可生效。服务器同样放在世界目录的 datapacks 里。

评论

登录后评论和评分