Tutorial: Adding Custom Music

From The Stardew Modding Wiki
Jump to navigation Jump to search

This a tutorial on how to add custom music to Stardew Valley

Future Infobox info: Mycatoreocookies, May 9 2021

Getting ready[edit | edit source | hide | hide all]

First you will need a music notation software. I recommend musescore.

Soundfonts are optional but they can really spice up your music. Musical Artifacts has tons of soundfonts to chose from.

if you have any questions please consult the musescore 3 handbook.

Finding music[edit | edit source | hide]

Now that you have musecore up and running you need to get a MIDI score for the song. Here are two ways to go about this.

  1. Look for the score you want on musescore. Just be aware that you can only download musescore files that are public domain and that say original on the score. If you have a musescore pro account you can download any song from musescore.
  2. Look for a midi file of the song you want. Sometimes musescore does not have the score you want. VGMusic has tons of video game midi files. Also try searching Google: type the music you want then put "midi" at the end and see what comes up.

Once you have your score, open it with musescore and export it to a .wav.

Else if you already have a .mp3 file you would like to use, just use an online converter such as Mp3.to to convert the song to .wav.

Custom Music also supports .ogg, which have a smaller file size.

Making the JSON files[edit | edit source | hide]

Here is what your content.json should look like.
{
  "Music": [
    {
      "Id": "foo", ///This is the name of the ID you'll use for your maps (make sure to append cm: to the beginning when using the ID)///
      "File": "foo.wav", ///.wav file///
      "Loop": false, ///true or false (if you want the track to loop or not)///
      "Preload": false ///true or false (if the track should be preloaded. may increase load times if true)///
    }
  ]
}
Here is what your manifest.json should look like.
{
  "Name": "name of your mod",
  "Author": "your name",
  "Version": "1.0.0",
  "Description": "what does your mod do",
  "UniqueID": "Music",
  "ContentPackFor": {
    "UniqueID": "Platonymous.CustomMusic",
    "MinimumVersion": "1.0.0",
    "UpdateKeys":["Nexus:####"]
  }
}