How to Make Looping Oggs
Introduction
The Ogg Vorbis sound format is a perfect format for BGMs in VX. Why? Unlike XP, VX supports the streamed playback of Ogg files as well as looping Oggs. What does this mean? It means you can start playing a large song and loop back to a specific point in the song, much like the MIDI event b06f. So why would you want to go through the trouble of making Oggs loop? Simple: A much smaller project size, great quality, and your songs can loop.
This tutorial is on how to edit your Ogg files to be loop-able in VX.
What You Need
For this tutorial, I will be using four programs: Calculator, Notepad, Audacity, and WinVorbis. Calculator and Notepad are standard applications, so you just need to download Audacity and WinVorbis.
Calculator will be used for calculating the values for the looping comments.
Notepad will be used to store the calculated values for when they're needed.
Audacity will be used for finding the exact section of the song that will loop. You may download Audacity here: http://audacity.sourceforge.net/
WinVorbis will be used to add the looping comments to the Ogg. You may download WinVorbis here: http://www.stationplaylist.com/winvorbis/
Step 1: Importing Your Ogg
Right click the Ogg file you want to loop and open it with Audacity. If Audacity is not in the open with list, select "Choose Program" and find it.
Once Audacity has imported your ogg, feel free to remove any white noise or blank at the beginning. Just select the section you want to delete and press the "Delete" key.
Step 2: Finding Your Loop
This is quite possibly the most tedious step. First, you'll want to get a general idea of where your loop is. Once you have the idea, try to select the portion of the song that you want to loop.
Don't worry about being exact right here. A later phase of this step if to get it correct.
Now check to see how close your loop is. Hold down SHIFT and press the PLAY button. If the loop sounds near perfect, great! Else, you're going to have to try resizing the selection to make it closer. Remember: You need to hit STOP before changing your selection!
Now it is time to get your loop to be exact! Zoom into the LEFT side of your loop and move the selection to something that can be easily matched. It should be very close to your original selection.
Next, do the same to the right hand side, making sure that if the left side was next to it, they'd meet up.
Keep on adjusting the size of your selection until the loop is seamless. Just remember to hit STOP before changing the selection.
Step 3: Calculating Your Values
Now that you have your loop perfectly looping, it's time to figure out the values to be used by the looping comments.
The first, and possibly the most important value is the "Sample Rate". This tells the Ogg how many "samples" there are per second. The Sample Rate can be figured out just by looking the the lower-left hand corner of Audacity.
Record down this value in Notepad if you have trouble remembering it.
The second value is when your loop starts. The thing to note is that Oggs don't use hours:minutes:seconds like we do. Instead, they use sample positions. To find the sample position of the loop's starting point, look once again to the lower-left corner of Audacity.
Here, you'll find the time the loop starts, the time the loop ends, and how long the loop is. These are all in minutes:seconds, so we'll need to convert them to sample positions. How, you ask? Remember the "Sample Rate" you recorded down in notepad? Simply multiply the times in seconds by it, and you get your sample positions. Keep the decimal places of your converted answer. One wrong digit, and you're loop won't work properly!
Start of Loop: 11.870332 * 44100 = 523481.6412
End of Loop: 46.780623 * 44100 = 2063025.4743
Length of Loop: 34.910291 * 44100 = 1539543.8331
Since we don't need the end of loop value, we can toss it away. The only two sample positions we need are the start of loop, and the length of loop. Record these into Notepad.
Step 4: Exporting Your (Smaller) Ogg
Congradulations! You know what values to use for your looping comments! Now you need to export your Ogg to be only the size it needs to be. Why? Some people have issues with material after the loop which causes the loop to malfunctions. Also, it reduces your Ogg by 30-50%!
Back in Audacity, make your loop selection cover the beginning of the song. What good does a looping song do without a beginning?
Now just go to the File Menu and select "Export Selection As Ogg Vorbis...". Save it under a different name or folder, just incase you somehow messed up your loop.
Step 5: Adding The Loop
Now it finally comes time to add the looping comments to your Ogg! Right click the Ogg you edited and open it with WinVorbis.
Click on the "Other Tags" tab then click on the "Add" button.
A dialog will pop up with two text fields: "Name" and "Value". It is here, that we'll add our comments.
The two comments that we will add are: LOOPSTART, and LOOPLENGTH. Enter the name of one of the comments in the "Name" box, and the corresponding value in the "Value" box. If you look back to your Notepad notes, you'll see that LOOPSTART should be 523481.6412, and LOOPLENGTH should be 1539543.8331.
Once you've entered in both values (One at a time!), hit CTRL+S to save. Exit WinVorbis.
Step 6: Profit
Congradulations, you now have an Ogg Vorbis file that loops when played in RPG Maker VX! Please note that Ogg files will not loop if played as an ME, so play them as BGMs!
I hope you have enjoyed this tutorial, and have learned something about looping Oggs!
Introduction
The Ogg Vorbis sound format is a perfect format for BGMs in VX. Why? Unlike XP, VX supports the streamed playback of Ogg files as well as looping Oggs. What does this mean? It means you can start playing a large song and loop back to a specific point in the song, much like the MIDI event b06f. So why would you want to go through the trouble of making Oggs loop? Simple: A much smaller project size, great quality, and your songs can loop.
This tutorial is on how to edit your Ogg files to be loop-able in VX.
What You Need
For this tutorial, I will be using four programs: Calculator, Notepad, Audacity, and WinVorbis. Calculator and Notepad are standard applications, so you just need to download Audacity and WinVorbis.
Calculator will be used for calculating the values for the looping comments.
Notepad will be used to store the calculated values for when they're needed.
Audacity will be used for finding the exact section of the song that will loop. You may download Audacity here: http://audacity.sourceforge.net/
WinVorbis will be used to add the looping comments to the Ogg. You may download WinVorbis here: http://www.stationplaylist.com/winvorbis/
Step 1: Importing Your Ogg
Right click the Ogg file you want to loop and open it with Audacity. If Audacity is not in the open with list, select "Choose Program" and find it.
Once Audacity has imported your ogg, feel free to remove any white noise or blank at the beginning. Just select the section you want to delete and press the "Delete" key.
Step 2: Finding Your Loop
This is quite possibly the most tedious step. First, you'll want to get a general idea of where your loop is. Once you have the idea, try to select the portion of the song that you want to loop.
Don't worry about being exact right here. A later phase of this step if to get it correct.
Now check to see how close your loop is. Hold down SHIFT and press the PLAY button. If the loop sounds near perfect, great! Else, you're going to have to try resizing the selection to make it closer. Remember: You need to hit STOP before changing your selection!
Now it is time to get your loop to be exact! Zoom into the LEFT side of your loop and move the selection to something that can be easily matched. It should be very close to your original selection.
Next, do the same to the right hand side, making sure that if the left side was next to it, they'd meet up.
Keep on adjusting the size of your selection until the loop is seamless. Just remember to hit STOP before changing the selection.
Step 3: Calculating Your Values
Now that you have your loop perfectly looping, it's time to figure out the values to be used by the looping comments.
The first, and possibly the most important value is the "Sample Rate". This tells the Ogg how many "samples" there are per second. The Sample Rate can be figured out just by looking the the lower-left hand corner of Audacity.
Record down this value in Notepad if you have trouble remembering it.
The second value is when your loop starts. The thing to note is that Oggs don't use hours:minutes:seconds like we do. Instead, they use sample positions. To find the sample position of the loop's starting point, look once again to the lower-left corner of Audacity.
Here, you'll find the time the loop starts, the time the loop ends, and how long the loop is. These are all in minutes:seconds, so we'll need to convert them to sample positions. How, you ask? Remember the "Sample Rate" you recorded down in notepad? Simply multiply the times in seconds by it, and you get your sample positions. Keep the decimal places of your converted answer. One wrong digit, and you're loop won't work properly!
Start of Loop: 11.870332 * 44100 = 523481.6412
End of Loop: 46.780623 * 44100 = 2063025.4743
Length of Loop: 34.910291 * 44100 = 1539543.8331
Since we don't need the end of loop value, we can toss it away. The only two sample positions we need are the start of loop, and the length of loop. Record these into Notepad.
Step 4: Exporting Your (Smaller) Ogg
Congradulations! You know what values to use for your looping comments! Now you need to export your Ogg to be only the size it needs to be. Why? Some people have issues with material after the loop which causes the loop to malfunctions. Also, it reduces your Ogg by 30-50%!
Back in Audacity, make your loop selection cover the beginning of the song. What good does a looping song do without a beginning?
Now just go to the File Menu and select "Export Selection As Ogg Vorbis...". Save it under a different name or folder, just incase you somehow messed up your loop.
Step 5: Adding The Loop
Now it finally comes time to add the looping comments to your Ogg! Right click the Ogg you edited and open it with WinVorbis.
Click on the "Other Tags" tab then click on the "Add" button.
A dialog will pop up with two text fields: "Name" and "Value". It is here, that we'll add our comments.
The two comments that we will add are: LOOPSTART, and LOOPLENGTH. Enter the name of one of the comments in the "Name" box, and the corresponding value in the "Value" box. If you look back to your Notepad notes, you'll see that LOOPSTART should be 523481.6412, and LOOPLENGTH should be 1539543.8331.
Once you've entered in both values (One at a time!), hit CTRL+S to save. Exit WinVorbis.
Step 6: Profit
Congradulations, you now have an Ogg Vorbis file that loops when played in RPG Maker VX! Please note that Ogg files will not loop if played as an ME, so play them as BGMs!
I hope you have enjoyed this tutorial, and have learned something about looping Oggs!