Essentially all this code is doing is checking to see whether our eight pins (which are hooked up to photoresistors) are high or low. if they are low then the arduino tells the pin that the speaker is hooked up to to turn on and off with differing amounts of delay in between each. As a result, different tones are produced based on the amount of delay in between the turning on and off.