The answersDownload the PDF
Worksheet

F8.8 Sound

Data representation · GCSE · OCR J277 1.2.4, AQA 8525 3.3.7, Edexcel 1CP2 2.2.3 · about 15 min

BugBotLab
NameClassDate

What this lesson is about

Sampling, sample rate, bit depth and file size, and finding a note from its samples.

Questions 5 marks in all

  1. [1 mark]A sound is sampled at 8,000 Hz with an 8-bit depth for 2 seconds. How many bits is it?

  2. [1 mark]What is the sample rate?

    1. AThe number of samples taken each second
    2. BThe number of bits in each sample
    3. CHow loud the sound is
    4. DThe length of the recording
  3. [1 mark]What does increasing the bit depth do?

    1. AEach sample is stored more accurately, and the file gets bigger
    2. BMore samples are taken each second
    3. CThe sound gets louder
    4. DThe file gets smaller
  4. [1 mark]A 440 Hz wave crosses the middle going upwards how many times in half a second?

  5. [1 mark]How many levels can a 2-bit sample take?

The task: find the note

Sample a note of 659 Hz for half a second at a sample rate of 8,000 Hz. Print samples: <n> and 8-bit size: <n> bits, worked out from the rate and duration. Then count the upward crossings, print note: <freq> Hz, and play that frequency on the buzzer for half a second.

# the two lines every program starts with: the commands, then the robot
from bugbot import *
connect()

import math

rate = 8000
seconds = 0.5

Plan your program here, then type it in and press Run.

QR code
Do it on the robot
www.bugbotlab.com/learn/f8-8-sound/
The simulator checks it and tells you when it passes. Nothing to install, no account.

Challenges

  1. Sample the same note at 1,000 samples a second. Does the crossing count still find it? Why not?
  2. Mix two notes by adding their samples. What does the crossing method report now?
  3. How many minutes of 8 kHz, 8-bit sound fit in 1 MB?