ok. Here's the magical code for eventghost to call music from media monkey by artist, album, song, or genre. You should be able to copy and paste this into your eventGhost config tree.
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1462">
<Macro Name="Q Artist, Album, SongTitle, Genre" Expanded="True">
<Event Name="Broadcast.Artist" />
<Event Name="Broadcast.Album" />
<Event Name="Broadcast.SongTitle" />
<Event Name="Broadcast.Genre" />
<Action>
EventGhost.PythonScript(u'maxresults=\'30\'\ndata = eg.event.payload\nprint len(data)\nif ( isinstance(data, str)):\n searchfor = \'"%\'+data+\'%"\'\nelse:\n searchfor = \'"\'+data[0]+\'"\'\nif (len(data)>1):\n if (data[1]=="unrated"):\n #print "unrated!"\n searchfor = searchfor+ \' and Rating="-1"\'\n\nsearchterm= eg.event.suffix\n\n\nsearchstring = searchterm+\' like \'+searchfor+\' order by random() limit \'+maxresults\nprint searchstring\neg.plugins.MediaMonkey.LoadPlaylistBySql(u\'\', searchstring, 0, 0, 0, True)\n#eg.plugins.MediaMonkey.LoadPlaylistBySql(u\'\', u\'Artist like "%beat%" order by RANDOM()\', 0, 0, 0, True)\n ')
</Action>
</Macro>
</EventGhost>
getting the music data from mediamonkey intot VoxCommando is a different story. I don't currently have a direct connection from VC to MediaMonkey like I have with WMC and XBMC. I modified a MediaMonkey script to create an xml file. see attached.
You have to put this vbs script into your mediamonkey\scripts folder. e.g.: C:\Program Files (x86)\MediaMonkey\Scripts
then you need to edit Scripts.ini (which is in the same folder) and paste the following into it.
[VoxGenXML]
FileName=VoxGenXML.vbs
ProcName=VoxGenXML
Order=2
DisplayName=&VoxGenXML
Description=Save in same folder as Vox and name file artists.xml
Language=VBScript
ScriptType=1
- restart MediaMonkey
- Select all the music you want to use (could be all your music, or just the good stuff / it should be well tagged for this to work properly)
- Look under the menu
File >> Create Reports and you should see VoxGenXml
- run it and you'll be asked where to save the xml. Tell it to create a file in your main VoxCommando folder and call it artists.xml
- then you just need to go into the VC options choose the EventGhost tab and put checkmarks and phrases in where appropriate.
This is a long process but after you do it the first time, all you need to do is run the MediaMonkey script and point it to the artists.xml file. You could also create a smart playlist in MediaMonkey with all the music you want to include.
for the genres I just enter them by hand into the VC command tree. the genre generation is not automated, because I have a lot of music with meaningless genre tags... and this was originally just for me!
Whew. If this works for you I'll have to cut and paste this into a wiki article with some pictures so I don't have to answer this one again!
do your best, but don't worry if you run into stumbling blocks. I'm happy to help.
* If you are not actually using XBMC for music I recommend you go to options and turn it off - If you are going to create artist and album voice commands for both xbmc and mediamonkey it's going to use a lot more memory especially if you have a large music collection. You'll also have to make sure you use different phrases for each so VC knows which one to execute. Do you follow? It must be a lot to absorb.
edit: I've updated the attached script to account for an error that escapeartist found. It was not filtering out songs with blank names. This should fix it.