How to pause (and resume) music in Scratch

Опубликовано: 26 Май 2026
на канале: Jared O'Leary //Multiplicity
9,402
79

🐱 More Scratch content in my home tab https://jaredoleary.com/scratch

🎧 Computer science education podcast https://jaredoleary.com/csk8

🖥️ PC specs and gear I use https://jaredoleary.com/gear

🎮 Gaming playlists http://jaredoleary.com/game

🥁 Drumming playlists http://jaredoleary.com/drum

📅 Stream schedule https://jaredoleary.com/schedule

👕 Merch https://jaredoleary.com/merch

👪 Socials (in the menu) https://jaredoleary.com

🐱 Scratch project https://scratch.mit.edu/projects/8771...

━━━━━━━━━━━━━

In Scratch, there's a block that can stop all sounds, but how do you pause a sound or music and then resume playing where it left off? If you divide negative one by zero, you get Negative Infinity. If we put that inside of a "set pitch" block, it will slow it down so much that it's basically pausing the sound. However, you'll hear a really low sound slowly playing.

So, we also want to set the volume to zero when we pause. To unpause, we first check if our volume is set to zero. If it is, we will reset the pitch effect to zero and the volume to something like 100 when clicked, so we can resume the music. Now, we simply put our pause code in the "else" part of the conditional to run this code if our volume is not equal to zero. This button will now pause and resume the music when clicked.

Check out the links above for more free Scratch videos, projects, lessons, tips, etc. If you'd like to learn how to teach computer science education with your students, check out the #CSK8 Podcast in the link above to explore research, experiences, and perspectives on computer science education through interviews with computer science educators, scholars, and administrators, as well as episodes that summarize and unpack implications of research for classroom teachers who are interested in learning more about practical applications of research in their classroom.

#scratch #JaredOLeary

━━━━━━━━━━━━━

00:00 How to pause music and sound in Scratch
00:23 How to un pause music and sound in Scratch