Re: Possibly OT: Controlling winamp with Python
Bill Mill schreef: > You could write the Python program as a proxy of the internet stream. > Basically, you would point your proxy at the web stream and receive > the data it sends. At the same time, you would be listening for > connections on some socket on the local machine. You would then point > winamp towards the local socket instead of the internet station. Winamp buffers incoming streams, so that won't be very functional... ;-) -- JanC "Be strict when sending and tolerant when receiving." RFC 1958 - Architectural Principles of the Internet - section 3.9 -- http://mail.python.org/mailman/listinfo/python-list
Re: Possibly OT: Controlling winamp with Python
On Fri, 4 Feb 2005 13:10:10 -0700, rumours say that "Brent W. Hughes" <[EMAIL PROTECTED]> might have written: >I'm running Windows XP and I'm using winamp to listen to internet radio >stations. Occasionally, an annoying commercial will come on. I would like >to write a Python program that, when run, will, in essence, push on winamp's >mute button. Then, after say 20 seconds, it will push the mute button again >to restore the sound. Is such a thing possible? > Search the winamp plugin pages for WinAmpCom, which allows you to control winamp through COM (if you can't find it, let me know by email, I'll send it to you). Much less hassle than my initial attempts to control it with SendMessage and PostMessage etc. -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from RFC1958) I really should keep that in mind when talking with people, actually... -- http://mail.python.org/mailman/listinfo/python-list
Re: Possibly OT: Controlling winamp with Python
Brent W. Hughes wrote: I'm running Windows XP and I'm using winamp to listen to internet radio stations. Occasionally, an annoying commercial will come on. I would like to write a Python program that, when run, will, in essence, push on winamp's mute button. Then, after say 20 seconds, it will push the mute button again to restore the sound. Is such a thing possible? Yes - IIRC WinAmp supports some "global" Windows messages that any app can send to make WinAmp do different things. Don't know if there's a "mute" command, but at the very leasy you could control the volume. You'd have to read their SDK and then use something like ctypes to fire the Windows message - very doable. If that doesn't do what you want, then you could go the more hacky route and grab the WinAmp window and fire a button click in the precise location. Something like AutoIt (which is controllable via Python) could work as well. Another route would be to just mute all audio in the system for 20 seconds - that might be the easiest approach of all. Again, ctypes is your friend - figure out what APIs you'd need to call and people here can help you come up with the Python code to call those APIs. -Dave -- http://mail.python.org/mailman/listinfo/python-list
Re: Possibly OT: Controlling winamp with Python
Hi Brent, Brent W. Hughes wrote: The Python program won't decide whether a commercial is playing, I will. At that point, I will run my program which will press mute, wait 20 seconds, and then press mute again. Actually, I could leave the program running but minimized to the task bar. When I hear the advertisement, I just click on the program in the task bar. It knows what to do from there. You don't need python for this. You can use auto-it to achieve the same thing. You can download it at: http://www.hiddensoft.com/AutoIt/ It is easy to program and it works nicely. There is also some similar thing for python. Perhaps a litle bit more complicated (I haven't tested it): WATSUP - Windows Application Test System Using Python http://www.tizmoi.net/watsup/intro.html Regards, Josef -- http://mail.python.org/mailman/listinfo/python-list
Re: Possibly OT: Controlling winamp with Python
Brent, You could write the Python program as a proxy of the internet stream. Basically, you would point your proxy at the web stream and receive the data it sends. At the same time, you would be listening for connections on some socket on the local machine. You would then point winamp towards the local socket instead of the internet station. If you put a "mute" button on your program, pressing it could trigger your program to begin sending empty data to winamp, and resume sending it at some arbitrary point. Peace Bil Mill bill.mill at gmail.com On Fri, 4 Feb 2005 13:35:04 -0700, Brent W. Hughes <[EMAIL PROTECTED]> wrote: > The Python program won't decide whether a commercial is playing, I will. At > that point, I will run my program which will press mute, wait 20 seconds, > and then press mute again. > > Actually, I could leave the program running but minimized to the task bar. > When I hear the advertisement, I just click on the program in the task bar. > It knows what to do from there. > > Brent > > "Kartic" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Brent, > > > > Question : how will your python script distinguish between a commercial > > and a song? > > > > I can understand if you are writing a streaming client in Python; in > > that case you can analyze the audio stream and decide if it is a > > commercial or a song/music. > > > > Did you check to see if there is already a Winamp plugin that would > > achieve this for you? > > > > Thanks, > > -Kartic > > > > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://mail.python.org/mailman/listinfo/python-list
Re: Possibly OT: Controlling winamp with Python
The Python program won't decide whether a commercial is playing, I will. At that point, I will run my program which will press mute, wait 20 seconds, and then press mute again. Actually, I could leave the program running but minimized to the task bar. When I hear the advertisement, I just click on the program in the task bar. It knows what to do from there. Brent "Kartic" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Brent, > > Question : how will your python script distinguish between a commercial > and a song? > > I can understand if you are writing a streaming client in Python; in > that case you can analyze the audio stream and decide if it is a > commercial or a song/music. > > Did you check to see if there is already a Winamp plugin that would > achieve this for you? > > Thanks, > -Kartic > -- http://mail.python.org/mailman/listinfo/python-list
Re: Possibly OT: Controlling winamp with Python
Brent, Question : how will your python script distinguish between a commercial and a song? I can understand if you are writing a streaming client in Python; in that case you can analyze the audio stream and decide if it is a commercial or a song/music. Did you check to see if there is already a Winamp plugin that would achieve this for you? Thanks, -Kartic -- http://mail.python.org/mailman/listinfo/python-list
Possibly OT: Controlling winamp with Python
I'm running Windows XP and I'm using winamp to listen to internet radio stations. Occasionally, an annoying commercial will come on. I would like to write a Python program that, when run, will, in essence, push on winamp's mute button. Then, after say 20 seconds, it will push the mute button again to restore the sound. Is such a thing possible? Brent -- http://mail.python.org/mailman/listinfo/python-list