Professional Documents
Culture Documents
Rawesak Tanawongsuwan
ccrtw@mahidol.ac.th
9
Sound fundamentals
• Created by vibrations from a guitar string or speaking
• The wave reach our ears and we can hear the vibrations as sound
Waveforms
• Amplitude: reflects the change in pressure from
the peak of the waveform to the trough
• Cycle: time for a waveform to go from one
amplitude until it reaches the same amplitude
again
• Frequency: the number of cycles per second (Hz)
1,000 Hz goes through 1,000 cycles every
second
• Phase: measures how far through a cycle a
waveform is
• Wavelength: the distance between two points
with the same degree of phase
9
Waveforms
9
Waveforms
9 275–276
Analog audio
• The pressure waves of sound are converted into changes
in voltage on a wire of a microphone
Digital audio
• Computer store audio information as a series
of zeros and ones
Sampling rate
• The higher the sampling rate, the closer the shape of
the digital waveform to the original analog waveform
Nyquist theorem
• Signals can be decomposed into a sum of sinusoids
Sampling rate
• If the audio contains frequencies as high as 8,000 Hz,
we need to sample at 16,000 samples per second
Bit depth
Bit depth
Data Size
• Sampling rate r is the number of samples per
second
Sound Editing
• Typical editing operations
• Trimming, combining, rearranging clips
• Lens itself to a timeline editing interface
• Timeline divided into tracks
• Sound on each track displayed as a waveform
• 'Scrub' over part of a track e.g. to find pauses
• Cut and paste, drag and drop
• May combine many tracks from different
recordings (mix-down) onto one (mono) or two
(stereo) tracks
9
Sound editing
• Loops
• Create a section of sound that represents
the sustained tone of an instrument i.e.
guitar
• Arbitrary long notes can be produced by
interpolating copies of the section between
samples
• Loops must be connected cleanly no
abrupt discontinuities between its end and
start, otherwise audible clicks will occur
9
2D texture synthesis
9
2D texture synthesis
9
2D Texture synthesis
9
Other domains?
• Video texture synthesis
• 3D texture synthesis
9 290–295
Audio Compression
• In general, lossy methods required because of
complex and unpredictable nature of audio
data
MP3
• MPEG Audio, Layer 3
• Three layers of audio compression in MPEG-1
(MPEG-2 essentially identical)
• Layer 1...Layer 3, encoding proces increases in
complexity, data rate for same quality
decreases
• e.g. Same quality 192kbps at Layer 1,
128kbps at Layer 2, 64kbps at Layer 3
• 10:1 compression ratio at high quality
• Variable bit rate coding (VBR)
9 301
AAC
• Advanced Audio Coding
• At the core of the MPEG4, 3GPP and 3GPP2
specifications
Audio Formats
• Platform-specific file formats
• MP3 has its own file format, but MP3 data can
be included as audio tracks in QuickTime
movies and SWFs
9 303–304
MIDI
• Musical Instruments Digital Interface
• Instructions about how to produce music,
which can be interpreted by suitable hardware
and/or software cf. vector graphics as drawing
instructions
• Standard protocol for communicating between
electronic instruments (synthesizers, samplers,
drum machines)
• Allows instruments to be controlled by
hardware or software sequencers
9
MIDI Messages
• Instructions that control some aspect of the
performance of an instrument
General MIDI
• Synths and samplers provide a variety of
voices
• MIDI Program Change message selects a new
voice, but mapping from values to voices is not
defined in the MIDI standard
• General MIDI (addendum to standard) specifies
128 standard voices for Program Change
values
• Actually GM specifies voice names, no
guarantee that identical sounds will be
produced on different instruments