Audio Files


 

How Computer Audio Works 

Most of the sounds you hear coming from a PC are digitized. That is, the waves that make up the sound have been converted into a stream of digital bits and bytes by feeding them through some kind of analog-to-digital converter.  This can be done with the software that came with the soundboard on any audio source, such as a microphone or cd player. Once digitized, the sound data is saved as a file on disk.

Digitized sound files vary in at least three important ways.  First is the sampling rate, or the number of times each second the audio wave form is sampled as it is converted to digital data.  PC sound file sampling rates generally range from 8,000 to 44,100 samples per second ( more smaples = higher quality sound).  Second is the way the data is organized in the file.  For example, a digitized sound file may or may not include header information, which describes the file, may interweave the data from multiple sound tracks (i.e. 2 tracks for stereo); or may be comprised of a library of different instrument sound samples followed by a "play list" for using them to play a song.  Finally, the data in a sound file may be compressed in some way to save disk space and transfer time.  For example, MPEG audio files are compressed at a 6:1 ratio.

There are a dozen or more relatively popular sound file types, each of which varies in the way it stores sound data. While most programs only play one or two kinds of sound files, most browsers can be configured to accomodate most needs.

Sound File Formats

  Type/Subtype           Extensions             Description

  audio/basic           .AU, .SND               ULAW Audio Data
  audio/x-aiff          .AIF, .AIFF, .AIFC      AIFF Audio
  audio/x-fssd          .SND, .FSSD             Mac, PC
  audio/x-iff           .IFF                    Amiga
  audio/x-midi          .MID, .MIDI, .RMI       MIDI music
  audio/x-mod           .MOD, .NST              Amiga, Atari ST
  audio/x-sf            .SF                     IRCAM
  audio/x-ul            .UL                     US telephony
  audio/x-voc           .VOC                    Sound Blaster
  audio/x-wav           .WAV                    Windows RIFF
  audio/x-pn-RealAudio  .RA, .RAM               Real Audio

The NAPlayer, included in most Netscape configurations only acknowledges the first two file types.  The remaining file types must be configured by using the applications set-up within Netscape (click: Options/General preferences/Helpers).  In addition to the sound formats already available within the Netscape set-up, it is recommended that your browser also be configured to play MIDI (.mid), WAVE (.wav), and RealAudio (.ra) files.  This will enable you to access the most popular files available on the web.


MIDI

MIDI stands for Musical Instrument Digital Interface and has been the rage among electronic musicians throughout its 13 year existence. It is a powerful tool for composers and teachers alike. It allows musicians to be more creative on stage and in the studio. It allows composers to write music that no human could ever perform. But it is NOT a tangible object, a thing to be had. MIDI is a communications protocol that allows electronic musical instruments to interact with each other.

Much in the same way that two computers communicate via modems, two synthesizers communicate via MIDI. The information exchanged between two MIDI devices is musical in nature. MIDI information tells a synthesizer, in its most basic mode, when to start and stop playing a specific note. Other information shared includes the volume and modulation of the note, if any. MIDI information can also be more hardware specific. It can tell a synthesizer to change sounds, master volume, modulation devices, and even how to receive information. In more advanced uses, MIDI information can to indicate the starting and stopping points of a song or the metric position within a song. More recent applications include using the interface between computers and synthesizers to edit and store sound information for the synthesizer on the computer.

The basis for MIDI communication is the byte. Through a combination of bytes a vast amount of information can be transferred. Each MIDI command has a specific byte sequence. The first byte is the status byte, which tells the MIDI device what function to perform. Encoded in the status byte is the MIDI channel. MIDI operates on 16 different channels, numbered 0 through 15. MIDI units will accept or ignore a status byte depending on what channel the machine is set to receive. Only the status byte has the MIDI channel number encoded. All other bytes are assumed to be on the channel indicated by the status byte until another status byte is received.

Some of these functions indicated in the status byte are Note On, Note Off, System Exclusive (SysEx), Patch Change, and so on. Depending on the status byte, a number of different byte patterns will follow. The Note On status byte tells the MIDI device to begin sounding a note. Two additional bytes are required, a pitch byte, which tells the MIDI device which note to play, and a velocity byte, which tells the device how loud to play the note. Even though not all MIDI devices recognize the velocity byte, it is still required to complete the Note On transmission.

The command to stop playing a note is not part of the Note On command; instead there is a separate Note Off command. This command also requires two additional bytes with the same functions as the Note On byte. Most people are confused at first by this approach to Note On and Note Off, but after further thought they realize the necessity of the structure.

Another important status byte is the Patch Change byte. This requires only one additional byte: the number corresponding to the program number on the synthesizer. The patch number information is different for each synthesizer, and the standards have been set by the International MIDI Association (IMA). Channel selection is extremely helpful when sending Patch Change commands to a synthesizer.

The SysEx status byte is the most powerful and least understood of all the status bytes because it can instigate a variety of functions. Briefly, the SysEx byte requires at least three additional bytes. The first is a manufacturer's ID number or timing byte, the second is a data format or function byte, and the third is generally an "end of transmission" (EOX) byte.

Computers and MIDI

Computer manufacturers soon realized that the computer would be a fantastic tool for MIDI, since MIDI devices and computers speak the same language. Since the MIDI data transmission rate (31.5 kBaud) is different from ANY computer data rate, manufacturers had to design a MIDI interface to allow the computer to talk at MIDI's speed. Apple Computers, with the Macintosh and Apple ][ series, and Commodore were the first companies to jump on the MIDI computer bandwagon [pun intended]. Roland designed an interface for the IBM series of compatible computers a few years later, and Atari designed a completely new computer, the ST series, with fully operable MIDI ports built in. Today, there are many different interfaces available for almost all types of computer system.

As great as the number of available interfaces may be, the availability of software packages is almost beyond belief. Virtually everything that can be done via MIDI has a software package to do it. First came the sequencers. Based on a hardware device that simply recorded and replayed MIDI data, the software sequencer allowed the computer to record, store, replay, and edit MIDI data into "songs." Though the first sequencers were somewhat primitive, the packages available today provide very thorough editing capabilities as well as intricate synchronization methods, such as MTC (MIDI Time Code) and SMPTE.

Various patch editors and librarians are also available for computers. These programs allow the user to edit sounds away from the synthesizer and often in a much friendlier environment than what the synthesizer interface offers. The more advanced librarians permit groups or banks of sounds to be edited, stored on disk, or moved back and forth from the synthesizer's memory. They also allow for rearranging sounds within banks or groups of banks for customized libraries. These programs are generally small and can be incorporated into some sequencing packages for ease of use. On the other hand, each synthesizer requires a different editor/librarian since internal data formats are unique for each. Some packages offer editor groups for a specific manufacturer's line as some of the internal data structure may be similar between the units. But, there is not yet a universal librarian that covers all makes and models of sound modules; it would just be too large.


Playing MIDI files in Netscape

Microsoft has supplied programs that play MIDI files.  Located in the the Windows directory in both Windows 3.1 and Windows 95, Media Player can be configured as a Netscape helper application for playing .mid files and .wav files (also Video for Windows-.avi- movies.

Helper Application Configuration 


Sample MIDI files

Chopin.mid (8 kb)
I Can See Clearly Now (42 K)
Gamelan (2 k)
Latin (15 k)
Lazybird (79 k)

Adding Background Music to your Homepage

Getting a Midi file to play in the background is simply a matter of putting ONE or TWO lines in your HTML code. With the release of Microsoft Explorer 3.0 and Netscape 3.0, both browsers FINALLY support the same command to get a Midi to play. If you want to set up your page so that people using either of those browsers can hear a Midi, you can use the following command ...

<center><embed src="name.mid" Autostart=TRUE Width=144 Height=56 Loop=5></center>

Breaking the above line down, this is what each command does ...

Src="name.mid" --- Defines the Midi file that you want to play. Width=144 Height=56 --- Defines the viewable size for the Midi Player. If you want to allow for the Crescendo Midi Player, then the sizes should be Width=200 Height=56. Autostart=TRUE --- This tells the Midi to automatically start playing once it is loaded. If this is not here (or is FALSE), then the listener has to click on the play button to hear the Midi. Loop=5 --- This causes the Midi file to replay (loop) 5 times if the listener stays on the page long enough to hear it that many times. This can be changed to whatever you want or completely removed so the Midi only plays one time and the listener must click the play button to hear it again. To have the Midi Loop FOREVER, enter Loop=true.

Just put the above line in your HTML code wherever you want the Midi Player to show up. IF YOU ARE USING ONE OF THE HTML EDITOR ASSISTANTS ... then leave off the <center> and </center> parts. ONLY enter the <embed src ...> portion. THEN go back and tell your program to CENTER the line if you wish!!

Change the name of the Midi file ("name.mid" in the above example) to the name of YOUR Midi File (MAKE SURE you leave the double quotes around the filename though!!!) Copy the Midi file to your Server (in the same directory as the HTML file), and VOILA!! It should work for you.  Wave files will work in the same way, just replace the filename with the appropriate .wav file. WARNING: Wave files are typically very large and will take a long time to download!!!


WAVE FILES

The wave format is Window's own standard file format. All windows warning beeps, whistles, and clangs live in your Windows directory as files with .WAV extensions.  Because it is such a standard fixture on windows computers, thousands upon thousands of wave files can be found on the World Wide Web.  You should be aware when downloading these files that they tend to be very large in comparison to other formats.  It is not uncommon to encounter .wav files that comprise several MILLION bytes. For this reason, several sound file converters are available to compress the large files into small, more easily accessible formats.

Helper Application Configuration 


Sample Wave files

Jeopardy (30k)
Open (81k)
Beatles1 (51k)
Lurch (69 k)


REAL AUDIO

(from RealAudio site)...............

What Is RealAudio?

RealAudio is a sound file format that allows streaming. This means that you can hear the file (music, spoken-word, whatever) without waiting a few minutes, an hour or a year for the whole thing to completely download. And it takes up much less space on your drive.

Sound quality?

That depends on the speed of your internet connection and your processor power. RealAudio sacrifices sound quality for immediacy. This is ok when you realize your music is suddenly available to complete strangers on demand 24 hours a day almost anywhere on the planet. RealAudio Player 3.0 was just released, and its a fantastic improvement - vastly improved sound reproduction, and stereo too. As of today, Nov 19 1996, the new player was available for Windows 95/NT and 3.1, and Macintosh PowerPC and 68040 computers. If you have a 28.8 internet connection, depending on the content of the audio file, it can sound pretty much like the radio. At 14.4, it sounds warped but recognizable - again depending on the content. Solo passages and monophonic instruments come across the best.

Using RealAudio for Music

We've decided to use editorial judgement when posting RealAudio files containing music content. We will post 14.4 files (files encoded so they can be played back over a 14.4 bps connection) only when the conditions are ideal for reasonable sounding playback. In all cases we will try to post 28.8 files. We RealAudio-encode after sampling at the highest quality our hard drives have room for - usually 44.1 kHz 16 bit stereo.

To download the RealAudio player now, click RealAudio Player . Requires a sound card for playback and at least a 14.4 connection. 28.8 recommended for music.


Helper Application Configuration 

LINKS

Ultimate MIDI Page-International MIDI Music
The Complete MIDI File Directory
The MIDI Farm
THE BEST OF REAL AUDIO!!!
Radio On the Internet
RealAudio: ABC News
Wave Files
Michael's Home Turf
Wav Central: The Wav Sounds Source
Sound Bites
Meerkat's Sound Bites
Complete Fresh Music RAFiles
SoundCenter Home Page
The Virtual Times: Audio Links
Audio Related Internet World Wide Web & FTP Sites
Windham Hill Music
Joe's Original Wave Files
Syntrillium:home (Cool Edit)
PC Sound
The WAV Place
Index of /personal/chrisbland/ (wav clips)
AUDIO PAGE (software)