Digital+Audio

 = BASICS OF SOUND RECORDING  =   Humans perceive sound when things vibrate at a frequency and amplitude that is detectable to them. //Frequency// is the rate at which things vibrate and corresponds to pitch. It is expressed in //hertz//, or cycles per second. Musical (or harmonic) sounds vibrate at a regular, periodic rate. Non-musical sounds, such as noise, have more random vibrations. The frequency of the A above middle C on the piano is approximately 440 hertz, for instance. If anything – whether it’s a guitar string or a rubber band – vibrates consistently at that rate, you will sense you are hearing the A above middle C.

//Amplitude// is the strength of the sound and corresponds to volume. Sometimes the term //decibel// is used to describe amplitude. A zero decibel sound is undetectable; a 100 decibel sound – like that you’d hear standing near a jet engine – causes pain to one’s ears!

The physical vibrations of an object (i.e. a guitar string or a singer’s vocal chords) cause quick fluctuations in the air molecules around them, producing waves of //compressions// (molecules bunching up) and//rarefactions// (molecules expanding) that move through the air. The quicker the vibration, the higher the frequency (or pitch). The stronger the vibration, the greater the swing or fluctuation, and therefore the greater the amplitude or volume.

Exploring Sound Waves: Frequency & Amplitude (lynda.com)

PODCAST: The Thing About Rhythm (whatmusicmeans.podomatic.com)

Complex Waveforms: Adding Sine Waves   = ANALOG vs. DIGITAL  =   We often hear the term “analog” with reference to older recording technology, yet it is very relevant to digital recording. //Analog// is, in one sense, the opposite of digital and refers to continuously changing values (as opposed to the discretely changing ones - ones that change in steps – in the digital realm).

For instance, imagine you are turning up a volume dial on a sound producing device. Let’s say this dial is labeled 1 (softest setting), 2, 3, 4, 5, 6, 7, 8, 9, and 10 (loudest setting), but you can sweep the dial to any position on or in between these numbers. Theoretically, there are an infinite number of settings for the dial in between 1 and 2, or 2 and 3, etc.

Now imagine a dial that “clicks” or locks into place only at the numbers 1, 2, 3, etc. instead of sweeping continuously. You can set the volume to 1, 2, 3, etc. but no where in between. On this dial there are only 10 discrete settings. This is digital, and from this example it doesn’t seem as good as analog, does it? But let’s get back to our vibrating object.  = ANALOG RECORDING  =   Perhaps the waves emanating from the vibrating object (or objects) are on their way to a listener’s ear, or a microphone that will record them. Either way, some membrane such as an ear drum or a microphone ribbon, will intercept the waves and begin vibrating too, swaying back and forth at a rate and strength //analogous// to the original sound. The nerve endings connected to the ear drum (and other parts of the ear) process this sound in a way similar to the wires, magnet, and other electronics connected to a microphone ribbon. As the microphone’s membrane swings quickly back and forth in response to the sound waves coming at it, the attached electronics produce a varying-voltage electronic signal //analogous// to the original sound.

In an analog recording scenario, the fluctuating voltage sent from the microphone can be recorded on magnetic tape (or some other medium). The voltage fluctuation is documented //continuously// for every moment of the recording onto the magnetic tape; there is never a time for which the signal strength is not recorded. Also, the strength (amplitude) of the voltage fluctuation is precisely documented regardless of level; there is no level that is not described.  = DIGITAL SAMPLING  =  In a digital recording scenario, the fluctuating voltage sent from the microphone is sent to an analog-to-digital convertor, or ADC. This device, perhaps housed in an audio interface box, takes “snapshots,” or samples, of the continuously changing amplitude levels at frequent, regular time intervals.

The number of amplitude levels to which a sample can be assigned is called the sample resolution. The rate at which samples are taken is called the sampling rate. The sampling rate for commercial compact disks (CDs) is 44,100 hertz (44.1 kHz). This means the ADC samples the signal from the microphone 44,100 times every second, each time assigning and storing in memory a particular amplitude level.

That’s a lot of amplitude records (or samples) in just one second!  = SAMPLE RESOLUTION  = <span style="display: block; font-family: arial,helvetica,sans-serif; font-size: 13px;"> Remember, the job of the ADC is to convert an audio signal from the analog to the digital realm. Every 1/44,100th of a second when the ADC records and stores the amplitude levels, it stores them as numbers. These numbers are stored digitally in a computer’s (or recording device’s) hardware memory as bits [1]. It turns out that with n bits you can store 2n values. A single bit (21) can offer just two values – a 1 or 0 – to which to assign an amplitude sample from a signal. This means that it records the voltage all the way on (1) or all the way off (0). Obviously, one-bit amplitude resolution is pretty course! Even four bits (24), offering 16 different levels to which the voltage may be assigned, is far too crude a resolution to describe with any detail an audio signal. The figure below shows a continuous (analog) sine wave and the same wave sampled digitally in four bit resolution.

The dynamic range (loudest to softest sound in a system) is reflected in the vertical aspect of the graph, which is divided into the 16 levels available with four bits. The way actual amplitudes along the original sine wave are forced to the nearest of the 16 levels is called quantizing (rounding). The difference between any of these quantized amplitude values, and the actual amplitude of the sine wave at that time, is digital noise (sometimes called quantizing noise).

Obviously the more bits a device can devote to describing amplitudes of samples, the truer the sound and the less digital noise. [2]

SAMPLE RATE & BIT DEPTH EXPLAINED

A More Thorough Explanation of Sample Resolution (Bit Depth)

[1] Bit is short for binary digit. Eight bits form a byte. [2] Without going into the gory details, it turns out that for every bit used to store amplitude sample values in a digital system, you reduce the noise by 6 dBs (decibels). An 8-bit recording device has a dynamic range of 48 dBs; the ratio of the loudest sound it can represent is 48 dBs (8 bits x 6 dBs) above the noise floor. For a 16-bit system, the loudest sound is a full 96 dBs above the noise floor. With 16-bits, noise created by quantizing is basically unnoticeable. <span style="display: block; font-family: arial,helvetica,sans-serif; font-size: 13px;"> <span style="display: block; font-family: arial,helvetica,sans-serif; font-size: 13px;"><span style="color: #333333; display: block; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px;">= DIGITAL MEMORY  = <span style="background-color: #ffffff; color: #333333; display: block; font-size: 14px; text-align: center; vertical-align: middle;"> Edit <span style="background-color: #ffffff; color: #333333; font-size: 14px; text-align: center; text-decoration: none; vertical-align: middle;"> 0 <span style="background-color: #ffffff; color: #333333; font-size: 14px; text-align: center; text-decoration: none; vertical-align: middle;">[| 3] <span style="background-color: #ffffff; color: #333333; font-size: 14px; text-align: center; text-decoration: none; vertical-align: middle;">[|…]  <span style="display: block; font-family: arial,helvetica,sans-serif; font-size: 13px;"> Memory is a factor that directly affects the cost of all sorts of digital devices, from computers, to synth keyboards, to storage media. Take the example of a synth keyboard which stores its on-board sounds as samples in built-in memory. While longer, higher resolution samples sound much better, they also require more memory to store. A fairly straightforward formula can be used to calculate digital memory:

** Time x Sample Rate x Resolution x Channels = Memory ** Note the following:

1. **Time**, the length of the digital recording, is in seconds. 2. **Sample Rate**, the number of amplitude readings taken per second, is a frequency (in hertz). 3. **Resolution**, how accurately an amplitude level can be recorded, depends on the number of bytes (8 bits) allotted to each sample. With n bits, an amplitude can be recorded on any of 2 n levels. 4. **Channels**, usually one (monaural) or two (stereo).

As an example, let’s figure out how much memory it takes to record a minute of audio at conventional CD-quality specifications. The time, at one minute, is 60 seconds. The sampling rate for CDs is 44,100 hertz. The sample resolution is two bytes since the specification for CDs samples is 16-bits. Finally, since CDs are in stereo, they use two channels. Here’s the memory calculation using the formula:

** 60 secs. x 44,100 hertz x 2 bytes x 2 channels = 10,584,000 bytes **

As you can see, //**one minute of CD quality audio requires about 10.5 megabytes of memory storage**//.