Digital Media - PowerPoint PPT Presentation

digital media n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Digital Media PowerPoint Presentation
Download Presentation
Digital Media

play fullscreen
1 / 86
Digital Media
96 Views
Download Presentation
pravat
Download Presentation

Digital Media

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Digital Media Dr. Jim Rowan Chapter 2

  2. The Question: • How do you put stuff in a computer • so that you can manipulate it • so that you can send it • so that someone else can see and use it? • How do you represent the real world in a digital world?

  3. The answer: • Represent the real world as numbers • Store the numbers • Transmit the numbers • Retrieve the numbers • Display them in a form humans understand

  4. Today: • Chapter 2 is a “first cut” of nearly all the material that will be covered in greater detail this semester • About the real world • About digital representation

  5. File formats and extensions • Indication to us (the humans) what kind of file this is • Some software looks at the extension • so... some software will try to open files with improper extensions • results in “file corrupted” error message • try it... change the extension from .doc to .jpg

  6. File formats and extensions • Some software looks at the data in the file for more definitive answer • important file-related information is encoded in the data of the file • for example: some image formats have color tables to reduce the size of the file • some video just saves the changes from one frame to the next

  7. But it’s all just numbers, and binary numbers at that!

  8. Note on paper

  9. Picture

  10. Song: fieldsOfGold.mp3

  11. Video

  12. Numbering systems:DecimalBinary Hexadecimal

  13. Numbering systems • Humans: decimal • Humans: 10 fingers, 10 digits: • 0, 1, 2, 3, 4, 5, 6, 7, 8 & 9 • Computers: binary • Computers: 1 finger, 2 digits • 0 & 1

  14. Hexadecimal • Humans and Computers: hexadecimal • Hexadecimal: 16 fingers, 16 digits • Humans organize 0s and 1s into groups of 4 • These groups of 4 are can be represented by a single hexadecimal digit (2**4 = 16) • 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F

  15. How to count using a different number of fingers • 10 fingers: Counting in decimal • 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, • start over with 0 and increment the digit to the left • 1 finger: Counting in binary • 0, 1 • start over with 0 but increment the digit to the left • 16 fingers: Counting in hexadecimal • 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F • start over with 0 but increment the digit to the left

  16. Binary Coding • Data for a computer... binary • zeros and ones, • off and on • false and true • Data for humans... ASCII, Hex... others • Coding schemes are used by humans to reduce the volume of binary digits • Two coding schemes used • Hexadecimal 4 bits => 1 Hex • ASCII • All end up as 0’s and 1’s

  17. ASCII • Humans and Computers: ASCII • Made of two hexadecimal codes • One ASCII character - two hex codes • ASCII code for R (from text pg 317) • hexadecimal: 52 • binary: 0101 0010

  18. From the Real WorldtoStuff on a computer • A note • Paper and pen -> bits (0s and 1s) • A picture • Reflected light -> bits (0s and 1s) • A song • Pressure waves in air -> bits (0s and 1s) • A video • Pressure waves in air and Reflected light -> bits (0s and 1s)

  19. First, the real world:Discrete&Continuous

  20. Phenomena in the Real world: discrete vs continuous • Things in the real world can be discrete • They either ARE or ARE NOT there • These things can be counted • Examples: • The number of cars in the parking lot • The number of beans in a jar

  21. Phenomena in the Real world: discrete vs continuous • Things in the real world can be continuous • Continuous can’t be counted, it must be measured • Examples: • Atmospheric pressure • Height of an ocean wave • Frequency of a sound wave

  22. But... computers can only count • Discrete data is easy for a computer • count it and store it as a number • Continuous data... easy? not so much • music: • measure the frequency & amplitude • encode as a collection of numbers • pictures: • measure the amount of light and its color at each spot • encode as a collection of numbers

  23. Question... • If computers only store 0s and 1s... • How does all this continuous stuff end up in a computer so that we can save it and play it back? • Answer • Continuous data must be converted to discrete data

  24. From the Real World and Back! Continuous phenomenon to digital data: -Do sampling Requires two processes sampling - equally spaced quantization - measuring at each sample Digital data back to continuous phenomenon: • Display samples using “sample and hold” • Play the sample for the duration of the sample time

  25. But... How many samples?

  26. single sample

  27. single sample

  28. single sample(sample and hold)

  29. two samples

  30. two samples

  31. two samples (sample and hold)

  32. three samples

  33. three samples

  34. three samples (sample and hold)

  35. four samples

  36. four samples

  37. four samples (sample and hold)

  38. five samples

  39. five samples

  40. five samples(sample and hold)

  41. How frequently should I sample? • too few • small file size (good) • not a faithful representation when replayed • too many • large file size (bad) • excellent representation when replayed • The Nyquist rate • twice as many samples as the frequency • ok file size • faithful representation when replayed

  42. CD quality is44,000 samples per second • Why? • Human hearing response is in the range of 20 to 22,000 cycles per second • Nyquist sample rate = highest frequency to be captured = 22,000 CPS 2 x 22,000 = 44,000 samples per second

  43. Looking at FieldsOfGold.mp3 • 4 minutes and 59 seconds long • 1,201,173 bytes in length Is this right? • CD quality • 44,000 samples per second (sample rate) • 16 bit samples (quantity stored for each sample) (2**16 = 65,536 individual levels)

  44. FieldsOfGold.mp3 • 4’59 = 299 seconds long • 299 x 44,000 samples per second = 13,156,000 samples • 13,156,000 x 2 bytes/sample • 26,312,000 bytes • Should be 26.3 megabytes! • Why only 1.2 megabytes? • HMMMmmm...

  45. FieldsOfGold.mp3 • Why 26.3 megabytes not 1.2 megabytes? • This is an MP3! • Data COMPRESSION!

  46. Further reading • http://en.wikipedia.org/wiki/Nyquist_rate • http://en.wikipedia.org/wiki/Sampling_%28signal_processing%29 • http://en.wikipedia.org/wiki/Mp3

  47. Project 1 preliminaryDownload AudacityPlay with itRecord your voiceAdd some effectsEdit out some stuffSave it as a wav filePlay it back using Quicktime

  48. The side effects of sampling:sampling artifacts