There's nothing up by sleeves, nothing in my head ...
By the end of today, you should:
understand differences between analog and digital signals
understand sampling rate, bit resolution, bit rate and calculating file size
think about the basics of Copyright law
Our ears interact with an analog world of sound waves, but music and other sounds are all being done digitally now. Why? How?
Sound travels faster in:
vacuum
water
air
speed doesn't depend on the medium
A little yappy dog's barking is:
Low amplitude, low pitch
Low amplitude, high pitch
High amplitude, low pitch
High amplitude, high pitch
Analog signals are superior to digital signals.
True
False
There is no difference between the two.
Digital signals are superior to analog because
Errors can be avoided
Errors can be detected
Errors can be corrected
Signals can be compressed
When will the parity bit NOT be able to detect an error:
When there is an odd number of bits in the transmission.
When there is an even number of bits in the transmission.
When the number of changed bits is even.
When the number of changed bits is odd.
Assume that the even parity bit indicates that there has been an error in transmission, what is our best option?
There is nothing we can do about it, noise is part of every transmission.
We can use the parity bit to identify the error and fix it.
We can use error correction algorithms to reconstruct the original signal.
We will have to request for the signal to be retransmitted.
Test yourself with this Online tone generator or this hearing test.
Have I convinced you? Good. So, how do we do it? How do we represent sound digitally?
The bit resolution is:
The sampling rate.
A multiple of the fundamental frequency.
The number of bits to represent frequency values.
The number of bits to represent amplitude values.
If the whales can produce sound in the range 10 Hz - 30 KHz, at what frequency we would have to sample to produce a digital recording?
15 KHz
20 KHz
30 KHz
45 Khz
60 KHz
Compute the bit rate in bits per second and the approximate file size in KB given the following information:
You might get the following:
Sampling rate is 100 KHz (double)
Bit rate is 100,000 * 16 bits or 1,600,000 bits per second
File size is 10 * 1,600,000 / (8 * 1000) = 10 * 200 = 2000 KB
Knowing that the bit rate is the number of bits to represent one second of digital sound, write jQuery/Javascript code that will perform the calculations for the form shown below.
The statements for reading the content from the fields is already given, you need to write two functions that take paremeters and return values and invoke them. Read comments in the execution box.
<form> <p>Bit Resolution: <input name="resolution"></p> <p>Sampling Rate: <input name="sampling"></p> <p>Time (in seconds): <input name="seconds"></p> <p>The Bit Rate is: <span id="bitrate"></span></p> <p>The File Size is: <span id="filesize"></span></p> </form>
Your solution might look like this:
function calculate_bitrate(bRes, sRate){ return bRes * sRate; } $("#bitrate").text(calculate_bitrate(bitRes, sampling)); function calculate_filesize(bRes, sRate, seconds){ var bitrate = calculate_bitrate(bRes, sRate); return bitrate * seconds / (8*1000); // convert in KB } $("#filesize").text(calculate_filesize(bitRes, sampling, seconds));
We hope that after these activities you can:
Will be posted later, visit again after .