2.0

2.0 | 1 rating Rate this file 125 downloads (last 30 days) File Size: 6.16 KB File ID: #23328

AIFFREAD

by Kenneth Eaton

 

17 Mar 2009

Code covered by BSD License  

Read AIFF (Audio Interchange File Format) sound file.

Download Now | Watch this File

File Information
Description

This function will read audio data from AIFF and AIFC/AIFF-C files. The file format standards I followed to write this function are cited below. At some point I will also write the corresponding AIFFWRITE, but AIFFREAD was all I needed for the moment and all I had time to complete. If you have any problems, leave a comment here or shoot me an email and I'll address them at my earliest convenience.

Description for the AIFF standard can be found here:

http://muratnkonar.com/aiff/index.html

Descriptions for the AIFC/AIFF-C standard can be found here:

http://www.cnpbagwell.com/aiff-c.txt
http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/AIFF/Docs/AIFF-C.9.26.91.pdf

Usage:

AIFFREAD Read AIFF (Audio Interchange File Format) sound file.
   Y = AIFFREAD(FILE) reads an AIFF file specified by the string FILE,
   returning the sampled data in Y. The ".aif" extension is appended if no
   extension is given.

   [Y,FS,NBITS,CHUNKDATA] = AIFFREAD(FILE) returns the sample rate (FS) in
   Hertz, the number of bits per sample (NBITS) used to encode the data in
   the file, and a complete structure of the chunk data (CHUNKDATA)
   contained in the AIFF file (minus the actual audio data returned in Y).
   See below for a description of CHUNKDATA.

   [...] = AIFFREAD(FILE,N) returns only the first N samples from each
   channel in the file.

   [...] = AIFFREAD(FILE,[N1 N2]) returns only samples N1 through N2 from
   each channel in the file.

   [SIZ,...] = AIFFREAD(FILE,'size') returns the size of the audio data
   contained in the file in place of the actual audio data, where
   SIZ = [nSampleFrames nChannels].

MATLAB release MATLAB 7.1.0 (R14SP3)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
30 Mar 2009 tian  
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
aiff Kenneth Eaton 17 Mar 2009 15:34:54
audio Kenneth Eaton 17 Mar 2009 15:34:54
read Kenneth Eaton 17 Mar 2009 15:34:54
data import Kenneth Eaton 17 Mar 2009 15:34:54
load Kenneth Eaton 17 Mar 2009 15:34:54
audio hliasmin Minogiannis 22 Oct 2009 14:44:20
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com