MP3 File Manipulation

So I started on a site that is going to do some manipulation of MP3 files dynamically, taking a preview out of the song that should be sort of representative of the song. I toyed with a few different ways of pulling out the section I wanted, looking for large dynamic changes, widest frequency range, flattest frequency pattern, breaks in the song, etc. I also tried a few different methods of making the snip. Here's what I found.

1) Regardless how cool it is to be able to detect changes in dynamics, frequency ranges, patterns, breaks, or anything else it just doesn't mean that the section will be representative.

2) MP3 players are fairly bullet proof and don't mind some abuse. There isn't any need to split properly across frames within the file - MP3 players (all that I've tested in Win and Linux) all handle improperly split files just fine.

3) Bitrates don't translate perfectly. Just because you know how many bits per second a file is doesn't mean you can clip the file at seconds * bits/second and get the proper spot. Nor can you take that spot, add some number of seconds * bits/second and get a proper length snip.

4) Audio files are much more fun to work with than images or html files.

5) Samples at 48kb/s without a bandpass filter of any kind (high pass and low pass) don't sound very good.

6) Audio file format conversion is pretty simple. The documentation on formats is very thorough online, so the conversion between well documented to another well documented is easy.

7) The existing libraries for working with MP3 files rock. Even if you throw country, jazz, metal or blues at them, they rock.

After playing with the low-level stuff and having some fun, I ended up using the libraries since that'll take some of the more tedious work out of my hands - especially as formats evolve. But it was fun to play with while it lasted.

Comments

Popular posts from this blog

Audition results

Keeping extremely busy

Gear Friday: Percussion Toys