User Tools

Site Tools

This is an old revision of the document!

Part I:

Under construction

Type in and experiment with any two of the five examples from the text (we'll have covered one or two in class). Delve into the Ess documentation for each of the classes and methods that are new to you. Write a short page describing how either of these sketches works, including drawings of the flow of data if appropriate. Your writeup should be good, solid technical writing which could be read and understood by someone else with some background in audio, but not Processing/Ess.

Part II:

Write a sketch to map a sound to an image and back again. To do this, map each sample in any (short) sound file to a pixel. You'll need to try and figure out how many pixels you'll end up with, and create a PImage object with more than enough real estate to display the result.

Here's the mapping: if the sample is greater than 0.03, the pixel is red. If the sample is less than -0.03, the pixel is blue; everything else is green. If in your resulting image one color seems too dominant, experiment with a different mapping. Just be sure to document your mapping, including a println statement showing the ranges you use. Try to figure out how long your sound file should be to fit inside a 640 by 480 image.

When you have this conversion working, add functions that convert from the image back to a sound when the use clicks on the image. Use the inverse mapping: if the pixel is red, output a sample with value = 0.03, and so on (for green, you could try 0 - you may need to experiment). Play the resulting sound. Is it recognizable?

cs276/ · Last modified: 2009/11/11 20:39 by wikiwikwik