Announcement

Collapse
No announcement yet.

Detect Silence / Trigger Event

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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?

    Comment


    • #3
      Ah and if anyone wants to know, the system in question: Winamp v5.05, Windows 2000, Sound card: PCI SBLive CT4760.

      Comment


      • #4
        It's not a crazy request, I'm looking for the same tool.
        Anyone ideas or do you have a plugin like this?

        Roland.

        Comment


        • #5
          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.
          GPL Freeverb Winamp Plugin

          Comment


          • #6
            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.

            Comment


            • #7
              if it's just hitting play when stopped for 5 seconds i guess i can do this. i'll keep you up to date.
              GPL Freeverb Winamp Plugin

              Comment


              • #8
                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.

                Comment


                • #9
                  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...
                  GPL Freeverb Winamp Plugin

                  Comment


                  • #10
                    i could make it shareware and kill every second sample. just kidding.
                    GPL Freeverb Winamp Plugin

                    Comment


                    • #11
                      so let's see if this is what you asked for: dsp_restless_111.zip

                      source code included.
                      GPL Freeverb Winamp Plugin

                      Comment


                      • #12
                        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.

                        Comment


                        • #13
                          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) now do i release it or not..

                          -daz
                          WACUP Project <‖> "Winamp Ramblings" - Indie Winamp Dev Blog

                          Comment


                          • #14
                            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.

                            Comment


                            • #15
                              Originally posted by DrO
                              now do i release it or not..
                              mine is nothing but a timer. of course you do!
                              GPL Freeverb Winamp Plugin

                              Comment

                              Working...
                              X
                              😀
                              🥰
                              🤢
                              😎
                              😡
                              👍
                              👎