Using a microphone, record and edit your own sound effects and add them to a project.
In this project we're going to record some of our own sounds and add them to the Racing Car project.
If you completed the Racing Car project in the Driving and Traffic Lights pack then open your completed project in Scratch. We'll add the sound effects to your project.
If you haven't completed this project then you can use this starter project which has the Racing Car code already completed.
The first change we're going to make is to turn down the volume from 100% and set it to 30%.
Add the set volume to 30 % block to the car sprite, underneath the point in direction 90 block.
when green flag clicked
set size to (10) %
go to x:(0) y:(0)
point in direction (90)
set volume to (30) % // add this block here
forever
if < touching color [#3db000]? > then
set [speed v] to (2)
else
set [speed v] to (6)
end
if < key [up arrow v] pressed? > then
move (speed) steps
end
if < key [down arrow v] pressed? > then
move (-2) steps
end
if < key [left arrow v] pressed? > then
turn ccw (5) degrees
end
if < key [right arrow v] pressed? > then
turn cw (5) degrees
end
end
Since your tablet or iPad doesn’t have a physical keyboard, you’ll use on-screen buttons to complete this task. Wherever the instructions in this lesson mention pressing a key, you’ll need to tap a button on the screen instead. So, while your steps are a little different, you’ll still be able to make everything happen in your project.
So for example, instead of doing either of these:
when [left arrow v] key pressed
move (10) steps
if < key [left arrow v] pressed? > then
move (10) steps
end
You need to add an on-screen button (like an arrow sprite) and use this code:
when this sprite clicked
move (10) steps
Now, just tap the button on the screen to perform the same action!
The first sound we are going to record and add to the project is the race starter saying the words "On your marks, get set, go!".
Record a new sound of you saying "On your marks, get set, go!".
Once you've recorded it, rename the sound from "recording1" to "on your marks".
Using the microphone on your computer you can record sounds and add them to your Scratch project.
To record a sound in Scratch follow these steps:
Now that you've recorded the sound, make it play at the start by adding the play sound [on your marks] until done block underneath the set volume to 30 % block.
when green flag clicked
set size to (10) %
go to x:(0) y:(0)
point in direction (90)
set volume to (30) %
play sound (on your marks v) until done // add this block here
forever
if < touching color [#3db000]? > then
set [speed v] to (2)
else
set [speed v] to (6)
end
if < key [up arrow v] pressed? > then
move (speed) steps
end
if < key [down arrow v] pressed? > then
move (-2) steps
end
if < key [left arrow v] pressed? > then
turn ccw (5) degrees
end
if < key [right arrow v] pressed? > then
turn cw (5) degrees
end
end
Click on the green flag and test that your sound plays OK. Notice that you can't make your car move until the sound has finished playing.
Since your tablet or iPad doesn’t have a physical keyboard, you’ll use on-screen buttons to complete this task. Wherever the instructions in this lesson mention pressing a key, you’ll need to tap a button on the screen instead. So, while your steps are a little different, you’ll still be able to make everything happen in your project.
So for example, instead of doing either of these:
when [left arrow v] key pressed
move (10) steps
if < key [left arrow v] pressed? > then
move (10) steps
end
You need to add an on-screen button (like an arrow sprite) and use this code:
when this sprite clicked
move (10) steps
Now, just tap the button on the screen to perform the same action!
The next sound we are going to record and add to the project is the sound of the engine.
Record a new sound of you making an engine noise. Use the trim tool to make it a VERY short sound as it will be playing over and over again quickly as your car moves forwards.
Once you've recorded it, rename the sound from "recording1" to "engine".
Using the microphone on your computer you can record sounds and add them to your Scratch project.
To record a sound in Scratch follow these steps: