Our Flash tutorials provide you with step-by-step instructions on how to create beautiful Flash animations and integrate them into your website.  Home Flash & Swish Flash Tutorials Working with Sounds

Working with Sounds

Browse Pages: << < 1  2  3 

Mp3 or Wav?

How we've already commented, the sounds, which Flash 8 can import, must have the extensions .wav or .mp3. If you do not know the differences between these types of files, you read next.

WAV Sounds

The sounds with extension WAV (.wav) are sounds with a very good quality, concretely, its quality is lower than an original sound by 13 times, this quantity is more than acceptable if we take into account that, for example, the sound of a telephonic call is worse than a original sound by 100 times, and a sound which we listen in radio (FM) is worse than a original one by 24 times. Knowing this, we will understand that WAV could take a lot of space in the hard disc. (A song of 4 minutes occupies 50 MBytes in format WAV).

Is it necessary so high quality? Is it necessary that the sound would be completely pure? Evidently not, and because of this others formats of audio appear. Others formats that without losing quality save space in the hard disc (and in our Flash movies) and provide flexibility to these sounds.

The format of audio that have acquired major popularity is the format MP3. Let 's see why.

MP3 Sounds

The MP3 (.mp3) is a technology of compression of audio file. Its complete name is MPEG-1 Audio Layer 3 and it appeared 15 years ago with the objective of reducing the enormous size that the audio files (for example, the WAV) had until then.

MP3 succeeds in combining quality of sound with a size of small file, becoming an audio standard in Internet. Its key is in that an MP3 sound does not contain all the details of the audio, those which are not captables by the human ear, but exist in the original sounds. That's to say, if a detail of the sound cannot be audible by the human ear, why not delete it.

And that is indeed the case; the result is a practically identical sound (often completely identical, depending on the level of applied compression) to the original sound. Some very powerful methods of compression are applied to this sound without needless information, and the final result is a file of MP3 audio, with a good quality and very reduced size (then, the song of 4 minutes from the previous example occupies 3,9 Mbytes only), that allows us to save a nearly unlimited number of songs in our computer, in CDs or even work with them in Internet...

Moreover, when we want to add a sound to our movie, we have to choose betwen one of these 2 formats. Usually the sound, which we try to insert, is already in one of them, but we haven't to forget about multitude of programs that convert a sound with extension .mp3 to one with extension .wav and vice versa, therefore, the use of original format has not to be inconvenient.

The question arises immediately: Which one is better?

This question is more important than seems, since if we want our movie to have sounds, we have to assume that load is very important in terms of movie size and, as consequence, in terms of download time. Typically the sounds sizes more than half of the total space and often it is not worth inserting them...

As we already have known, the sounds .mp3 sizes much less than the sounds .wav (10 times less or more), then, it seems to be advisable to insert .mp3 instead of .wav.

Can Flash compress sound which was already compressed? In other words, if a sound .wav has been compressed and now has the extension .mp3, can Flash compress it once more?. The answer is it cannot. Flash compresses the sounds that we insert in our movies, but if the sound is already compressed, it cannot compress it again (in fact, it tells it succeeds in compressing, but the final sound is the same as initial one).

Example:

We have a movie with an unique frame that is empty. Once we prepare this movie to be seen (.swf), it sizes 1KB.

We have 1 sound .wav that sizes 1596 KB.

We compress this sound with a compressing program of audio and obtain the same sound in format .mp3; it sizes 145 KB. (The quality of sound is practically identical).

Now we insert the sound .wav in the original movie and export it (this is discussed in the last unit).

Result: A movie with sound that sizes 37KB.

Instead we insert the sound .mp3 in the original movie.

Result: A movie with sound that sizes 145KB.

Conclusion: The movie with a sound .wav sizes nearly 5 times less than the one, which has the same sound in .mp3, hence, it seems to be recommendable to insert .wav sounds (the compression of audio obtained by Flash is great).

As counterpart, lost of quality in the sound could be appraised that is audible in the movie. This lost will be more or less important according to the type of sound. If it is one voice, for example, we have to insert .mp3 since the voice has necessarily to be well audible. If it is background music, it is probable that the final result is acceptable, although the lost of quality. It is best to probe both versions and to evaluate the result.

You can see various tests in this movies:

Background Music

Click to play video
Movie with sound (music) in format .wav.
Total Size: 37 KB.
Quality: Good

Click to play video
Movie with sound (music) in format .mp3.
Total Size: 145 KB.
Quality: Good
Sound "Voice"
Click to play video
Movie with sound (voice) in format .wav.
Total Size: 9 KB.
Quality: Regular
Click to play video
Movie with sound (voice) in format .mp3.
Total Size: 67KB.
Quality: Good

In the first case it would be advisable to remain the smaller movie, since both sounds are good. In the second case, the second movie would be more appropriate, since it is worth having the quality of sound, even though it has a larger size.

Finally, we would like to comment that Flash can't import sounds in format MIDI (.mid). But if we want the sound in our animation to be a MIDI and do not want or cannot get a program, which converts the sound MIDI to WAV or MP3, there exists a way to do this consisting in the combined use of Flash and Javascript. Flash 8 allows to load sounds in a dynamic way (without increasing the space), this will be considered in the Unit 17 "Action Script".



Author's URL: Teacherclick.com
Browse Pages: << < 1  2  3 
Final results of our readers
New!
Passed through all the steps? Share your result!
Your result will be premoderated.
Please make sure you choose the right image.
 
 



Captcha

*Required fileds
Our Flash tutorials provide you with step-by-step instructions on how to create beautiful Flash animations and integrate them into your website. More Flash Tutorials: Featured Materials | Fresh Materials | More Flash Tutorials at FlashPerfection.com

No comments yet...
Add comments to "Working with Sounds"

Captcha