O'Reilly logo

Hello World! Second Edition: Computer Programming for Kids and Other Beginners by Warren Sande and Carter Sande

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 19. Sound

In the last chapter, we made our first graphical game, PyPong, using what we have learned about graphics, sprites, collisions, animation, and events. In this chapter, we’ll add another piece of the puzzle: sound. Every video game and many other programs use sound to make them more interesting and enjoyable.

Sound can be both an input and an output. As an input, you’d connect a microphone or other sound source to the computer, and the program would record the sound or do something else with it (maybe send it over the Internet). But sound is much more common as an output, and that’s what we’ll cover in this book. You’ll learn how to play sounds like music or sound effects and add them to your programs, like PyPong.

More help ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required