Xonotic Forums
[TUTORIAL] Making .ogg files loop in the engine - Printable Version

+- Xonotic Forums (https://forums.xonotic.org)
+-- Forum: Creating & Contributing (https://forums.xonotic.org/forumdisplay.php?fid=10)
+--- Forum: Xonotic - Music and Sound Development (https://forums.xonotic.org/forumdisplay.php?fid=33)
+--- Thread: [TUTORIAL] Making .ogg files loop in the engine (/showthread.php?tid=5714)



[TUTORIAL] Making .ogg files loop in the engine - Archer - 07-22-2015

Here's is a small little video tutorial on how to make .ogg files loop in the engine.

Video:



Software required (cross-platform):
- Audacity (right on the video): http://sourceforge.net/projects/audacity/
- MusicBrainz Picard (left on the video): http://picard.musicbrainz.org/downloads/


Notes:
- MAKE SURE that you have "samples" selected as unit for audio length in Audacity, you can right-click the selection bars at the bottom and change the unit like that.
- You can make the loop start/end anywhere you want, just select a desired position in Audacity and note the amount of samples in the "Selection Start" bar.


That is all, hope this is useful.


RE: [TUTORIAL] Making .ogg files loop in the engine - BuddyFriendGuy - 07-22-2015

Thank you, Archer. Just to clarify:

1. Xonotic engine will automatically respect the loop settings of OGG files, right?

2. If I have LOOP_START = 500 and LOOP_END=9000, then the sequence of playing would be:
0-499
500-9000
500-9000
500-9000
...
until the track is terminated, and anything after 9001 won't get played at all, correct?


RE: [TUTORIAL] Making .ogg files loop in the engine - Archer - 07-22-2015

(07-22-2015, 04:21 PM)BuddyFriendGuy Wrote: Thank you, Archer. Just to clarify:

1. Xonotic engine will automatically respect the loop settings of OGG files, right?

2. If I have LOOP_START = 500 and LOOP_END=9000, then the sequence of playing would be:
0-499
500-9000
500-9000
500-9000
...
until the track is terminated, and anything after 9001 won't get played at all, correct?

I don't understand what you mean with the first question, but you always need to add these tags if you want Xonotic to properly loop the files (so seamlessly).

Your second question is something I haven't tested in practice but should be correct indeed. It should return to 500 right after sample 9000 and continue from there.

Best is to indeed test it out to confirm it, replace a sound that loops in an obvious way (such as the arc loop) with a testfile that has START and END not at the beginning/end of the file.


RE: [TUTORIAL] Making .ogg files loop in the engine - BuddyFriendGuy - 07-23-2015

@Mr. Bougo pointed me to the answer. It was discussed before already. Here's even a Wiki page for technical details.

@Archer, I added your video to the Wiki page.

Thank you all.