Obtain the custom music you with to use. A large collection of songs to use may be obtained here. Only .txt files are usable; MIDI, MP3, WAV, etc. will not work!
Once you have your song, open up "Addmusic_list.txt".
Add a new line at the bottom of the file, type in an unused number, and then the song's filename. For example, "34 My Song.txt" (without the quotes). This will be the song number that you will use in Lunar Magic.
Copy and paste the text file into the folder named "music". If there are any samples (these end with ".brr"), then copy and paste them into the "samples" folder.
If the song comes with a custom bank file (a file that ends with ".bnk"), then you must add the following text to the top of the file:
#samples
{
"XXXXXXXX.bnk"
}
where XXXXXXXX.bnk is the name of the bank file. DO NOT use Sample Tool, just add this bit of text. You will also need to copy and paste this bank file into the "samples" folder.
Run the program. You will be promped for your ROM name. Make sure that your ROM is in the same directory as the program and that its name does not contain any spaces, then type in the name and hit ENTER.
Some text will appear on the screen describing details of each song you've inserted. Examine it if you like, then exit the program.
You can now use custom music. A file named
Open up your song's text file.
Look for a line or lines that look like sXX_10_14_13_12_16_15_FF or something similar.
At the top of the file, add the following text:
#samples
{
#default
#AMM
"sample1.brr"
"sample14.brr"
"sample13.brr"
"sample12.brr"
"sample16.brr"
"sample15.brr"
}
Where "sample10.brr" is the sample in blist.txt at slot 10, "sample14.brr" is the sample in blist.txt at slot 14, etc. The order of the samples must be in the order that the sXX line specified, so be careful!
Delete the sXX line, save the file, and then exit.
Copy the sample files (probably in a folder named "brr" or "samples" into your sample folder.
10 Trumpet.brr 11 Strings.brr 12 Bass.brr 13 Snare.brr 14 Cymbal.brr 15 Organ.brr 16 Choir.brr
#samples
{
#default
#AMM
"Trumpet.brr"
"Strings.brr"
"Cymbal.brr"
"Bass.brr"
}
Open the offending file. Find the text "#default" and replace it with "#optimized". If this text does not exist (and the text "#samples" also does not exist), then add the following to the top of the file:
#samples
{
#optimized
}
Otherwise, move on to the next step.
Find something that looks like "$F1 $XX $YY $ZZ", where XX YY and ZZ are numbers. Decrease $XX until you don't get any more errors. This may make the song sound a bit different, however.
If you've reached this step, this song is simply too big for your hack. You will either have to delete some sound effects, or remove a global song (explained in the advanced section). This should hopefully never happen, however.
Return to the main page