Jukebox Song Generator
BetaPick the sound, write the “Artist - Title” line, set the song length and the comparator signal, and get the jukebox song file with a /give command for the disc. The preview shows the disc playing, its tooltip and the redstone signal.
Describe it — AI writes the command
Type what you want in plain words. The AI fills the form below, so you can see it and change anything. It follows the edition and version you picked.
Checking the AI…
Your command · Java 26.3
62 characters/give @p music_disc_cat[jukebox_playable="my_pack:boss_theme"]
data/my_pack/jukebox_song/boss_theme.json{
"comparator_output": 12,
"description": {
"text": "Alex - Boss Theme"
},
"length_in_seconds": 150,
"sound_event": "my_pack:music_disc.boss_theme"
}
- my_pack:music_disc.boss_theme is a custom sound, so it needs a resource pack: in assets/my_pack/sounds.json add {"music_disc.boss_theme": {"sounds": [{"name": "my_pack:records/boss_theme", "stream": true}]}} and put the music at assets/my_pack/sounds/records/boss_theme.ogg. Use a mono .ogg file, or it won't fade with distance.
- Set the length to the song's real length (2:30 now): the jukebox stops its particles and comparator signal after that time.
- Any item can play a song with this component — the line gives a disc that plays yours. Put it in a jukebox to listen.
- Put the file in your data pack (or press Download data pack), drop the pack in your world's datapacks folder, then run /reload.
Raw editor
How it works
Since Java 1.21, music discs are data: each song is a file in data/<namespace>/jukebox_song/, and any item with the jukebox_playable component plays it.
{
"comparator_output": 12,
"description": {"text": "Alex - Boss Theme"},
"length_in_seconds": 150,
"sound_event": "my_pack:music_disc.boss_theme"
}length_in_seconds is when the jukebox counts the song as finished (its particles and comparator signal stop). comparator_output is the signal strength a comparator reads from the jukebox while it plays, 1 to 15, so a redstone build can tell discs apart.
Java 1.21 to 1.21.4
give @p music_disc_cat[jukebox_playable={song:"my_pack:boss_theme"}]Java 1.21.5 to 26.3
The component became a plain ID:
give @p music_disc_cat[jukebox_playable="my_pack:boss_theme"]
Your own music
A sound from the game (like music_disc.pigstep) works as it is. Your own song needs a resource pack with the .ogg file and an entry in assets/<namespace>/sounds.json. Use a mono file so it gets quieter as you walk away, and "stream": true for long songs:
{"music_disc.boss_theme": {"sounds": [{"name": "my_pack:records/boss_theme", "stream": true}]}}Bedrock has no custom jukebox songs, so this generator is Java only.
FAQ
How do I add my own song to a music disc?
Two packs: a resource pack with your .ogg file and a sounds.json entry for it, and a data pack with the jukebox song file pointing at that sound. Then give yourself a disc with the jukebox_playable component set to your song.
Does it replace a vanilla disc?
No. The /give line makes a copy of the item (a cat disc by default) that plays your song instead; normal cat discs keep playing Cat. You can use any item, even a stick.
What is comparator output for?
A comparator next to a playing jukebox gives that signal strength. Vanilla discs use 1 to 15, so redstone can tell which disc is in the jukebox.
Why does my song cut off or keep going?
Set the length to the real length of the audio. The jukebox stops its particles and redstone signal after length_in_seconds even if the sound is still playing.
Does this work in 1.20?
No, jukebox songs and the jukebox_playable component were added in Java 1.21. Before that, the only way was replacing a vanilla disc's sound with a resource pack.