Notematic Player Lite
作者:rebot | 分类:模组
Minecraft 版本: 1.21.9 1.21.10 1.21.11 26.1 26.1.1 26.1.2 26.2
平台: datapack
标签: technology utility
Notematic Player Lite
Features
- 100% Vanilla & Server-Side: Runs on pure vanilla Minecraft. No plugins (like Paper/Spigot) or client-side mods required.
- Notematic Studio Companion: Plays
.mcfunctionsong sheets exported directly from the Notematic Studio MIDI converter and Vocoder. - Global Sound Broadcast: Broadcasts audio directly to players using
/playsoundso 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.jsonfolder 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:
- Convert your MIDI files or generate vocoded speech using Notematic Studio.
- Export/download the song as a
.mcfunctionfile. - Save the
.mcfunctionfile in your world directory at:
saves/<World Name>/datapacks/Notematic Player Lite/data/notematic_lite/function/songs/ - Run the
/reloadcommand in Minecraft. - 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: ```mcfunction # 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: ```mcfunction # 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: ```mcfunction function notematic_lite:stop ```
请登录后举报
暂无评论,抢个沙发吧~