Difference between revisions of "Reading MP3 Files"

From CCRMA Wiki
Jump to: navigation, search
 
 
(One intermediate revision by one other user not shown)
Line 6: Line 6:
 
# Grab [http://ccrma.stanford.edu/~jsundram/shared/mp3read.m my modified mp3read.m]
 
# Grab [http://ccrma.stanford.edu/~jsundram/shared/mp3read.m my modified mp3read.m]
 
# Grab the mp3info binary I compiled [http://ccrma.stanford.edu/~jsundram/shared/mp3info mp3info] (or download [http://www.mpg123.de/ the rpm] and install it yourself).
 
# Grab the mp3info binary I compiled [http://ccrma.stanford.edu/~jsundram/shared/mp3info mp3info] (or download [http://www.mpg123.de/ the rpm] and install it yourself).
 +
# You will need to make sure it has executable permission (from the command line, <tt>chmod 755 mp3info</tt>)
 
# 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.
 
# 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.
# Make sure that mp3read.m is on your Matlab path.
+
# Make sure that <tt>mp3read.m</tt> is on your Matlab path.
 
# Use mp3read just like you would use wavread.
 
# Use mp3read just like you would use wavread.
 +
 +
Update (7/2/09): Mac users can download all necessary files [http://www.mathworks.com/matlabcentral/fileexchange/13852 here].

Latest revision as of 14:44, 2 July 2009

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.