Digital Audio Explained — Transcript
Full transcript
- 0:00[Music]
- 0:23before we consider how sound is stored
- 0:26and processed by a computer let's first
- 0:28consider what sound actually is and how
- 0:31it's captured
- 0:32this is an abstract model of the air
- 0:35around us
- 0:36in reality the air molecules are not
- 0:38uniformly sized and spaced like this
- 0:42and they're in a constant state of
- 0:44random motion even when there's no noise
- 0:46at all
- 0:48nevertheless when a sound is made
- 0:50perhaps by the clap of a pair of hands a
- 0:52vibrating guitar string or someone's
- 0:55voice the air molecules nearby are
- 0:58disturbed
- 1:00as each molecule collides with its
- 1:02nearest neighbours a wave of alternating
- 1:04compressions and decompressions moves
- 1:07away from the source of the sound
- 1:10on a dry day at 20 degrees celsius this
- 1:13longitudinal wave travels at a speed of
- 1:16343
- 1:18meters per second
- 1:23to capture this sound we can use a
- 1:25microphone
- 1:26a dynamic microphone contains a magnet
- 1:29surrounded by a coil of copper wire and
- 1:32attached to the coil is a thin membrane
- 1:34a diaphragm
- 1:37when a sound wave hits the diaphragm the
- 1:39coil moves in relation to the magnet and
- 1:42this induces an electrical current in
- 1:44the wire
- 1:45this current can then be recorded
- 1:47somehow and the sound played back later
- 1:50if you plot a chart of the electrical
- 1:52current generated by a microphone versus
- 1:55time you might see this classic
- 1:58representation of a sound wave
- 2:00again you're looking at a simplified
- 2:02picture here
- 2:04this sine wave is really just an
- 2:06approximation of what might be produced
- 2:08by a guitar string for example
- 2:11the distinctive sound of a note from a
- 2:13guitar owes itself to the many subtle
- 2:16overtones that are produced along with
- 2:18the primary sine wave
- 2:21this is how the peaks and troughs of
- 2:23this graph relate to the positive and
- 2:26negative air pressures within the
- 2:28original compression wave
- 2:30the maximum height of this graph is
- 2:32related to the number of molecules
- 2:34displaced by the original disturbance
- 2:36that created the sound
- 2:38or to put it another way the maximum
- 2:41height of this graph reflects the amount
- 2:43of compression at that point in time
- 2:46the higher the level of compression the
- 2:48louder the sound
- 2:50this is the so-called amplitude
- 2:54the distance between two adjacent peaks
- 2:57two adjacent troughs or to be more
- 2:59precise the length of a single cycle is
- 3:02known as the wavelength
- 3:05the shorter the wavelength the higher
- 3:07the frequency of the sound and hence the
- 3:10higher the pitch that you hear
- 3:14now let's consider how a computer goes
- 3:16about saving this information in a
- 3:18digital audio file
- 3:20it's important to appreciate first that
- 3:23sound is an analog phenomenon in other
- 3:26words its properties vary continuously
- 3:30for example at this point in time the
- 3:32sound has a particular value for
- 3:34loudness
- 3:35at this point in time the value is
- 3:37smaller it's quieter
- 3:40because this is an analog wave there are
- 3:43an infinite number of values of loudness
- 3:46in between the two
- 3:48in other words loudness varies
- 3:51continuously
- 3:53not only that but a sound wave can have
- 3:56a long wavelength which means a low
- 3:58frequency or a short wavelength which
- 4:01means a high frequency
- 4:04and it can have an infinite number of
- 4:05values for wavelength in between
- 4:08so wavelength and therefore frequency
- 4:11also vary continuously
- 4:15it's impossible for a computer to store
- 4:17an infinite number of values for
- 4:20loudness and frequency
- 4:22so instead the sound is sampled at
- 4:25regular intervals and at each interval a
- 4:28numeric value for loudness is recorded
- 4:31this results in a set of numbers
- 4:34these numbers are a digital
- 4:36representation of the original wave
- 4:39this sampling may be done while the
- 4:41sound is being captured or it may be
- 4:44done while an analog recording of the
- 4:45sound is being played back perhaps from
- 4:48an old style cassette tape or an lp
- 4:50record
- 4:51a circuit known as an analog to digital
- 4:54converter is used to do this there's one
- 4:56of these behind the microphone socket on
- 4:59a typical computer
- 5:01and because we're talking about
- 5:03computers let's not forget that these
- 5:05numbers are actually saved as binary
- 5:08numbers
- 5:10when the digital recording is played
- 5:12back the digital data in the sound file
- 5:15are used to recreate the original wave
- 5:18the electrical signal generated can then
- 5:21be amplified and fed to a loudspeaker or
- 5:23headphones
- 5:25but you can clearly see that what we
- 5:27have now is just an approximation of the
- 5:30original analog waveform
- 5:33this means that when the recorded sound
- 5:35is played back it's not exactly the same
- 5:38as the original sound
- 5:39the quality is not necessarily as good
- 5:43to improve the quality of the recording
- 5:45the original analog wave can be sampled
- 5:48more frequently in other words we can
- 5:50increase the sample rate
- 5:53you can see that when this sound wave is
- 5:55recreated from the data encoded with a
- 5:58higher sample rate it's a much better
- 6:00approximation of the original analog
- 6:03wave
- 6:04of course if you double the sample rate
- 6:07you may double the quality of the
- 6:08recorded sound but you also double the
- 6:11amount of data that needs to be stored
- 6:14resulting in a bigger sound file
- 6:16getting the balance right is important
- 6:20in this example you can see a wave with
- 6:22a much shorter wavelength and therefore
- 6:24a much higher frequency
- 6:27if the sample rate is too low for this
- 6:29wave not enough data will be captured
- 6:31when it's digitized
- 6:33and the reconstructed wave will bear
- 6:36little resemblance to the original
- 6:38analog wave
- 6:39if the sample rate is too low it will
- 6:42completely fail to capture the nature of
- 6:45high frequency sounds
- 6:48in order to capture a high frequency
- 6:50sound with any degree of accuracy the
- 6:52wave must be sampled at least twice per
- 6:56cycle
- 6:59sample rates are measured in samples per
- 7:02second namely hertz
- 7:06a typical sample rate is eight thousand
- 7:09times a second that's eight thousand
- 7:11hertz or eight kilohertz
- 7:14this is used for telephone calls and
- 7:16voice over internet data transmission
- 7:19a sample rate of eight kilohertz is
- 7:21often referred to as speech quality
- 7:25with an audio cd the sample rate is much
- 7:28higher at forty 44 100 hertz about 44
- 7:31kilohertz
- 7:33although this is more than enough to
- 7:35cater for the sensitivity of most human
- 7:37ears many people argue that the sound
- 7:40from an analog recording such as an lp
- 7:43record has a much warmer quality than
- 7:45the cd
- 7:48but the sample rate isn't the only thing
- 7:51that can affect the quality of digital
- 7:53sound
- 7:54an equally important factor is the
- 7:57number of binary digits available to
- 7:59encode the loudness of each sample the
- 8:02so-called bit depth
- 8:05suppose for a moment that there are only
- 8:07three bits available to encode the value
- 8:10of each sample this means that each
- 8:13sample can have one of only eight
- 8:16possible values ranging from zero to
- 8:18seven
- 8:20while the original analog wave is being
- 8:22sampled the analog to digital converter
- 8:25has to decide which of these eight
- 8:27values to assign to each sample in a
- 8:30process called quantization
- 8:33each original value has to be rounded
- 8:35either up or down to a value that can be
- 8:38encoded using only three bits
- 8:40the rounding errors that result from a
- 8:43low bit depth mean that the quality of
- 8:45the digital recording can be far removed
- 8:48from the original sound even at a
- 8:50suitably high sample rate
- 8:53what you see here of course is a rather
- 8:55extreme example most digital audio
- 8:58applications use a bit depth of 16 bits
- 9:01so each sample can have one of 65
- 9:05536 possible values
- 9:08needless to say though the higher the
- 9:10bit depth the more data and therefore
- 9:13the bigger the sound file
- 9:17audio applications for studio recording
- 9:20mixing and mastering might use a bit
- 9:22depth of 24 bits allowing for one of
- 9:25over 16.7 million possible values per
- 9:29sample
- 9:3132 bits per sample that's over 4 billion
- 9:34possible values is also available
- 9:38the benefit of a high bit depth is much
- 9:41better precision while editing and a
- 9:43much bigger dynamic range
- 9:46that is the difference between the
- 9:48loudest and the quietest values possible
- 9:52in summary
- 9:54an analog sound can be captured using a
- 9:56microphone
- 9:58this converts the sound to an analog
- 10:00electrical signal which can be sampled
- 10:02and digitized
- 10:04the quality of the digital sound depends
- 10:06on the number of samples taken per
- 10:08second namely the sample rate
- 10:11if the sample rate is too low it may
- 10:13fail to record high frequency sounds
- 10:17the quality of the digital sound also
- 10:19depends on the bit depth
- 10:21the number of bits available to encode
- 10:23the loudness of each sample
- 10:25if the bit depth is too low measurements
- 10:28during sampling will be inaccurate which
- 10:30will result in a fuzzy recording
- 10:33you may also come across a figure known
- 10:35as the bit rate for a sound recording
- 10:39this is the number of bits delivered per
- 10:41second during playback
- 10:43the bit rate is easily calculated by
- 10:46multiplying the bit depth by the sample
- 10:49rate
- 10:50if the sound has been recorded in stereo
- 10:52then this is multiplied by the number of
- 10:54channels which is usually two
- 10:58higher sample rates and bit depths
- 11:00result in digital recordings that are
- 11:02closer to the original sound but this
- 11:04comes at a cost
- 11:06bigger file sizes
- 11:10the most common raw uncompressed audio
- 11:14format is lpcm which stands for linear
- 11:18pulse code modulation
- 11:20this is the format used on audio cds
- 11:24you don't often see files with the lpcm
- 11:26extension because the raw audio data is
- 11:29normally contained within a wrapper file
- 11:32these wrapper file formats include dot
- 11:34wav waveform audio file format which was
- 11:38developed by microsoft and ibm
- 11:41and aiff audio interchange format which
- 11:45is the apple equivalent
- 11:47one of the most well-known compressed
- 11:49sound formats is mp3 which can make a
- 11:53sound file up to 14 times smaller
- 11:56mp3 is a lossy compression format
- 11:59because it removes data for sound beyond
- 12:02the normal hearing range of people and
- 12:04reduces the quality of sounds that are
- 12:06difficult to hear
- 12:08some people nevertheless argue that
- 12:10compressed digital sound is noticeably
- 12:13inferior to uncompressed sound
- 12:16indeed some musicians have changed the
- 12:18way they produce music to work within
- 12:20the limitations of compressed formats
- 12:23like mp3
- 12:25perhaps in these days of high bandwidth
- 12:27and more discerning audiences compressed
- 12:30music will eventually fall out of favor
- 12:33altogether
About this transcript
This page contains the full transcript of Digital Audio Explained by Computer Science Lessons, generated from the public captions YouTube serves with the video. The transcript has 1,707 words across 290 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.