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 ...

Get Hello World! Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.