Jump to content
  • Advertisement
Sign in to follow this  
keithmoore

How to confirm seamless looping?

This topic is 2838 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Got a piano loop in Logic that I need to bounce to an mp3 (mobile game). The audio loops seamlessly in Logic and bouncing to mp3 adds those bits of silence. I've tried editing the mp3 in Audacity to remove those bits of silence and it seems to be smooth again, but when I test the loop in Quicktime Pro I get that hesitation again.

Is there a "best" way to make sure that my loops are looping seamlessly before I pass them on to the game folks? I feel like I can't trust anything in my system!:)

Share this post


Link to post
Share on other sites
Advertisement
Are you sure that what loops correctly is the whole audio file, rather than a certain portion between loop points that are lost when exporting? You might have to explicitly delete bits of silence before exporting.
Are you sure you haven't set options in Logic to add silence at the beginning or at the end, to add a fade in and/or fade out effect, or to pad file length to some block size used in MP3 encoding? If the sound loops properly in Logic and it has silence after export, there's no other place to look.

Of course, both saving from Audacity and test playback in Quicktime Pro might alter the presumably repaired audio file in the same ways.

Share this post


Link to post
Share on other sites
Let me make sure I understand what you're doing:

You're creating then bouncing out a MP3 file in Logic.

You're bringing it into another DAW (in this case Audacity), cutting the silent gaps, then bouncing it out again as a MP3 file?

If so, then your issue is trimming the gaps in another DAW then bouncing out just recreates the same gaps. You need to use a MP3 trimming program which subtracts the gaps but still keeps the MP3 format. As far as I know, Audacity doesn't do this, but I could be wrong. To test the clip, I open it up in Peak Pro (you could use Logic though) and loop the playback ensuring that you're only playing back the file's exact length. It may take several tries to get it perfectly seamless but it is possible. The key is a specialize program that removes the gaps.

Thanks,

Nate

Share this post


Link to post
Share on other sites
Hey Keith!

This is a problem that I've encountered many times.

To add to what Nate said, don't ever open a mp3 edit it and then save it again. The only thing that will happen is you'll add another gap and compress the compression.

I've yet to see a software that manages to create seamless loops from mp3 (although if somebody finds one, please tell me). Mp3 adds about 25ms of silence at the beginning. Now the problem here is about 25ms. If it was a fixed time then the programmers could have solved it easily. Just skip the first 25 ms, right?

Being in production doesn't give you much time to investigate but from what I found, this is the best explanation:

http://www.compuphas...p3/mp3loops.htm

MPEG 1 Layer 3 (MP3) stores a sound clip in frames of 1152 samples and all frames must be full. When you take an arbitrary clip, it is unlikely that it has a multiple of 1152 samples and encoding it into an MP3 file will therefore probably result in a final frame that has "silence" padding up to the next multiple of 1152 samples. Even if the original clip has an exact multiple of 1152 samples, many encoders append another frame of silence as "padding".

These days I basically accept the gap or use another encoder. If you're producing for iOS I'm sorry to say you don't have that many options :(

If the people who are developing the game are using Unity 3 then you might have an alternative. They claim to have fixed the looping issue but I haven't had time to try that either. Then again, if you use Unity why even go for old and grumpy mp3-format anyway? :P

The last alternative that I know of is FMOD. The tool is horribly non-intuitive and you have to pay for the license if it's a commecial game.

Cheers

//Henrik

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!