The Palace is multimedia. That's why it's so great and kicks butt over other chat networks like IRC or AOL's chat rooms. And one of the most fun parts of Palace is its ability to play midis. We've had a lot of fun at CyberQuest with our Friday night dances, accompanied to the wonderful midi tunes DJ'ed by our very own KyderDog Dan and the always kind Kaitlyn Miranda. In certain palaces, like Dreamland, a midi plays when you enter a room, and that song becomes associated with the room, to lovely effect.

If you've gone to many palaces I'm sure you've come across several that have a special jukebox room, where you can play midis and dance or just listen. CyberQuest has such a room called the Cafe, and the directions below will include how to make a juke that works the way CyberQuest's juke works. I'm calling that the Single Script/mmmmm juke.

However, you might wish to have a juke that operates on a different principle than the one at CyberQuest. I recommend you take a look at Dreamland's juke which works on a touch basis and also The Finch Nest juke, which operates on verbal commands. While I won't specifically discuss those jukes, I will give you several alternative scripts (which I'm calling the Dual Platform Scripts) so that you can create your own juke.

The Palace allows PC users to play midis directly without any other application running. Not true for the Mac side, however. Palace is planning to have midi capability in the next Palace client for Macs, but until that arrives, Palace builders face a real problem. In order for both Mac and PC users to hear the same midi, you'll have to make some choices in scripting, and some compromises as well. So, none of these juke possibilities is very elegant, but they will work.

First, let's note that once a PC user has a midi installed in the Palace:Midis folder, that midi can be activated by the user typing the following command in the text field, and hitting return: )spooks.mid. If you've been on Palace any length of time, you have probably seen people activating midis in that way. Everyone in the room, who has that particular midi installed in their Palace:Midis folder, will hear that same midi--everyone, that is, except Mac users. So, the most simple way to script a juke takes advantage of this spoken command. It looks like this:

ON SELECT { ")spooks.mid" SAY }

We use this particular script in the Cafe at CyberQuest. We use it in conjunction with a message script and a verbal script, and you'll read below how those are done. Now, let's analyze that script. First, we find the words ON SELECT, which means the script will activate when the user touches a spot. The next part of the script has the open bracket { followed by the ")spooks.mid". You can vary that to reflect the name of the midi you want the script to activate. Remember to include the .mid extension to the filename and have everything within the quotation marks. Finally, the command portion of the script, SAY, makes the user speak the phrase that is in quotation marks. And, of course, the script ends with the closed bracket }. When clicked, then, the script doesn't technically cause a midi to play. Rather, it causes the user to speak a phrase that causes the midi to play. Whoa, that's so technically tricky it sounds like the Clinton confession speech!

So, you might be asking, "Why not just use the MIDIPLAY command?" Very good question. You could use that MIDIPLAY command and your PC users would be able to hear the midi just fine. But Mac users would not be able to hear it. The SAY command allows Macs use another plugin to hear the exact same midi PC users hear. Which leads me to a discussion of the mmmmm.

It's a real pain to have the dual platform midi problem and for a long time on Palace, Mac users simply could not have midis activated from inside the Palace client. They could play midis, yes, but had to go outside the Palace program, open a midi player from the Finder, open the midi, and finally press play. By the time they did all that (and I should know, having done it many times) PC users had heard about half the song already, and the Mac users had missed much of the conversation. Mac users felt pretty darn left out.

Several very clever people have worked to fill the gap left by Palace programmers. One such person is ken marks, who created the mmmmm, a plugin for the Mac which uses AppleScript to create small applications which start up SoundApp (a midi player for Macs) and play the appropriate midis based on commands typed in the Palace text field--just like PC users. If all your Mac users get ken marks' plugin, and can get it working correctly, you can use the single script above to deliver your midis both to PC and Mac users. You will need to alert your Mac users that they must download and install the mmmmm, which is a bit tricky to install and requires a fairly fast computer with a lot of RAM. It's not a panacea, then, for all our Mac midi problems. But from personal experience I can tell you, it's SO cool to have the mmmmm working and be able to listen to the same midis our PC friends are listening to.

To sum up this portion, then: If your Mac users install the mmmmm plugin, you can use the SAY command script given above to deliver your midis to both Mac and PC users. While it's a pain to get your Mac users to get the mmmmm, it's a pain to have to script a juke room separately for Macs and PC's, as you're about to see. But first, let's discuss some ways to actually use the SAY command:

Variations on the above:

First, you could just create a door (I use the word "door" and "spot" interchangably, though technically a door acts as a passage to another room while a spot is only used to house a script), size it, under options click on Don't Move Here and Show Name, and name the door the name of your midi (like "Spooks"). You could create a room just filled with such spots and the room would look very similar to a traditional av dispensing room. Aesthetically, the room would be kinda ugly, and people would have nowhere to stand, much less dance, but it would work.

Or, you could follow the above instructions except put in an overlaid GIF with the midi name--and not click on Show Name under Options in the Door Dialogue Box. If you don't jam the room with such overlays, you could have a very pleasant looking room, like the juke room at Dreamland.

Or, you could even create a background GIF that had your midi names already on it, and just put the spots over the names of the midis that are a part of your background already. This room would function, then, very similarly to the background GIF av room I've previously discussed on another page, except instead of delivering avs, the room would deliver midis.

Remember that your users will still need to download the midis you want them to hear and for which you are writing scripts. So, you'll have to have a web page with the midis available for download. Remind your users where to place their midis--the Palace:Midis folder.

If you don't want to hassle with getting your Mac users to intall the mmmmm, you'll need to use separate scripts for PC and Mac users to make each platform hear your midis. I'll discuss two ways of including dual scripts, the first with a touch, the second with a verbal command.

For PC users, you can do the following:

1) Create a door

2) Size it and move it

3) Open the Door Info Dialogue Box. Name the door, then under Options click on Don't Move Here and Show Name.

4) Insert the following script:

ON SELECT { "spooks.mid" MIDIPLAY }

With that script installed, your PC users will be able to click on your spot, and hear that midi.

Overlaid GIF Variation: While such a room would have scripts that work, it would also probably be ugly--with those ugly Palace door texts all over the place. A much better alternative would be to use overlaid GIFs instead of naming the door.

Mac Users, you can do the following:

1) Create a door

2) Size it and move it

3) Open the Door Info Dialogue Box. Name the door, then under Options click on Don't Move Here and Show Name.

4) Insert the following script:

ON SELECT { "http://www.palacetools.com/tutorials/ori/blackbrd.mid" NETGOTO }

Let's briefly analyze that script: the ON SELECT means the script is activated when the user touches (clicks on) your newly created spot. The open bracket { begins the script data. Then, we find a typical URL inside quotation marks. That URL happens to be to my web site where I have that "Blackbird" midi--cool tune, too. After the URL, we find the command NETGOTO. That command starts up the user's web browswer and either goes to the URL, or else launches a web browser plugin that will seek out the URL and automatically play the midi. And of course, we find the end bracket }. So, the Mac touch script works by playing the midi not through Palace, but through another application--the web browser. Ugh. It's not a real great option, since retrieving a midi this way is time consuming and may even crash your Mac user if they don't have enough RAM to have Palace and their web browser open simultaneously. And the script doesn't ask if they want to open the browser--it just flat out tries to do it. Oh, Palace programmers, why have you made us do this?

Overlaid GIF Variation: While such a room would have scripts that work, it would also probably be ugly--with those ugly Palace door texts all over the place. A much better alternative would be to use overlaid GIFs instead of naming the door.

Philosophically speaking, you probably want your juke room to have a lot of open space--after all, we want to hear music and dance--and you might want your room to look like a room, rather than look like a closeup of a juke (though I've seen very cool juke rooms that work this way). So, while the touch scripts described above will work, they do eat up a lot of real estate on your background GIF and hence they limit the number of midis you're able to have in one room. An option that avoids these problems is to use scripts that activate upon a verbal command. That way you don't have touch spots all over the place and your room can look like anything. And these verbal scripts can hold a lot of midis.

PC users can use the following script:

ON OUTCHAT
{
{ ")anangel.mid" SAY "" CHATSTR =
} CHATSTR "An Angel" == IF
}

You can vary this script very easily by changing two portions of it: First, you'll want to change the part within the quotation marks to reflect the name of the midi you wish to play. Remember to include the .mid extension. Then, you'll need to change the fourth line to reflect the key words you want to activate your script.

Of course, who wants just one midi in such a script? And the cool thing about this particular script is you can put in many midis by duplicating the third and fourth lines and inserting them after the IF (of course, you'll also need to edit the midi name between the quotation marks and the keyword as well). Like this, for example:

ON OUTCHAT
{

{ ")anangel.mid" SAY "" CHATSTR =
} CHATSTR "An Angel" == IF

{ ")badmoon.mid" SAY "" CHATSTR =
} CHATSTR "Bad Moon Rising" == IF

{ ")beloved.mid" SAY "" CHATSTR =
} CHATSTR "Beloved" == IF

}

You can cram a whole lot of midis into this one, folks--60 or more, depending on your server. So, the verbal command is a powerful tool for scripting midis.

Of course, you'll need to tell your users what the keywords are for activating the midis. I suggest you make a message script that activate on a touch command to accompany the preceding script. It would look something like this:

ON SELECT {
"To hear the midis, just type the key word for the midi you wish to hear. Here's that list:
An Angel
Bad Moon Rising
Beloved" LOCALMSG }

If you have a very long list, you'll want to break up the song titles into separate messages so that the entire list will appear. See my page on message scripts for info on breaking up long messages.

Mac users can use the following script:

ON OUTCHAT
{
{ "http://www.palacetools.com/tutorials/ori/blackbrd.mid" NETGOTO "" CHATSTR =
} CHATSTR "blackbird" == IF
}

You can add more midis into that script, of course. Just duplicate lines three and four and insert them on a line after the IF, then change the URL information and the keyword which activates the script. You'll be in biz very soon with this one.

Remember that you'll have to have separate URL's for all the midis you want the user to access. That means you should upload them onto your web page without stuffing them into a big midi pack. And, just as with the PC script, you'll need a message script which tells people the keyword to use to access the script.

The above scripts can be varied, to put in different midi songs, a different number of midi songs, etc. But I suggest that initially you make as few variations as possible. Stick with a small number of midis until you get your juke working. Then, begin seeing what you can do to change the script. After a little practice, you will be able to delete and insert your own material easily.

Remember also that to include midis you'll need to do other work besides scripting. You'll need a web page so the PC and Mac users can download the midis to put in the Palace:Midis folder for the Single Script/mmmmm script. You'll also need to have separate URL's for each Mac midi you intend to put in the Mac touch and Mac verbal scripts. It's a lot of work, but when that juke works, you're gonna feel great and know that all the work was worth it.

Back to Home Page On to Additional Palace Links