Computer Science Grade 9 20 min

Recording Audio

Recording Audio

Tutorial Preview

1

Introduction & Learning Objectives

Learning Objectives Explain how continuous analog sound waves are converted into discrete digital data through sampling. Identify and describe the key parameters of digital audio: sample rate, bit depth, and channels. Calculate the file size of an uncompressed audio recording using its parameters. Apply the Nyquist-Shannon Sampling Theorem to determine an appropriate sample rate. Differentiate between uncompressed (WAV), lossless (FLAC), and lossy (MP3) audio file formats. Write a simple pseudo-code loop to represent the process of capturing a series of audio samples. Ever wonder how your phone turns your voice into a file you can send to a friend? 🎙️ Let's dive into how real-world sound becomes computer data! In this tutorial, we'll explore the computer science b...
2

Key Concepts & Vocabulary

TermDefinitionExample SamplingThe process of taking measurements (samples) of a continuous analog sound wave at regular, discrete intervals to convert it into digital data.Imagine taking a snapshot of a runner's position every single second of a race. Sampling audio is similar, but it takes thousands of 'snapshots' of the sound wave's amplitude per second. Sample RateThe number of samples taken per second, measured in Hertz (Hz). A higher sample rate captures more detail, resulting in higher-quality audio.CD-quality audio has a sample rate of 44,100 Hz, meaning the analog wave is measured 44,100 times every second. Bit DepthThe number of bits of information used to store each sample. A higher bit depth allows for a greater range of volume levels (dynamic range), creati...
3

Core Syntax & Patterns

Uncompressed Audio File Size Formula FileSize (in bits) = SampleRate (Hz) * BitDepth * NumberOfChannels * Duration (seconds) Use this formula to calculate the exact size of a raw, uncompressed audio file (like a .WAV). To find the size in bytes, divide the final result by 8. Nyquist-Shannon Sampling Theorem SampleRate ≥ 2 * HighestFrequency A fundamental principle stating that to accurately digitize a sound, the sample rate must be at least twice as high as the highest frequency in that sound. This is why professional audio often uses high sample rates. Conceptual Sampling Loop (Pseudo-code) audio_data = [] FOR i FROM 1 TO (duration * sample_rate): current_sample = capture_sample_from_ADC() ADD current_sample TO audio_data END FOR This pattern shows how a compute...

4 more steps in this tutorial

Sign up free to access the complete tutorial with worked examples and practice.

Sign Up Free to Continue

Sample Practice Questions

Challenging
You need to make a high-quality digital recording of a bat's echolocation calls, which have a maximum frequency of 100 kHz. What is the minimum file size in Megabytes (MB) for a 10-second, uncompressed, mono recording using an appropriate sample rate and a bit depth of 16? (1 MB = 1024 KB, 1 KB = 1024 Bytes, 1 Byte = 8 bits)
A.1.91 MB
B.3.81 MB
C.7.63 MB
D.10.0 MB
Challenging
An uncompressed, 16-bit, stereo (2 channel) WAV file is 25 MB in size. If it was recorded at a standard CD-quality sample rate of 44,100 Hz, what is its approximate duration in seconds? (1 MB = 1,048,576 bytes)
A.12.5 seconds
B.75.1 seconds
C.112.8 seconds
D.150.2 seconds
Challenging
You have space for a 10 MB file. You are currently recording uncompressed stereo audio at 48,000 Hz and 24-bit. To maximize recording time, which single change would be most effective?
A.Changing the recording from stereo (2 channels) to mono (1 channel).
B.Changing the bit depth from 24-bit to 16-bit.
C.Changing the sample rate from 48,000 Hz to 44,100 Hz.
D.Applying lossy MP3 compression after recording.

Want to practice and check your answers?

Sign up to access all questions with instant feedback, explanations, and progress tracking.

Start Practicing Free

More from Digital Media Creation

Ready to find your learning gaps?

Take a free diagnostic test and get a personalized learning plan in minutes.