I'm finishing up developing a speech control jukebox. I've scoured
"iTunes COM Interface Documentation 4.9.0.17" (for windows) and cannot
determine a way to tell the browser to select a genre, artist, or
album. I am using Microsoft Visual C++ to develop a windows mfc
application. When I speak "open genre classical" I want the Itunes
browser windows to select that genre. I would also like to do the
same for artists and albums.
I would expect the Itunes api to have a select genre function. The
only way I can think of now to select a genre in the genre column of
the browser window is to send a mouse click to it then send a sequence
of keystrokes to select the genre. I don't think I can stomach this
hack.
My speech recognition app can now tell Itunes 4.9 to play, pause, and
stop. When my app loads it reads all 14,000 songs in my collection in
7 seconds from the Itunes xml file - "iTunes Music Library.xml" (my
hardware is athlon 2000, 7200rpm udma WD, 1gb ram.)
After getting this far I thought the rest would be easy. I'm about
ready to switch back to using winamp. Apple's Itunes api appears to
be incomplete and clear as mud. Up until now I thought Apple made a
good api for Itunes, but why isn't there some function like this:
browserWindow->SelectGenre(genre). I wonder if the Itunes api for OS
X also incomplete.
Can anyone here tell me how to tell the Itunes browser window to
select genres, artists, and albums? Does anyone know who to ask?
Thanks,
Jeff
Ulrich Hobelmann - 29 Jul 2005 19:25 GMT
> My speech recognition app can now tell Itunes 4.9 to play, pause, and
> stop. When my app loads it reads all 14,000 songs in my collection in
> 7 seconds from the Itunes xml file - "iTunes Music Library.xml" (my
> hardware is athlon 2000, 7200rpm udma WD, 1gb ram.)
I don't know about the iTunes API, but I think since XML is
sequential (not random access) iTunes HAS to read the whole file
anyway, and probably does so on startup (on my iBook it takes a
while, too).
Probably you have to read the stuff into an array or list, and
then do the selection yourself...
OTOH, even with 14000 songs (I have about 4000) it shouldn't take
THAT long to read in the file... (on my 800MHz machine startup
takes about 3 seconds, and a good part of that is the GUI I guess)

Signature
XML is a prime example of retarded innovation.
-- Erik Meijer and Peter Drayton, Microsoft Corporation