Oct 032004

[suffusion-widgets id='2']

“Streaming” on the Internet is when you don’t have to wait until (e.g.) a sound file is completely downloaded before you can begin to listen to it. You can tell that it makes a lot of sense to use “streaming” with anything that happens in time, like audio, video and animation.

Let’s look at an example: say you have a sound file of two minutes. Say it would take 5 minutes to download the entire file over your modem. Without “streaming” you’d have to wait 5 minutes until you can listen to the sound. With “streaming” your computer can start to play the sound after about 3 minutes. There’s still enough time to download the rest of the file without having to stop the music!

While you can save 2 minutes in this example, most people don’t even want to wait for 3 minutes. For a start within seconds and for live radio or video on the Internet, the sound or video files have to be so small that their download time is not longer than their playtime.

“Streaming” multimedia files always target a specific connection speed. You can say a file “streams on a 28 k modem connection”. This means that with a 28 k modem the file can start to play within seconds after the user hits the play button. With the same file and a slower Internet connection you’d have to wait for a while before you could start the sound. This amount of time is sometimes referred to as “streaming latency”.

Big difference: Some multimedia players can automatically figure out how long they have to wait before they can start the multimedia file (RealAudio, VivoActive). With others the multimedia files have to be programmed in a special way to avoid that the player (or browser) starts them too early so that they have to be interrupted (Shockwave).

Sep 282004

[suffusion-widgets id='2']

A digital sound is actually quite big: Each second of a stereo CD contains 1,411,200 single informations (bits), or 176,400 Bytes, or 172.25 KBytes. On a computer this type of sound usually comes as a file with the extension “wav” on the PC and “aiff” on the Mac. Downloading a second of CD quality sound would last about 2 minutes on an average Internet connection with a 28 k modem. (A 14 k modem takes about twice as long…)

The same file type can also store sound information in lower quality. Three things can get worse: Stereo can become Mono (1 channel instead of 2), the “resolution” can be reduced from 16 bit to 8 bit or even 4 bit, and the “sample rate” can be reduced from 44.1 kHz to 22 kHz, 11 kHz or 5 kHz.

Any of these reductions are “divide by 2″ operations – and that’s what will happen to the file size! One second of sound (wav or aiff) in mono, 22 kHz, 8 bit is about 21.5 Kbytes. One second in mono, 5 kHz, 4 bit is about 2.7 Kbytes.

Doesn’t sound big? True – but doesn’t sound good either! And now consider this: 2.7 Kbytes is pretty much a dream performance of a 28 k modem connection to the Internet! It happens, but not very often. Realistically speaking, a “good” connection with a 28 k modem makes something between 1.5 and 2.3 Kbytes per second – not even enough for the bad sound at 5 kHz 4 bit.

While audio files can only become smaller by “compressing” them (trying to put more information in the same space) there is one sound format that’s naturally slim and trim: MIDI. The size of a MIDI file depends somewhat on how much action is in the music. Starting at about 100 Bytes per second, you will hardly find a MIDI file that’s more than 500 Bytes per second! Yep, that’s small.

So, why not stuff all the audio files into MIDI format and use this for the Internet? There’s a problem: MIDI can’t be recorded like audio, it must be “programmed”, and it’s limited to sounds that a “sound module” or “sound card” can generate. That means no human voices, no natural instruments – nothing that can only be recorded with a microphone or something like this.