I’m not a CS graduate or anything. I am a self-taught developer. This is what I’ve been wondering quite a while now.
I kinda know how images work. Yes, the format specifications might differ. A PNG file and a JPG file are different about how they *store* the image data. However, at the end of the day, images are the horizontal and vertical formation of pixels on a screen.
Yet, I do not know what a “sound” is. Images have a unit like “pixel”, what is the unit of sound?
Please note that I’m talking about “sound” as data, not as a physical event.
In: Technology
The basic until of data in a sound file is “loudness”. Individual sounds are made up of a wave, of which there are two components: Amplitude (loudness) and Frequency (pitch). While the mapping between amplitude is obvious and the higher the frequency the higher the pitch. Now, more complex sounds like music and speech are made up of layering multiple individual sounds over top of each other. Some sounds formats, such as midi, attempt to recreate this by have a library of individual sounds which can be played at the required pitch at the required time, but they are generally not used for recording. Most sound recording is done by sampling the loudness of the sounds extremely fast, fast enough to be able to recreate the sound if played back at the same speed. If you can record at twice the frequency of the high individual sound, it is mathematically possible to recreate it without any loss of data. So, most sounds files are just streams of loudness-es at extremely high frequency.
Latest Answers