![]() |
#1 |
Junior Member
Join Date: Oct 2004
Posts: 18
|
Detect Silence / Trigger Event
I have a crazy request here and I am just hoping anyone reading can do this. It does not seem like it would be that tough to make happen for someone who knows what they are doing - sadly I don't, I'm not a coder, developer, etc. I just have an idea and need to know how to do it, or whether a plugin that will do it already exists, or if someone would want to create a plugin that does it. Failing all that maybe someone could suggest an "outside" way to get it done (ie: some script or app independent of Winamp that could run alongside to accomplish same goal?)
THE CONCEPT IS THIS: I need some way to have the sound coming through Winamp be monitored in realtime and have any period of silence longer than X seconds detected, where if such a period is detected, an outside event (in my case launching a batch file) will be triggered. Seems simple. Is it? Not knowing anything about Winamp's inner workings, it seems to me that, since Winamp obviously has already the ability of realtime sound monitoring (ie: the analyzer/scope/visualization functionality) there should be some way to have an add-on (plugin?) that could detect some defined length of time that no sound is coming out, and trigger the launching of my batch file upon said event. If that would be harder than it sounds, maybe an external app (some script or exe realtime sound card monitor / silence detector running separately) would be easier? For the curious, here is my entire goal: to 100% automate the restart of dumped live audio streaming. As it is right now, in about half the cases a live stream gets dumped, Winamp's "repeat" feature will turn around and reconnect the stream automatically. The rest of the time, however, the stream does not actually dump, it just dies but remains connected, in which case Winamp does nothing to reconnect, and I just get silence until I manually push "play" again. I wish to find a way to detect X seconds of silence so that in that event a batch file can be launched to send the hotkeys at Winamp to "play" thus restarting the stream with no user intervention. Comments? Thoughts? Suggestions? Please! ![]() |
![]() |
![]() |
![]() |
#2 |
Junior Member
Join Date: Oct 2004
Posts: 18
|
One more thing, this magical function would need to have the ability to launch my batch upon X seconds of silence detected, even in the event Winamp were literally stopped. Either hard coded to just make that batch launch after event is triggered regardless of Winamp current state, or as an option to do so regardless of state. I want this to be so foolproof that even if Winamp were to stop completely, the process would send the "play" command after X seconds of silence regardless. Ideas?
|
![]() |
![]() |
![]() |
#3 |
Junior Member
Join Date: Oct 2004
Posts: 18
|
Ah and if anyone wants to know, the system in question: Winamp v5.05, Windows 2000, Sound card: PCI SBLive CT4760.
|
![]() |
![]() |
![]() |
#4 |
Junior Member
Join Date: Oct 2005
Location: Tiel - Netherlands
Posts: 7
|
It's not a crazy request, I'm looking for the same tool.
Anyone ideas or do you have a plugin like this? Roland. |
![]() |
![]() |
![]() |
#5 |
Senior Member
Join Date: Sep 2005
Location: Berlin, Germany
Posts: 207
|
one way would be a dsp plugin. the only thing i got no idea of is how to detect silence/volume level. if somebody else can do this part i could possibly help with the rest.
|
![]() |
![]() |
![]() |
#6 |
Junior Member
Join Date: Oct 2005
Location: Tiel - Netherlands
Posts: 7
|
I hope someone can make something like this. It is not a big thing. Only when the music is stopped and there is a silence of 5 of 10 seconds, the (DSP-)plugin must send a play-command to winamp... that's all...
I hope someone can make it... Roland. |
![]() |
![]() |
![]() |
#7 |
Senior Member
Join Date: Sep 2005
Location: Berlin, Germany
Posts: 207
|
if it's just hitting play when stopped for 5 seconds i guess i can do this. i'll keep you up to date.
|
![]() |
![]() |
![]() |
#8 |
Junior Member
Join Date: Oct 2005
Location: Tiel - Netherlands
Posts: 7
|
Ok dllmain, thanks for your help!
The only point is, is that winamp sometimes hang while loading a internetradio stream. Sometimes the buffer stands on 66% and load not to 100%. Winamp only plays with a 100% full buffer. If winamp hangs with the stream, I give sometimes a new play-request, winamp connect the stream again and than it plays normally. But, I'm not always at home and sometimes winamp doesn't load the stream correctly. And now I'm looking for a DPS-plugin ore something, that if there is no sound for 5 of 10 seconds, the plugin send automatically a play-command to winamp. Or, maybe is there a options to make a DSP, that watch if winamp plays. If not, then mus the DPS send a play-request. This is maybe another option if the soundcard-detection not works... I hope you can make something, many, many thanks!!! Roland, Netherlands. |
![]() |
![]() |
![]() |
#9 |
Senior Member
Join Date: Sep 2005
Location: Berlin, Germany
Posts: 207
|
i could make it a dsp and see if ModifySamples() gets called. that should do what you need i guess. so let's see how fast i can get it done...
|
![]() |
![]() |
![]() |
#10 |
Senior Member
Join Date: Sep 2005
Location: Berlin, Germany
Posts: 207
|
i could make it shareware and kill every second sample. just kidding.
|
![]() |
![]() |
![]() |
#11 |
Senior Member
Join Date: Sep 2005
Location: Berlin, Germany
Posts: 207
|
|
![]() |
![]() |
![]() |
#12 |
Junior Member
Join Date: Oct 2005
Location: Tiel - Netherlands
Posts: 7
|
WOW!!!!!!!!!!!!!!!!
Super DSP-plugin! This is what I mean! It works great! If there is a silence, winamp gets a play-command! I tested on my own shoutcast-server. I login with winamp, and then I disconnect the shoutcast-server. The buffering of Winamp stops and I saw that Winamp get's a play-command. The I turned on the shoutcast-server and yes, winamp logged in succesfully, and the music starts again! Many, many thanks dllmain for making this plugin! I'm very, very happy now! My radiostation can now run without any (long) silence! Wow, hi, realy good! Roland. |
![]() |
![]() |
![]() |
#13 |
Join Date: Sep 2003
Posts: 27,873
|
damn, i've just been doing this as well though i've done it in a different way basing it on checking the samples and going from there (with some nice configurable actions)
![]() -daz |
![]() |
![]() |
![]() |
#14 |
Junior Member
Join Date: Oct 2005
Location: Tiel - Netherlands
Posts: 7
|
Give it a try! I don't know how dllmain it makes...
On the first place, I'm very happy with the plugin, but maybe is it a nice idea to make the plugin with some options or something? The forum here is special for development of plugin's, so, if you can make it better, try it! Dllmain was the first who makes a silence-detector, but if you want to make another one, who says that's forbidden? Nobody... Other question for Dllmain, how works this plugin you made? Is this a volume-level based plugin, or looks the plugin to winamp if it plays or not? Roland. |
![]() |
![]() |
![]() |
#15 | |
Senior Member
Join Date: Sep 2005
Location: Berlin, Germany
Posts: 207
|
Quote:
|
|
![]() |
![]() |
![]() |
#16 | |
Senior Member
Join Date: Sep 2005
Location: Berlin, Germany
Posts: 207
|
Quote:
|
|
![]() |
![]() |
![]() |
#17 |
Junior Member
Join Date: Oct 2005
Location: Tiel - Netherlands
Posts: 7
|
It's a great plugin Sebastian, simple, but exactly what I mean!
Roland. |
![]() |
![]() |
![]() |
#18 |
Join Date: Sep 2003
Posts: 27,873
|
Silence Detector v1.0
well i assume this works since it works fine on the files locally i could test which have silences but for all i know only dllmain's method may be suitable for this situation ![]() -daz |
![]() |
![]() |
![]() |
#19 |
Senior Member
Join Date: Sep 2005
Location: Berlin, Germany
Posts: 207
|
@dro
the options are nice. how does your plugin do the silence detection exactly? can we have the source? |
![]() |
![]() |
![]() |
#20 |
Join Date: Sep 2003
Posts: 27,873
|
edited to not break the frames and that's the core part of the plugin with it setting/removing the timer as required when null samples/valid samples are detectedcode: -daz |
![]() |
![]() |
![]() |
#21 |
Senior Member
Join Date: Sep 2005
Location: Berlin, Germany
Posts: 207
|
so you are detecting "digital silence". i thought you were analyzing the volume level.
|
![]() |
![]() |
![]() |
#22 | |
Senior Member
|
Quote:
err better question, is one plugin better then the other (lol I geuss i like starting conflict) just out of curiousity, how often does this checking get done? Just curious about resources I guess (probably could stop that loop at the first non-zero bit too :P) |
|
![]() |
![]() |
![]() |
#23 |
Junior Member
Join Date: Oct 2005
Location: Tiel - Netherlands
Posts: 7
|
Maybe is it a idea to make that with some options?
How long must the detector wait before it send a play-request, or/and if you make it on the volume-level, maybe you can config how much dB means silence for the detector. Some music-files have a silence for a copple of seconds... Go go go, and make it! I still have one of dllmain, and it works very good. My internet-connection goes offline today and the plugin sends a play-request, again and again. Even so, after 5 minutes my internetlink is online and yes, winamp connects automatically, and the music goes on. Veeeeeeeeeeeeeeeeeeery good! ![]() Roland. |
![]() |
![]() |
![]() |
#24 |
Junior Member
Join Date: Feb 2006
Posts: 5
|
jumps to next playlist entry
Thanks guy's for working all this out. I have tried both the Silence_Detector_v1_0 & dsp_restless plugins. The Silence_Detector still hung @ 0%
![]() ![]() |
![]() |
![]() |
![]() |
#25 |
Senior Member
Join Date: Sep 2005
Location: Berlin, Germany
Posts: 207
|
well as far as i can remember dsp_restless only emulates hitting "play" not "next track". so i guess this means your playlist entry is just not playable. i know this behavior from trying to play moved mp3 files. does this help?
|
![]() |
![]() |
![]() |
#26 |
Junior Member
Join Date: Feb 2006
Posts: 5
|
thanks for the quick response...
even with just one playlist entry I still get the buffering with both plugins and I have tried diifernt entries. This is a new phenomonon in the last couple of weeks. I startrd a new thread here ( http://forums.winamp.com/showthread....hreadid=238803 ) on this with more detail of what I am experiencing. Thanks for the input dllmain, I'll keep looking for a solution... |
![]() |
![]() |
![]() |
#27 |
Junior Member
Join Date: Mar 2006
Posts: 4
|
Is it possible for the plugin to not be dsp based ?
I have on the same computer winamp that gets an internet stream from a radio station and then re-encodes it and broadcasts it to the shoutcast server running in the background. This is why I can't use both DSP plugins (the shoutcast one and the silence detection). |
![]() |
![]() |
![]() |
#28 | |
Senior Member
Join Date: Sep 2005
Location: Berlin, Germany
Posts: 207
|
Quote:
|
|
![]() |
![]() |
![]() |
#29 |
Junior Member
Join Date: Mar 2006
Posts: 4
|
Thanks for the answer.
Sorry if this has been asked before. |
![]() |
![]() |
![]() |
#30 | |
Senior Member
Join Date: Sep 2005
Location: Berlin, Germany
Posts: 207
|
Quote:
|
|
![]() |
![]() |
![]() |
#31 |
Senior Member
Join Date: Sep 2005
Location: Berlin, Germany
Posts: 207
|
New version:
>> dsp_restless_1_1_2_source.zip   |
![]() |
![]() |
![]() |
#32 |
Senior Member
Join Date: Sep 2005
Location: Berlin, Germany
Posts: 207
|
New version:
>> dsp_restless_1_2_0_source.zip   |
![]() |
![]() |
![]() |
#33 |
Junior Member
Join Date: Oct 2007
Posts: 1
|
make plugin execute batch script
would it be possible to make the plugin execute a batch script?
I would like to make the plugin e-mail me every time there was silence of 30 seconds or more. I would use it to monitor my school's internet radio stream, since I am the one that has to make sure it stays up 24/7 and want to avoid buying hardware. |
![]() |
![]() |
![]() |
#34 |
Junior Member
Join Date: Jan 2007
Posts: 1
|
Hi, I'm looking for something similar to this as well.
I'm after something I can run on my stream server which will listen to the shoutcast stream, then if it detects X seconds of silence, it will trigger an event - or run a bash script etc. In my case, I want to run a script to ban the IP of the source, and kick it off the server. I've been looking at the Java Sound API, thinking of writing something my self, but I don't know Java very well (yet!), and I can't see how I'd use it. Can anyone help please? ![]() |
![]() |
![]() |
![]() |
#35 |
Junior Member
Join Date: May 2019
Posts: 1
|
Restless not working reliably
Good day everybody.
So i looked for a solution to keep a shoutcast stream going that i feed into an FM exciter/Transmitter. I use Stereo Tool as a plugin for processing audio. The restless plugin does not seem to work reliably in my case. My ISP reset there network every morning at 3AM. among other interruptions it did manage to keep y feed alive for about 3 days without me hitting the play button again. But mosty it's as if its not there at all. Is there any suggestions? |
![]() |
![]() |
![]() |
#36 | |
Junior Member
Join Date: Sep 2020
Posts: 1
|
Quote:
|
|
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|