Adding sound files, background music, speeches, or just plain-old-fashioned ramblings to your Web site is a relatively painless task when using the right software. This chapter will familiarize you with a variety of ActiveX controls and plug-ins available for the delivery of audio on the Internet.
The Crescendo ActiveX control is ideal for playing MIDI music online. It has a CD-like control panel and a digital counter. This plug-in requires no special server. The HTML document will have <EMBED> tag pointing to the audio file which will be loaded and the HTML file using the HTTP server. The Crescendo Plug-in is available for free download over the Internet.
Vendor Information:
LiveUpDate
http://www.liveupdate.com
Figure 19.1 : Crescendo ActiveX control
Property | Description |
AutoStart | Determines if the audio file starts playing automatically |
bgcolor | Sets the background color for the control using RGB values |
ClassID | Sets the class ID for the <OBJECT> |
CodeBase | Describes the Version of the ActiveX control to be used and activates the auto install of upgrades. The current CODEBASE="ftp://ftp1.liveupdate.com/labtech/beta /cplus/cres.cab#Version=2,2,0,6" specifies the version number to use. If you have an older one, the auto installer will install the more recent one on your computer |
Height | Height of the control |
ID | Refers to the current <OBJECT> name |
Loop | Describes the loop behavior |
Param Name | Determines the relative attribute "Song" and location of file VALUE= "filename.mid" |
txtcolor | Sets the RGB color values for the song counter |
Width | Width of the control |
Method | Description |
AboutBox | Displays a dialog box that describes the Crescendo ActiveX control |
Fast Forward | Advances the play position of the file |
Pause | Pauses the Audio file playback at the current position |
Play | Starts the audio playback |
Rewind | Rewinds the audio playback |
Rewind to Start | Causes the Crescendo control to restart the audio playback from the beginning of the file |
Method | Description |
Automatic Update | Activates when the user opens a page using the Crescendo control |
Add the following code to your HTML files, replacing VALUE="yourmidfile.mid" with the filename of your Crescendo audio file.
Listing 19.1 Object-In The Crescendo control
<HTML> <BODY> <H1>Crescendo Control</H1> <P>The contents of the page.</P> <OBJECT ID=Crescendo CLASSID="clsid:0FC6Bf2B-E16A-AB23-0080AD08A326" HEIGHT=55 WIDTH=200 CODEBASE=ftp://ftp1.liveupdate.com/labtech/beta/cplus/cres.cab#Version2,2,0,6"> <PARAM NAME="Song" VALUE="yourmidfile.mid"> </OBJECT> </BODY> </HTML>
NOTE |
The code in Listing 19.1 comes from the Crescendo ActiveX Authoring page accessible from the Crescendo's home page at http://www.liveupdate.com/. Be sure to check this page for more on ActiveX authoring for Crescendo. |
Echo Speech Corporation offers two distinct Internet audio products:
EchoSpeech and EchoSpeech Broadcast. The EchoSpeech Plug-in allows
continuous streaming at connections as low as 14.4Kbps. This is
one of the most accessible audio plug-ins available on the Net,
featuring low speed connection and processor requirements.
TIP |
EchoSpeech will work on a 486SX-33 using a 14.4Kbps modem. Compression ratio is 18.5:1. |
EchoSpeech users can download a compressed EchoSpeech File and listen to the site in just a few seconds. The EchoSpeech Plug-in, Encoder, and Server are available for free download over the Internet.
Vendor Information:
Echo Speech Corporation
http://www.EchoSpeech.com/
6460 Via Real
Carpinteria, CA 93013
(805) 684-4593
Figure 19.2 : The EchoSpeech icon appears when a file can be heard by clicking the icon
There are no properties available for EchoSpeech since there is no user interface. The plug-in runs unseen in the background.
There are no methods available for EchoSpeech since there is no user interface. The plug-in runs unseen in the background.
There are no events available for EchoSpeech since there is no user interface. The plug-in runs unseen in the background.
NOTE |
The EchoSpeech plug-in will decode files that were created and compressed using the EchoSpeech coder. This plug-in uses HTTP servers. |
Listing 19.2 Embed Code for EchoSpeech
<HTML> <BODY> <EMBED SRC="yourfile.es" img src="echo.gif"> <P>Click the echoSpeech Icon to play an EchoSpeech audio file</P> </BODY> </HTML>
Remember when you were a kid and you wanted to run your own radio station? Well maybe not, but with the EchoSpeech Real Time Broadcast plug-in, you can listen to the attempts of those who did. As with EchoSpeech, the Real Time Broadcast version can deliver a smooth multimedia-quality audio presentation over a 14.4 modem.
The EchoSpeech Real Time Broadcast will deliver quality sounds over the Internet in full duplex if you are using a 28.8-or-faster modem. You can have a telephone-like conversation with someone else on the Internet/intranet. The EchoSpeech Broadcast plug-in is available for free download over the Internet.
Vendor Information:
Echo Speech Corporation
http://www.EchoSpeech.com/
6460 Via Real
Carpinteria, CA 90313
(805) 684-4593
There are no properties available for EchoSpeech Broadcast since there is no user interface. The plug-in runs unseen in the background.
There are no methods available for EchoSpeech Broadcast since there is no user interface. The plug-in runs unseen in the background.
There are no events available for EchoSpeech Broadcast since there is no user interface. The plug-in runs unseen in the background.
NOTE |
The EchoSpeech Real Time Broadcast plug-in will only decode files that were created and compressed using the EchoSpeech coder and served through the EchoSpeech Real Time Server. |
Listing 19.3 Embed Code for EchoSpeech
<HTML> <BODY> <EMBED SRC="yourfile.es" > <P>Click the echoSpeech Icon to play an EchoSpeech audio file</P> </BODY> </HTML>
Koan, similar to Crescendo and EchoSpeech, uses lower compression rates and requires no special server. Koan will load the audio file and play it without any prompting from you. A rather special feature of Koan is that it can use sound fonts for the audio files. The Koan ActiveX control is available for free download over the Internet.
Vendor Information:
Sseyo, Inc.
http://www.sseyo.com/
Pyramid House
(011)44 1344 712017
(011)44 1344 712005 fax
Figure 19.3 : Koan ActiveX control
Property | Description |
autostart | Determines if the audio file starts automatically when the page is loaded |
embed | Tells the browser to load the item included (audio file) using the properties that are included in the embed tag |
Height | Sets the height |
Width | Sets the width |
This control has no methods.
This control has no events.
Listing 19.4 Embed Koan Audio files-Instant playback
<EMBED SRC="yourmidfile.skp" height=32 width=32 autostart=true>
Listing 19.5 Koan ActiveX-Script Required
<HTML> <HEAD> <SCRIPT Language="VBScript"> Sub MyOnLoad parent.sitemus1.KoanAX.KoanFile = "http://www.sseyo.com/images/gmjun3t2.skp" end sub Sub MyOnUnload parent.sitemus1.KoanAX.KoanStop() end sub Sub OnBtnStart parent.sitemus1.KoanAX.KoanPlay() End Sub Sub OnBtnStop parent.sitemus1.KoanAX.KoanStop() End Sub </SCRIPT> <SCRIPT for="BtnStart" event="onClick" language="VBScript"> rem Handle the click event ! OnBtnStart() </SCRIPT> <SCRIPT for="BtnStop" event="onClick" language="VBScript"> rem Handle the click event ! OnBtnStop() </SCRIPT> </HEAD> <OBJECT TYPE="application/x-oleobject" CLASSID="clsid:984926A3-2D0D-11D0-Bf10-444553540000" height=32 width=32 ID=KoanAX> </OBJECT> </BODY></HTML>
Listing 19.6 Embed MIDI files-Instant playback
<HTML> <HEAD><TITLE>MIDI EXAMPLE<TITLE></HEAD> <BODY> <EMBED SRC="yourmidfile.mid" height=32 width=32 autostart=true> <P>A MIDI file will automatically be loaded, and begin playing, when you load this document.</P> </BODY> </HTML>
MidPlug, by Yamaha, has a built-in Soft Synthesizer with many GM-compatible voices, reverb, and drum kits. The high quality compact MIDI audio files are set up for maximum efficiency and speed on the Web. Although no extra equipment is required to use this plug-in, the option is available for adding an XG sound module or a daughtercard. The MidPlug plug-in is available for free download over the Internet.
Vendor Information:
Yamaha
http://www.yamaha.co.jp/english/xg/html/
Property | Description |
autostart | Determines if the audio file is played when the page is loaded |
height | Sets the height of the control |
panel | determines the color scheme to use for the Control Panel |
repeat | Sets the repeat value |
text | provides alternative text in the display section of the control panel |
width | Sets the width of the control |
Method | Description |
Aboutbox | Displays a dialog box that contains information about MidPlug |
display | Displays the name of the current selection |
information | Goes to the MidPlug home page |
initialize | Automatically initializes the tone generator |
MIDIMapper | Opens the MIDI mapper |
pause | Pauses the playback at the current position |
play | Begins playback |
synthesizerSetup | Opens the SGMP Driver control panel |
stop | Stops playback of audio file |
tempoDown | Decreases the tempo level |
tempoReset | Resets the tempo level |
tempoUp | Increases the tempo level |
volumeDown | Decreases the volume level |
volumeUp | Increases the volume level |
SGMPDriver | Displays all MIDI drivers available |
This control has no events.
Listing 19.7 Embed-In The MidPlug Control
<HTML> <HEAD><TITLE>MIDI EXAMPLE<TITLE></HEAD> <BODY> <EMBED SRC="yourfile.mid" <!- location of MIDPLUG file -> HEIGHT=40 WIDTH=150 PANEL=0 <!-- 0/light 1/dark --> AUTOSTART=true <!-- true/start false/wait for user action.--> REPEAT=true <!-- true/loop false/no-loop --> TEXT=your message!> <!-- text replaces midi file name --> <P>A MIDIPLUG file will automatically be loaded, and begin playing, when you load this document.</P> </BODY> </HTML>
RapidTransit uses a proprietary technology called Adaptive Wavelets Transform (AWT) to achieve Hi-Fi music/CD-quality sound at very high compression rates. The RapidTransit Player decompresses the files and passes the decompressed audio file to your operating systems audio feature-Media Player in Windows 95- to play. The RapidTransit Plug-in is available for free download over the Internet.
Vendor Information
FastMan, Inc.
http://www.monsterbit.com/rapidtransit/
1613 Capitol of Texas Hwy. S.
Austin, TX 78748
(512) 328-9088
There are no properties available for RapidTransit since there is no user interface. This plug-in is a download-and-play type.
There are no methods available for RapidTransit since there is no user interface. This plug-in is a download-and-play type.
There are no events available for RapidTransit since there is no user interface. This plug-in is a download-and-play type.
Listing 19.8 Embed Code for RapidTransit
<EMBED SRC="yourfile.1cc" >
RealAudio Player 3.0 is ideal for the 28.8 modem or faster-ISDN and LAN-connections. You can expect to receive near-stereo sound at 28.8 and near-CD quality using the faster connections. The RealAudio .ra .ram files can be served through the RealAudio Server, which makes the audio a streaming Audio file downloaded in packets as they are required. RealAudio files can also be delivered through the HTTP server.
Older versions of RealAudio work fine with a 14.4 modem connection.
The RealAudio Player 2.0 information site is accessible from
www.realaudio.com; go there to find out more about version
2.
NOTE |
RealAudio with HTTP If the RealAudio server is not being used, you will have to do a few things so you can listen to the audio file. Once the RealAudio file downloads to your hard drive: |
Vendor Information:
Progressive Networks
http://www.realaudio.com
There are no properties available for RealAudio.
Method | Description |
elapsedTime | Displays the elapsed time for the current selection |
forward | Fast forwards the audio file |
play/pause | Starts or pauses playback |
positionSlider | Jumps to any position in the audio file |
rewind | Rewinds the clip |
statusBar | Displays the current status of the audio file |
stereoIndicator | Determines if the file being played is mono or stereo |
stop | Stops the playback |
volumeControl | Controls the volume level |
There are no events available for RealAudio.
Using .ram META files with the RealAudio Server
First, create your META file which has a .ram extension. In the META file, you place the URL for the RealAudio .ra file
pnm://www.yourhost.com/yourfile.ra
Now put a hyperlink in your HTML file that will call up the .ram file when the user clicks it.
<A HREF="yourfile.ram" > <IMG SRC="/pics/ralogo.gif" align=left></a>
Using the RealAudio logo makes it easier for the user to identify and activate the audio file.
Using .ram META files Without the RealAudio Server
You must use the RealAudio Server. You can work around not having the server by linking to someone else's .ram file and server.
<A HREF="http://www.realaudio.com/hello1.ram" > <IMG SRC="/pics/ralogo.gif" align=left></a>
Shockwave is a commercial development program. The player plug-in is available for free download from the Macromedia Web site for anyone wishing to take advantage of sites using Shockwave technology. Before downloading, consider connecting at a minimum of 28.8. Using Shockwave with a slower connection is known to cause systems to crash.
Vendor Information:
Macromedia, Incorporated
http://www.macromedia.com
600 Townsend St.
San Francisco, CA 94103
(415) 252-2000
(415) 626-0554 fax
Macromedia Europe (UK & Benelux)
Pyramid House
East Hampstead Road
Bracknell
Berkshire
RG12 1NS England, UK
44 1 344 458 600
44 1 344 458 666 fax
Figure 19.6 : Shockwave Audio player
Property | Description |
swPreLoadTime | To permit a portion of the song to be preloaded, you must specify the exact amount of playing time in seconds. This has nothing to do with the wait time for the download, but an "amount" of the SWA file to preload. The default preload time is three seconds. |
SwText | Specifies what text to include in the text area of the Shockwave Audio Player. The default is "Audio Streaming Over the Internet." |
sw1 | Debugger, the default is off. It is recommended by Macromedia that you leave the debugger on its default setting. |
sw2 | Options are 1 & 0. Option 1 tells Shockwave to begin playing the audio file automatically. Use option 0 if you want the playback to begin only after the user has pressed play. |
sw3 | (0/1) When the user clicks the Shockwave logo of the player, option 0 causes the audio to play or stop, and option 1 (the default setting) causes the audio to play or pause. |
sw4 | (0/1) Only necessary if you wish to have an infinite loop. Option 0 (the default setting) causes the file to play once and quit at the end of the single loop, and option 1 causes the file to loop. |
Shockwave Audio has no methods.
Shockwave Audio has no events.
Listing 19.9 Shockwave Audio Player
<HTML> <HEAD> <TITLE>the SWA Player</TITLE> </HEAD> <BODY BGCOLOR="#666666"> <!----Shockwave Audio Player HTML----> <center> <embed width=416 height=32 SRC="http://audio.server.com/player.dcr" sw1=off swURL="http://audio.server.com/classic.swa" swTEXT="Audio Streaming Over the Internet" swPreLoadTime=3 sw2=0 sw3=1 sw4=0> <!----sw1= debugger, sw2= Autoplay, sw3= LogoMode, sw4=Autoloop----> </center> </BODY> </HTML>
NOTE |
You can find out more information about using the Shockwave Audio Player from the Macromedia Developers site: http://www.macromedia.com/support/technotes/shockwave/developer/ |
Talker is an Apple plug-in designed to allow users the opportunity to "have their say" on the Net. It is a very simple text-to-voice application. To use it, simply create a text file containing your message, save it with a .talk extension, and, using the HTML <EMBED> tag, point to the location of the .talk file. The Talker plug-in is available for free download over the Internet.
Vendor Information:
MVP Solutions
http://www.mvpsolutions.com/
Figure 19.7 : The Talker icon tells users there is a talker file available
There are no properties available for Talker since there is no user interface. The plug-in runs unseen in the background.
There are no methods available for Talker since there is no user interface. The plug-in runs unseen in the background.
There are no events available for Talker since there is no user interface. The plug-in runs unseen in the background.
Listing 19.10 Embed-Talker
<HTML> <HEAD><TITLE>MIDI EXAMPLE<TITLE></HEAD> <BODY> <EMBED SRC="yourfile1.talk" HEIGHT=40 WIDTH=150> </BODY> </HTML>
As a powerful little program with a compression ratio of up to 53:1, this plug-in offers one of the fastest real-time download streaming rates. It works on your existing HTTP server, so you don't need to worry about downloading and installing a special server. The ToolVox plug-in is available for free download over the Internet.
Vendor Information:
VoxWare
http://www.voxware.com/
305 College Road East
Princeton, NJ 08540
(609) 514-4100 / (888)TOOLVOX
(609) 514-4101 fax
Property | Description |
height | Sets the height of the control |
width | Sets the width |
Method | Description |
pause/play | Starts or pauses playback |
position | Moves to another spot forward or back in the clip |
rewind | Rewinds the audio file |
speed | Changes the speed of the audio file |
This plug-in has no events.
The TrueSpeech plug-in is automatically loaded when you install the TrueSpeech Player. The TrueSpeech plug-in is available for free download over the Internet.
Vendor Information:
DSP Group, Inc.
http://www.dspg.com/
3120 Scott Blvd.
Santa Clara, CA 95054-3317
(408) 986-4300
(408) 986-4323 fax
This plug-in has no properties.
Method | Description |
forward | Fast forwards the audio file |
play/pause | Starts or pauses playback |
rewind | Rewinds the clip |
stop | Stops the playback |
This plug-in has no events.
<HTML> <HEAD><TITLE>MIDI EXAMPLE<TITLE></HEAD> <BODY> <a href="sounds/welcome.tsp"><img src=" images/TS.gif "></a> </BODY> </HTML>
WebTracks uses a proprietary music compression format. It will begin playing Web pages immediately when you reach a Web site that has WebTracks files included. In addition to the WebTracks files, it will also play MIDI files. The WebTracks plug-in is available for free download over the Internet.
Vendor Information:
WildCat Canyon Software
http://www.wildcat.com/
This plug-in has no properties.
This plug-in has no methods.
This plug-in has no events.