Alice-Media Computation Change Sound Frequency Project Barbara Ericson, ericson@cc.gatech.edu Georgia Tech July 2006 Project Summary: Create three objects of the same class and resize one to be bigger and one to be smaller. Use media computation to modify a sound to make a higher sound (double the frequency) and a lower sound (half the frequency). Associate the higher sound with the smaller object, the lower sound with the bigger object and the original sound with the mediumsized object. Topics Covered: The Alice topics covered include creating an object and using the mouse controls to copy objects, resize objects, and position objects. In media computation we cover using a Java for loop and writing methods. Alice Part: Use Alice to create a world using the water template. Add an island from the Environments category. Create a frog from the Animals category. You will have to move it up to see it on the island. Copy the frog 2 times so that you have 3 frogs. Point out that they have different names (and you can rename them if you wish). Use the resize feature to make one big, one medium, and one little frog in a row. Use media computation to take the croak.wav sound in the mediasources directory and make a version that is higher and a version that is lower (see instructions below). Then import all 3 sounds by clicking on File and then on Import and pick the sound to import. Next, have each frog play the appropriate sound and then tap its foot using the play sound method and the foottap method at the same time (using Do together). Then play the movie. Media Computation Part: To make a higher sound make a copy of the original sound and then copy every other value from the copied sound to the original and clear the rest of the original sound to 0. Or you can create a new sound half as long as the original and copy every other value from the original to the new sound. You can return the new sound. To make a lower sound you can make a copy of the original sound and then copy each value in the copied sound twice back to the original sound until the end of the original sound. Or, create a new sound that is twice as long as the original and then copy from the original to the new sound and return the new sound. You can create a new sound with a specified number of sample values using the constructor that takes an integer. You can write out the new or modified sound using the write method of Sound. See the JavaDoc on Sound for more information. Additional Materials: There are powerpoint slides on how to change the frequency of a sound in the file SoundChangeFreq.ppt. I have original croak sound, the higher and lower croak sounds, and an example Alice world in the zip file as well. You will need the classes Sound and SimpleSound, and the javazoom directory in the bookClasses directory. You can get the bookClasses zip from http://coweb.cc.gatech.edu/mediaComp-plan/101. Other Ideas: Have the students create 5 objects of different sizes and 4 variations on an original sound. Have students create a more general scaleUp method and a more general scaleDown method.