CSE 8A : Fall 2012
  • Home
  • Calendar
  • Assignments/Labs
  • Course Material
  • Tutor Hours
  • Lab Schedule

Reading Quiz Questions Week 8

These are the questions that will appear on the reading quizzes in week 8.  Remember these quizzes take place at the start of class, and you get points for correctness, not just participation.  These will be the exact questions we ask you.  They will be multiple choice clicker questions, but we do not provide the answer choice here.  If you can answer them without the answer choices, you'll have no problems answering them when you see the choices.  These are not designed to be overly tricky.

Tuesday, Nov 20

1. What does the following piece of code do?

     Sound target = new Sound(FileChooser.getMediaPath(“sound1.wav”));
     Sound source = new Sound(FileChooser.getMediaPath(“sound2.wav”));
     for(int i = 0; i<source.getLength(); i++)
     {
          value = target.getSampleValueAt(i) + source.getSampleValueAt(i);
          target.setSampleValueAt(i, value);
     }

   

2. According to the textbook, what is the algorithm for blending two sounds?




3. Assume you call the echo function with a delay of 10.  In one iteration of the loop, if the function gets a sample value at index 20, at what index does it add a fraction of that value to create the echo?




4. In the code for halveFreq on page 321 (which lowers the pitch of a Sound), the update in the for-loop increases the value of sourceIndex by 0.5.  Which of the following best describes the effect of this increase




Thursday, Nov 22

Happy Thanksgiving


Powered by Create your own unique website with customizable templates.