Storm Palace Hosting > Storm Hosting Help Desk > Knowledgebase

Ask a question:


Solution Scripts Music Images WWW Tweaks/How to's Server & Programs Voice Sound PChat Security Contact Us Us

Hover mouse on each icon for information


This one is going to be so tricky with so many options because of the different operating systems and how they react to different download and play commands. Im probably going to get confused just trying to explain all this to you. Some basic information to start with up front about the different platforms.

New Clients
This is pretty simple because theyve made both the mac and pc recognize, download, and play with the SOUND command. If you knew that all you were going to have are new clients, the script would be.......

"soundname.mid" SOUND
{ "soundname.mid" MIDIPLAY } 100 ALARMEXEC }

All that last command does is cause the script to play without having to re enter the room once theyve downloaded it. The only problem with this script is you cause the mac client to execute the script twice. They dont play midis IN palace like PC's do. When a midi is started with the SOUND command and they dont have it, they download it. If they do have it, that command is sent to SoundApp. For a PC user, that would be like your mp3 player starting up and playing it for you OUTSIDE of palace. Now imagine that a script has opened your mp3 player to play this song called "soundname" and then the very next command says ok play it one more time also with the MIDIPLAY command so in your mp3 player window you have the same sound waiting to be played after the first one stops. Thats how SoundApp works. MIDISTOP wont work for a mac for this reason. Its OUTSIDE of palace that this sound is playing.

Macs also have to have extentions on their sounds or SoundApp wont know if its a midi or maybe an mp3 and to play it with SoundApp. Wavs are handled INSIDE of palace, so an extention isnt necessary with those.

Older PC Clients
They won't download a sound with the .mid extention using the SOUND command, so you have to strip that off and turn "soundname.mid" into just "soundname". They will download .wav, .gif. or no extention and just about anything else but not the .mid extention. By the same token though, macs still have to have that extention so what do you do?

Look at the code thats at the bottom of the page. Thats the best workaround all client friendly script that Ive seen.

Older Mac Clients
They need to download and install Ken Marks mmmmm to recognize and play midis in palace. They will download file_m, file, m_file, file.mid or just about any other combination but cannot use the SOUND command or they hear nothing but a screeech when it tries to play. This is why they prefer the ON SELECT instead of a forced ON ENTER SOUND command. Please remember when naming your midis that if they do NOT end with .mid, make sure they begin with m_ MIDIPLAY will only work if they have mmmmm and sometimes that wont even work so your best option is to use the SAY command. If you give the mac client two commands like ")soundname" SAY and "soundname" SOUND, it will play it twice because both commands are sent to an external player. Its no different than if you click on one mp3 and it started playing, then you clicked on another and it loaded it in the window to play next after the first got finished. The script to avoid that happening would look like this....

{ ";#mytune.mid#" SAY "mytune.mid" MIDIPLAY }

The #....# tells the Mac plugin to start a midi and ignore any further requests to play a midi. This prevents replays when other people enter the room. Remember that this will not download for a mac nor a pc. You have to use the SOUND command in an ON SELECT door so the mac user will be ready for it.
None of the mac clients have MIDISTOP support. They have to do it manually in their external application playing the sound.

To make the same script above mac and old pc client friendly, that script would have to look like this.....

{ ";#m_mytune#" SAY "m_mytune" MIDIPLAY }

Having fun yet? Dizzy?

PC clients LOVE the SOUND command because that will download AND play for us the next time we enter the room so basically all we need is

ON ENTER { "soundname" SOUND }

Macs, on the other hand, HATE it. What do we do as scripters trying to make our palaces all-platform friendly then? At this point, your guess is as good as mine. We still have people running 68k macs, people that refuse to upgrade just because, people that would rather bitch and moan about forced downloads rather than help us find ONE script to suit ALL clients. I can only tell you what I do and that really depends on how lazy Im feeling that day when I put a sound script in. I always go back and try to make it mac friendly. Here is a script that Alissa contributed that I think makes more sense than any Ive seen and which will be friendly for all.

{ "soundname" SOUND } ;post 3.5 windows
{ "soundname" SOUND} ;pre 3.5 windows
{ "I'm on Mac" SAY
{ Post 3.5 Mac Code } ;post 3.5 mac code
{ ";#mytune.mid#" SAY "mytune.mid" MIDIPLAY } ;pre 3.5 mac code

Was this article helpful? yes / no
Article details
Article ID: 293
Category: Sounds
Date added: 10-05-2011 23:47:35
Views: 570
Rating (Votes): Article not rated yet (0)

<< Go back

Powered by Help Desk Software HESK™