| Return to Index | Read Prev Msg | Read Next Msg |

Slink-e / CDJ Discussion Archive #11

Re: Command line control of CDJ from my Stargate

Posted By: Mike Hardy <mhardy@h...>
Date: 1/10/01 1:39pm

I made real good progress on integrating CDJ and the Stargate. This is still one way, without the ability to communicate back to the Stargate with Winevm or display any of the CD information on the LCD Keypads. The utility provided by Nirvis is a one way utility and will only send data to the slink server, it will not send anything back to Winevm.

Place the contents of the zip file in the same directory as Winevm. You do not need WSH to run these. The Send Keys command worked, but it relied on CDJ to be maximized to run. This example will run with CDJ minimized. WSH also adds a degree of risk from Viruses and other issues.

To test, just double click on each batch file to see if it works with Cdj.

The zip file is available at http://members.home.com/mhardy/cdj_comands.zip

The batch files use a command line utility that is available when you install CDJ called slcmd.exe. I have added the file to this zip so that you can extract them all at the same time into your Stargate directory.

The cdjx.pif files are used to close the batch files after they are run. That way you don't need to close the black command prompt screens after each command.

I created 9 generic Then Macros to call the batch files. I need allot more, but this will do for now. I named each cdj0 - cdj8. I then use the ASCII out command in each then macro to run an application &&cdjx.bat. The x is 0-9 for the batch files that exist in the zip file you will extract to your Winevm directory. Change the ASCII out command to point to the correct batch file.

I gave each batch file a generic name so that it will be easy to make changes and not affect your schedule. All you will need to do is assign an LCD or LED button to call the then macro that will send the commands to CDJ. Make a change to the cdjx.bat file and you are back in business without downloading the schedule. My wife or the kids can even make this change if need be.

I created 7 buttons on the playlist screen from the example keypad screen that say the following

Special, Rock, Country, Blues, Buffett, Random, Wife's,

Each one calls

cdj1.bat cdj2.bat cdj3.bat cdj4.bat cdj5.bat cdj6.bat cdj7.bat

cdj1.bat contains the following commands

Rem This is a CDJ batch file to load the playlist called Because.pla slcmd send cdj:playlist_stop slcmd send cdj:playlist_clear slcmd send cdj:playlist_load[because.pla] slcmd send cdj:playlist_shuffle slcmd send cdj:playlist_pointer[top] slcmd send cdj:playlist_play

cdj1.bat loads a play list called because.pla in the playlist directory used by CDJ. slcmd is the utility to communicate with the slink server that talkes to cdj. the send command just sends the ascii text to the slink server. cdj: tells the slink server that cdj is the target application. The rest of the string is the command to be sent.

cdj2.bat contains Rem this is a CDJ command file to load a Rock Playlist slcmd send cdj:playlist_stop slcmd send cdj:playlist_mode[manual] slcmd send cdj:playlist_clear slcmd send cdj:search_mode[track] slcmd send cdj:playlist_clear slcmd send cdj:search[kw=rock] slcmd send cdj:playlist_mode[random] slcmd send cdj:playlist_pointer[top] slcmd send cdj:playlist_play

This will load a random list of Rock tracks using the key word "Rock"

The rest do about the same thing. You can modify them to your liking. My wife is happy with the way it works. She does not even need to go the computer to run it any more.

You can use the same commands that are in your map files that CDJ loads as the Batch files. Just add the slcmd send to the beginning of each line.

You need to make sure that winevm is running and the mega controller is open and CDJ needs to be open or this all to work correctly.

If you send the command slcmd send cdj:sleep

CDJ pauses the playlist and turns off the CD player. CDJ wakes up when it gets the next command and starts playing. This is a good way to have an away macro or a shutdown macro run that stops CDJ and powers down the players without quitting CDJ. Makes it easy to not have to keep track of the status of CDJ. The only issue is the ability to open multiple instances of CDJ. I was hoping that I was able to run a batch file that opened CDJ if it was closed, but it starts another copy every time it is run.

I also wanted to create an event that will tell my wife to start Winevm if it was not open so that she was able to control cdj from the LCD Keypad. At this time, if the kids close winevm, the events will not work and she will not know why. The ability to have winevm check in and tell the schedule that it is available will keep the WAF factor at about a 10.

I still need to do the following

This is the important step. I need to find a way to send the following command the first time I try and use winevm to control CDJ. slcmd adddevtxt CDJ type=devtx 0 0 0 I guess I can send the command multiple time, but I have not tried this yet Without this command, it will not work.

Find a way to add the ability to start CDJ from the Keypad if it is closed.

Find a way to notify the user that Winevm is off line and that it needs to be started to run CDJ. Without winevm, the batch files are just taking up space.

Let me know if you need any help getting this to work.


Zip file of commands I use

| Return to Index | Read Prev Msg | Read Next Msg |


Slink-e / CDJ Discussion Archive #11 is maintained by slinke-bbs-owner@nirvis.com with WebBBS 3.21.