CSE 8A Chapter 9.1-9.2: Lecture 18 Reading Assignment Notes

22 views2 pages

Document Summary

9. 1 manipulating different sections of a sound differently. This method makes the first half of the sound louder, and the second half of the sound lower. First, we must set a halfway point: this is simply the length of the sound divided by 2. Then, we loop through the first half, a(cid:374)d i(cid:374)crease each sou(cid:374)d sa(cid:373)ple"s value: to do this, we must multiply the value by 2. We then loop through the second half, and decrease the sound: we do this by multiplying the value by 0. 5 (remember to cast it!) Clip sound waves by clipping a specific part of it: like cropping a picture. Involves copying one part of the sound and pasting it into a new sound object. Calculate the number of samples it will have by subtracting ending value from starting value + 1 public sound clip(int start, int end) int lengthinsamples = end - start + 1;

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents