Goal
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
understand the basics of Copyright law
know how to apply rules of fair use
Recap of Analog and Digital
Our ears interact with an analog world of sound waves, but music and
other sounds are all being done digitally now. Why? How?
- Analog signals alwasy degrade with time, distance and
other factors.
- With an analog signal, you can't be entirely sure of what the
original sound was supposed to be out of the literally infinite number
of possibilities.
- Digital signals are only tranmitting one of two possible
values (zero and one). Each is a bit.
- Therefore, when the receiver gets a degraded signal, it can make
an informed guess about which of the two possibilities was actually
transmitted. This allows the signal to be cleaned-up.
- Furthermore, by adding redundant information in the form
of parity bits, errors can be detected.
- By using additional parity bits, the receiver can figure
out which bit is erroneous and, since there are only two
possible values, errors can be corrected.
- Thus, it is possible, using digital representations, to
have perfect transmission.
Have I convinced you? Good. So, how do we do it? How do we represent
sound digitally?
- Imagine drawing the analog signal on graph paper. Make two
crucial decisions:
- The resolution on the vertical axis, and
- the resolution on the horizonal axis.
- The horizontal axis will be time.
- Sample the analog signal at each vertical line (each
moment in time), rounding it off at the nearest horizontal line.
Write this down as a number.
- The sequence of numbers is then the digitized signal.
- The resolution of the vertical axis (how close together the
horizontal lines are) determines the number of bits per
sample. Usually, this is some nice round number like 8, 16
or 32 bits per sample.
- The resolution of the horizontal axis (how close together the
vertical lines are) determines the sampling rate.
- The product of these two gives the bit-rate.
- The greater the bit rate, the better the receiver
can reconstruct the original signal.
- The Nyquist theorem tells us how high the sampling rate has to be
in order to capture sounds up to a given maximum frequency (pitch).
Quiz Question Nr. 1
Sound travels faster in:
vacuum
water
air
speed doesn't depend on the medium
Quiz Question Nr. 2
A soprano's singing (with an orchestra) can be considered as sound with:
Low amplitude, low pitch
Low amplitude, high pitch
High amplitude, low pitch
High amplitude, high pitch
Quiz Question Nr. 3
Analog signals are superior to digital signals.
True
False
There is no difference between the two.
Quiz Question Nr. 3b
Digital signals are superior to analog because
Errors can be avoided
Errors can be detected
Errors can be corrected
Signals can be compressed
Quiz Question Nr. 4
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.
Quiz Question Nr. 5
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.
Quiz Question Nr. 6
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.
Quiz Question Nr. 7
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
Task 1: File Size Calculations
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>
Copyright and Fair Use
Digital information has qualitatively changed the effect of copyright
protection. Now that perfect copies are instantly available, the
incentive to make illegal copies is enormous.
Copyright
- is for physical expression of a work (you can't copyright ideas).
- is automatic
- is for a limited duration, after which the work goes into
the public domain.
- is different from intellectual credit. That is, plagiarism is
different from violating copyright.
The courts also acknowledge the importance of fair use of
copyrighted works. It depends
- on the purpose and character of the use.
- on the nature of the copyrighted work
- on the amount or substantiality of the use.
- on how the use affects the potential market of the
copyrighted work.
Copyright law is for the benefit of society, not solely for the
benefit of the copyright holder.
Quiz Question Nr. 8
When does a written work receive protection under U.S. copyright laws?
when you write it down
when you publish your work
when you register your work with the U.S Copyright Office
Quiz Question Nr. 9
If your student-run theater group performs a play without the copyright
holder's permission, offers free admission (so the group makes no money
on the performance), is it violating copyright laws?
Yes
It depends
No
Quiz Question Nr. 10
You did an amazing lip-syncing video of Taylor Swift's "Shake it Off" with your friends and
uploaded it to YouTube. Is that copyright infrigement?
Yes
It depends
No
Activity
With those around you, skim over these
open-ended
questions and choose one to discuss. We'll collect thoughts afterwards.
Summary
We hope that after these activities you can:
- understand digital signals and how they are transmitted
- sampling for conversion between analog and digital signals
- copyright law and fair use
Solutions
Will be posted later, visit again after
.
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));