1 Digital Audio Storage Formats
2 Formats There are many different formats for storing and communicating digital audio: CD audio Wav Aiff Au MP3
3 WAVE Waveform Audio (wave or.wav) is a file format in which Windows stores sounds as waveforms The WAVE format is a subset of RIFF (Resource Interchange File Format) used for storing digital audio Basic.wav files store information in PCM format with no compression
4.wav Wave files contain 3 parts: Descriptor Format information Data
5 Chunk Descriptor ChunkID - Contains the letters “RIFF” in ASCII form ChunkSize - This is the size of the entire file in bytes minus 8 bytes for the two fields not included in this count: ChunkID and ChunkSize Format - Contains the letters “WAVE” in ASCII from
6 Format Sub-chunk Subchunk1ID - Contains the letters “fmt” Subchunk1Size - 16 for PCM. This is the size of the rest of the sub-chunk which follows this number AudioFormat - PCM = 1 (i.e. Linear quantization). Values other than 1 indicate some form of compression ByteRate - SampleRate * NumChannels * BitsPerSample / 8 BlockAlign - NumChannels * BitsPerSample / 8 The number of bytes for one sample
7 Data Sub-chunk Subchunk2ID - Contains the letters “data” Subchunk2Size – NumSamples * NumChannels * BitsPerSample / 8 This is the number of bytes in the data Data - The actual PCM sound data 8-bit samples are stored as unsigned bytes, ranging from 0 to bit samples are stored as 2’s-complement signed integers, ranging from to 32767
8.au Sun’s audio file format File is composed of three parts: 24-byte header variable-length annotation block contiguous segment of audio data
9 Header Information Magic Number - 4 bytes - “.snd” hdr_size - 4 bytes - offset to start of audio data data_size - 4 bytes - data length, in bytes (optional) encoding - data encoding type code sample_rate - samples per second channels - number of interleaved channels
10 AIFF Apple’s Audio Interchange File Format RIFF (and thus.wav) is derived from AIFF File is split into: Header, Common and Data Chunk ChunkID - Contains the letters “FORM" in ASCII. ChunkSize - This is the size of the entire file in bytes minus 8 bytes for the two fields not included in this count: ChunkID and ChunkSize. Format - Contains the letters “AIFF” Common chunk – information on data format Data chunk – PCM audio data
11 MIDI Musical Instrument Digital Interface Serial interface standard for interfacing between electronic instruments (31.25Kbits uni-directional) Involves communicating sound events rather than sampled audio
12 MIDI The information transmitted between MIDI devices is in a form called a MIDI message, which encodes aspects of sound such as: note played, note number, velocity sustain pedal, breath controllers, aftertouch, pitch bend, modulation
13 MIDI Message Format Control messages are sent as groups of bytes, preceded by one start bit and followed by a stop bit
14 MIDI Message Format There are two basic types of MIDI message byte Status byte (starts with a ‘1’) Data byte (starts with a ‘0’) 1sssnnnn 0xxxxxxx 0yyyyyyy 8 bits StatusData 1Data 2
15 MIDI Message Format
16 MIDI There are sixteen basic MIDI channels and instruments can usually be set to receive on one (omni off) or all (omni on) General MIDI sets the standard for the ordering and naming of sounds Group1-8 Piano65-72 Reed 9-16 Chromatic Percussion Pipe Organ Synth Lead Guitar Synth Pad Bass Synth FX Strings Ethnic Instruments Ensemble Percussive Instrms Brass Sound effects Plus 47 percussive sounds
17 MIDI Using MIDI for transferring music can be problematic Even with general MIDI the output depends on the quality and type of synthesiser used Not so good for Hi-Fi Very good for multimedia or games sound effects and music
18 MIDI Sequencers Capable of storing a number of “tracks” of MIDI information and manipulating them
19 MIDI Sequencers
20 MIDI Sequencers
21 Fin