Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Itunes com api - can't control the browser

  1. #1
    Newbie kykeon's Avatar
    Join Date
    Jan 2005
    Location
    kansas city area, missouri
    Posts
    20

    Thumbs down Itunes com api - can't control the browser

    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 MS Visual C++ and MFC. When I speak "open genre classical" I want the Itunes browser windows to select that genre.

    Up until now I thought Apple made a good api for Itunes, but why isn't there some function like this:
    browserWindow->SelectGenre(string genre). Anyone who has a clue about OOD (object oriented design) should map classes to real world objects, i.e. there should be high level classes which map directly to the gui components of Itunes, specifically the browser window. I think the developers of Itunes need to go back to school can take some classes on OOD.

    I would expect the "IITBrowserWindow Interface" 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.

    Is anyone else here working with the Itunes COM interface on windows?
    "There is one thing stronger than all the armies in the world, and that is an idea whose time has come." - Victor Hugo, 1802-1885

  2. #2
    Newbie
    Join Date
    Sep 2005
    Posts
    4
    Yes - I'm developing a simplified touch screen interface in VB.NET I too have been banging my head against the wall - I don't understand why every piece of iTunes is not exposed via the API. What I'm trying to create is an iPod like interface, for example, Music -> Albums, which gives you a list of albums (obviously), then you select the album you want to listen to (all) or select an individual track), and it plays that track or group of tracks. This will make it simple to find what you want. I think what I've resigned myself to doing is load the entire library library into a datatable, and create my own lists of albums, artists and genres (and playlists too). Once this is done, when an album, artist, etc is selected I'll look for a playlist called "currentPlaylist" and delete if it exists. Then I'll use the iTunesLib.IITLibraryPlaylist.search to get the tracks if the user selects album, artist or song name. (Haven't quite figured out how to handle genre, probably have to search my data table and somehow create a track collection?) Then I'll create a playlist with the track collection returned by the search and make that the current playlist. Obviously this is a little more complicated, because there are some nuances, such as when selecting an album or artist I'll need to add "All" as well and then make a decision about how to perform the search.

    I don't know if this makes sense - it's 2AM and I need a nap...

  3. #3
    Newbie
    Join Date
    May 2005
    Posts
    27
    yeah, im using itunes as my backend. working out well so far. my biggest problem is loading the library. takes about 23 seconds for about 3500 songs. that's entirely too long. i think what i'm going to do is just everytime i add music, have an option to load the library and it'll create and xml file of artists, another of albums, genres, etc. i can then try and duplicate the ipod interface from there. it's a really crappy way to do it, but, it'll work.

  4. #4
    Newbie kykeon's Avatar
    Join Date
    Jan 2005
    Location
    kansas city area, missouri
    Posts
    20
    Quote Originally Posted by sirgeoph
    yeah, im using itunes as my backend. working out well so far. my biggest problem is loading the library. takes about 23 seconds for about 3500 songs. that's entirely too long. i think what i'm going to do is just everytime i add music, have an option to load the library and it'll create and xml file of artists, another of albums, genres, etc. i can then try and duplicate the ipod interface from there. it's a really crappy way to do it, but, it'll work.
    If you email me I would have posted here sooner.

    Here's my solution. I can load 14,000 songs in 2 seconds. I load a preparsed xml file from my own cache. Here is the structure of my xml cache file:

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <music_collection>
    <!-- ******************* ARTIST ******************* -->
    <artist>
    <display_name>10,000 Maniacs</display_name>
    <pronounceable_name>10,000 Maniacs</pronounceable_name>
    <!-- ############################## -->
    <album>
    <display_name>10,000 Maniacs: MTV Unplugged</display_name>
    <pronounceable_name>10,000 Maniacs MTV Unplugged</pronounceable_name>
    <!-- ############################## -->
    <tracks>
    <track>
    <!-- ############################## -->
    <display_name>I'm Not The Man</display_name>
    <pronounceable_name>Im Not The Man</pronounceable_name>
    <filepath>M:\music\keith\10,000 Maniacs\10,000 Maniacs_ MTV Unplugged\04 I'm Not The Man.mp3</filepath>
    <genre>Pop</genre>
    </track>
    <track>
    <!-- ############################## -->
    <display_name>Trouble Me</display_name>
    <pronounceable_name>Trouble Me</pronounceable_name>
    <filepath>M:\music\keith\10,000 Maniacs\10,000 Maniacs_ MTV Unplugged\10 Trouble Me.mp3</filepath>
    <genre>Pop</genre>
    </track>

    </tracks>
    </album>
    <!-- ############################## -->
    </artist>
    "There is one thing stronger than all the armies in the world, and that is an idea whose time has come." - Victor Hugo, 1802-1885

  5. #5
    Newbie kykeon's Avatar
    Join Date
    Jan 2005
    Location
    kansas city area, missouri
    Posts
    20
    Quote Originally Posted by craigj
    Yes - I'm developing a simplified touch screen interface in VB.NET I too have been banging my head against the wall - I don't understand why every piece of iTunes is not exposed via the API. What I'm trying to create is an iPod like interface, for example, Music -> Albums, which gives you a list of albums (obviously), then you select the album you want to listen to (all) or select an individual track), and it plays that track or group of tracks. This will make it simple to find what you want. I think what I've resigned myself to doing is load the entire library library into a datatable, and create my own lists of albums, artists and genres (and playlists too). Once this is done, when an album, artist, etc is selected I'll look for a playlist called "currentPlaylist" and delete if it exists. Then I'll use the iTunesLib.IITLibraryPlaylist.search to get the tracks if the user selects album, artist or song name. (Haven't quite figured out how to handle genre, probably have to search my data table and somehow create a track collection?) Then I'll create a playlist with the track collection returned by the search and make that the current playlist. Obviously this is a little more complicated, because there are some nuances, such as when selecting an album or artist I'll need to add "All" as well and then make a decision about how to perform the search.

    I don't know if this makes sense - it's 2AM and I need a nap...

    I'm probably going to finish the Itune compatible part of my software, but I plan to use something better real soon. Itunes has too many limitations.

    I think I really like mediamonkey - http://mediamonkey.com/. I've been using it for months now. It seems way more flexible than Itunes. My only major compaint is the built in player seems to have some serious bugs.
    "There is one thing stronger than all the armies in the world, and that is an idea whose time has come." - Victor Hugo, 1802-1885

  6. #6
    Low Bitrate
    Join Date
    Mar 2004
    Posts
    62
    Quote Originally Posted by craigj
    Yes - I'm developing a simplified touch screen interface in VB.NET
    I don't know if this makes sense - it's 2AM and I need a nap...
    I'd really like to help out in some way with this.

    I'm decent with graphics if you'd like me to do something for you. I've been trying to find something like this for so long.

    Any chance i can beta test?

    thanks
    mark
    --
    1997 Acura 1.6 EL
    Ampie Case, Epia SP13000, 1G ram, 80g 2.5" HDD, Tripnav GPS, Lilliput 7" Touchscreen, M1-ATX

  7. #7
    Newbie kykeon's Avatar
    Join Date
    Jan 2005
    Location
    kansas city area, missouri
    Posts
    20
    Quote Originally Posted by babazoid
    I'd really like to help out in some way with this.

    I'm decent with graphics if you'd like me to do something for you. I've been trying to find something like this for so long.

    Any chance i can beta test?

    thanks
    mark
    Do you want to beta test my product? I could use some help. Send me an email. I prefer to communicate through email - jeff@intelligentjukebox.com
    "There is one thing stronger than all the armies in the world, and that is an idea whose time has come." - Victor Hugo, 1802-1885

  8. #8
    Low Bitrate
    Join Date
    Sep 2005
    Location
    North Babylon, NY
    Posts
    77
    I would be interested in collaborating with anyone on an iTunes interface, if you guys are willing to share the source.....
    Dell Optiplex GX260- 7" Avatar Touchscreen- OPUS 150W power supply

  9. #9
    Newbie
    Join Date
    Mar 2006
    Posts
    1
    I know its been a couple of months but has anyone been able to figure this one out in vb.net? I think the controls for a simplified i-tunes is pretty easy to do using things like iTunesLib.iTunesApp to Play/Pause, Next, Previous, Genre, ....

    The only issue I am having is after creating and pulling the info from the itunes.xml file is to how to use the DatabaseID value to select and play the song I selected from VB.net.

    Does anyone have any ideas? There is almost no information on the internet and have downloades apples latest com documentation, which is very vague.

    Thanks
    cic

    http://www.mp3car.com/vbulletin/images/smilies/nutz.gif

  10. #10
    Newbie
    Join Date
    Apr 2006
    Posts
    7
    Sorry for ressurecting what appears to be a dead thread but I've decided to use iTune's COM API since all of my music is ACC encoded. I don't want much as far as functionality and the API seems to cover the basics of playing music. I'd have to agree that searching capabilities, however, are woefully inadequate and the XML database appears to have been written by a very clever person thoroughly intent on making it as cryptic and inefficient as possible.
    My basic approach is to write an XSL stylesheet that will fully denormalize and restructure the XML into something that makes sense and is easy to query. Anyways, if anyone's interested feel free to PM me. My code is still very much in the initial development phase so I don't really have anything to share atm but I'm more than willing to share my code if anyone is interested.


    Roger
    "The purpose of an expert is not to make fewer mistakes but to make more sophisticated ones."

Page 1 of 2 12 LastLast

Similar Threads

  1. Cruise Control
    By MGD in forum Road Runner
    Replies: 16
    Last Post: 05-05-2005, 05:41 PM
  2. New voice itunes voice control software!
    By The Don in forum MacCar
    Replies: 0
    Last Post: 03-25-2005, 10:20 AM
  3. Media player that works with iTunes?
    By serendipity in forum Software & Software Development
    Replies: 6
    Last Post: 01-18-2005, 08:47 AM
  4. Replies: 3
    Last Post: 05-26-2004, 05:08 AM
  5. Replies: 22
    Last Post: 08-13-2001, 02:42 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •