Share this Page URL

Chapter 13. Using Sound in Flash > Sound Basics - Pg. 231

Using Sound in Flash 231 · Turning the music off. If you're going to have sound on your site, you really should give your audience the option of turning the sound off. Not doing so is rude. Learn how to add the nec- essary user controls. Before you jump into the good stuff of manipulating and working with sounds in Flash, you need to get some basic sound theory under your belt. The more you understand about how sound data is handled, the more efficient you can make your Flash files. Sound Basics You live in an analog world. The data you receive from the world around you is presented as a continuous stream of information that your eyes, ears, and brain interpret. When sound or video is recorded for use on a computer, it has to be captured in discrete units or bits. By its very nature, digital information cannot be continuous. That presents some challenges. Note Think about the differences between an analog watch and a digital watch. An analog watch has hands that are in continuous motion and that can represent every possible increment of time. A digital watch, on the other hand, can display time only in very specific increments --you go from one number to the next without ever seeing any of the values between the two numbers. What you perceive as sound are vibrations traveling through the air in the form of sound waves. The sound waves reach your eardrum, which in turn begins to vibrate. Sound waves have both frequency and amplitude. Frequency is how many waves of a sound pass a given point in one second; it is measured in hertz (Hz). The higher the frequency, the higher you perceive the pitch of that sound to be. Lower fre- quency sounds are heard as lower pitches. The distance from the peak of one of the waves to the peak of the next wave is known as the wavelength (see Figure 13.1). Figure 13.1. One complete cycle for a sound wave has both an upper limit and a lower limit. The greater the height or amplitude of the wave, the louder the sound. The length between the peaks is known as the wavelength.