iTunes Thread last updated on 2008-09-03 02:19:52

Posted by member 349278 on 2006-10-23 08:44:21

Hi, I'm looking to use iTunes in conjunction with LiteStep (much in the same way as WinAmp) Is there a module that performs such functions. I've looked everywhere but all I see mentioned is "iTunesstat" Which I can't find a link to anyway. I've found a PHP script that allows the control of iTunes using COM interfaces, Is it possible to code a module from that?

sorry about any errors I've made, I'm a new user :P

link to PHP Scripts: http://home.insightbb.com/~hooboy/iTRemote.zip

Posted by member 5575 on 2006-10-23 09:25:28 link

The itunesStat-0.2 and iTunesControl-0.3 modules allow you to control iTunes and display track information on an xlabel. Just run the !netinstall bang with those names and they should be downloaded from the appropriate netloadmodule site. If they aren't, you probably need to update your list of netloadmodule sites. ;)

Posted by member 349278 on 2006-10-23 09:32:39 link

Ah, Thanks a lot :) Works like a charm,

Is there any source code for iTunesStat as I need a way to get the playback time.

I'm just changing a theme I found at the moment and it'd be great if I could get it working fully with itunes :)

Posted by member 5575 on 2006-10-23 19:36:40 link

You'd have to contact the module author (look in docs) about that - I don't know if the source has ever been released.

Posted by member 349278 on 2006-10-24 06:42:48 link

Don't worry, I found it :) I've added a few new variables also (Track Position and PlayerState)

Since I'm working on it, does anyone have any requests?

Posted by member 5575 on 2006-10-24 10:12:41 link

Yeah, let us know when you're done with the mods, and make the source available when you release the update! =) Could you provide time elapsed, time remaining, and total track time? That'd be great.

Posted by member 349278 on 2006-10-24 10:46:39 link

Sure :)

I'm going to be editing itunescontrol (mainly to add repeat, shuffle and volume slider support) any requests for that one?

Posted by member 1949 on 2006-10-24 13:26:49 link

D4rkDrago0n very nice to see this work being done on this mod.
please let us know when your done and we will get it out for nlm to dl.

Posted by member 5575 on 2006-10-25 00:33:30 link

Imagine you haven't been using LS, and then read the second sentence above. ;)

Posted by member 349278 on 2006-10-25 03:45:52 link

I'm really only an LS newb so I had to stop and figure it out for a couple of seconds :)

Posted by member 349278 on 2006-10-25 14:06:36 link

Ok, I uploaded my first iteration of 'iTunesStat Extended' onto this site, [s]It will be available after being reviewed (By moderators I assume).[/s]

Let me know what you think :)

edit: source is there also for any who wish to look (it's in Visual C++ 2003 format)

edit: it's available now at http://www.litestep.net/?section=7&catId=1&action=details&id=141

Posted by member 5575 on 2006-10-25 17:52:21 link

Great, thanks, I'll try it out soon.

Update: %trackpos worked fine, but the other three new parameters wouldn't work for me. I checked out the source, and couldn't see any reason why they'd be different - unless perhaps the iTunes COM interface has changed (I use version 7.0.1.8)? When I tried using any of the other three (%tracklength,%trackremaining, or %playerstate) I just saw the pattern displayed on the target label.

One other thing - if iTunes uses [] in the artist/album/track string, it causes xlabel to choke. This isn't particular to your version, but it might be addressed in a future update, i.e., "escaping" []'s so that xlabel will display them properly.

Posted by member 349278 on 2006-10-26 05:15:17 link

Sure, I'll look into that :)

How are you calling the other params?

Posted by member 212670 on 2006-10-26 06:17:43 link

Suggestion: Since this will end up being loaded with NLM, I'd suggest changing the file name slightly. Typically it's modulename-ver#.zip, so something like iTunesStat_Extended-0.1.zip would be better, or itunesstat_ex-0.1.zip. Basically, it's just the dash missing. :P

Btw, it's really great to see someone new who can do some module stuff. =)

Posted by member 349278 on 2006-10-26 07:52:19 link

I've posted a new update (has to be moderated first)

changes:
v0.2
----
:: Escaped "[" and "]" to fix errors in xLabel
:: Fixed error where Some information would not be displayed correctly

I've also changed the filenames to "iTunesStat_Extended-0.2.*" as requested by xcal

In the next release I'm going to implement a bang like in geekamp where it alternates %trackpos between Elapsed time and Remaining time


any more requests?

Posted by member 1949 on 2006-10-26 09:37:26 link

this file has been uploaded on:
*NetLoadModuleSite "http://www.modules.nbi-studio.com/"

Filename has been changed to this
itunesstatex-0.2.zip

Download thru nlm like this using the netloadsite string above
*NetLoadModule itunesstatex-0.2

Thanks for updating this!

Please Note!!!!!
Module name change due to andymon and I having different names. I also included the source in the zip

Posted by member 5575 on 2006-10-26 11:14:00 link

Indeed! I'll try the new version ASAP and see how things go. What was the error you fixed, BTW? Otherwise I'll have to go and winmerge the sources. =)

@immortal: NLM worked fine for the new version - thanks for doing that.

Posted by member 349278 on 2006-10-26 11:15:44 link

haha, a stupid error on my front, I forgot to update the number of parameters in itunestat.h

@ immortal: Thanks a lot for putting this on NLM

Posted by member 1949 on 2006-10-26 12:05:50 link

Please read my edited post above!
D4rk when you fix the itunestat.h email me a new copy and I can reupload and let andy know about this as well...

Posted by member 5575 on 2006-10-26 12:06:44 link

Ahhh, Ok, that's why I couldn't see anything wrong - it wasn't in the .cpp file. =) All of the parameters are working fine now for me.

My (Litestep.exe) CPU use tends to go through the roof when I've got iTunes running and this module loaded though. If I unload it, while keeping everything else the same, CPU use returns to normal. I've got the info displaying on an xlabel (xlabel-4.0 with xPaintclass) that is hooked into another xlabel, no transparency or alphamapping used. I don't know if that might be making a difference or not.

Update: CPU use remained high even after I killed iTunes. Perhaps it has to do with the way the info is requested through the COM interface?

Posted by member 349278 on 2006-10-26 12:56:05 link

@immortal: I fixed it in 0.2, so you should already have an up-to-date version...... and who's andy? XD

@Boreas: I noticed that also, I think it is the inactive labels, I'll look into a more efficient way of dealing with them



edit:

I've got CPU usage down to 0 when it's idle

has anyone got any ideas on how to bring it down whilst getting the song data,

Heres roughly whats going on

Wait for update timer to expire (default half a second)
{
Check if iTunes is still open
{
Set all stats to zero;
Get all new stats from itunes;
Set new stats to variables;
Parse String 1;
Set Label 1;
Parse String 2;
Set Label 2;
Parse String 3;
Set Label 3;
Parse String 4;
Set Label 4;
}
}
Repeat;




edit: could someone be really great and check to see if it is specific perameters that are causing increased CPU usage, if it it I could work on sliming them down.

I'd do it myself but I have previous commitments that I need to partake in

Posted by member 1949 on 2006-10-26 13:40:22 link

@immortal: I fixed it in 0.2, so you should already have an up-to-date version...... and who's andy? XD

Ya I would say your new to the scene... lol
Andy is the creator of all the xmodules
His website:
http://www.ls-universe.info/news.php

Posted by member 349278 on 2006-10-26 13:56:38 link

heh, yeah :) How exactly should I contact him?

*Sees screename in big bold letters*

I'm getting a little publicity aren't I :)

Posted by member 1949 on 2006-10-26 15:15:32 link

All module coders are revered in the community!
Reach him here:
andymon at ls-universe.info

Posted by member 5575 on 2006-10-26 15:29:57 link

I'll try to check out the various parameters and see if one in particular is responsible, but it's not likely to happen until next week. I'm moving on Saturday, and will have no net connection until next Monday, unless I go in to work this weekend.

Posted by member 412562 on 2008-09-03 01:57:53 link

is there any module for Ares Destiny?? coz i rarely use itunes..:D

Posted by member 412562 on 2008-09-03 02:19:52 link

oh and can someone share how to configure it pls thnx