Palace allows for several types of sound files to be played within Palace itself. You can script for both wav files and midi files and each type has its own command.

A "wav" (pronounced "wave") is a sound file in a .wav format, which Palace plays very easily. In fact, every server comes with some standard wav files which include the kiss, the applause, the teehee, etc. You can play these wav files by typing )kiss, )applause, etc. into your text field and hitting return.

Beyond the standard wavs, though, you can also put your own wavs on your server and make them play. Once on your server, they will download (d/l) to the user automatically, just like the background GIF files do, so the user doesn't have to access the web or download from any other source.

One bad thing about wav files is that they are long--even a short wav file takes a lot of memory, so a long wav file can take many minutes to d/l.

You can d/l wav files from the Web on many different sites, or make your own. Let's talk about each way in turn.

To make your own wavs, you'll need software to record stuff onto disk.

For Mac users, I recommend a combination of SoundEffects and SoundApp. Both are shareware, available on the Internet. SoundEffects will record snippets of songs from CD's etc, or will record your voice if you have a microphone connected to your puter. It saves the sound in AIFF or System 7 format (neither of which you can use for Palace purposes). You can then use SoundApp to turn your newly-created sound into a wav file.

Windows users can record wavs with Sound Recorder, which is part of the Windows package itself (thanks to thugly, for this bit of info). To use Sound Recorder, you must have a sound card and speakers installed on your computer. If you want to record live sound, you also need a microphone.

To find wavs on the web, go to a search engine like Yahoo and type "wav" into the search and you'll be on your way. Also, a lot of cool wav sites have links to each other, so if you get to one, you'll be able to link almost indefinitely. To get you started, you might try Sound America or Kaitlyns Palace Additions which has lots of wavs and links to other sites as well.

Remember that you must d/l your wav from the web and save it as "source," not as a text file.
 
 

Once you have d/l'ed the wav file you want, put it in the "Pictures" folder of your Palace folder. I know that doesn't make sense, since this is a sound, not a picture. Nevertheless, that's where it goes and from there anyone connecting to your palace will be able to d/l that sound automatically. You will want to delete the .wav appendix so that "bird1.wav" will appear in your Palace:Pictures folder just as "bird1" without the quotation marks. To hear one use of such a wav file, go the CyberQuest Palace and then to the Beach in the Quest for Romance section. You'll automatically d/l an ocean sound, which gets played whenever your re-enter the room. That ocean wav, by the way, is one of the most popular wavs on Palace--and it's really great!

Once the wav file is in the proper folder, you can use the following simple script:

ON SELECT { "kiss" SOUND }

So, go to Wizard mode, then go under the Wizard Menu to authoring and click that. Then under the Wizard menu, find New Door to create a door (I use the words "door" and spot interchangeably, though technically as door is a passage to another room while a spot is used to house a script). Size your new door and move it humbly out of the way. You can do that by clicking once in the middle of it to highlight the tabs, then by dragging the tabs into the position you want. You can open the door dialogue box by highlighting the door, going under Wizard Menu to Door Info . . .

Open the Script dialogue box, and paste the above script in. Also, under Options check Don't Move Here. Go out of authoring mode and click your newly-created spot. If you look in your log you should see that you are d/l ing the sound to yourself and then the log should say that you have received the file. Once the sound file is received, click the spot again and presto! you should hear it. With the "kiss" sound above, you already have it as a default sound, so it doesn't have to d/l to you.

You can vary the script to have the script activate on different occasions. The above script activates and plays the sound when the spot is touched. But you could change it to play the sound when a user enters the room by replacing ON SELECT with ON ENTER. For an example of how that works, enter Heaven's Gate at Main or Members Palace and you'll hear the "fazein" sound. You'll also end up wearing a halo, but that's another story.

Remember that if your users d/l a new sound, one that's not a part of the default package of sounds that comes standard with the client, they will not be able to hear a wav the first time with the script set to ON ENTER. When they enter the room, they will d/l the sound, but it will not play until they exit that room and re-enter it.

Looping the Wav: Sometimes you might want to make a wav play in a loop, repeating again and again at a set interval. For example, if your room is an outdoor scene, and you want to have a bird call sound, you could loop it so that it would play at intervals continuously after the user activates the script. Or, you might want to make the wonderful ocean waves sound play in a loop, so the user gets a more realistic feeling of being at the beach. Here's that script:

ON SELECT

{

180 ME SETALARM

}

ON ALARM

{ "bird" SOUND

500 ME SETALARM

}

Let's analyze that script just a bit to see how it's working. First, the script is set to activate ON SELECT, or when the user touches a spot. You could easily change that to ON ENTER. The 3rd line down "180 ME SETALARM tells the server to activate the alarm after 180 ticks, or about 1.5 seconds. The "alarm" by the way is just a timing device--think of it as an alarm clock. So, the alarm goes off after 180 ticks and then the "bird" sound plays. The next part of the script, the 500 ME SETALARM just tells the server to reset the alarm after 500 ticks, or about 5 seconds. And so on, with a repeating function built right in. If you want a longer interval between the wav, increase the number before ME SETALARM. Try 1000, or 2500. Just fiddle with the timing until you like the interval you have set. Of course, the same is true for the initial part of the script--the 180 ME SETALARM. Descrease or increase that number to achieve just the effect you want.

Putting in a wav script, then, is just that easy. It's one of the most simple Palace scripts. With the Web at your fingertips and thousands of wav files to choose from, you should have lots of fun installing sounds into your palace.

You might be asking, "What if I want to play a sound that's not in the wav format?" Well, tough. Palace doesn't play other sound formats like .au. But, you should be able to take a sound in another format and convert it to a wav file. On my Mac I use SoundApp for that purpose, a lovely shareware program that makes it a snap to convert sounds to wavs. If you can convert other formats to wav, you can put that converted sound in Palace. (Note: Some freaky limitations exist. Really long wavs won't play, for example, at least on my Mac).

Midis are song files that are specially formatted to play with a midi player. They have the advantage of taking up very little memory. Even a 4 or 5 minute song can d/l in just seconds. So, for music, midis make more sense right now than wavs files do, which are much larger files. Further, you can access thousands of midi files on the web, and like wav sites, midi sites tend to have links to other midi sites. To start with, you might check out MaryEllen's midi collection by clicking here.

The downside is that the quality of midis varies widely. Some midis sound quite good; other simply stink. Further, since midis are played through different sound cards (on a PC) or through different applications (on Macs), they won't sound the same to most users. A midi that sounds good to me may sound bad to a person with a PC sound card. So, use midis with caution and try them out on your friends to see which ones actually sound good to most people.

For a user to hear the midi, they must d/l that sound from a web page and place the d/l'ed midi in the Sounds folder of their Palace's Media Folder. (In other words, to hear a midi at CyberQuest Palace, the downloaded midi must be placed in the Palace:Media:CyberQuest:Sounds folder). Alternatively, you can place the midis in the Palace:Midis folder or the Palace:Sounds folder.

Sadly, Mac computers do not play midi files directly through Palace. The next version of the Mac Palace client should rectify this problem, but right now Mac users can't play midis directly through the Palace client. This means that midi files require separate scripts for Mac users and PC users. Several clever and industrious people have worked to solve this problem, the most notable being ken marks, who has written an Apple Script plugin for Macs called the mmmmm.(No Longer Required with Mac Client 3.0). It works well, though it is somewhat difficult to configure (not ken's fault, but the nature of the wee beastie). You can, with the mmmmm, use a single script in your palace to play midis for both Macs and PC's, but your Mac users will have to d/l and configure the mmmmm, which they may find a bit daunting. For more information on Midi files, access Sparkle's excellent webpage at http://www.west.net/~starfire/palmidi.htm

For PC users (or if you have directed your Mac users to the mmmmm), you can put the following script into your Palace:

ON SELECT { "midiname" MIDIPLAY }

As long as the midi is in the proper folder on the user's computer, that script will make the midi play. Remember to include the .mid to the name. So a midi file name would look something like "river.mid" without the quotes.

Some variations for this exist. To stop the current midi from continuing to play, you can use MIDISTOP.

And to make a midi play repeatedly in a loop (why would anyone want to do this?) you can use the following script:

ON SELECT { "midiname" <#> MIDILOOP }

Of course in that script you put in an actual numeral like 3 without the brackets to make the midi play three consecutive times. Your users might want to bop you on the head if you actually use that script, however.

Until Palace gets a good plugin for Macs, probably the best way to have Macs play the midis is with the following script:

ON SELECT { "URL" NETGOTO }

The above script will launch the Mac user's Web Browser and take them to the given URL. If you have a web page, you can create separate links for each midi you want Mac users to be able to play. When the script is activated, the browser goes to that site, d/l's the midi, and plays it through the appropriate browser plugin. For Macs, I recommend the Beatnik or Crescendo plugin for Netscape.

Currently Palace provides no client for Macs that will play midis. This means you'll have to make a decision as to how you want your Mac users to access midi files in your palace. You can 1) have them d/l ken marks' mmmmm Apple Script plugin, which means you can use a single script in your Palace to make the midis play for all users; or 2) you can have two separate scripts in each room you use midis, one script for PC users, and another script for Mac users. Aieieieieieiei! What a pain. But let's hope this situation will be just an unpleasant memory soon when Palace releases the new Mac client with midi capability.

No, I'm not Nostrodamas, but I'll play prophet for a paragraph. Wavs have great clarity and dynamics, but are such memory hogs that they are probably only useful for very short files, like sound effects or the occasional smooch. Midis, no matter how good, lack the depth of sound that even a cheesy am radio provides, and of course they lack vocals entirely. The next phase of sound development on Palace will probably incorporate Real Audio's Real Player or some other similar technology. In fact, Real Player links are already showing up in Palaces, including CyberQuest. But the Real Player is not a part of the Palace client and therefore cannot be scripted to play directly--the user has to d/l the Real Player link, then drop it into the Player outside of the Palace client. And of course, Real Player requires a fast modem and even then can suffer from dropouts. But with Real Player, we're getting closer to full multimedia experience on Palace.

Back to Home Page On to How to Make Lockable Rooms