How to create new songs for Music
Music allows servers to be able to play custom sounds. However, due to the fact that Music requires a custom resoucepack to store the music, the steps for adding new sounds may seem complicated. This guide will show you how to add new sounds to your serer.
#1) Creating the sound files
For this guide I will assume you already have the sounds you want to add. If you do not, you will need to record or download the sounds that you wish to add.
Minecraft requires all sounds to be in the .ogg format. In case the file format is not an ogg, you will need to convert it to that forum either by using some sound editing software or by using an online conversion website.
Due to the way minecraft handles sound *(It does not get stored in memory) it reads the sound file every time a sound plays. That means that if you are trying to read a long/high quality sound file, the client will receive lag (possibly to the point of crashing). To fix this, it is best to reduce the file size. Here are some tips:
- Make sure the audio only has one channel (Mono). Minecraft does not support multiple channels anyways, so you are not losing any quality doing this.
- Reduce the bit-rate.
- Reduce as much quite time as possible in the beginning and end of the track, since even silence contributes to the file size.
- If you need, split the one file into multiple smaller files. How many files is up to you, but to reduce the lag as much as possible, make sure each file is under 1MB.
#2) Creating the resoucepack
Once you have all of the sounds you wish to add, create a resoucepack and register the sounds. In case you never made a resoucepack/ added new sounds, use this video as a guide:
Once you have created the resoucepack, verify that the sounds can be played by using the /playSound command.
#3) Registering the resoucepack
Once you verify that the sounds work, you can now register the sound for the server. Do this by going into the "\plugins\Music\Music" folder. This is where all songs/sounds are stored. Copy one of the existing files and rename it to the name of the song. Then, open up the file and replace the 'Time' with the length of the sound and 'Songname' with the name of the song (case sensitive). For this example, you see the file for "robotrock", which plays for 8.46 seconds
#4: Upload the resoucepack
There are many places which you can host the resoucepack. Depending on where you host it, the steps may be different, so I won't go into specifics. However, if you use dropbox or any other file-hosting site, make sure you get the direct URL to the file (For dropbox, that means making sure there is a =1 at the end of the url instead of =0).
#5) Adding the resoucepack to the download list
To add the resoucepack link, go into the "\plugins\Music\" directory and open the Resoucepacks.txt file. In it, you should add the URL to the list. It should look like the following:
Once you add the link to the resoucepack, players can now download it and hear all of your new sounds.