logo

Click the logo to add
this site to your Favourites


Search:

This Site The Web


Quick Links

  


Subscribe to my Newsletter


Books presented in association with:

Chapters.ca


Your Free E-Mail
Account:


   


Send me mail!

Send Me Mail


 

 


Embedding Sounds

OE5


 

Introduction
Here's how to do it
    FrontPage Express
    FrontPage 98
    Important info for FrontPage users
    Notepad
    Arach
    On the Fly
A much requested feature


Compatibility:
  the information presented below applies only to Outlook Express 5.  If you have Outlook Express 4  or Outlook 98 please see the OE4 Sounds page for sound embedding information.

 

Introduction:

With the release of the Outlook Express 5, Microsoft has changed the way that embedded sounds are handled in stationery.  This is a good thing.

We no longer have to resort to the script that was used in OE4 - for that matter, we can't use those scripts anymore, but that's a different story.   Instead, the code for sound looks identical to the way it is done for a webpage:

<BGSOUND src="E:\Stationery\Music\some.mid" volume=0>

What this means is that finally, we can use our HTML editors to insert sound in stationery.  That's right - even FrontPage Express will embed sounds into stationery.  Heck, for that matter, you don't even need to use an editor, OE now has the ability to add sound "on the fly".

Here's how to do it:

In FPE go to Insert | Background Sound.   Click Browse in the dialog box. then simply find and select the sound file you desire.  Click Open and then Ok.  My lord - look at that:  FPE is actually useful for something....  The only place that FPE falls short with the new sound method is that it includes no way to set the "loop" - the number of times the sound is to play.

If you're using FrontPage 98, the method is very similar to that of FPE.  Go to Format | Background.  Then on the General tab you can browse for your file.  You'll notice that FP98 does include an option to set the loop value for the sound. 

Important info:   However, when using either FP program, there is one more thing you must know.  For OE5 to embed the sound the code must contain the full pathname to the file - for example, if my stationery html file is in e:\stationery, and the sound is in the music subfolder, referencing the sound as e:\stationery\music\some.mid will work - music/some.mid will not.  Thus, an absolute path is required for the sound to actually embed.

Unfortunately, neither FrontPage program automatically encodes the full path name to the files referenced.  Although when you first insert the sound, if you look at the code, it appears to have a full path, both FP programs "trim" this down to a relative path when you save.  Thus to use either FP98 or FPE to embed sound in stationery with OE5, you must first save your work with the sound file inserted and then switch to the HTML view and manually restore the full path specification and resave.

As with most areas, FPE makes things a little more difficult because when you save a file in FPE that includes a music reference, you are presented with the option to save that file to the local disk.  This will copy the music file to the directory where you save the stationery file itself.  If you choose to do this make sure you pay attention to where it is being saved so you can restore the proper full path specification.

Now, if you're using Notepad or another text editor to do this, you have it considerably easier - just type the following:

<bgsound src="e:\stationery\music\some.mid">

into your code.  Of course, change the code shown to reflect the actual position of the sound file on your system.  Since you're typing it yourself, you don't have to worry about the reference limitation just discussed for FrontPage users.  If you want your sound to play multiple times, all you have to do is add a loop.  Just add loop="x" just before the final > in the <bgsound> tag.  In the loop="x" statement, x represents the number of times the sound will play:  1 = once, 2 = twice, etc.   To loop infinitely, simply replace x with -1:

<bgsound src="e:\stationery\music\some.mid" loop="1">

Users of my Arach toolbars can also embed sound into OE5 messages. Assuming you've downloaded  version 3 or greater of my toolbars, you'll see the new Sound5 button.  This will insert sound in the correct format for OE5.  As far as the path limitation just discussed goes, you are still affected by it, but not as badly as the FP or FPE users - please see my Arach instructions for details on how to properly configure the Sound5 button for your system to eliminate this problem.

Yes, you read correctly before, you can now add sound to OE5 on the fly.  What this means is that OE5 includes an option for embedding sound right in it's compose window.  Simply go to Format | Background | Sound.  Since this is right in OE itself, you don't have to give a thought to the file reference limitation, and setting the loop is a real "no brainer" as the loop option is well marked in the dialog box.

 

A much requested feature:

One of the suggestions for the sound script that I receive the most is for a way to easily stop the music from playing in a received email.   Although it's nice to be able to add sound to a message you can't always predict whether your recipient will appreciate that sound - maybe someone is trying to sleep in the same room as their computer or perhaps they're trying to converse with someone.   In these situations having a midi come blaring out of their speakers would not be welcome.  Therefore it would be considerate of you to include a way for them to easily stop the sound from playing.

To that end I have come up with a script that adds a mute button to the basic sound script detailed above.  This button takes up no room in the finished stationery and does not interfere with the operation of the sound script.   To use it, the recipient of such a message needs to move the mouse over the top-right corner of the stationery and the button will appear.  Clicking on the button will mute the music.  Another click will restore the sound.

I won't bother going through the whole script here as it isn't much different from the basic sound script.  You can download a template of this script by clicking here.

The zip file you just downloaded contains a single file - stopsoundoe5.txt.  Unzip this file somewhere and open it with Notepad or your favourite text editor.  Select the entire script and paste it into the HTML document that you wish to embed sound into.

If you use a graphical HTML editor  - to use that script and have it work, it must be pasted into the HTML view of your editor.  If you paste it into the regular view of such a program it will not work. 

In order to use it, you must specify which sound you wish to use, so find the line with the <bgsound> tag and replace the "Your Midi Here" in the src attribute with the path and filename of a music file actually on your system.  So if the file example.mid is in your c:\sounds folder, the tag would look like this:

<bgsound src="e:\sounds\example.mid" loop="1">

 

Home | FAQ | Download | TroubleShooter | Discussion | PSP | MIC | WET Retrospect | Feedback

 

© 1998, 1999 sven All content designed and written by sven, except where noted.

Disclaimer:  I am not affiliated in any way, shape or form with Microsoft Corporation.  All opinions expressed on this web site are mine alone and may not represent those of the majority of Outlook Express users.  All brand and product names are trademarks or registered trademarks of their respective owners.  No animals were harmed in the creation of this website.  All characters and situations portrayed on this website are completely fictional.  Any resemblance to actual persons or events is purely coincidental.  Your mileage may vary.  Past performance is not a reliable indicator of future gain. No purchase necessary.