The ultimate aim of computer music is to create actual sound in the real world. So let's start by looking at what sound actually is.
A sound is created whenever anything disturbs the air around it. A twig snapping, a gong being struck, a note being played on a violin, all cause the surrounding air to move. This creates a variation in pressure that radiates out as a sound wave.
The effect is rather like throwing a pebble into a pond and watching the ripples radiate outwards. In the case of sound, the waves are not circular, they are three dimensional spheres that expands outwards from the source, travelling at the speed of sound, which is about 340 meters per second, or 760 miles per hour. The speed varies slightly depending on conditions such as air temperature, pressure and humidity.
In the real world, your senses will often be met with several sound sources, located in different places, each emitting their own stream of sound waves.
For example, a full orchestra might have a hundred different instruments, all around the stage, each creating their own different and interesting sounds.
But it is actually even more complex than that, because sound reflects. If you stand in a mountain range and shout, you will hear an echo coming back - the sound reflected back off the side of a nearby mountain. The same happens in a concert hall - the sound bounces off the walls, ceiling and floor, perhaps many times. Concert halls are actually designed to make that happen, that is what we mean when we say that a room has good acoustics. It makes the sound wonderfully full and rich.
If you could actually see the sound waves when and orchestra is in full flow, with a hundred sources of sound and a thousand reflections, it would be a complex and beautiful sight! But how can a computer program replicate that?
One thing that makes computer sound slightly less daunting is the fact that we can only hear the sound that enters our two ears. Specifically, we mainly detect sound waves that hit our eardrums (a small membrane in each ear that transmits sound from the air to the inner ear).
This means that we can create something like the sound of a full orchestra (or any other type of music) using a pair of headphones or two (or more) speakers. We can even simulate the effect of sounds being reflected, by applying echo or reverb to the sound. It won't sound exactly like being in the concert hall, but it can be a reasonable approximation.
The cochlea, in our inner ear, is the part that actually senses sound. It contains a large collection of hair cells, each of which responds to a narrow range of frequencies, and sends a signal to the brain based on the loudness of that particular frequency - our ear hears sound as a collection of frequencies rather than as a single "sound wave". A normal human ear can detect frequencies between 20Hz and 20,000Hz. Our ears are less sensitive to higher frequencies, so as a sound approaches 20,000Hz it will get quieter and quieter until we can't hear it at all. As we get older, we tend to lose the ability to hear very high frequencies.
At lower frequencies something slightly different happens. Consider an electromechanical buzzer, a simple device that makes a click sound each time you apply a pulse of electricity. If you make it click 30 times a second, you will hear a continuous buzz. If you make it click 10 times a second, you will here the individual clicks. The transition from hearing a buzz to hearing separate clicks happens at about 20Hz.
We can also sense the volume of a sound - that is, how loud it is. We can actually sense a very wide range of loudness. We measure this in decibels (dB):
It is important to realise that decibels are a logarithmic measure of sound power. Every time the decibel value goes up by 10, the sound power is multiplied by 10.
For example, a normal conversational of sound is about 10 dB higher than the hum of a fridge, which means it has 10 times the sound power. An alarm clock is 30 dB louder than a fridge, that means it has 101010 times the power.
The reason we use a logarithmic scale is because a difference of 10 dB between two sounds seems like the same amount. For example:
It seems like the difference between the TV and conversation is similar amount to the difference between and alarm clock and aloud TV. In fact, alarm clock is 100 times more powerful than normal conversation. So decibels express what we experience, while power expresses what is actually happening in reality.
It is also worth noticing that the loudest sound we can listen to without risk of damaging our ears is about 60 dB above the quietest sound we can only just hear, which makes it 1,000,000 more powerful!
Copyright (c) Axlesoft Ltd 2020