
Basics of Digital Sound Theory Part 2

A sample rate of 44.1 kHz is not always ideal.
When transmitting data over a low-bandwidth network, the quality of the sound must be sacrificed in favor of its size, in practice sampling frequencies two, four and eight times lower than 44.1 kHz are usually used:
• 22.05 kHz: the so-called radio quality. Used when encoding the sound of FM radio stations. In the case of Flash, it is good for creating background music and event sounds. For the transmission of a human voice, it is even somewhat redundant;
• 11.025 kHz – telephone quality. A sample rate more suitable for the human voice. Used in 1P telephony;
• 5.5 kHz: sound about to lose the information component. This sample rate can be used to transmit low sounds as well as speech (albeit with mediocre quality).
Flash Player supports sample rates 44.1: 22.05; 11,025; 5.5 kHz. The choice of frequency should be determined by the type of sound, as well as the importance of maintaining the size of the SWF file. However, it should be remembered that there is no point in increasing the sample rate of the audio fragment compared to the initial one. This will not increase the quality, but will only unnecessarily increase the size of the movie.
Bit depth of samples
Bit depth determines how many different amplitude values can be captured during digitizing. If the bit width is 4 bits, then the range of the amplitude value from zero to the maximum will be divided into only 16 bins. Naturally, the error when rebuilding the analog signal will be very high. This bit depth is suitable for representing very simple sounds as well as speech (its quality will be low).
The 8-bit width allows 256 amplitude values to be represented. This is the bit depth used by FM radio stations. It is enough to present any sound in satisfactory quality. 16-bit encoding is optimal. At the same time, it can work with 65,536 amplitude options, which is enough to cover the entire audible range.
The 16-bit format is used for CD recording. Higher quality quantization is only justified in the case of studio sound processing.
Flash Player supports 8-bit and 16-bit quantization for uncompressed formats (for example, WAV) and only 16-bit for compressed formats (MP3 belongs to them). Keep this in mind when importing a sound file into a movie.
Number of channels The
Stereo sound is designed to give the playback sound a natural dimension. This is achieved due to the fact that a different component of sound is reproduced from each speaker. In general, the sound of each channel is a separate sound file, so the size of the stereo sound is proportional to the number of channels supported.
Conventional non-professional sound cards work with two-channel audio. The Flash player also supports the same number of channels. With ActionScript, you can mix the sound of the channels by playing the left channel on the right speaker and the right channel on the left. How this is done, we will talk a bit below.
If the sound is encoded in MP3 format, you can choose one of three stereo formats.
• Dual channel. Each channel receives half of the stream and is separately encoded as mono. It is mainly recommended in cases where different channels contain a fundamentally different signal, for example text in different languages.
• Stereo. The channels are scrambled separately, but the scrambler program can give one channel more space than the other if necessary. Most standard format.
• Joint stereo. The stereo signal is divided into two new channels. One is the average of the original channels and the other is the difference between the channels. In this mode, the sound quality is obtained more frequently than in others.
Unfortunately, in the Flash development environment, you cannot specify which stereo format is used. Therefore, if sound quality is of paramount importance, then the creation of MP3 files with the required parameters should be done using one of the specialized programs.



