The MP3car.com Store  

Welcome to the MP3Car.com forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. Registering will also remove advertisements. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   MP3Car.com > Mp3Car Technical > Software & Software Development

Reply
 
Thread Tools Display Modes
Old 07-29-2005, 01:12 AM   #1
Newbie
 
kykeon's Avatar
 
Join Date: Jan 2005
Location: kansas city area, missouri
Vehicle: 98 toyota rav4
Posts: 20
My Photos: (0)
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
kykeon is offline   Reply With Quote
Sponsored Links
Old 09-17-2005, 04:09 AM   #2
Newbie
 
Join Date: Sep 2005
Posts: 4
My Photos: (0)
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...
craigj is offline   Reply With Quote
Old 09-27-2005, 01:43 AM   #3
Newbie
 
Join Date: May 2005
Posts: 17
My Photos: (0)
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.
sirgeoph is offline   Reply With Quote
Old 10-17-2005, 12:36 PM   #4
Newbie
 
kykeon's Avatar
 
Join Date: Jan 2005
Location: kansas city area, missouri
Vehicle: 98 toyota rav4
Posts: 20
My Photos: (0)
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
kykeon is offline   Reply With Quote
Old 10-17-2005, 12:52 PM   #5
Newbie
 
kykeon's Avatar
 
Join Date: Jan 2005
Location: kansas city area, missouri
Vehicle: 98 toyota rav4
Posts: 20
My Photos: (0)
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
kykeon is offline   Reply With Quote
Old 10-18-2005, 01:04 PM   #6
Low Bitrate
 
Join Date: Mar 2004
Posts: 62
My Photos: (0)
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
babazoid is offline   Reply With Quote
Old 10-20-2005, 10:45 PM   #7
Newbie
 
kykeon's Avatar
 
Join Date: Jan 2005
Location: kansas city area, missouri
Vehicle: 98 toyota rav4
Posts: 20
My Photos: (0)
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
kykeon is offline   Reply With Quote
Old 11-03-2005, 11:42 AM   #8
Low Bitrate
 
Join Date: Sep 2005
Location: North Babylon, NY
Vehicle: 94 Chrysler Concorde
Posts: 77
My Photos: (0)
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
dorgan1983 is offline   Reply With Quote
Old 03-01-2006, 07:30 PM   #9
Newbie
 
Join Date: Mar 2006
Posts: 1
My Photos: (0)
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
cicallini is offline   Reply With Quote
Old 04-02-2006, 04:16 PM   #10
Newbie
rjl6d's CarPC Specs
 
Join Date: Apr 2006
Vehicle: 05 Acura RSX
Posts: 7
My Photos: (0)
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."
rjl6d is offline   Reply With Quote
Sponsored Links
Old 04-11-2006, 12:24 AM   #11
Newbie
 
Join Date: Apr 2006
Posts: 1
My Photos: (0)
inserting tracks

Hey, has anyone figured out how to insert a track into an existing playlist? I can't seem to find the right API calls. The closest one was IITUserPlaylist::AddFile, but this just adds it to the end of the playlist. You can get the play order via IITTrack::PlayOrderIndex, but this is read-only, and I can't insert the track into the middle of the playlist.

Any help would be greatly appreciated!!
mountainbikerak is offline   Reply With Quote
Sponsored Links
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cruise Control MGD Road Runner 16 05-05-2005 04:41 PM
New voice itunes voice control software! The Don MacCar 0 03-25-2005 09:20 AM
Media player that works with iTunes? serendipity Software & Software Development 6 01-18-2005 07:47 AM
Kenwood KDC-W6527 radio CD/MP3/WMA receiver & remote control chewiee Car Audio 3 05-26-2004 04:08 AM
My hardware/Software computer control system - Wish list/feedback - Easy power off DarkWolf General Hardware Discussion 22 08-13-2001 01:42 PM


All times are GMT -5. The time now is 11:41 AM.


Sponsored Links
The MP3car.com Store

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Copyright © 1999 - 2008 Mp3Car.com Inc.
Ad Management by RedTyger
Message Board Statistics