0% found this document useful (0 votes)
13 views20 pages

Sound SamplingV4

Uploaded by

alanchenyin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views20 pages

Sound SamplingV4

Uploaded by

alanchenyin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 20

2 Data Representation

Sound
Sampling Intervals
Quality & File Size
The Syllabus

 Explain how sound can be sampled and


stored in a digital form
 Explain how sampling intervals and
other considerations affect:
 Sizeof a sound file
 Quality of playback
Real life continuously changes

 Analogue
 Continuously
changing
variables
 Temperature
 pH
 Sound
Analogue Music
Analogue Music
Digital Music
Inputs are mostly analogue
 Analogue to digital
converter - ADC
 Change the
analogue SENSOR
signals
 To digital ones the
computer can use
Outputs are mostly analogue
 Digital to Analogue
converter - DAC
 Change the digital
COMPUTER signals
 To analogue ones
the actuators
(motors) can use
Computers are Digital
What is a sound wave?
 Air particles vibrate
backwards and
forwards in the direction
the sound is travelling
 Frequency
 Cycles / sec (Hz)
 How low or high pitched
 Amplitude
 Maximum displacement
 How loud the sound is
More Complex Sounds:
A Clarinet & a Dropped plate
Sampling – converting to binary
Images Sound
 Split the image into  Split the sound wave into
millions of tiny parts millions of tiny time
 Pixels intervals.
 Binary code for each pixel  Sampling
 Sampling rate
 Number of times per
second we take a sample
 Binary code each sample
Sampling rate of 2 /sec (every 0.5 secs)
Displacement (+9.3, -3.1, -4.1, +8.2, -10.0, +4.0, +4.5)

Original wave Sampled wave


Sampling rate of 10 /sec (every 0.1 secs)
More time units – Encoding closer to original
(Compare: smaller pixels increasing image quality)
Original wave Sampled wave
Quantisation – mapping of samples to
numbers
 Sample Resolution or “Bit Depth”
 Number of bits to store each sample
 More bits, better accuracy, better quality
2 bits = 22 = 4 values
 3 bits = 23 = 8 values
 4 bits = 24 = 16 values .....
 Bit Rate – Bits/Second
 Bit Rate = Sampling rate X Bit Depth
 = Samples X Bits
 Second Sample
Count the bits

FILE SIZE
File Size – "Counting bits"
 Number Bits = (sample rate) X ( bit depth) X time (seconds)
 Bit rate (bits per second) = (sample rate) X (bit depth)
 CD has a sample rate of 44 kHz
 CD has a bit depth of 16 bits
 Sampled at 44 000 times / second
 Bit depth 16
 Bit rate = Sampling rate X Bit depth
 Bit rate = 44000 X 16 = 700 000 bits / sec
 Stereo (2 channels) = 700000 X 2
 1400000 bits / second
Sound Quality vs. File size
 Sample Interval
 Lower the interval, more times sample per
second so … Higher quality
 Sample Resolution
 More bits used, more accurate … Higher
quality
 File size
 High quality means high file size
 Compression techniques – MP3
 Reduce quality of sounds at edge of what
(most) humans can actually hear.
File Size – "Counting bytes"
 CD bit rate was 1400000 bits / second
 File Size (How much memory needed)
 How long is the music?
 Let’s say one minute = 60 seconds
 File size = 60 X 140000 M bits
 = 8400000 Bits
 Now change to bytes / 8
 Change to Mebibytes (binary millions) so
divide by 1024 X 1024
 File size = = = 1.001 MiB
What a computer “sees”

You might also like