Winamp
Winamp
I have created a plugin which is a companion to the existing Winamp plugin.
Get it from here :-
http://eg.wolf359.cjb.net/plugins/winampex.zip
v1.0
adds a bunch of winamp stuff like :-
GetPlayingSongTitle()
GetRepeatStatus()
SetRepeatStatus()
ToggleRepeatStatus()
GetShuffleStatus()
SetShuffleStatus()
ToggleShuffleStatus()
GetVolume()
SetVolume()
GetSampleRate()
GetBitRate()
GetChannels()
GetPosition()
GetLength()
GetElapsed()
GetDuration()
I created this plugin out of necessity, I originally created all these in girders lua, a while ago, but now need them in EG so here they are.
I use them all for showing info on my serial VFD (SerialVFD plugin coming soon) on my mediabox when winamp is playing.
Matt.
Get it from here :-
http://eg.wolf359.cjb.net/plugins/winampex.zip
v1.0
adds a bunch of winamp stuff like :-
GetPlayingSongTitle()
GetRepeatStatus()
SetRepeatStatus()
ToggleRepeatStatus()
GetShuffleStatus()
SetShuffleStatus()
ToggleShuffleStatus()
GetVolume()
SetVolume()
GetSampleRate()
GetBitRate()
GetChannels()
GetPosition()
GetLength()
GetElapsed()
GetDuration()
I created this plugin out of necessity, I originally created all these in girders lua, a while ago, but now need them in EG so here they are.
I use them all for showing info on my serial VFD (SerialVFD plugin coming soon) on my mediabox when winamp is playing.
Matt.
- Bitmonster
- Site Admin
- Posts: 2239
- Joined: Mon Feb 06, 2006 10:28 pm
- Bitmonster
- Site Admin
- Posts: 2239
- Joined: Mon Feb 06, 2006 10:28 pm
- Bitmonster
- Site Admin
- Posts: 2239
- Joined: Mon Feb 06, 2006 10:28 pm
thread hijack
pardon my thread hijack... but:
using the winamp plugin to grab a playing song's name, what's the best practice to monitor winamp if I want to, say, display the track name via OSD on track change? is it a bad practice to keep checking winamp and comparing the previous title to the new? is there a good way to grab an "on track change" trigger from winamp?
using the winamp plugin to grab a playing song's name, what's the best practice to monitor winamp if I want to, say, display the track name via OSD on track change? is it a bad practice to keep checking winamp and comparing the previous title to the new? is there a good way to grab an "on track change" trigger from winamp?
I wouldn't say bad practice, obviously not the best, but until an easier method comes along we are all stuck with this one. 
I use it, I use it every 250ms, so 4 times a second i get the new values.
It doesn't talk to winamp directly, it uses the winapi (GetWindowtText) to return the title of winamp's window and after some string manipulation you get the song title.
One could write a dedicated winamp plugin (winamp dll) that eg interfaces to winamp with, I have seen them, girder has one, but it only sent an event every 1000ms (configured inside the winamp plugin), so your osd could be out by 1 second or so (me being a stickler for speedy updates i wasn't happy with that), and if girder crashed or exited then you had to restart winamp to get the plugin events working again.
EG's plugin is isolated, if winamp is running you get the values, if not then you don't, if eg stops / starts there is no need to restart winamp, you will get the value no matter what.

I use it, I use it every 250ms, so 4 times a second i get the new values.
It doesn't talk to winamp directly, it uses the winapi (GetWindowtText) to return the title of winamp's window and after some string manipulation you get the song title.

One could write a dedicated winamp plugin (winamp dll) that eg interfaces to winamp with, I have seen them, girder has one, but it only sent an event every 1000ms (configured inside the winamp plugin), so your osd could be out by 1 second or so (me being a stickler for speedy updates i wasn't happy with that), and if girder crashed or exited then you had to restart winamp to get the plugin events working again.
EG's plugin is isolated, if winamp is running you get the values, if not then you don't, if eg stops / starts there is no need to restart winamp, you will get the value no matter what.

yeah... it kinda gives me the creeps to think about that process running 4 times a second, all day long. i'm probably over-reacting.
i'm going to experiment with this winamp plugin:
http://www.winamp.com/plugins/details.php?id=141842
[edit: now looking at:
http://www.winamp.com/plugins/details.php?id=138883
]
it writes to a text file whenever the track changes. it gets its formatting from another text file, so you can include whatever data you want.
then i'll set EG to watch the directory that this writes to. If I remember correctly, windows gives EG a call when the directories contents change. EG doesn't have to constantly watch it.
Maybe a little less overhead... maybe not...
the only prob i'm having with that plugin is that it doesn't seem to be writing the correct data when playback stops.
what would be NICE is if there was a plugin that calls a URL or sends a windows message on track change. but alas, i'm not a C programmer.
i'm going to experiment with this winamp plugin:
http://www.winamp.com/plugins/details.php?id=141842
[edit: now looking at:
http://www.winamp.com/plugins/details.php?id=138883
]
it writes to a text file whenever the track changes. it gets its formatting from another text file, so you can include whatever data you want.
then i'll set EG to watch the directory that this writes to. If I remember correctly, windows gives EG a call when the directories contents change. EG doesn't have to constantly watch it.
Maybe a little less overhead... maybe not...
the only prob i'm having with that plugin is that it doesn't seem to be writing the correct data when playback stops.
what would be NICE is if there was a plugin that calls a URL or sends a windows message on track change. but alas, i'm not a C programmer.
- Bitmonster
- Site Admin
- Posts: 2239
- Joined: Mon Feb 06, 2006 10:28 pm
There is a plugin for Winamp that exposes many properties through ActiveX/COM:
http://www.myplugins.info/activewinamp.htm
It has event hooks for track changes. ActiveX can easily be handled with Python. As far as I'm concerned I'm not so interested in writing something for Winamp. But maybe someone else is willing to take the job.
http://www.myplugins.info/activewinamp.htm
It has event hooks for track changes. ActiveX can easily be handled with Python. As far as I'm concerned I'm not so interested in writing something for Winamp. But maybe someone else is willing to take the job.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
i've got that 2nd plugin working OK for now:
http://www.winamp.com/plugins/details.php?id=138883
it makes an HTTP post with a form containing track status info.
it's not gonna be fast enough for thug's .25 second response time, but it's serving my needs. i'll keep an eye out for a notification plugin for winamp that's less of a duct-tape solution.
http://www.winamp.com/plugins/details.php?id=138883
it makes an HTTP post with a form containing track status info.
it's not gonna be fast enough for thug's .25 second response time, but it's serving my needs. i'll keep an eye out for a notification plugin for winamp that's less of a duct-tape solution.
Re: Winamp
hi,
i have got a problem. How can i tell winamp to repeat just one song? (at the moment, "toggle repeat" turns on "repeat all" or "nothing")
mfg morph
i have got a problem. How can i tell winamp to repeat just one song? (at the moment, "toggle repeat" turns on "repeat all" or "nothing")
mfg morph
Re: Winamp
Looks great!
Would you be able to add something to play internet radio stations?
Winamp allows you to save a station as a playlist -- perhaps it's easier to play a playlist?
Perhaps your Choose File action could be modified to choose a playlist file, open it and play it?
My ideal is to use a button on my remote to correspond to a particular radio station, open and play it.
What do you think?
Would you be able to add something to play internet radio stations?
Winamp allows you to save a station as a playlist -- perhaps it's easier to play a playlist?
Perhaps your Choose File action could be modified to choose a playlist file, open it and play it?
My ideal is to use a button on my remote to correspond to a particular radio station, open and play it.
What do you think?
Re: Winamp
cycleops,
I use playlists and trigger the "Start Program: winamp.exe" action with the playlist file as the command line option.
I use playlists and trigger the "Start Program: winamp.exe" action with the playlist file as the command line option.
Re: Winamp
Hi everyone,
I did some changes to the Winamp plug-in I would like to share with you:
- Automated feedback on track change, play-list length change, status change
- New action: Jump To Time
- New action: Jump To Track Nr.
- New action: Clear Playlist
- New actions: EQ change bands and get states
- New action: Get Play Status
Check it out!
I did some changes to the Winamp plug-in I would like to share with you:
- Automated feedback on track change, play-list length change, status change
- New action: Jump To Time
- New action: Jump To Track Nr.
- New action: Clear Playlist
- New actions: EQ change bands and get states
- New action: Get Play Status
Check it out!

- Attachments
-
- __init__.py
- (32.66 KiB) Downloaded 319 times