backIndex

Xelagot topics

Playing midis

See also the verbal commands and action script statements for playing midis.

Preparation in DJ.exe 2.08

To prepare a xelagot to play midis, there is a separate program, DJ.EXE version 2.08, which you will find in the folder DeeJay (it can be put anywhere, the DeeJay folder is a convenient place). If your version is older, please download the newer version: version 2.01 was buggy, 2.00 had less options, and the previous versions could not check validity nor play-time.

This program can load a normal list of urls from a text file containing one url per line (nothing else in the file), for instance:
http://members.tripod.lycos.nl/Dolimah/bewit.mid
http://www.chez.com/viralkeeper/musique/gangsta.mid
http://www.klotsnet.com/midi/Carrey%20Mariah/one_sweet_day.mid
and so on... To load this file, choose File | Open Unformatted URL List, find and load your file.

You may also load a Preston mls file by selecting menu File | Open Preston mls File.

Xelagot midi files, produced by this program, can also be re-loaded: File | Open Xelagot File.

Midi lists contain four columns:

  1. Title
  2. Cat, i.e. category (up to you to assign one if you so wish)
  3. (Sec), i.e Duration or play-time in seconds, by default 0 (Xelagot 2.999929 onwards will change this default to 200 seconds).
  4. URL
Each column can be sorted alphabetically. To enable/disable sorting, click on the checkbox allow sorting columns. To sort, just click on the column header.

You can edit each of these midi entries manually: right click on the midi (make sure you have the cursor in the first column), and select Edit Item to bring up an edit screen. You can also insert new midis or delete them by selecting the appropriate entry and, check them for validity and play-time (see below), and play them. If you double click on the midi, the edit screen will appear.

You can change the order of the midis by dragging them (this routine is a bit clumsy, sorry for that).

The URL silence entry is for a midi which does nothing. Many worlds have such a midi, to stop the music. Try to find somewhere a silent midi or a very short one, and write its url here. It will be used to interrupt any ongoing music.

The Collection Title is optional.

You could save this list now for the bot to use, but it will not have adjusted the duration of the midis, nor will it have checked their validity: whether the file can be downloaded and played. Doing this check is what DJ.EXE's new code does best.

Note: Proxy settings: If you need to override the windows internet settings to install a proxy server to download files, select menu Edit | Proxy Settings. Choose use proxy, checkmark default proxy and enter the name of the proxy server. Optionally, you can add a port number after the name, separated from it by a colon, e.g.
proxy.ams.chello.nl:8080

To check for validity and play-time, choose the main menu Edit | Check URL and a new screen will pop up. On it you see a blank text screen with a clear button on the top right corner to clear the text. Under it are a few checkboxes. On the line marked Check: you should checkmark the boxes unverified and failed, the box verified need only be checked if you wish to verify midis which have been verified and approved previously. Another checkbox, Use path for unqualified midis, together with the input field for Path, is used if you have your own midis on the world object Path and wish to omit the Object Path in the url of the midi: enter the path in the edit field under this checkbox if you have such midis on your list. The last checkbox, Delete unrecognised formats, is to allow deleting files whose format is not recognised (anything not ending in .mid, bad midi files, etc): leave it unchecked if you wish to keep these files.

Make sure you are connected to internet, then click start to start the download.

Start the download...? Yes, the program will try to download each midi and test its duration. The midis will be kept in a folder called Midis. They are not needed by the bot.

Midis which download properly and are recognised as valid ones will receive a green checkmark and their play-time will be recorded. Midis which fail to download or are not valid will be marked with a red X sign, and this will be logged to the text screen. Midis which have not been tested remain without a checkmark.

Once all midis are tested, return to the midi list and check it. You may remove all the failed midis (marked with the X) in one operation selecting the main menu Edit | Purge Bad, or delete them one by right-clicking on them and choosing Delete Item. You may also clear the X marks at the main menu: Edit | Clear Marks. You may re-check failed midis by repeating the URL check: make sure the checkbox failed is checked, and uncheck verified and unverified so that only failed midis get processed. Or you can verify them individually by right clicking on the midi and selecting check URL. This is handy, because sometimes the first check fails due to poor internet connection.

You can play the midis after all midis have been checked by selecting the pop-up option Play when you right-click on the midi name on the list.

Once your list is ready, save it as a Xelagot file, not as an unformatted file, as you would lose the timing. Choose File | Save Xelagot File, give it a name and save it in the DeeJay folder, where the bot will be looking for it. This file will contain all the necessary information for the bot to play them. You may also reload it later in DJ.exe to verify again the URLs.

Optionally, you can save your list as a Preston file: File | Save Preston mls File.


Loading the list in Xelagot

version 2.99983 upwards

To load a midi list prepared by DJ.exe in the Xelagot program, start the xelagot, select a bot and log it into the world. Then choose World | DeeJay. At the Midis tab you can load the list you prepared with DJ.exe by hitting load. This list will be used by the bot to play midis.


Installing the speaker

version 2.99983 upwards

To install a speaker, the bot must be logged into the world where the music will be played. Choose World | DeeJay and go to the Speakers tab. Add as may speakers as you will need, delete any unnecessary ones. Select one speaker using the spin-buttons, hit the edit button to edit. Type in a model to use as speaker, it can be any valid object: I often use a flower, for example, flower1.rwx, or a sign1.rwx. Type in the coordinates or get the bot's position with button get bot's, add any commands to the fields, for instance, you can type in the create field (if you use a sign object): sign bcolor=white color=red (do not type 'create'), then hit apply. Repeat this for each speaker. Speakers without a model will not be used, even if the rest has been defined properly. The length of the action command in the speakers, including the url, may not exceed 255 characters, excessive characters will be truncated. This rule also applies to the Description field. All speakers will be modified simultaneously. Too may speakers may result in a world server overload and the bot may get disconnected.
As from this moment, the bot will know and remember what objects to use as a speakers, and their positions in a given world.

Once you have defined your speakers, you can save that definition to file. This allows you to build up different sets of speakers. Give the file a name you'll recognise as belonging to a certain world. The file extension is always XSP. You can load these definitions by hitting the load button.

To install, modify or load speakers, the bot must not be playing. To end a session, hit the stop button on the Midis tab.
The speaker objects should not be put there beforehand by any other than the bot itself (it creates and manages its own objects) and no one may move or modify them, otherwise the bot will not be able to delete them to replace the midis. See below the note on 'Lost speakers'. The bot must have build rights and must be able to create the objects without encroaching or exceeding the cell capacity. It may leave the objects in place after it finishes playing, provided no-one modifies them. Next time it plays, it will remember those objects and use them: it keeps all data on file, including the object number.


Playing midis

version 2.99983 upwards

Make sure you followed the previous steps before doing this, check the bot has loaded a midi list and has speakers defined (menu World | DeeJay). The bot must be in the world to play, but need not be in the neighbourhood of the speakers. Midis can be played using either the buttons on the Midis tab (as explained on this page), using action script statements, or using verbal commands. Note that the bot cannot play the same midi twice in a row, or better said, the aw browser will not re-start the same midi.

User interface: Midis tab. Use the following


Verbal commands: See Verbal commands: Diskjockey commands for a full list. If you use the standard english language files, say:
play midi
The bot will create the speaker if necesary, and start playing. Use these verbal commands to play midis: play up, play down, play random, play next, play pause, play continuous, play once (careful with this one!). To end a session, before you remove the bot, you may clear away the speaker. Say:
play stop to clear the speakers.
You may also leave the speakers there, the bot will continue playing next time it logs into the same world, even if it in not in the neighbourhood of the speakers.

Action script statements: see Action Script: DeeJay.


Notes


backIndex