Presentation is loading. Please wait.

Presentation is loading. Please wait.

Anatomy of a Sound File v12.7.17 © Allan C. Milne Abertay University.

Similar presentations


Presentation on theme: "Anatomy of a Sound File v12.7.17 © Allan C. Milne Abertay University."— Presentation transcript:

1 Anatomy of a Sound File v12.7.17 © Allan C. Milne Abertay University

2 What is a sound file ? A saved digital wave form containing the sample values. A long stream of 1’s and 0’s So the file must have an encoding and structure allowing a correct interpretation of the binary data in rebuilding the digital wave form.

3 Some Common Encodings. Here are some audio file encoding standards: –WAV (.wav) –AIFF (.aif,.aiff) –AIFC (.aic,.aifc) –AUN (.au,.snd( –REAL (.ra) –MPEG (.mpa,.mp2, mp3) –FLACC –LIQUID (.la1)

4 File Headers. Provides information on the format of the data within the file; this might include –Name of sound clip –File size –Playback duration –Number of channels –Resolution –Sampling rate –Compression information –And more …

5 WAV File Format. The native audio file format used by Windows. Overall structure based on IFF (Interchange File Format) –Developed by EA for the Amiga. Microsoft then developed RIFF (Resource Interchange File Format). A WAV file is a RIFF file.

6 RIFF Files. Organised as a collection of nested chunks. Tags identify the contents of each chunk. File should start with –4 characters = 'RIFF'. –4 byte chunk size (= file length -8). –4 character type code = 'WAVE'.

7 RIFF Chunk Format. 4 character identification tag –E.g. 'RIFF', 'fmt ', 'LIST', 'data'. 4 byte chunk size (less 8). Chunk data … RIFF size WAVE RIFF chunk fmt size ……… fmt chunk LIST size INFO LIST chunk

8 WAV Format (fmt) Header. Defines the properties of the sample data and hence how to reproduce the original sound. –Formatting (2 bytes) = 1 for PCM. –# of channels (2 bytes). –Sampling rate (4 bytes). –Average # of bytes per second (4 bytes). –# of bytes for 1 sound point (2 bytes). –# of bits per sample (2 bytes). See WaveFormat.doc for a fuller definition.

9 The Sampled Data. Samples are stored in a 'data' chunk. Irrespective of sample size (in bits), the samples are always stored in complete bytes. Sample size & interpretation: – <= 8 bits  unsigned integer – > 8 bits  signed integer Samples for all channels at a specific time index are stored together in channel order.


Download ppt "Anatomy of a Sound File v12.7.17 © Allan C. Milne Abertay University."

Similar presentations


Ads by Google