Animals make sounds that vary by motivational state. Aggression is signaled by a low frequency growl, while the sound of fear is high-pitched. The sound of a dog barking at a stranger approaching shows how the 2 emotions may be combined into a distinct sound signature.
Sound is more subject to degradation than light, though high frequency sounds attenuate and are scattered by obstacles more readily than low frequencies, regardless of environ. Some creatures take advantage of these audio parameters to tailor their sonic signals.
Habitat fosters speciation, and communication factors in. Urban birds, such as sparrows and tits, sing louder and at a higher pitch than their country cousins. They do so to be heard over the noise. They also make other spectral changes in their songs, including timing, to improve conveyance.