Pre-class Musings…

Explain your code structure, logic, important parts

The code for my “creature” follows a very simple programming pattern. First of all, the loop() handles most of the logic, and depending on the current lighting conditions, it will run one of several functions that play a corresponding sound. By breaking the code up into chunks, each part could be created and tested separately.

The loop() initially takes input from the photoresistor and evaluates whether this makes the creature happy or sad. The higher the light level, the “sadder” the creature becomes. When no extraordinary conditions are occurring, the program will run the normal sound function. This function will play a small sound sample that bases it’s top-most frequency and tempo on the excitement of the creature. The happier the creature, the faster and higher pitched the creature’s voice becomes. These changes are not immediate, but as a reaction to a higher or lower level of light. It is only over time that the mood really changes.

If there is a sudden and large change in light, the creature will react much more abruptly and either scream out in rage (low to high light change), or a sigh of relief and joy (high to low light change). Furthermore, if the creature exists in the high light levels for a long time, there is a function that initiates the creatures death, after which it needs to be revived by hiding it from light for a short while.

 

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

One feature that my partner Bree and I did that I haven’t seen in other people’s work is to account for rapid changes in light. Essentially, we are not just looking at how light affects the sound of the creature, but the speed at which light changes. In many ways this is how most creatures are, including humans. We endure changes for the worse when they happen incrementally, and we take small positive changes for granted, but as soon as something big changes quickly, people and animals become quite vocal and the pain/elation is much more apparent. It’s a very recognizable aspect of life and we wanted to incorporate this tendency into our creatures. Furthermore, this gives time and the light level a certain active quality as well. Instead of just being a value that directs our creatures in a one-to-one sort of way, allowing for changes that happen at different speeds gives another avenue of interaction and depth, like moving from a static velocity to one with acceleration.