OGG LOOPING?

Posts

Pages: 1
I saw that RPG Maker VX Ace supports looping oggs but for the life of me I cannot figure out how to "tag" something on an ogg or whatever. Am I missing something totally obvious? I've searched the net and I can't seem to find what i'm looking for. I want to loop some BGM in the right place so it doesn't start all over again.
Is it really that difficult and complicated? Or am I just retarded? :/
Rave
Even newspapers have those nowadays.
290
OGG looping == when it finishes play, it starts again. Like in Winamp when repeat single file is selected. There is no "intro" thing, unless you use midis in which case you tag it as in previous makers or some script for making two-part BGM (one file for "intro", rest for loop).
It's possible to create this loop point in an oblique fashion. You can make two versions of the same OGG. One contains the introduction, and the other is the OGG only from that point on. In a parallel process, have the engine count the seconds or frames until the introduction is over, then switch over to the looping main OGG.
Or just use a soundbyte of the start of the file as a sound (the non-looping part), and when it's done, make the looping ogg play.
I figured this out as soon as I noticed the RTP's BGMs loop and started inspecting the files. Use WinVorbis or the audio editor of your choice (that supports metatag editing, of course) to add custom metadata tags to the OGG file (the "other tags" tab). The custom tags you'll want to add are called loopstart and looplength. The value is expressed in samples rather than seconds, so take the starting point of the loop in seconds and multiply it by the sample rate (32.98 seconds * 44100 Hz, for example, but your sampling rate might be different). Looplength is the same, but it is a duration. Take the end point of the loop and subtract the starting point (again, in seconds), then multiply that difference by the sampling rate.

This will work in anything configured to read these metadata tags, though your standard media players usually aren't.

As an example, here is what Battle2.ogg and its metadata tags look like inside of WinVorbis:



In this example, the loopstart is at 7.84 seconds (345544 / 44100 = 7.84)
The loop duration, or loop length is 69.57 seconds, such that the BGM repeats between 7.84 and 77.41 seconds.

Finding the precise times might be difficult. It's fairly easy for me because I can just grab those points in FL Studio when I'm creating the music. But if you're trying to loop something that's already been encoded, you'll probably have to approximate or look closely at the raw waveform to identify a particular drum beat/amplitude spike.

Make sense?
author=Jude
I figured this out as soon as I noticed the RTP's BGMs loop and started inspecting the files. Use WinVorbis or the audio editor of your choice (that supports metatag editing, of course) to add custom metadata tags to the OGG file (the "other tags" tab). The custom tags you'll want to add are called loopstart and looplength. The value is expressed in samples rather than seconds, so take the starting point of the loop in seconds and multiply it by the sample rate (32.98 seconds * 44100 Hz, for example, but your sampling rate might be different). Looplength is the same, but it is a duration. Take the end point of the loop and subtract the starting point (again, in seconds), then multiply that difference by the sampling rate.

This will work in anything configured to read these metadata tags, though your standard media players usually aren't.

As an example, here is what Battle2.ogg and its metadata tags look like inside of WinVorbis:



In this example, the loopstart is at 7.84 seconds (345544 / 44100 = 7.84)
The loop duration, or loop length is 69.57 seconds, such that the BGM repeats between 7.84 and 77.41 seconds.

Finding the precise times might be difficult. It's fairly easy for me because I can just grab those points in FL Studio when I'm creating the music. But if you're trying to loop something that's already been encoded, you'll probably have to approximate or look closely at the raw waveform to identify a particular drum beat/amplitude spike.

Make sense?

Yes that makes perfect sense! I was able to find a program a long time ago that let me set an exact time (in samples) that i wanted to loop to in a song. But it wasn't like i could export or anything. it was basically just a toy. I could never figure out how to edit metatags on ogg vorbis... I have WinVorbis luckily. I had no idea it could do that. I will try this out!
FUUUUUUUUUUUUUUUUUUU-!!!!! IT WORKS!!!! I've been trying to figure this out for AGES!!! Million thanks to ya! Finally my game won't sound so crappy!!!
This is great! Would you happen to know if this works for .mp3s or other formats as well? Or is this a feature specific to .ogg files?
author=Zachary_Braun
This is great! Would you happen to know if this works for .mp3s or other formats as well? Or is this a feature specific to .ogg files?
You can add custom metadata tags to MP3s also, though you'll have to use software other than WinVorbis to do it.. I am unsure if VX Ace's player supports looping for MP3s, though. It doesn't have any MP3s in the RTP to examine. I might try later.
Pages: 1