Copyright (c) 2003 by Tom Grandgent
Important!!! Read this entire page before trying to use this software!
ACWatch is a Windows-based program that facilitates interaction between the Turtle Beach AudioTron MP3 player and the MoodLogic software in order to enable an end-user to generate a playlist based on a single song. The end-user can do this from the AudioTron, without needing to use a PC.
This means that a user can think, "hmm, I want to hear some songs like song X", choose a special option on the AudioTron to generate a playlist, and then choose song X. If the song is mixable, the playlist will automatically be created and queued for playback.
Leave ACWatch running on a PC on the same network as your AudioTron(s). This PC must be running Windows and must have the MoodLogic software installed. The MoodLogic software does not need to be left running, though. When a user wants to make a playlist, the ACWatch software will handle the process by interacting with the AudioTron and the MoodLogic software.
ACWatch and its associated files may be freely used for personal and commercial applications. The source code is included, so you may make modifications for your private use. You may not redistribute or mirror any files of the ACWatch distribution in original or modified form, unless you have my written consent to do so. You may not use any part of ACWatch in derivative works unless they are for private use only, or you have my written consent to do so. This software comes with no warranty, express or implied. By using this software, you assume all risk and liability.
ACWatch.zip - 67,076 bytes - includes program executable, this documentation, data files
Step 1: Find out from the user that he or she wishes to generate a playlist.
Due to limitations in the programmability of the AudioTron, this most important step is a bit roundabout. When the user takes an action on the AudioTron, there is no way for a program to get notified of this, and polling the AudioTron's status all the time is too slow and cumbersome. Therefore, ACWatch uses a special "trigger file" to let the user indicate that he or she wishes to generate a playlist. ACWatch constantly (but efficiently) checks the last accessed time for this trigger file. When a user selects this file using the AudioTron (by selecting it as a playlist, for example) the last accessed time of the file is updated as soon as the AudioTron closes the file. ACWatch notices this change and uses it as a signal that the user wishes to generate a playlist. (Hence the name "ACWatch.")
Step 2: Find out from the user which song should be used as the basis for the playlist.
ACWatch polls the AudioTron's status every few seconds until it sees that a song is being played. Unfortunately, the AudioTron is not responsive to requests during the first 8 seconds or so of playing an MP3, so the end-user has to select the song and wait for a bit until the AudioTron answers back to say what it's currently playing.
Step 3: Generate the playlist and start it playing.
This part is relatively quick and painless! ACWatch writes out a text file with information about the playlist to generate, then it spawns a separate program (called MakePlaylist) which uses MoodLogic to generate the playlist. If the playlist was created successfully, ACWatch displays a message on the AudioTron saying so and instructs the AudioTron to begin playing it. If the playlist couldn't be created for some reason, the user is prompted to choose a different song.
1) Put ACWatch.exe, ACWatch.ini, and MakePlaylist.exe in the same directory somewhere on a computer with MoodLogic installed. For example: c:\ACWatch
2) Inside this directory, make a subdirectory for each of your AudioTrons. The name of each subdirectory must match either the hostname of an AudioTron or its IP address, because this is how ACWatch determines the name of the AudioTron making requests. For example: c:\ACWatch\AudioTron1, c:\ACWatch\AudioTron2, etc.
3) Copy the trigger file (!Generate Playlist Based on Song.m3u) and the dummy file (Please wait.wav) into each of these subdirectories. If you want to rename these to something else, that's fine - they're configurable.
4) Share each one of these subdirectories. It's easiest to make the share names the same as the directory names, as is the default, but it's up to you.
5) Go into each AudioTron's web-based configuration and go to Settings, File Access, "Click to Configure Share Search Options". Make sure the Share Search Mode is set to the third option, "Search all folders in shared folders listed below". Then make sure your list of shares includes the share(s) where your MP3s are stored, plus the share you just created for the trigger file. For example: \\srv2k\AudioTron1
6) [optional] Assign the trigger file to be one of the "favorites" on the AudioTron's remote control. This will make it extra easy to initiate playlist generation if you're using the remote control. To set this up from the web interface, go to Music Selection, Favorites, and click on Configure next to the favorite you want to use. Then click on Music Selection, Lists, click the radio button next to the trigger file (!Generate Playlist Based on Song.m3u by default), and click the Set Favorite button at the bottom of the page.
7) Restart each AudioTron to make the new settings take effect.
8) Edit the configuration file, ACWatch.ini, which must be in the same directory you put ACWatch.exe in. You shouldn't have to change most of the settings, but make sure that the ones involving filenames and paths match up to how you've set things up. Also, make sure you specify your AudioTron password in this file.
9) Run ACWatch.exe. It will create an icon in the system tray. Click on that icon to open the main window. Look at the log info it's showing. If there are any errors or warnings, check your configuration file and directory structure and restart ACWatch if you make any changes.
10) If you're not sure whether or not your computer has the files necessary to run VB6 programs, try running MakePlaylist.exe. If a message box pops up saying "Syntax: MakePlaylist [config file]" then you're all set. If you get some error message instead, you will need to download the VB6 runtimes. You can download them here or do a search for VB6 runtime download.
11) That's it! You're ready to test the system. If all goes well, you'll probably want to make a shortcut to ACWatch.exe in your Startup folder to keep it running all the time.
1) Go to your AudioTron and select the trigger file. If you set it up as a favorite on the remote control, just push the favorite button corresponding to that file. Otherwise, go to the top-level menu, select Lists, scroll until you reach the trigger file, and select it.
2) You should see a prompt on the display asking you to choose a song. Go ahead and choose a song. Note that the song will have to be mixable - you can see which songs are mixable by running the MoodLogic software. They'll have a dot next to them with an M inside of it.
3) The song you chose will start playing. Wait up to 10 seconds or so, and then the playlist should be generated. The display will indicate success or failure. If the song you chose was not mixable, you'll have to choose another one. Once a playlist has been generated, you can step through it with the next and previous buttons. If you want to hear it in random order, push the random button so that the random light comes on.
What is ACWatch written in, and what are its dependencies?
ACWatch is written in straight C++. It does not use MFC or any third-party libraries and so it has no dependencies. However, the MakePlaylist program that it uses to actually create the playlists is written in VB6. Most PCs these days have the files necessary to run VB6 programs. If you don't, you can download them here or do a search for VB6 runtime download.
What if the user initiates playlist generation but never chooses a song?
The playlist generation session will time out after two minutes, by default. This is configurable.
Isn't it wasteful to continuously poll for the file access times? Couldn't you use a notification instead?
No, and no. The information about the files being polled gets cached by the operating system, so very little work is done on each poll. The only way to set up a notification for file access time is by using ReadDirectoryChangesW(), but this is limited to one notification every two hours. This is unacceptable for this application.
Why are you only supporting song-based playlist generation when MoodLogic allows for all kinds of other playlists to be generated?
The AudioTron's user interface and limited programmability make it difficult to let the user select the parameters associated with other types of playlists. Also, it's relatively practical to pre-generate these other playlists and store them as static files which the user can select easily.
Where's the source code to the MakePlaylist program?
Sorry, but I can't make that available. If you want to know how to interface with the MoodLogic software, contact MoodLogic.
I want the program to work differently. Will you change it for me?
Did you read through the configuration file? If so, and you still want something changed in the program, you can try emailing me but I can't make any guarantees. If you have a C++ compiler and know how to program, you should consider modifying the source code yourself.
I found a bug! -or- I can't get it to work!
Make sure you've read this entire file, as well as the configuration file. Make sure you've checked your settings in the configuration file and on the AudioTron. Make sure you've organized files on the disk and shared them according to the instructions in this file. Make sure you have the MoodLogic software installed properly and are able to generate song-based playlists from it. If you're still stuck, send me email with a detailed description of the problem you're having. I will try to help, but I can't make any guarantees.
Thanks for reading to the end. If you find this program useful, I would like to hear from you. Special thanks go to MoodLogic for providing me with the information necessary to create this software.
Windows is a registered trademark of Microsoft Corporation in the United States and other countries.
AudioTron and Turtle Beach are trademarks of Voyetra Turtle Beach, Inc.
MoodLogic is a trademark of MoodLogic, Inc.