Learning Goals 3 min
By the end of this lesson you will be able to:
- Add a sound to a sprite from the Sound library.
- Record your own sound with the microphone button.
- Explain why a sound has to be added to the sprite that will play it.
Warm-Up 7 min
Your market makes noise, and every noise in it is a cat meowing. Even a very good sound cannot be three different things at once.
Quick-fire puzzle
Priya added a drum sound to her cat, then selected the bread sprite and looked for it in the dropdown. It was not there. Why not?
when flag clicked
start sound [Meow v]
Reveal the answer
Sounds belong to sprites. She added the drum to the cat, so only the cat has it. The bread has whatever sounds the bread came with, and nothing else.
This is exactly how costumes work. If two sprites both need a sound, it has to be added to both.
New Concept — where sounds come from 15 min
You have already done this twice. The sprite library gave you characters; the backdrop library gave you settings. The Sound library works the same way, and it is bigger than either.
Four ways to get a sound
Select a sprite, open the Sounds tab, and hover the round button at the bottom-left. The same four options fan out that you saw for sprites and backdrops.
| Icon | Name | What it does |
|---|---|---|
| 🔍 | Choose a Sound | Opens the library — hundreds of sounds, grouped by category. |
| 🎤 | Record | Records from your microphone into the project. |
| 🎲 | Surprise | Adds a random sound. Occasionally inspired. |
| 📤 | Upload | Adds a sound file from your computer. |
The library is organised by what a sound is for
The categories are worth knowing: Animals, Effects, Loops, Notes, Percussion, Space, Sports, Voice, Wacky. For a market, Effects and Animals are where you will spend your time. Voice holds only a handful of sounds, and none of them is a stallholder calling out — which is exactly why Step 5 has you record your own. Loops are sounds designed to repeat seamlessly, which becomes very useful in Lesson 38.
Recording your own
The microphone button opens a small recorder: a big record button, a stop, and a play to check it. Record, listen, and either keep it or try again.
A recorded sound is nothing special once it exists — it appears in the list like any other and works in exactly the same blocks. The only difference is that you made it.
Trim the silence
Recordings almost always begin and end with a moment of nothing, because you press record before you speak and stop after you finish. Drag the handles at either end of the waveform to cut that off.
This matters more than it sounds. Half a second of silence at the front of a sound makes every script using it feel slightly late.
Why it matters
A soundscape is only convincing if the sounds belong to the place. Meow for everything is a placeholder; a market needs voices, footsteps and clatter — and the two most Malaysian sounds in your project will be ones you record yourself.
Worked Example — giving each sprite its own voice 15 min
We replace the borrowed meows with sounds that belong to each thing making them.
Step 1 — Open the stallholder’s Sounds tab
Select the stallholder sprite, click Sounds, and look at what she already owns. Probably one sound you did not choose.
Step 2 — Add a market sound from the library
Hover the round button, click the magnifying glass, and choose the Animals category. Pick Chatter — a busy chattering that works well as a stall in full swing. Click the thumbnail and it joins her list.
Step 3 — Use it
Back on Code, her dropdown now offers the new sound.
when flag clicked
start sound [Chatter v]
Step 4 — Prove sounds are private
Select the bread sprite and open a sound block dropdown. The stallholder’s voice is not there — the bread has its own list.
Add something from Effects to the bread instead, something that could be a stall being set up.
Step 5 — Record your own
Select the cat and click the microphone button. Record yourself saying a market phrase — Murah! Murah! works nicely. Stop, then press play to hear it back.
Step 6 — Trim it
Look at the waveform. There is almost certainly a flat stretch at the start before your voice begins. Drag the left handle in until the sound starts immediately, and do the same at the end.
Play it again. It should now start the instant you trigger it, which is what makes a recorded sound feel deliberate rather than laggy.
Step 7 — Name it
Click the name field above the waveform and change recording1 to something you will recognise. Every block referring to it updates automatically.
Step 8 — Run the whole market
Give all three sprites a flag script that starts their own sound. Three different noises, overlapping, from three different sources.
when flag clicked
start sound [Murah v]
wait (2) seconds
start sound [Murah v]
What changed: your market has stopped borrowing one sound for everything and started sounding like a specific place.
The full assembled scripts (your reference)
when flag clicked
start sound [Murah v]
wait (2) seconds
start sound [Murah v]
when flag clicked
wait (1) seconds
start sound [Chatter v]
Try It Yourself — three small builds 12 min
Goal: Add three sounds from three different library categories to one sprite, and give each its own key.
when [1 v] key pressed
start sound [Chatter v]
when [2 v] key pressed
start sound [Bell Toll v]
Think: a sprite can own as many sounds as you like. Only the sprite matters, not how many sounds it holds.
Goal: Record a market phrase in Malay, trim it properly, and compare it with the untrimmed version.
Think: trigger the untrimmed version from a key and count how long it takes to actually make a noise. Then do the same with the trimmed one.
Mini-mission: a sound for every source. Make sure every sprite in your market makes a noise that could plausibly come from that thing, and that no two sprites share a sound.
It works if: at least one sound is your own recording, no two sprites use the same sound, and a listener could guess which sprite made which noise. Keep each stack under 8 blocks.
Think: if a sound is missing from a sprite’s dropdown, that is not a bug. What does it tell you about where you added it?
Mini-Challenge — guess the source 5 min
“Which sprite made that?”
Build a market where a listener with their eyes closed can tell which sprite made each sound, purely from what it sounds like.
It works if:
- Three sprites each own a different sound.
- Each sound plays on its own key, so a listener can trigger them one at a time.
- A classmate with eyes closed matches at least two of the three to the right sprite.
- You can say which library category each came from.
Reveal one worked answer (teacher)
A voice from Voice for the person, something from Animals for the cat, and a clatter from Effects for the stall.
The failure to watch for is pupils picking sounds they simply like — a laser or a boing — which are memorable and match nothing on the Stage. Ask them to justify each choice against the sprite.
Recap 2 min
Sounds come from the Sound library, from your microphone, or from a file — added through the Sounds tab, using the same four-button menu as sprites and backdrops. Crucially, a sound belongs to the sprite you added it to and appears in no other sprite’s dropdown. Recordings need trimming at both ends, or every script using them feels a beat late.
- Sound library
- Scratch’s built-in collection, grouped by category. Opened from the Sounds tab.
- Sounds tab
- Next to Costumes. Lists the sounds belonging to the selected sprite.
- Recording
- A sound captured from your microphone. Works exactly like a library sound once added.
- Trimming
- Cutting silence off the start and end of a recording so it plays immediately.
Homework 1 min
Three sounds, three sources. Build a small sound board where each key plays a sound that suits its sprite.
- Give three sprites one sound each, from three different library categories.
- Give each sprite a key script so its sound can be triggered on its own.
- Ask somebody at home to guess which sprite made each sound, with their eyes shut.
- Screenshot one sprite’s Sounds tab and its script.
when [1 v] key pressed
start sound [Chatter v]
Bring back next class:
- Your screenshots and how many your listener guessed correctly.
- Your answer to: “Why does a sound you added to one sprite not appear in another sprite’s dropdown?”
Heads up for next class: SCR-L01-37 teaches volume and pitch — how to make one sound feel near or far, big or small.