Sound SamplingV4
Sound SamplingV4
Sound
Sampling Intervals
Quality & File Size
The Syllabus
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)
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”