Hi all
I have written a new plugin for Hal6 which allows you to ask Hal to play any of the MP3 files stored on your hard disk.
Please read the user guide to get more details about how to use it.
http://www.vrconsulting.it/halhelp/vrMP3Help.htmlIf you are interested, you can download them accessing the Software Downloads Area in the Virtual Humans Forum:
http://www.vrconsulting.it/vhfNote: Currently I store the name of the song as the name of the file without the MP3 suffix. I know that the MP3 format allows to extract many more info, like the author, the exact title, the genre, etc. Someone more experienced in the ID3 format may further develop this aspect.
http://en.wikipedia.org/wiki/ID3Some consideration about it:
After indexing your MP3 files on disk, You can ask Hal to play your songs, simply saying PLAY A SONG, followed by some word which is contained in the name of the file.
But I've also managed to put some more human-like behaviour: sometimes Hal will come up playing a song even if you didn't ask!
You may be talking about California, for example, and Hal, instead of answering as usual, will say "You talked about California and this reminds me this song.", and then starts playing the song Hotel California, by The Eagles (or whatever song you have indexed, containing this word.
I have used the HalBrain.QABrain method, which is not a deterministic full-text algorythm, but can find anything which has some similarity with your words.
Since this behaviour may be annoying, I've added a parameter in the plugin window which allows you to set the level from high to none.
Some more technical note:
In this plugin I have used some tecniques which may be useful for others here:
1. Use the FSO (File System Object) classes to access operating system info (to read folders, subfolders and files).
2. Incapsulate the subfolder access in a Function, which produces a more readable and maintainable code
3. The function is recursive, which was needed to be able to read subfolders at any level.
4. I use input windows, external to the standard Hal user interface, which allow a more detailed input of specific fields, such as the directory path.