Hello! This post is aimed at helping you add custom background music to your minecraft experience. Note that this is not replacing music files, as has been the traditional method of doing it, but instead, adding your own music to play in random rotation with the default minecraft music. I searched quite a bit and found fractured methods of replacing files and adding in custom sounds to use with command blocks, but was unable to find a clear and straightforward method of adding in custom background music without replacing files (and being limited to those amount that are included with minecraft). Therefore, I decided to make this in the hopes I can help someone else who also enjoys customizing their background music experience. I wasn't totally sure where to post this, but since it has to do with resource packs, I decided to put it here. If it's better suited elsewhere, please move as appropriate. If there’s enough desire/if this text tutorial is too confusing, I can certainly make a video, too.
Things you will need:
- Minecraft 1.7.9 (unsure if this works in prior versions, as this is the version I’m using)
- Music files in .ogg (or access to online converter/audacity, etc)
Part One: Get Your Stuff Together
Step 1) Find your music files you wish to add as background music. Check the file type: if they are .ogg files, perfect, skip to step 3! If not, there’s the extra step of converting them.
Step 2) Converting your files to .ogg can be done in a few different ways. If you have a lot of files you want to convert, I highly recommend using Audacity (http://audacity.sourceforge.net). It’s free and works great for batch converting. However, if you don’t wish to use it (or only have a couple you need to convert), there are many free online audio converters. Those can be found with a simple google search (or here http://audio.online-.../convert-to-ogg).
To convert your files using Audacity, first download and open it. Then, go to File->Import->Audio. You can then select multiple files (by using shift) and when you are done selecting the files you wish to convert, click Open. Audacity will take some time importing your files. Once it is finished, go to File->Export Multiple (if only exporting one file, simply choose export). In the box that comes up, under "Export format" select "Ogg Vorbis Files." Then click on Options and you'll see a slider. Drag it so the number in the middle shows a 2 or a 3. This is done to reduce the file size of the converted audio, and there is little to no noticeable difference in the exported audio. Then click OK.
Lastly, click Export and you will be prompted to edit the Metadata of the files you are exporting. You can ignore this or fill it out, that is up to you. Either way, you will need to click OK for each file. Once you have gone through all the files, Audacity will export them which may take awhile depending on how many you selected.
If you are using an online converter, simply select the file you wish to convert and make sure you have .OGG selected as the output. For the website I linked, select "Choose File" and pick the file you wish to convert. Then simply select Convert File. Note: if you have WAV or AIFF files or any other audio file that has a large file size, I highly recommend you use Audacity as it will take quite awhile to upload the large files.
Once you have your files converted, you can move onto step 3.
Step 3) First off, let’s rename the files to something a bit more simple. Rename the files so the filename is only one word (or so it contains no spaces). It could be as simple as “mcbg1” or “minecraftmusic1” or whatever you want, just as long as there are no spaces.
Step 4) Now create a folder called “My Resource Pack” or whatever you want to call it. Inside that folder, create another folder called “assets” inside of which you will make another folder called “minecraft” and then inside of that folder make the folder called “sounds” and inside of that folder make the folder called “music” and finally (after all of the folder-ception) make a folder called “game”
Step 5) Drag all of your .ogg sound files you want as background music into that last folder you named “game.”
Step 6) Navigate back to your minecraft folder. You can do this if you have the newest launcher by opening minecraft, clicking on the button “Edit Profile” then clicking on “Open Game Dir”
Step 7) In your minecraft folder, navigate to the folder called “resourcepacks.” Now drag the folder-ception thing you made in step 4 called “My Resource Pack” into that folder.
Step 8) Now things might start to get a bit confusing. Inside of “My Resource Pack” you will want to put a file called “pack.mcmeta”. This is so the game can recognize your resource pack and have it be selectable in game. Open your text editing application and copy/paste this into it:
Then save it as “pack” and make the file extension .mcmeta after the file is saved. Make sure this is inside of your “My Resource Pack” folder and not inside the “assets” folder. You can change the text in the code that says “My Resource Pack” to say anything you want.
Part Two: Make Your Music Play
Step 1) So here we get more confusing. In order for Minecraft to recognize your .ogg files and play them in game, you will need to create a file called “sounds.json” which will be placed inside the assets/minecraft folder, just outside of the “sounds” folder. To do this, open the website http://www.jsoneditoronline.org and you’ll see a bunch of text up there. Hit the “clear” button on the top right side of the page. I suggest using this website because it will show you if there are errors and it keeps the formatting nice.
Step 2) Now to make the JSON code. For your convenience, it is located here and you can basically just copy/paste it into the editor in your web browser. However, notice that the first and last curly bracket may already be in the editor, so if you receive an error, make sure there isn’t a duplicate set of curly brackets. Note that when you have an open curly bracket, you must have a closed curly bracket as well to end the section.
Step 3) Now, check for any duplicate brackets or anything. If there is an error, there will be a red X on the left side of the editor. At this point, if you’re error free, you can continue.
Step 4) Rename where it says “FILENAME” in the code to the names of your music files that are located in your music/game folder. However, do not add the file extension. I do not know if it will work if you do or not, but I mirrored this off of the file that Minecraft uses to access it’s own sound and music files.
Step 5) If you have less than three files to add, you can delete extra sets of
which may or may not have a comma after the last curly bracket. Important! The comma located at the end of the curly bracket can cause an error if there is a comma and it is the last file listed. If it is the last file listed, delete the comma after the curly bracket. If you have more than three files you wish to add, copy and paste the above code, however make sure you add a comma after the last curly bracket. Think of it like a list that is separated by commas. You wouldn’t have a comma after the last item in the list.
Step 6) Finished? If so, awesome! Now check again for any errors, and if you are error free, click the “save” button in the top right corner of the page. It will download the JSON file you just made. Locate it and rename it to “sounds.json”.
Step 7) Navigate back to your My Resource Pack/assets/minecraft folder and put your sounds.json file in there, so it is outside of the “sounds” folder, but inside of the minecraft folder. For clarity, your folder structure should look like this.
Part 3: Enjoying
Step 1) Open up your minecraft game and go into options. Click resource packs, locate your resource pack, and click on it to add it to the right column called Selected Resource Packs. Then click done. Step 2) Start up your game and play! Note that you may not notice the new music immediately because it will play randomly. If you want to make sure it worked and was added in, you can load a world, run around for a minute and wait for music to play. If it isn’t your new music, save and quit, then reload and repeat until you hear your music. Otherwise, just play and enjoy like normal!
I hope that this tutorial has been helpful and as clear as a text tutorial can be. If you have any questions or if something is unclear, please let me know and I’ll do what I can to help you out!
The Meaning of Life, the Universe, and Everything.
This tutorial is excellent! It may be the best "Minecraft 1.7+ BG Music" tutorial currently on the Internet.
I have a few requests though on improvement... perhaps you can add more pictures in the process like for each step. You might also want to add the clue on how to access the .minecraft folder using the "%appdata%" command in Window's run feature. It would also be great if you could demonstrate how to add music to other folders as well such as the game's creative music and menu music.
I also have a question. Is it possible to prevent the default music from playing while your resource pack is active? If so, how can it be done? I would be very thankful if you could respond to me, North Kozar. ^.^
The Meaning of Life, the Universe, and Everything.
Okay, I've pondered about this for awhile... since custom sounds use .JSON coding, I was wondering what the "stream": true/false function does. I'm assuming it determines whether the song will stream from the custom folders randomly.
I also wonder if there are more than two functions or more than the "name" and "stream" options. I wonder if there is some sort of "weight" option that determines the probability of how often the song plays. These could lead to alot of possibilities for future resource pack designers and I'm hoping that you could respond to this, North Korzar, or at least someone else -- please?
Thanks for the suggestions. Yeah, I could certainly add in how to put music in the Nether, menu and things like that, it's pretty straightforward. And I think I'll just try and make a video sometime this week.
As for your first question, yes you can essentially "prevent" the default music from playing. If you name some of your music files the same as the default minecraft ones (hal1, hal2, hal3, hal4, calm1, calm2, calm3, piano1, piano2, piano3, nuance1, nuance2) then in the sounds.json file, you would add "replace": true, so it would look like this:
.... and so on and so forth. This would attempt to replace all the files listed in that series, so if you had some you wanted to add outside of the files you're replacing, it'd probably be best to create a new "music.game" list that doesn't include the replace tag, at least that's what I would imagine.
That should replace the original sound file with your sound file. I've done that with the door_open and door_close sounds because I prefer the older non-squeaky versions, and I imagine it would work the same with the music files.
As for your second question, yes! There is "replace" as I mentioned just above, but there is also a weight. You can see the options available here from the wiki and/or here from reddit. It also states that the stream function is recommended if the file is longer than a few seconds to avoid lag.
Hmm.. I tried doing what you said to prevent regular minecraft music from playing, but when I do that, only regular minecraft music plays. I have my music in the right spot, sound\music\game, but it doesn't overlap the regular minecraft music. Only regular minecraft music plays. Heres what my .json looks like:
IT DOESN'T WORK!! THE JSON EDITOR MAKES TEXT DOCUMENTS!! IMGDFIONUKRSUAHJCDKLXZFH
Maybe I'm doing it wrong... I'm crushed. I'm trying to make a minecraft map called Craftometry Dash, where you do parkour to music and you can't stop. But I can't because of the json editor. I don't know if I can do it.. could you try it for me?
If you say yes, can you tell me your e-mail so I can send the songs to you?
This worked great for me! There seems to be a delay between the tracks tho ( I'm not sure if music is delayed in vanilla for that long.) Thanks a lot, playing with the default music is annoying and playing with no music is boring.
-Make sure your music volume is all the way up,
(because some people mute it because of the annoying minecraft music, you can change the category to records, so it will be under the Jukebox/Noteblocks volume slide)
-And also make sure your ogg file has EXACTLY the same name as in your json file, so it should be station.ogg
If it is bad english, sorry for that, because I'm Dutch
Hello! I tried this, but it didn't work (I used Minecraft 1.12) maybe it is outdated? Well, maybe you can still help me please! Here's the pack I created, I hope you could take a look at it before it's too late!