This chapter covers
- The sound capabilities of the NES console
- Creating sound effects in FamiStudio
- Adding the music/sound effects engine to our game
- Using sound effects in our game
We now have lots of gameplay features in our game and have learned several techniques for using the NES graphical hardware, but our game is silent. We need to add some sound to our game so that we can hear our main ship’s laser firing, enemies moving, explosions, and more. This will make our game even more compelling and fun to play, and we will get to learn about the distinctive sound capabilities of the NES hardware.
14.1 NES sound capabilities
The NES has a custom audio processor unit (APU) that has quite a distinctive sound, mainly due to the type of waveforms that can be generated. The APU has five channels: two pulse wave generators, a triangle wave, a noise generator, and a delta modulation channel for playing digital sound samples. The ability to play digital sound samples on an 8-bit system was particularly advanced for the time when the console was released.
The ability to not just set a pitch for each channel but also to partially control the shape of the waveform generated and how long it will last and potentially repeat frees up the CPU. In most 8-bit systems that have simpler sound chips, the CPU needs to constantly control the pitch and volume of each channel.