Difference between revisions of "Sound Replacement Tutorial"

From Pikmin Technical Knowledge Base
Jump to navigation Jump to search
m (Espyo moved page User:Untitled-1/Sound Replacement Tutorial to Sound replacement tutorial without leaving a redirect: Other users want to contribute, but are having a hard time.)
Line 1: Line 1:
 +
{{todo|Cleanup.}}
 +
 
First, make sure you have Python installed. Then, download [https://cdn.discordapp.com/attachments/301121846944727040/358295103019679764/Pikmin2SoundHelperScripts.zip Yoshi2's sound helper] and extract the contents to your root's AudioRes folder. Run create_workshop.py, and wait for it to finish extracting everything.<br>
 
First, make sure you have Python installed. Then, download [https://cdn.discordapp.com/attachments/301121846944727040/358295103019679764/Pikmin2SoundHelperScripts.zip Yoshi2's sound helper] and extract the contents to your root's AudioRes folder. Run create_workshop.py, and wait for it to finish extracting everything.<br>
 
<br>
 
<br>
Line 24: Line 26:
 
<br>
 
<br>
 
After this, you can rebuild the iso, and if your wav files weren't too big before, then everything should work perfectly!
 
After this, you can rebuild the iso, and if your wav files weren't too big before, then everything should work perfectly!
 +
 +
[[Category:Notes]]

Revision as of 11:31, 9 July 2023

To do: Cleanup.

First, make sure you have Python installed. Then, download Yoshi2's sound helper and extract the contents to your root's AudioRes folder. Run create_workshop.py, and wait for it to finish extracting everything.

In the waves folder are the extracted sounds, which you must replace with wavs that are at least very close in file size. It's reccomended that all your sounds are in mono, and are the same length and sample rate as the sounds they're replacing.

To change the sample rate, go to Tracks>Resample in Audacity, and change the sample rate to whatever number you need it to be. Then, in the bottom rate, you should see a drop down called "Project Rate (Hz)". Change the number in that drop down to whatever sample rate you need the sound to be; it should be the same number you just used in resample.

To change the track to mono, go to Tracks>Mix>Mix Stereo Down to Mono. Sometimes, the sound may already be at a good sample rate, and/or may already be in mono, so those steps aren't always needed.

You should also make sure your sound should be heard, in which case you should select the entire sound (Ctril+A) and do Effect>Amplify>OK.

Finally, go to File>Export and then save it as a 16-bit PCM wav. You should then replace the vanilla sound you want to replace with your edited sound. For an as-of-now incomplete list of which sound is which, go here. Keep in mind the names of the sound files you are changing, because you'll need it for the next part.

Next, go in the workshop folder and open wsys.xml in Notepad++. Find each sound you replaced, and do the following:

1) Replace the "repack" in the filepath with waves.

2) Replace the ".raw" at the end of the sound file name with ".wav".

3) Remove the "rate=XXXXX " part. This will make the program automatically calculate the sound's sample rate when it repacks the sounds. If you don't do this, then the sound may be at the wrong pitch or speed in-game.

4) Certain sounds have a "loop point" that you can change. If you needed to make one of your sounds longer than the sound it's replacing, you should change this. To help determine which sample count you want it to loop at, go in Audacity, and at the bottom where it shows the current time the sound is at, click on the small arrow and change the units to samples instead of hh:mm:ss + milliseconds. Now, whenever you select a part of your sound in Audacity, you can see which sample point you are at, and thus it's much easier to make a custom loop.

Once you've done all that for each sound you've replaced, go back to the AudioRes folder and run rebuild_soundfiles.py. This script may take a while to execute, but once it's done, go in the newly created output folder. Copy every new aw file into AudioRes/banks, and copy PSound.aaf into the AudioRes folder itself.

After this, you can rebuild the iso, and if your wav files weren't too big before, then everything should work perfectly!