Reading MP3 Files

From CCRMA Wiki
Revision as of 14:44, 2 July 2009 by Berkleeb (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

I've made some minor changes to Dan Ellis's mp3read.m file to get it to work on the Planet CCRMA machines. To get mp3read.m to work, you need 2 external binaries, mp3info and mpg123. The binary for mpg123 is present on the Planet CCRMA machines at /usr/bin/mpg123, but mp3info is not. I've compiled the binary and placed it here.

You can grab my modified copy of Dan Ellis's mp3read here. You will need to modify line 96 to point to the location of mp3info.

In short:

  1. Grab my modified mp3read.m
  2. Grab the mp3info binary I compiled mp3info (or download the rpm and install it yourself).
  3. You will need to make sure it has executable permission (from the command line, chmod 755 mp3info)
  4. Make sure that the line 96 of the mp3read.m that you downloaded in step 1 points to the location of the mp3info binary you downloaded in step 2.
  5. Make sure that mp3read.m is on your Matlab path.
  6. Use mp3read just like you would use wavread.

Update (7/2/09): Mac users can download all necessary files here.