1 digital audio storage formats. 2 formats there are many different formats for storing and...
Post on 19-Dec-2015
233 Views
Preview:
TRANSCRIPT
2
FormatsFormats
There are many different formats for storing and communicating digital audio:CD audioWavAiffAuMP3
3
WAVEWAVE
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
5
Chunk DescriptorChunk 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-chunkFormat 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-chunkData 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 data8-bit samples are stored as unsigned bytes,
ranging from 0 to 255. 16-bit samples are stored as 2’s-complement signed integers, ranging from -32768 to 32767
8
.au.au
Sun’s audio file formatFile is composed of three parts:
24-byte headervariable-length annotation blockcontiguous segment of audio data
9
Header InformationHeader 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
AIFFAIFF
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 formatData chunk – PCM audio data
11
MIDIMIDI
Musical Instrument Digital InterfaceSerial interface standard for interfacing between
electronic instruments (31.25Kbits uni-directional) Involves communicating sound events rather than
sampled audio
12
MIDIMIDI
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 FormatMIDI Message Format
Control messages are sent as groups of bytes, preceded by one start bit and followed by a stop bit
14
MIDI Message FormatMIDI Message Format
There are two basic types of MIDI message byteStatus byte (starts with a ‘1’)Data byte (starts with a ‘0’)
1sssnnnn 0xxxxxxx 0yyyyyyy
8 bits
Status Data 1 Data 2
16
MIDIMIDIThere 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
• Group 1-8 Piano 65-72 Reed
9-16 Chromatic Percussion 73-80 Pipe 17-24 Organ 81-88 Synth Lead 25-32 Guitar 89-96 Synth Pad 33-40 Bass 97-104 Synth FX 41-48 Strings 105-112 Ethnic
Instruments 49-56 Ensemble 113-120 Percussive
Instrms 57-67 Brass 121-128 Sound
effects
• Plus 47 percussive sounds
17
MIDIMIDI
Using MIDI for transferring music can be problematic
Even with general MIDI the output depends on the quality and type of synthesiser usedNot so good for Hi-FiVery good for multimedia or games sound
effects and music
18
MIDI SequencersMIDI Sequencers
Capable of storing a number of “tracks” of MIDI information and manipulating them
top related