View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

4.5 | 6 ratings Rate this file 8 Downloads (last 30 days) File Size: 6.16 KB File ID: #23328 Version: 1.0




Read AIFF (Audio Interchange File Format) sound file.

| Watch this File

File Information

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:

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


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].


This file inspired Mi Rtoolbox.

MATLAB release MATLAB 7.1.0 (R14SP3)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (6)
02 Jul 2016 Shu Ren


16 Oct 2014 Sakari Lukkarinen

Really nice and works!

I've used iPhone's iTalk to record sounds and they are stored in aiff-format. This function (aiffread) imported the sounds nicely to Matlab.

09 Dec 2013 Paul Peeling

Excellent work

05 Apr 2012 Greg

Greg (view profile)

Works well

05 Jan 2011 Joel

Joel (view profile)

Works for me. Why would someone give it a 2? No one used this in nearly two years?

30 Mar 2009 tian

tian (view profile)

Contact us