00:00
00:00
Newgrounds Background Image Theme

EVILTHWEK just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

Hyb's 100 - MP3 looping Tutorial

2,359 Views | 3 Replies
New Topic Respond to this Topic

Hyb's 100 - MP3 looping Tutorial 2007-04-17 07:12:15


I'm not sure if people know how to do it and just don't care, or don't know how to do it. Either way, as my 100th post on Newgrounds, I've decided to write a small tutorial on looping mp3s. And by small tutorial I of course mean I'm going to make this simple task as long and complicated as I possibly can in order to feed Rucklo's lust for unnecessary content (it's true, keep making useless threads guys he needs to feed). I've wanted to do this for a while, but no one responded much when I brought up the idea >=( However, as there are only a couple weeks left for the Pico Loop MAC, I figure now is a better time to do this than never.

So with that said, I now present....

---------------------------------------------
-----------------
Hyb's 100 - MP3 Looping Tutorial Xtreme

It's 4:00am and I have no life.

---------------------------------------------
-----------------

Why mp3s Suck at Life
First of all, it is necessary to know why mp3's cannot loop perfectly in order to better understand the process of making them loop correctly.

All mp3s have meta data embedded either before or after the actual audio content, aka an ID3 tag. This contains extraneous information such as the genre, song title, artist name, and track number. Unfortunately, this data is stored as part of the media adding approximately 50-70 milliseconds of quiet static to the begin and/or end of the mp3. This causes just a small skip in the song which usually is unnoticeable. However, when we try to make a loop, any skip, even of such a small size, ruins the continuity of the loop and makes it more repetitive sounding.

The Solution.
The goal is to simply to find a portion of the song that is completely silent. Then we create a loop ending it at that part so that the silence blends in with the extra meta data. The end of the song is deleted to compensate for the extra meta data and to keep the tempo flowing.

Find a portion of silence in a loop that is undoubtedly more than 60 milliseconds long and loop it from there. This is easier with certain genres of music (and slower tempos), especially solo pieces where there is often long pauses. Sometimes you have to adapt a song to have the required length of silence using fades and volume envelops. In some cases, the inconvenience of looping and mp3 interferes too much with the total quality of the loop, and thus is not worth the damage. Its up to the artist to decide whether or not to go through with this.

Approximating the length of the added-on meta data isn't always enough, find out how much time is actually being added to the loop when converted to mp3. To do this you must first mix/render your song as wav. If you can, find out the exact length of it in samples (otherwise if you can't determine its length in samples, use milliseconds, etc., but get it as precise as possible). Then, convert to or save as mp3 and reopen the track. Find out the length of the mp3 version and subtract it from the original's length to find out how much will be added to the wav file. Its usually around 2000 samples or about 60 milliseconds. Open the original wav file again and delete the amount that is added from the portion of silence you are looping at. This way, when you upload the song on to Newgrounds, the loop will not lose its flow even with the added meta data.

Tips on Looping
I did a few experiements on getting my songs to loop properly and luckly, I think I figured it out well enough by the time I submitted my first track for the MAC contest. I learned a few things that might help you with looping. These may not be the most effective methods, so its up for discussion on how this should be done. This is how I do it and it seems to have worked fine for my last 2 loops.

- Don't always loop from where your song ends and begins. Find some point in the song where it gets silent and loop it from there if the end of the song isn't comletely silent because of echo effects and reverb, etc. So instead of having your loop go from the beginning of the actual piece to the end, cut it so that it starts partially through the loop at its most spread out or quiet portion. This may make the song sound weird and again its up to you whether or not its worth making the song loop properly.

- Sometimes it sounds good, especially in classical and ambient songs, to make the loop fade out completely and fade back in. This can work good, but make sure you delete an extra portion of silence as instructed to maintain the song's tempo.

- Intend for your song to loop when you make it. If you intend for it to loop you have a better chance of maintaining the songs continuity. Basically if the only quiet part is when it loops, it makes the loop sound more boring and repetitive than if the dynamics of the song are more unpredictable. This mostly applies to when you make a loop out of a full length song - save it as a new version and alter it to loop properly.

- Following the last two ideas, deliberately make a portion of your song the part where you want to loop it from. I like to make a moment of silence almost like a cadence towards the end of a song where it loops. Then from there, have some kind of reintroduction to the beginning of the song, all within the same bar. This keeps the loop from being so obvious and keeps it flowing better.

- Avoid reverb and echo, at least on the part where the song loops. On the other hand, echo effects can help create a better illusion of a loop when used properly. For example, if the end of the loop plays a dry sound and then is silent and the begining of the loop plays the wet sound (the first echo), the loop becomes much less noticeable.

- Make more than one variation on your loop. The way I see it, if you have short, simple, 8-bar loop, why not add another variation (or two... or three) and make 16 or 32 bars? A small change to the drums can make the loop become much less repetitive.

- Songs previewed on newgrounds actually sound pretty accurate. Doing all of this work will pay off. It is possible to get a song to at least sound like its looping properly, and the newgrounds media player will actually play a good loop close to perfectly (just in case you were skeptical).

So good luck and happy looping! If you plan on entering the March/Februrary MAC or any such future loop contest, try using some of vast knowledge you just ascertained and make a better loop. Good luck!
If you want me to clarify anything, I can provide examples without self-whoring here, so PMs are welcome (I do check inbox regularly). Additionally, any other questions and comments are welcome on this forum as well. I know I'm not teh brightiest knife in the box, so please share anything you can to add to this.

Othwerise STFU!!!

Your favorite NG user,
-HybrisHybrid

Links
http://www.compuphase.com/mp3/mp3loops.htm
Interesting project although I didn't quite understand it. Might be worth looking at I think.
http://en.wikipedia.org/wiki/Mp3
Some good stuff to know.
http://en.wikipedia.org/wiki/ID3
I get everything I know from Wikipedia...
http://www.newgrounds.com/bbs/topic.php?id=67 3827
MAC March/Feb. ENTER THE CONTEST, BITCHES!

Couldn't find any related threads on Newgrounds.

Response to Hyb's 100 - MP3 looping Tutorial 2007-04-17 07:45:25


this is what I need

Response to Hyb's 100 - MP3 looping Tutorial 2007-04-17 08:51:25


Useful, thanks!


BBS Signature

Response to Hyb's 100 - MP3 looping Tutorial 2007-04-17 13:57:41


Very good tutorial mate, I'm definitley bookmarking this (and suggest everyone else do too, if not for other than your own sake!). Good and helpful tutorials like this is definitley things I would like to see in the sticky!


Wakka wakka