Skip to content

Creating Audio Files

To create audio files for Persona 4 Golden (PC), you will need the following at minimum:

  • The audio file you’re adding in WAV format
    • If your file is not a WAV, you’ll want to convert it using FFmpeg (this can be installed for Audacity following these instructions)
  • Yona

To loop audio files (for music or repeating SFX, etc.), you will need the following:

Music and certain sound effects use loops defined within the data of the audio files, so they will continuously play as long as they are being called/used. These need to be set up so that the audio file will repeat correctly.

If you are editing an audio file that requires looping, read Looping Audio. Otherwise, skip to Converting Audio

If your audio file requires loops, you will need to find and set up loop points, which tell the audio where to start looping again. In some cases, this is as simple as finding start and end loop points, and in other cases, more advanced audio editing needs to be done in order to ensure a clean sounding loop. Generally, video game songs tend to be composed with looping in mind, but other songs may be more difficult to loop.

There are three ways to get loop points depending on your use case. In most cases, you will want to automatically find loop points using PyMusicLooper. In some cases, you may need to manually find loop points. In other cases, you may simply need to loop the entire file from start to end. These methods are detailed below.

The simplest way to get loop points is to use PyMusicLooper to automatically find optimal loop points. PyMusicLooper is a command-line interface (CLI) program, which means you have to run it by directly inputting commands into a terminal rather than using a GUI like with many other programs.

Open a terminal in the same spot as your audio files (either command prompt or Powershell). Type in the following command: pymusiclooper --samples -i play --path <audio file>

The program will take a few seconds to process the audio file and try to find the best loop, then it will output the following:

The best loop points that the program has found are displayed in the output. As shown at the bottom of the output, you can select a loop by typing in its index number, and by appending p, you can preview the loop to make sure it sounds good before selecting it.

Generally, the lower the index, the better the loop will be, but make sure the loop captures the entire segment of the song you want; as long as the score is high enough (>95%), the loop will generally sound fine.

Once you’ve found a loop you like, save the loop start and loop end values; you will use them when converting your audio in the next section.