Determine Song Length
In order to maintain audio consistency, recordings uploaded to the Video Game Music Preservation Guide must follow the timing guidelines. Unfortunately, many of the audio formats used by video game designers do not have built-in timing information and are set to loop forever. This guide will teach you how to determine a song's length so that it may be recorded to meet the standards of the VGMPF.
This guide will teach you how to determine the length of a Nintendo Entertainment System song in NSF format, but the guide can be easily modified for most other video game music formats.
Step 1: Setup
First, make sure you have the following programs installed:
Step 2: Load Your Soundtrack
Step 3: Make a Long Recording
Before we can determine how long a song is, we'll first need a full-length recording of the song to work with. Since we don't yet know how long the song is, we're going to have to guess. Most songs from the 1980s and 90s lasted only a minute or two, but some were longer. To determine the looping points, we want more than enough, so it helps to start with about 5 minutes of recorded audio.
Most video game music players allow you to specify a length of time to play a song, so let's start by customizing the Game Emu Player.
- In foobar2000, open the File menu and click Preferences.
- Expand the Playback item in the left tree view.
- Below that, expand the Input item.
- Click the Game Emu Player to view the component's settings on the right.
- Change the Default length is: to 5:00, and the Fade out for: to 0:00.
- Click OK to save the changes.
Now, we'll convert one of the songs into WAV format.
Note: If you are using a format that supports timing (like SPC), and it has an incorrect value set in it, you should remove the value before converting it to WAV. Check the individual format page for details on how to do this.
- Right-click on the first track and expand Convert, then click Quick convert.
- In the Quick Convert dialog, select WAV, and click Convert.
- Specify a file name and location to save the WAV file.
We now have a five minute WAV recording of the song.
Step 4: Viewing the Song
Determining song length is made much easier with a decent audio editor program. Open Audacity then drag and drop the WAV file we converted into it to see the song. Pressing the play button allows us to listen to the song. If you're familiar with the game, you will recognize NSF track 1 as the Entranceway music.
Step 5: Finding the Loop Point
While listening to the song, try to determine where the song loops. You should hear it at around the 24 second point, but we want to be more precise. Stop the play back and highlight the area a few seconds before and after where you heard the loop, then click the Fit Selection button to zoom in (it looks like a magnifying glass with two arrows pointing outward).
Click at the start of the zoomed in view and click play again. Watch closely and you should be able to identify where the song loops. Click on the loop point and the Selection Start box at the bottom should read 00h:00m:23.583s. This lets us know that a single play-through of the song is 0:23.583 seconds long. This is the value you should use for the song's Length property in the song page.
Some audio formats, like those that use a NEZ Plug style playlist, allow for additional timing information, like the length of an introduction portion of a song, which can be determined in a similar manner. Other formats, like VGM and SPC, allow you to enter the timing in the format directly and you can just convert them directly in foobar2000 and you won't need to manually adjust the recording. For non-timed formats, see the next step.
Step 6: Second Loop and Fade Out
Formats based on ripped audio code, like NSF, SID, AY, and the like, don't have an easy way to add timing to the format and require you to hand-edit the timing of the recording in order to match the two-loop standard of the VGMPF. Since we now know the first loop is around the 24 second mark, we can predict that the second loop should be around the 48 second mark.
Zoom out to see the whole song by clicking the Fit Project button (it looks like a magnifying glass with two arrows pointing inward), and then highlight around the 48 second mark. Click the Fit Selection button and listen to the track to find the songs second loop point, which you should hear at 0:47.187.
This is the end of the second loop. We also need 10 seconds more of the song for the fade out. You can easily jump ahead 10 seconds in Audacity by clicking in the Selection Start box and adding 10 seconds to the value, giving us 0:57.187. Click the Fit Project button again and you'll see the current line drawn at the 57 second mark.
The rest of the song is unwanted at this point, so click in the End box and change the time to 5:00.000 to select the remainder of the recording. You can then type CTRL+K to delete the selected portion, or click Edit -> Delete from the menu. If you click the Fit Project button you can see what's left of the recording.
To add the fade out, we need to select just the last ten seconds of the song. So, in the Selection Start box, subtract 10 seconds to get 0:47.187, which highlights the last 10 seconds. Then, in the Effect menu, click Fade Out, and the last ten seconds of the song will be turned into a fade out.
Step 7: Save the Song
To save your finished song, open the File menu and click Export Audio.... This will open the export dialog and allow you to save your song. I suggest saving in FLAC format at level 8 compression and 16-bit depth so you will always have a lossless version of the song to work with. Before you upload, you can easily convert the entire soundtrack to OGG using foobar2000. Of course, if you want to save space, you're free to export directly to OGG, just set the quality to 4.
Click the Save' button, and the Edit Metadata dialog will pop up. Just click the OK button and leave everything with its default values, we'll update it later.
That's one song done; repeat these steps for each song in the soundtrack.
Once you've set the proper timing for the entire soundtrack, you're ready to use foobar2000 to add the metadata.