Illusion of Life – Free Write Scott

View Whiny Baby Project

1. Explain in a nutshell your code – structure, logic, important points

Our code was based on the pitch-follow example from Last week, we really enjoyed the oscillating sounds made by varying the tone back and forth with for loops and wanted to explore this more deeply. This also allowed use to create a device that utilized the full spectrum of sound the speaker could create.

In our explorations, we tried varying all of the different possible inputs to create organic sounding oscillations – changing the note itself, varying the length that the tone stays on a particular note as it changed, and varying the length of the entire oscillation. We injected randomness into each of these variables, but eventually decided to do away with the randomness and instead tie all our variance in with the photosensor, to make the creatures we created feel more responsive.

In the final code, the pitch the oscillation is centered on is determined by the length of the second half of the oscillation – if the sensor is above a certain point then then the second half (upswing) lasts longer than the first half (downswing). Or vice versa if the sensor indicates a value below that central point. This sensor data is simply mapped to a range then determines the overall note value, so changing whether the creature likes light or dark is as simple as changing that mapping.

We also vary the oscillation’s length, connecting it directly to the overall note, so that higher notes oscillate faster and lower notes oscillate slower (this also makes things move faster at the higher, pained region).

Finally there is a vibration motor similar to the kind found in a wii-mote that kicks in on the low-end notes.

2. What did you do that you feel is new, non-obvious, useful.

I feel that our sound almost resembles biofeedback, in modulating the length of a “vibration” to change tone. This is a fairly literal corollary to the way that sound itself is created in nature, by the speaker, and by the tone() function itself, which hopefully makes this sound lifelike both aesthetically and theoretically.

As well, using a totally different method of generating sound on the low-end (by the actual physical vibration of the motor against the plastic casing for the creature) is a nice exploration into alternative methods of sound creation and hopefully adds to the organic feeling of the creature as a whole.

Finally, we just find our little whiny babies to be ever so creepy, with their sensor eyes and their annoying cries and their lonely wail.