Chapter 3. Multimedia Data Representations

  

3.1. Basics of Digital Audio

Digitization of Sound
Introduction to MIDI

Reference: K.C. Pohlmann, "Principles of Digital Audio", 3rd ed., McGraw-Hill, 1995.
Reference: Chapter 3 of Steinmetz and Nahrstedt

3.1.1 Digitization of Sound


Facts about Sound

Digitization in General

Digitizing Audio

Nyquist Theorem

Signal to Noise Ratio (SNR)

Signal to Quantization Noise Ratio (SQNR)

Linear and Non-linear Quantization

Typical Audio Formats

Audio Quality vs. Data Rate


Quality    Sample Rate  Bits per   Mono/         Data Rate        Frequency
	      (KHz)      Sample    Stereo     (if Uncompressed)     Band
---------  -----------	--------  --------    -----------------  ------------

Telephone     8            8        Mono        8   KBytes/sec   200-3,400 Hz

AM Radio     11.025        8        Mono       11.0 KBytes/sec

FM Radio     22.050       16       Stereo      88.2 KBytes/sec

CD           44.1         16       Stereo     176.4 KBytes/sec   20-20,000 Hz

DAT          48           16       Stereo     192.0 KBytes/sec   20-20,000 Hz

DVD Audio    192          24       Stereo   1,152.0 KBytes/sec   20-20,000 Hz

Synthetic Sounds

Further Exploration

CD audio file formats
  

3.1.2 Introduction to MIDI (Musical Instrument Digital Interface)


Definition of MIDI: a protocol that enables computer, synthesizers, keyboards, and other musical device to communicate with each other.

1. Terminologies:

Synthesizer:

Sequencer:

Track:

Channel:

Timbre:

Pitch:

Voice:

Patch:

2. Hardware Aspects of MIDI

MIDI connectors:

-- three 5-pin ports found on the back of every MIDI unit

Note: It is only the MIDI IN data that is echoed by MIDI through. All the data generated by device itself is sent through MIDI OUT.

A Typical MIDI Sequencer Setup:

3. MIDI Messages

-- MIDI messages are used by MIDI devices to communicate with each other.

Structure of MIDI messages:

Classification of MIDI messages:

                                               ----- voice messages
                   ---- channel messages -----|
                  |                            ----- mode messages
                  |
MIDI messages ----| 
                  |                            ---- common messages
                   ----- system messages -----|---- real-time messages
                                               ---- exclusive messages
                   

A. Channel messages:

-- messages that are transmitted on individual channels rather that globally to all devices in the MIDI network.

A.1. Channel voice messages:

Voice Message           Status Byte      Data Byte1          Data Byte2
-------------           -----------   -----------------   -----------------
Note off                    &H8x      Key number          Note Off velocity
Note on                     &H9x      Key number          Note on velocity
Polyphonic Key Pressure     &HAx      Key number          Amount of pressure
Control Change              &HBx      Controller number   Controller value
Program Change              &HCx      Program number      None
Channel Pressure            &HDx      Pressure value      None            
Pitch Bend                  &HEx      MSB                 LSB

Notes: `x' in status byte hex value stands for a channel number.

Example: a Note On message is followed by two bytes, one to identify the note, and on to specify the velocity.
To play note number 80 with maximum velocity on channel 13, the MIDI device would send these three hexadecimal byte values: &H9C &H50 &H7F

A.2. Channel mode messages: -- Channel mode messages are a special case of the Control Change message (&HBx or 1011nnnn). The difference between a Control message and a Channel Mode message, which share the same status byte value, is in the first data byte. Data byte values 121 through 127 have been reserved in the Control Change message for the channel mode messages.

1st Data Byte      Description                Meaning of 2nd Data Byte
-------------   ----------------------        ------------------------
    &H79        Reset all  controllers            None; set to 0
    &H7A        Local control                     0 = off; 127  = on
    &H7B        All notes off                     None; set to 0
    &H7C        Omni mode off                     None; set to 0
    &H7D        Omni mode on                      None; set to 0
    &H7E        Mono mode on (Poly mode off)      **
    &H7F        Poly mode on (Mono mode off)      None; set to 0

** if value = 0 then the number of channels used is determined by the receiver; all other values set a specific number of channels, beginning with the current basic channel.

B. System Messages:

B.1. System real-time messages:

System Real-Time Message         Status Byte 
------------------------         -----------
Timing Clock                        &HF8
Start Sequence                      &HFA
Continue Sequence                   &HFB
Stop Sequence                       &HFC
Active Sensing                      &HFE
System Reset                        &HFF

B.2. System common messages:

System Common Message   Status Byte      Number of Data Bytes
---------------------   -----------      --------------------
MIDI Timing Code           &HF1                   1
Song Position Pointer      &HF2                   2
Song Select                &HF3                   1
Tune Request               &HF6                  None

B.3. System exclusive message:

4. General MIDI

Appendix

A1. General MIDI Instrument Patch Map

A2. General MIDI Percussion Key Map

   

Further Exploration

Try some good sources for locating internet sound/music materials at

A tutorial on MIDI and wavetable music synthesis

YAHOO's Multimedia:Sound Page

   

  
Top | Chap 3 | CMPT 365 Home Page | CS