PDA

View Full Version : Get WinAMP all titels from playlist and ID3-Tags



MMcM
October 13th, 2002, 12:55 PM
1. Do you want to poll for changes in the playlist and send them out asynchronously, or do you want to refresh the list on demand?

If the former, then events could be added to DVDSpy's Winamp plug-in to do this. Hopefully computing the payload periodically like that would not be too expensive even when the playlist gets long.

If, on the other hand, you want to get the list synchronously, it might make sense to do it another way. Using the SendMessage plug-in, send message 1024 (= 0x400 = WM_USER = WM_WM_IPC) with wParam 0 and an lParam 120 (= IPC_WRITEPLAYLIST) to a Target Class Name Winamp v1.x and Executable winamp.exe. Winamp will write c:\Program Files\Winamp\winamp.m3u, its persistent playlist representation. It's a text file with a header line and a couple of lines for each entry.

Once you have the playlist in some form, do you intend to parse it on the PDA side? If so, then Winamp's format may be good enough. Then you just need something in GVMS or the Serial plug-in to load a text file into a variable or to send a file out the serial connection straight. Either of those might be generally useful.

2. Winamp does not give its plug-ins access to this information. At least not last time I looked. I think that the expectation is that given the .mp3 filename, they could parse the tags themselves. With that understanding, I've always imagined that the right way to do this is to have a plug-in that takes the name of a file in a variable and puts ID3 info in other variables. Internally, it would use one of the several open source ID3 libraries. That said, I haven't actually written any such thing.

(In the same vein, I've always imagined that there could be a plug-in to get MBM info or check mail with simple MAPI and route them from event payloads to the LCD plug-in, rather than having this built-in like in LCDC. But I haven't done that either. :wink: )

MMcM
October 13th, 2002, 12:55 PM
1. As I said, an enhancement to GVMS is needed to get the contents of the file into a variable.

Fortunately, this enhancement is already in the works. Ron has succumbed to temptation and will make GVMS a real programming language. All the usual scripting languages have some way of reading files.

For example, if Lua is chosen, you would need something like the following:


readfrom("c:\\Program Files\\Winamp\\winamp.m3u")
playlist = read("*a")
readfrom()

Then just tell the Serial plug-in to output [playlist]. There is a prototype of the Lua conversion. Look for references in the Developers forum.

2. Yes, that is what I mean. DVDSpy tells Girder the name of the current media file. Something else takes this file and extracts the ID3 info. Although this may sound complicated, it is really no more work than if DVDSpy did it itself, since Winamp does not provide direct ID3 support (that I am aware of). The new code could also be a GVMS extension function, if those end up being supported, since it manipulates variables more than noting events or taking actions.

MMcM
October 13th, 2002, 12:55 PM
I've always imagined that the right way to do this is to have a plug-in that takes the name of a file in a variable and puts ID3 info in other variables.

There is now an ID3 plug-in that does this. In addition to getting the Artist name reliably, you can display things like Genre on your LCD too. Or even add user frames to your files and completely control what's displayed.

I have not investigated whether this might have been done differently with the new version of Winamp. Now that Winamp plugins are more powerful, perhaps the Girder / DVDSpy one could send more in events easily. In any case, it's still appropriate for the stable 2.80 version and for other players.

cam
October 13th, 2002, 12:55 PM
Hello.

Girder is a great tool! I love it!

But I have a big problem:
Is it possible to get all titles from the winamp's playlist to girder, because I would like to send all song names over the serial plugin of girder.
My palm is connected over the com1 port to control winamp and other programs with girder. DVDspy is a great plugin and gives me the basic informations (current title, playtime, ...).

2.
How is it possible to get the ID3-tag informations of the current song into girder?


I can't find a solution. :cry:


Thank you for helping me.
Bye

cam
October 13th, 2002, 12:55 PM
Hi MMcM,

thank you for your detailed answer. It's very useful for us.
We have just started to actualize the file winamp.m3u with IPC_WRITEPLAYLIST and it works fine. But how can we get the file into girder?
I think it's a problem.

2.
You mean we nead a own program/plugin for girder to get the ID3-informations directly from the mp3-file?


Thank you
CAM

cam
October 13th, 2002, 12:55 PM
Hi MMcM,

generically I find, "Girder" has the best support. Every question from me was answered. Thank you @all. :P


1. I will wait for the next release with the extended GVMS with the file support.
In the mean time, I think, it could work to get the content of a file over the ieventc.exe. I will try to test the call "ieventc.exe [eventname] < winamp.m3u".


2. I could write a own plugin for girder to read ID3 infos directly from the mp3 file.
What do you mean? Is this a good idea or should I wait for a extension of a new GVMS?


Thank you
CAM

cam
October 13th, 2002, 12:55 PM
Hi MMcM,

thank you for your work! :)
I will download it...


Greetings
CAM

cam
October 13th, 2002, 12:55 PM
Hi MMcM,

the ID3-Plugin works fine!
Thanks!


CAM