![]() ![]() |
| |||||||||
| Hotspots: Slides and Code TA Corner Comments? Announcements FAQ Static Webspace | ||||||||||
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| So which would be lower and which higher? Did you try the programs and see which does which? How about how you would figure out the maximum amplitude? Mark Guzdial |
| Posn is a variable, you could use anything in the place of all the posn and the program would still do the same thing. In this case, it has been used to represent "i % 200". Summer McWilliams |
| % is the "Mod" operator. It can be used just like any other arithmetic operation. Experiment in JES to see what it does. Greg Leo |
| the modulus is the remainder after division. Missing Page |
| That doesn't mean anything in term of the two programs. That's got to do with where the function is stored in memory. Kelly Lyons |
| The number after media.Sound is (essentially) the address of where the object sits in your computer's memory (RAM). Louder sounds should have larger amplitude, right? Mark Guzdial |
| Lower pitch means lower frequency which means fewer cycles per second. Does it SOUND lower? Mark Guzdial |
| It affects both. Amplitude being how high it goes up is affected by what you are adding to value (The more you add, the higher it goes up) Frequency is related to how long it takes to get back to the original value, so for how long are you increasing it before you start decreasing it, and how long will it take to decrease back to it's original value. Kelly Lyons |
| Why divide to compute amplitude? Isn't the amplitude just how high the wave gets at maximum? Mark Guzdial |
