LOOPING OGG FILES FOR USE IN RPG MAKER & OTHERS

Loop your files like a pro! A step-by-step guide on giving your songs a nice start that doesn't play twice!

  • Mirak
  • 11/12/2016 08:10 AM
  • 13929 views


This tutorial is available on the web already, but i thought i'd rewrite it to make it even more understandable by people who appreciate a more thorough indication on what to do and where to click.

This tutorial is a step-by-step guide on how to loop .ogg files like the pro's do.

You might have noticed in various RPG's that music has a special way of looping. A battle theme might start with an introductory beat before the main melody kicks in, then when the song finishes, instead of starting from the beggining and playing the introductory beat again, it loops back to the main melody! Let's learn how to do this.

◄ Things You Will Need ►

For this tutorial you will need two things:

• The free audio editing software Audacity, latest version.
• The .ogg track you want to loop. For this tutorial, let's practice using this one (Right click > Save As).

Note: Audacity has the capability of opening various file formats, so don't worry if all you've got is a WAV or MP3* file, audacity can open them, and then you can save the audio in whatever format you'd like, in this case it will be Ogg Vorbis.
* Audacity needs lame_enc.dll (Right click > Save As) to open and export to mp3.

◄ Instructions ►

Install and run Audacity, then open SuperPantito_TitleScreen.ogg with it.

Your screen should look more or less like this one.



This is the basic user interface of Audacity. Most of what you see is obvious stuff, the round buttons below the taskbar play, pause, stop, skip to start or end the currently loaded track, and the last button records audio input from your microphone if you've got one.

Try it out, press and hold Shift, and then click on the round Play button (the button with a green arrow that looks like ►), this will play the song with looping enabled.

Once it finishes, you'll notice it starts from the beggining, repeating the drum section at the start. Ideally, we want it to loop right when the main drum beat starts.

We could spend a bit of time explaining the complete interface of Audacity, but for the purpose of this tutorial, let's focus our immediate attention on this section:



Click on the little arrow pointing down at the right side of the gray box under "Selection Start:", and a popup window will appear. Select "Samples" from the window and the gray boxes will change into sample selection mode. Afterwards, check the circle that says "Length" above the second gray box.



Once you've done this, we can begin. Hover the mouse over the blue squiggles at the middle, which represent the audio waves of our song. If you click on any part of the song, the track will start playing from that point the next time you press the Play button.

What we want is to loop the song so you don't even notice the song started playing again. We need to find the points of the song where it should loop. This is something you have to do carefully, if you choose two parts that don't sound more or less the same, when the track loops you'll hear a noticeable cut and that's not what we're looking for.

For your convenience, i've already cut the track at an easy to locate loop point. The next thing we will do is place a marker for the part where the song ends, and another one for when the song starts again. In this particular song, let's place our song's starting point by clicking anywhere on the blue squiggles, and then clicking on the Skip To End button (The round button that looks like ►►| ), this will place the cursor right at the end of the song.



Next, go to the taskbar at the top, and click on "Tracks > Add Label At Selection", a label shall be added below the song, you'll be asked to name it, name it "Loop End". This is where the song shall end.



Now we have to add another tag, this time for when the song begins. Here we will have to be more careful. For convenience, here's a screenshot of the place where the starting point is:



It's right when the cymbal crash sounds. You might want to zoom-in on the track so you can click on the right moment before the cymbal sounds. You can do this by pressing on the magnifying glasses at the top bar.



As the little icons explain, the magnifying glass with a plus sign (+) will zoom in, while the one with the minus sign (-) zooms out.

Once you've located and clicked on the right point where you want the song to start again, repeat what we did before, click on "Tracks > Add Label At Selection", and name the new label "Loop Start".



Now we have both of our labels. Zoom out a bit by clicking on the magnifying glass with a minus a few times, this way we can see the entirety of our track and both labels.

Next, click and drag from "Loop Start" to "Loop End" to select the portion of the track that we want to loop. Don't worry about precision, thanks to the labels the cursor will stick to them if you click close to them.



If you want to test if you got the loop right, press and hold Shift, and then click on the play button ( ► ) to play and loop what you selected.

Make sure you still have the part from Loop Start to Loop End selected, and notice how the gray boxes we saw previously have some numbers displayed on them, keep these numbers at your sight, you'll need them in a bit:



With your loop still selected, let's click on "File > Export Audio".



A save file window will appear. Choose the folder you want to save the track in, name your new track, and select Ogg Vorbis as filetype.



Once you did this, the export window will appear. This window contains all the tags that display information about your file, like the track's name, Author, album, year, etc.

We need two empty tags, so click on the "Add" button two times. This will create two new empty tags.



Click on the first tag and name it LOOPSTART, then the one below and name it LOOPLENGTH. This will create our loop.

Now, remember our gray boxes with numbers on them? Take the numbers of the first box (under "Selection Start:") and ignoring the commas, type them on the block next to LOOPSTART. Next, take the numbers of the second gray box (Under "End" and "Length") and also ignoring the commas, write them on the value for LOOPLENGTH.



Finally, click on "OK", and your song will save.
Next, open up your maker of choice (In my case i tested it using Rpg Maker VX Ace, RPG Maker MV and Game Maker Studio), and if you did everything correctly, your track should only play the beggining once, and loop the main part of the song after it ends!

This would have been the resulting file.

Now that you know how to properly set up loop points you can try out this technique with any kind of song.

Thank you for reading this tutorial and i hope you found it instructive.
If you have any questions or comments feel free to ask.