Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
Winamp - Get Album Information - Current Song Playing
Winamp - Get Album Information - Current Song Playing
Now that i have the current song title and the artist showing up on my Phillips remote, i would like to also add the current album that it is playing from. I was looking at the script for the plugin and it appears that it is going to Winamp and grabbing the song title from the player, parse the data down, and returning the name of the current song. Would it be possible to do this and get more information? I would really like to be able to get the Album name so eventually i can make it get the album cover as well.
Thanks for the help!
Thanks for the help!
- jitterjames
- Experienced User
- Posts: 677
- Joined: Thu Aug 13, 2009 4:36 pm
- Location: Quebec, Canada
- Contact:
Re: Winamp - Get Album Information - Current Song Playing
would you be willing to switch to mediamonkey?
Re: Winamp - Get Album Information - Current Song Playing
I am not locked into anything. The only reason i am using the winamp software is because it allows me to use 4 instances of winamp at the same time. I play the audio from each winamp through 4 different sound cards so it allows me to have 4 different playlist piped through my house at any given time. It also allows you to run it with different classes so winamp can control each of the 4 instances of the software independent of each other.
does mediamonkey allow you to run multiple instances and through different sound cards and have winamp control each instance?
does mediamonkey allow you to run multiple instances and through different sound cards and have winamp control each instance?
- jitterjames
- Experienced User
- Posts: 677
- Joined: Thu Aug 13, 2009 4:36 pm
- Location: Quebec, Canada
- Contact:
Re: Winamp - Get Album Information - Current Song Playing
I'm not sure I understand what you are doing or why, but mediamonkey does allow you to run multiple instances and to select any sound device for output, so presumably different instances could use different sound cards.
It might be a bit more resource intensive than winamp though so running 4 instances might not work so well unless it is set up to share resources efficiently. It is a wonderful program though and it allows you to use winamp as a player, so you might as well play around with the free version. It does most of what the gold version does.
If you are playing the same thing on 4 stereos would it not make more sense to use one sound card and send the output from 1 preamp to 4 amps? Like I said, I don't really get what you are doing... for example, do all four sound cards produce perfectly synced output? Do you want the option of sometimes playing different things in different rooms?
I guess the ideal would be if you could send the output from 1 instance of the program to multiple sound cards, but I believe that is only possible with windows XP. Maybe there is some kind of output plugin that could send to multiple outputs, or some sound cards can be configured to send the same analog output to multiple jacks.
I may be way off base though... sorry if I am just confusing things.
It might be a bit more resource intensive than winamp though so running 4 instances might not work so well unless it is set up to share resources efficiently. It is a wonderful program though and it allows you to use winamp as a player, so you might as well play around with the free version. It does most of what the gold version does.
If you are playing the same thing on 4 stereos would it not make more sense to use one sound card and send the output from 1 preamp to 4 amps? Like I said, I don't really get what you are doing... for example, do all four sound cards produce perfectly synced output? Do you want the option of sometimes playing different things in different rooms?
I guess the ideal would be if you could send the output from 1 instance of the program to multiple sound cards, but I believe that is only possible with windows XP. Maybe there is some kind of output plugin that could send to multiple outputs, or some sound cards can be configured to send the same analog output to multiple jacks.
I may be way off base though... sorry if I am just confusing things.
- jitterjames
- Experienced User
- Posts: 677
- Joined: Thu Aug 13, 2009 4:36 pm
- Location: Quebec, Canada
- Contact:
Re: Winamp - Get Album Information - Current Song Playing
on the other hand, to answer your original question:
yes. The plugin can be modified to grab the album text as well. You will need to modify your preferences to include the album in the now playing window.
let me see what I can rig up.
you would think that I should have something more important to do eh?
yes. The plugin can be modified to grab the album text as well. You will need to modify your preferences to include the album in the now playing window.
let me see what I can rig up.
you would think that I should have something more important to do eh?
- jitterjames
- Experienced User
- Posts: 677
- Joined: Thu Aug 13, 2009 4:36 pm
- Location: Quebec, Canada
- Contact:
Re: Winamp - Get Album Information - Current Song Playing
do you need it parsed out to a separate variable?
If not, you don't need to modify the plugin at all, just change your winamp options.
in winamp go to options, general preferences, titles
change the string to this:
[%artist% - ]$if2(%title%,$filepart(%filename%))[ // %album%]
what you should get back from eventghost will then be "artistname - songname // albumname"
if you want you can then use a little python to break it up. Let me know a bit more specifically how you want it to work and we'll see.
If not, you don't need to modify the plugin at all, just change your winamp options.
in winamp go to options, general preferences, titles
change the string to this:
[%artist% - ]$if2(%title%,$filepart(%filename%))[ // %album%]
what you should get back from eventghost will then be "artistname - songname // albumname"
if you want you can then use a little python to break it up. Let me know a bit more specifically how you want it to work and we'll see.
- jitterjames
- Experienced User
- Posts: 677
- Joined: Thu Aug 13, 2009 4:36 pm
- Location: Quebec, Canada
- Contact:
Re: Winamp - Get Album Information - Current Song Playing
if you use this as your advanced title string in winamp:
[%artist% // ]$if2(%title%,$filepart(%filename%)) // [%album%]
you can then use the following python script. (it just prints the values to the log, but you could store them in variables etc)
here's the full macro that you can cut and paste into the macro tree
[%artist% // ]$if2(%title%,$filepart(%filename%)) // [%album%]
you can then use the following python script. (it just prints the values to the log, but you could store them in variables etc)
Code: Select all
info = eg.result.split(" // ")
print "artist:",info[0]
print "song:",info[1]
print "album:",info[2]
here's the full macro that you can cut and paste into the macro tree
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1194">
<Macro Name="Winamp: Get Currently Playing Song Title" Expanded="True">
<Action>
Winamp.GetPlayingSongTitle()
</Action>
<Action>
EventGhost.PythonScript(u'info = eg.result.split(" // ")\nprint "artist:",info[0]\nprint "song:",info[1]\nprint "album:",info[2]')
</Action>
</Macro>
</EventGhost>
Re: Winamp - Get Album Information - Current Song Playing
The main reason i am doing this is i have a 12X8 audio matrix that i use for distributed audio in my house. It allows me to do volume adjustments as well. I have that plugged in to a 12 channel amp and it gives me my distributed audio for my house. So the plan is to have a few playlist that are always running so if you want to listen to jazz, you just switch to the jazz source and you have jazz in that room. If i want it throughout the whole house, i just send that source to all 8 outputs. I am using eventghost with a crestron controller so i can use the 12 button wall panel to change the sources in the rooms.
changing the output to also display the album should work for this stage of what im trying to do. I can have my controller sparse the data as it recieves it. Next step is getting cover art to show up on the remote
but thats a whole other issue.
thanks for the help with this though. I really appreciate it!
on the note of album art, how hard would it be to get the directory that the file that is playing is from. If im playing Paul Revere it would give me
M:/Beastie Boys/Licenses to Ill/
that way i can put folder.jpg and get the album of the current track everytime?
Drabert
changing the output to also display the album should work for this stage of what im trying to do. I can have my controller sparse the data as it recieves it. Next step is getting cover art to show up on the remote
thanks for the help with this though. I really appreciate it!
on the note of album art, how hard would it be to get the directory that the file that is playing is from. If im playing Paul Revere it would give me
M:/Beastie Boys/Licenses to Ill/
that way i can put folder.jpg and get the album of the current track everytime?
Drabert
- jitterjames
- Experienced User
- Posts: 677
- Joined: Thu Aug 13, 2009 4:36 pm
- Location: Quebec, Canada
- Contact:
Re: Winamp - Get Album Information - Current Song Playing
ya it's not that pretty but:
winamp:
[%artist% // ]$if2(%title%,$filepart(%filename%)) // [%album%] // %filename%
python script:
that's kind of redundant though if all your tracks are stored in M:\artist\album
winamp:
[%artist% // ]$if2(%title%,$filepart(%filename%)) // [%album%] // %filename%
python script:
Code: Select all
info = eg.result.split(" // ")
print "artist:",info[0]
print "song:",info[1]
print "album:",info[2]
fullpath=info[3]
path=fullpath.rsplit('\\',1)[0]
print "path:",pathRe: Winamp - Get Album Information - Current Song Playing
yeah no kidding... didnt think about it that way...
how do i use the python script? i just got a new job that has some very talented python programmers that i can "use" for help if i knew how to use them. do you just create a python script in the tree and add it to an action and then catch the results of the script with another command after? like OSD or writing to com port?
I am using a Phillips pronto for my control and sending the information via com port to a serial input on the controller. Working good so far, but i hope to one day get it all through TCP/IP
thanks for the help with this script... i had pretty much given up hope until you came along!
how do i use the python script? i just got a new job that has some very talented python programmers that i can "use" for help if i knew how to use them. do you just create a python script in the tree and add it to an action and then catch the results of the script with another command after? like OSD or writing to com port?
I am using a Phillips pronto for my control and sending the information via com port to a serial input on the controller. Working good so far, but i hope to one day get it all through TCP/IP
thanks for the help with this script... i had pretty much given up hope until you came along!
- jitterjames
- Experienced User
- Posts: 677
- Joined: Thu Aug 13, 2009 4:36 pm
- Location: Quebec, Canada
- Contact:
Re: Winamp - Get Album Information - Current Song Playing
Something like that. I'll give you some pointers in the morning. I don't know anything about pronto or serial stuff though.
- jitterjames
- Experienced User
- Posts: 677
- Joined: Thu Aug 13, 2009 4:36 pm
- Location: Quebec, Canada
- Contact:
Re: Winamp - Get Album Information - Current Song Playing
basically here's what you need to know
http://www.eventghost.org/docs/scripting.html
instead of printing the values, you just assign them to variables. In order for them to be seen outside of your python script, you need to use the event ghost globals.
so you write
eg.globals.albumpath = "c:\blahblahblah"
eg.globals.artistname = someothervariable
and later you can use it, for example in the OSD by writing {eg.globals.albumpath}
not ALL actions will support this method, but most do. If they don't, you can get around it by calling the action from within your python script.
http://www.eventghost.org/docs/scripting.html
instead of printing the values, you just assign them to variables. In order for them to be seen outside of your python script, you need to use the event ghost globals.
so you write
eg.globals.albumpath = "c:\blahblahblah"
eg.globals.artistname = someothervariable
and later you can use it, for example in the OSD by writing {eg.globals.albumpath}
not ALL actions will support this method, but most do. If they don't, you can get around it by calling the action from within your python script.
Re: Winamp - Get Album Information - Current Song Playing
ill give that a shot when i get home tonight.
