Vous êtes sur la page 1sur 36

Sistem Multimedia

Konsep Pemrosesan Media (Audio)


Mahardeka Tri Ananta
deka.kelas@gmail.com

1
What is Sound?

Suara adalah (tekanan) gelombang yang diciptakan oleh benda bergetar.

2
How Sound Is Produced ?
• The vibrations by a vibrating object set particles in the surrounding
medium (typical air) in vibrational motion
• Molecules in air are disturbed, one bumping against another
• An area of high pressure moves through the air in a wave
• Thus a wave representing the changing air pressure can be used to
represent sound

3
The Sound Wave

• The sound wave is referred


to as a longitudinal wave.
• The result of longitudinal
waves is the creation of
compressions (memadat)
and rarefactions
(merenggang) within the
air.
4
Wavelength, Amplitude, Frequency of a Wave

5
Amplitude, Frequency, Wavelength, Velocity
• Amplitude : keras lemahnya bunyi atau tinggi rendahnya gelombang yang
dinyatakan dalam satuan decibel (dB)
• Frequency : Banyaknya periode dalam 1 detik (Hz) atau cycles per second (cps). 1
Hertz = 1 vibration/second
• Infrasound 0Hz-20Hz
• Pendengaran Manusia 20Hz-20KHz
• Ultrasound 20KHz-1GHz
• Hypersound 1GHz – 10THz
• Sistem multimedia menggunakan suara yang berada dalam range pendengaran
manusia yang dikenal sebagai “AUDIO” dan gelombangnya sebagai “ACCOUSTIC
SIGNALS”, Sedangkan suara diluar range pendengaran manusia disebut “NOISE”

6
Amplitude, Frequency, Wavelength, Velocity
• Wavelength: Panjang gelombang yang dirumuskan  c/f di mana c =
kecepatan rambat bunyi, f = frekuensi
Berapakah panjang gelombang untuk gelombang suara yang memiliki
kecepatan rambat 343 m/s dan frekuensi 20 kHZ?
Jawab: Wavelength = c/f = 343/20 = 17,15 mm
• Velocity: Kecepatan perambatan gelombang bunyi sampai ke telinga
pendengar (m/s). Pada udara kering dengan suhu 20°C kecepatan rambat
suara sekitar 343 m/s

7
Digitization of Sound

• Microphones, video cameras produce analog signals


(continuous-valued voltages) as illustrated in the figure below.

• To get audio or video into a computer, we have to digitize it


(convert it into a stream of numbers) Need to convert Analog-
to-Digital

8
Sampling and Quantization

1. Sampling - divide
the horizontal
axis (the time
dimension) into
discrete pieces
2. Quantization -
divide the
vertical axis
(signal strength)
into discrete
pieces

9
Sampling

• The rate at which sampling is performed • How many Samples to take?


is called the sampling frequency
• 11.025 KHz
• Frequencies over 22.01 kHz are filtered
out before sampling is done.
• -- Speech (Telephone 8KHz)
• The sampling rate must be at least twice • 22.05 KHz
the highest frequency component of the • -- Low Grade Audio
sound (Nyquist Theorem). • (WWW Audio, AM Radio)
• The human voice can reach
• 44.1 KHz
approximately 4 kHz, For audio, typical
sampling rates are from 8 kHz (8,000 • -- CD Quality
samples per second) to 48 kHz,

10
Quantization
• Sampling in the amplitude or voltage dimension is called
quantization.
• Typical uniform quantization rates are 8-bit and 16-bit
• 8-bit quantization divides the vertical axis into 256 levels, and 16-bit
divides it into 65,536 levels.

11
Nyquist's Sampling Theorem
• Nyquist Sampling Rate: Untuk memperoleh representasi akurat
dari suatu sinyal analog secara loseless, amplitudonya harus
diambil sample-nya setidaknya pada kecepatan (rate) sama atau
lebih besar 2x lipat komponen frekuensi maksimum yang akan
didengar.
• Misal:
Untuk sinyal analog dengan bandwidth 15Hz-10kHz  sampling rate = 2
x 10kHz = 20 kHz

12
Nyquist's Sampling Theorem

• Teorema sampling Nyquist menjamin sample data


mengandung semua informasi dari sinyal orisinal
• Voice data (speech) limited to below 4000Hz
• Membutuhkan 8000 sample per detik (2x4000Hz Nyquist)
• Sistem telepon dapat mendigitalisasi voice dengan 128 level
atau 256 level.
• Level-level tersebut disebut level kuantisasi
• Jika128 level, maka bit tiap sampel = 7 bits (2 ^ 7 = 128).
• Jika 256 level, maka bit tiap sampel = 8 bits (2 ^ 8 = 256).
• 8000 samples/sec x 7 bits/sample = 56Kbps for a single
voice channel.
• 8000 samples/sec x 8 bits/sample = 64Kbps for a single
voice channel.
13
Quantization Interval
• If Vmax is the maximum positive and negative signal amplitude and n is the
number of binary bits used, then the magnitude of the quantization interval, q, is
defined as follows:
2Vmax
q n
2
• For example, what if we have 8 bits and the values range from –1000 to +1000?

14
Signal-to-Quantization-Noise Ratio (SQNR)
• nilai kualitas keluaran ADC yang ditentukan oleh Rasio daya sinyal
terhadap daya kebisingan (noise)
• This introduces a roundoff error. Although it is not really “noise,” it is
called quantization noise (or quantization error).

15
Quantization
Intervals and
Resulting
Error

16
Linear Vs. Non-Linear Quantization
• Linear quantization., Audio digital disample secara kontinyu pada fixed rate.
• Setiap sample direpresentasikan dengan jumlah bit yang tetap, disebut
• non-linear quantization, menggunakan beberapa digit (bit) untuk mewakili
sampel di beberapa level.
• Untuk media suara, lebih penting untuk memiliki representasi yang lebih halus
(lebih banyak bit) untuk sinyal amplitudo rendah daripada tinggi karena sinyal
amplitudo rendah lebih sensitif terhadap suara. Dengan demikian, kuantisasi
non-linear digunakan.

17
Linear Vs. Non-Linear Quantization

Quantizing level
15 15
14 14
13
13
12
11 12
Strong signal
10 11
10
9
8 Weak signal 9
8
7 76
6 5
5 4
4 3
3 2
2
1
1
0 0

Without nonlinear encoding With nonlinear encoding


18
Pulse Code Modulation (PCM)
Representasi digital dari sinyal analog, di mana gelombang di-sample secara
beraturan berdasarkan interval waktu tertentu, yang kemudian diubah ke biner
(Quantisasi)
Original signal

3.9 3.4 4.2


3.2 2.8
PAM pulse 1.2

PCM pulse 3 4 3 3 4
with quantized error 1
011 100 011 011 001 100

PCM output 011100011011001100


19
20
Pulse Code Modulation (PCM)
• PCM menggunakan pengkodean kuantisasi non-linear:
spasi amplituda dari tiap level tidak linear
• Ada step kuantisasi yang lebih banyak pada amplituda rendah
(low)
• Ini untuk mengurangi distorsi sinyal secara overall.

21
Delta Modulation (DM)
• Pada Delta Modulation, sinyal analog ditracking.
• Analog input diaproksimasi dengan staircase function
• Apakah Move up (naik) atau down (turun) satu level () pada tiap interval
sampel
• Bit 1 digunakan untuk merepresentasi kenaikan level tegangan pd sinyal, dan bit
0 untuk merepresentasi turunnya level tegangan. -> Output dari DM adalah bit
tunggal untuk setiap sample
• Digunakan juga pada berbagai teknik Kompresi Data
• e.g. Interframe coding techniques for video

22
Delta Modulation

23
Delta Modulation

Staircase function

Delta Modulation output

24
How about Memory Space?
• AUDIO: a sequence of
microphone readings on
several channels.
• Readings (samples) are
normally taken at 11000,
22K or 44K per second and
may be 8, 12 or 16-bit values.

• Q: Berapa banyak memori dibutuhkan untuk menyimpan rekaman


audio selama 5 menit dengan menggunakan 2 channel dan 16 bit per
sample?

25
How about Memory Space?
KB = 1024 bytes MB = 1,048,576 bytes GB = 1,073,741,824 bytes
Jika: Fs = 11000 Hz
• Nsampel = 5 (menit) x 60 (detik/menit) x 11000 (sampel/detik) =
3.300.000 sampel
• Nbit = 16 (bit/sampel) x 3.300.000 sampel = 52.800.000 bit =
6.600.000 byte = 6,295 MB
• Nbit Stereo (2 channel) = 6,295 MB x 2 ≈ 12,6 MB

Jika: Fs = 44100 Hz
• Nsampel = 5 (menit) x 60 (detik/menit) x 44100 (sampel/detik)
= 13.230.000 sampel
• Nbit = 16 (bit/sampel) x 13.230.000 sampel
= 211.680.000 bit = 26.460.000 byte ≈ 25,234 MB
• Nbit Stereo = 25,234 MB x 2 ≈ 50,468 MB  satu lagu pada CD audio

26
Raw Digital Audio ..

• Makin besar FS, makin baik kualitas rekaman audio, makin banyak jumlah
bit yang dibutuhkan!
• Makin besar jumlah bit / sampel, makin baik kualitas rekaman audio, makin
banyak jumlah bit yang dibutuhkan!, demikian pula sebaliknya
• Kualitas Audio Digital adalah linear dengan kebutuhan memori!

27
AUDIO FILE FORMAT
• Uncompressed Audio Formats
1. PCM
2. WAV
Lossy Compressed Audio Formats
1. MP3
2. AAC
Lossless Compressed Audio Formats
1. FLAC
2. ALAC
28
PCM
• PCM stands for Pulse-Code Modulation, a digital representation of
raw analog audio signals.
• There is no compression involved. The digital recording is a close-to-
exact representation of the analog sound.
• PCM is the most common audio format used in CDs and DVDs

29
WAV [.wav]
• WAV stands for Waveform Audio File Format (also called Audio for Windows at some
point but not anymore). It’s a standard that was developed by Microsoft and IBM
back in 1991.
• A lot of people assume that all WAV files are uncompressed audio files, but that’s not
exactly true. WAV is actually just a Windows container for audio formats. This means
that a WAV file can contain compressed audio, but it’s rarely used for that.
• Most WAV files contain uncompressed audio in PCM format. The WAV file is just a
wrapper for the PCM encoding, making it more suitable for use on Windows systems.
However, Mac systems can usually open WAV files without any issues.

30
MP3 [.mp3]
• MP3 stands for MPEG-1 Audio Layer 3. It was released back in 1993 and quickly
exploded in popularity, eventually becoming the most popular audio format in
the world for music files.
• The main pursuit of MP3 is to cut out all of the sound data that exists beyond the
hearing range of most normal people and to reduce the quality of sounds that
aren’t as easy to hear, and then to compress all other audio data as efficiently as
possible.

31
AAC [.m4a]
• AAC stands for Advanced Audio Coding. It was developed in 1997 as the
successor to MP3.
• The compression algorithm used by AAC is much more advanced and technical
than MP3, so when you compare a particular recording in MP3 and AAC formats
at the same bitrate, the AAC one will generally have better sound quality.
• AAC is standard audio compression method used by YouTube, Android, iOS,
iTunes, later Nintendo portables, and later PlayStations.

32
FLAC
• FLAC stands for Free Lossless Audio Codec.
• FLAC can compress an original source file by up to 60% without losing a single bit
of data.
• FLAC is an open source and royalty-free format rather than a proprietary one,
• FLAC is supported by most major programs and devices and is the main
alternative to MP3 for CD audio. With it, you basically get the full quality of raw
uncompressed audio in half the file size

33
ALAC
• ALAC stands for Apple Lossless Audio Codec.
• It was developed and launched in 2004 as a proprietary format but
eventually became open source and royalty-free in 2011.
• iTunes and iOS both provide native support for ALAC and no support
at all for FLAC.

34
MIDI
• MIDI, which dates from the early 1980s, is an acronym that stands for
Musical Instrument Digital Interface.
• a protocol that enables computer, synthesizers, keyboards, and other musical
device to communicate with each other.
• Components of a MIDI System : Synthesizer, Sequencer, Track,
Channel,Timbre, Pitch, Voice, Path

35
TERIMA KASIH
SEMOGA BERMANFAAT

36

Vous aimerez peut-être aussi