Scratch Sound Blocks Tutorial: Ultimate Guide to Adding Sound & Music in Scratch

Block Programming

Introduction: Mastering Scratch Sound Blocks

Sound is one of the most powerful tools in storytelling and game design. In Scratch, adding music, sound effects, and voice recordings doesn't just make your project "heard"—it makes it felt. Whether you're designing an interactive game, animating a fun story, or building your first coding project, Scratch sound blocks help you turn static scenes into immersive experiences.

This tutorial is your complete beginner's guide to using sound in Scratch. You'll learn how to:

  • • Add music and sound effects
  • • Use blocks like "start sound", "stop all sounds", and "clear sound effects"
  • • Control pitch and volume dynamically
  • • And create interactive audio responses for your games and animations.

We'll walk through each sound block with real examples, practical tips, and ready-to-use code, all based on the Kodex Academy Scratch Sound Blocks Tutorial.

What You Will Learn:

  • ✅ Add music and sound effects to your Scratch projects
  • ✅ Use blocks like "start sound", "stop all sounds", and "clear sound effects"
  • ✅ Control pitch and volume dynamically
  • ✅ Create interactive audio responses for your games and animations
  • ✅ Record your own voice and custom sound effects
  • ✅ Build professional-sounding projects with layered audio

Getting Started: How to Add Sound in Scratch

Before you can use Scratch's powerful sound blocks, you first need to add sounds to your project. Scratch offers several ways to do this—whether you're importing from the built-in library, recording your own voice, or uploading custom audio files. Here's a step-by-step guide to getting started with sound in Scratch:

Step 1: Open the Sounds Tab

  1. Open your Scratch project.
  2. Select the sprite you want to add sound to.
  3. Click on the "Sounds" tab at the top of the Scratch interface.
  4. From here, you'll see any sounds currently attached to the sprite.

Step 2: Choose a Method to Add Sound

Option 1: Import from Scratch Sound Library

Scratch has a built-in sound library with hundreds of sound effects, music loops, and character voices.

  • Click the "Choose a Sound" (🎵) button in the bottom-left corner.
  • Browse categories like Animals, Effects, Loops, Instruments, and more.
  • Click on any sound to preview it.
  • Click again to add it to your sprite.

📌 Pro Tip: Use relevant sound categories (like "Loops" for background music or "Effects" for in-game actions) to speed up your workflow.

Option 2: Record Your Own Sound

Want to personalize your project with your own voice or a custom effect?

  • Click the "Record" icon (🎤 microphone).
  • Press Record, speak or make your sound, then Stop.
  • Use the editor to trim or adjust volume.
  • Save the recording and rename it for easy identification.

📌 Great for: Voice-overs, narration, character dialogue, or custom sound effects.

Option 3: Upload a Sound File

Already have your own MP3 or WAV files? You can import them directly:

  • Click the Upload Sound icon (⬆️).
  • Select a file from your computer (.mp3 or .wav recommended).

📌 Note: File size should be under 10MB for best performance.

Bonus: Managing Multiple Sounds

Once you've added several sounds:

  • Rename them clearly (e.g., `jump-sound`, `background-music`) for easier coding.
  • You can preview, trim, and edit any sound in the built-in Scratch sound editor.
  • Use the "Code" tab to start programming how and when the sound should play using the Sound blocks.

By mastering how to add, record, and upload sounds in Scratch, you're unlocking the first step toward building engaging, interactive, and audio-rich projects.

Deep Dive: Scratch Sound Blocks & Their Usage

Let's explore the main categories and examples:

Block Purpose Best Use
play sound [v] until done Plays fully before moving on. Great for syncing actions.
start sound [v] Starts instantly, script doesn't wait. Useful for layering dynamic audio.
stop all sounds Halts EVERYTHING—ideal at the end of scenes. Pausing background music or game over.
change pitch/set pitch effect Adjust pitch up/down for dramatic effect. Robotic voices or creating variation.
clear sound effects Resets pitch/volume to defaults. Before starting new scenes.
change volume/set volume Modify loudness—slowly or instantly. Fading in/out or consistent levels.
volume (sensor) Returns current sprite volume level. Debugging or dynamic adjustments.

Let's walk through each sound block in Scratch — how it works, when to use it, and code examples for beginners.

1. Play Sound [sound] Until Done

Purpose: Plays a sound and waits until the sound finishes before moving on to the next block.

when green flag clicked
play sound [meow v] until done
say [Now the sound is over!] for 2 seconds

📌 Best for: Sound effects that should complete before an action — like waiting for an intro voice-over before starting a game.

2. Start Sound [sound]

Purpose: Plays a sound but does NOT wait for it to finish — the next block runs immediately.

when green flag clicked
start sound [bark v]
say [Sound is playing!] for 2 seconds

📌 Best for: Background music or overlapping effects that don't need to delay the script.

3. Stop All Sounds

Purpose: Instantly stops all playing sounds from all sprites.

when I receive [game over v]
stop all sounds

📌 Best for: Pausing background music, ending a game, or transitioning scenes.

4. Change Volume By [number]

Purpose: Increases or decreases the sprite's volume relative to its current level.

when space key pressed
change volume by (-10)

📌 Use negative numbers to lower volume, positive to raise it. Useful for fading in/out.

5. Set Volume To [percentage]%

Purpose: Sets the volume to an exact level from 0% (mute) to 100% (full volume).

when green flag clicked
set volume to (80)%

📌 Great for setting consistent volume levels, especially when switching between scenes or sprites.

6. Volume (Reporter Block)

Purpose: Returns the current volume level of the sprite. This is a reporter block, meaning it gives back a value.

say (join [Volume is ] (volume))

📌 Use this for debugging or adjusting volume dynamically based on game-play events.

7. Change [Pitch] Effect By [number]

Purpose: Modifies the pitch of the sound to make it higher or lower temporarily.

when green flag clicked
start sound [piano v]
change pitch effect by (20)

📌 Great for robotic voices, dramatic effects, or creating variation in repeated sounds.

8. Set [Pitch] Effect To [number]

Purpose: Directly sets the pitch value to a specific level.

set pitch effect to (40)

📌 Use this to start a sound with a defined pitch baseline before adjusting it further.

9. Clear Sound Effects

Purpose: Removes all pitch or pan effects applied to the sound so it plays normally again.

clear sound effects

📌 Use this before starting a new scene or sound to reset audio settings.

Practical Scratch Scenarios & Code Recipes

A. Simple Sound Effect on Flag Click

when green flag clicked
play sound [Meow v] until done

B. Layered Sounds – Background and Effects

when green flag clicked
play sound [BackgroundMusic v] until done
forever
  if  then
     start sound [Laser v]
  end

C. Looping Background Music

when green flag clicked
forever
  play sound [LoopedMusic v] until done
end

Using "play sound until done" ensures no overlaps.

D. Dynamic Pitch Adjustment

when green flag clicked
set pitch effect to (50)
play sound [Spooky v]
clear sound effects

E. Fade-Out Music (Volume Control)

when I receive [FadeOut v]
repeat (10)
  change volume by (-10)
  wait (0.2) seconds
end
stop all sounds

F. Interactive Soundboard (Click Per Sound)

when this sprite clicked
start sound [Beep v]

when green flag clicked
start sound [LoopMusic v]

G. Randomized Sound Effects on Event

when I receive [Mystery]
if <(pick random (1) to (3)) = 1> then
  start sound [Meow v]
else
  start sound [Pop v]
end

Using Music Extension for MIDI-style Sound

Note: "MIDI style" refers to a method of representing and playing music that is based on MIDI (Musical Instrument Digital Interface) — a technical standard used to communicate musical performance data between electronic instruments, computers, and audio software.

  • Add the Music extension to access blocks like play drum for beats, set tempo, play note for beats, and choose instruments.
when green flag clicked
set tempo to (120)
play instrument [Piano v] note (60) for (0.5) beats

Techniques & Best Practices

  • Timing is Everything: Use "play sound until done" to sync effects (e.g. jump + land sound).
  • Avoid Clutter: Stop one sound before starting another to maintain clarity.
  • Check Audio Formats: Stick with MP3/WAV; if a sound fails to upload, convert it.
  • Enhance Experience with Sound Layers: Background ambiance + action sounds = immersive effects.
  • Name Your Sounds: Use clear naming like "jump_sound" or "victory_music" for clarity.

Conclusion: Elevate Your Scratch Creations with Powerful Sound Blocks

Sound is more than just an add-on in Scratch — it's a core component that brings your animations, games, and stories to life. With Scratch Sound Blocks, even the simplest projects can become engaging, expressive, and immersive.

From playful background music to dramatic sound effects and custom voice-overs, these blocks give you full control over how your project sounds. By mastering sound blocks you can craft experiences that are polished, professional, and fun — even if you're just starting out.

Now that you understand the fundamentals, challenge yourself with enhancements like:

  • 🎼 Creating interactive music loops
  • 🔀 Randomizing sound effects for variety
  • 🔊 Building sound-based games or quizzes
  • 🧠 Using pitch and volume to reflect game states (e.g., low health = lower volume)

Call to Action

  1. Don't forget to check out the full video tutorial by Kodex Academy here: Learn Scratch Sound Blocks | Complete Guide to Adding Sound Effects & Music in Scratch Programming
  2. Like, comment & share the video
  3. Visit kodexacademy.com
  4. Subscribe to the Kodex Academy YouTube channel for deeper Scratch content.

Learn More with Kodex Academy

At Kodex Academy, we're passionate about helping students learn coding in creative ways. This project teaches more than Scratch—it empowers young minds to build tools that work in the real world.

Explore more:

Stay updated with new content, free tutorials, and coding challenges!

Happy coding with Kodex Academy! 🚀

🎵 Ready to Add Sound to Your Projects?

Start experimenting with sound blocks today and bring your Scratch creations to life with audio!