Level 4

Sound Control

Level 4 · Chapter 11

What this lesson follows

CSTA K–12 Computer Science Standards (2017)

Algorithms & Programming · Grades 6–8

Combine loops and conditions, even nested ones.

Code 2-AP-12Read the official text

Common Core State Standards for Mathematics

Operations & Algebraic Thinking · Grade 5

Write and read number expressions.

Code 5.OA.A.2Read the official text

The short lines are our own words. We matched this lesson to these standards ourselves; the standards' owners have not reviewed or endorsed this course.

Common Core State Standards © 2010 National Governors Association Center for Best Practices and Council of Chief State School Officers. All rights reserved.

Today you will control volume and apply sound effects to audio in your project.

1👋 Warm-Up

For teachers · goals · guide
Lesson Outcomes · for teachersCSTA 2
✦ CSTA 2-AP-12 · ISTE 1.5.c · Standards
🎯 I cancontrol volume and apply sound effects to audio in your project
🧩 New blocks3 blocks
📝 New words6 words
⏱ Lesson time~35 min
Teacher Guide

📋 Before class

⚠️ Common misconceptions

  • Students confuse set volume to (absolute) with change volume by (relative). Absolute sets the exact value; relative adds to the current value.
  • Students may expect negative pitch values to silence the sound — they lower pitch, not volume.
  • Students forget that clear sound effects does not reset volume. Volume and effects are independent.

🎯 Differentiation

🐢 Struggling: Start with only volume control (up/down arrows). Add pitch effects only after volume works correctly.

🚀 Advanced: Challenge students to create a smooth fade-in by using a repeat loop that changes volume by +5, ten times, starting from 0.

💡 During the lesson

  • Warm-UpAsk students: "Have you ever heard a video slowed down so the voice sounds deep and slow?" Explain that changing pitch is exactly that effect. Clarify that volume and pitch are two separate controls — today they will control both.
  • Try ItDemonstrate set volume to (0) vs. change volume by (-10) starting from 50. Show that set always gives the same result, while change depends on the current value. This is the absolute vs. relative distinction — a key concept in programming.
    Run set pitch and then clear sound effects back to back so students hear pitch turn on, then reset. Confirm the volume stays where it was after the clear — clear sound effects does not touch volume. This blocks the later misconception that clear is a "full reset."
  • PlanPoint out there are SIX separate scripts, not one. Script 1 loops the sound on its own; each key has its own when [key] key pressed hat that runs the moment the key goes down. Ask students to trace: "If I press down arrow 3 times starting from 50, what is the volume?" (20 — and Pico shrinks each press, so the volume change is visible too.)
  • BuildWe use separate when [key] key pressed hat scripts here — one per key. Combining them into a single loop comes in a later level, so do not introduce it now. Pico's size shows the volume change even without sound. If sound repeats too fast, show students they can adjust the sound length in the Sounds tab.