Modstream and silence detection

You have a question or need an advice about how to do something? Ask it here!
Post Reply
AladnaFm
Posts: 111
Joined: 16 Apr 2014 23:29
Modstream and silence detection

Post by AladnaFm »

Hi,

we are using the modstream but sometimes it will happen that the connection is lost.
There for we had setup the silence detection.
But when a silence happens and the connection drops the playlist start playing but there is no sound coming out.
What could this be? Is the connection not completely disconnected?

Greetz Jesper
User avatar
radio42
Site Admin
Posts: 9139
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Modstream and silence detection

Post by radio42 »

Can you please send me the command on how you start the MODStreamWatcher?
As well please also send me your commands your trigger with OnSilenceDetected.

However, when the MODStream Player looses its connection, it automatically disconnects itself and thus resumes any paused playlist.
If this is not happening, I can only assume, that the stream is still connected.

Do you send a MODSTREAM_WATCHER_STOP command at any time? If not, please try to do so, as else the MODStreamPlayer might still be running? Is its windows being closed?
And what are you exactly doing when you detect silence? Are you somehow changing the volume via control commands yourself?
AladnaFm
Posts: 111
Joined: 16 Apr 2014 23:29
Re: Modstream and silence detection

Post by AladnaFm »

The job it needs to do when silence detected is create a playlist from a script and start playing till the connection is re established.
Volume is not changing or changed.

The modstream we start manually.

We use the following command for onsilencedetection:

PLS_CURRENT_CLOSE
SLEEP 1000
PROGRAM_STARTSCRIPT |Automaat|${now}|true
PLS_CURRENT_AUTOPLAY_ON

But what I have seen now playlist isn't started but only pre loaded. So no wonder there is no audio.
The autoplay goes ON and directly OFF again.
So the playlist never starts.

Never used the command Stop modwatcher because the modtream cannot be closed entirely because it needs to continue when it is reconnected.
AladnaFm
Posts: 111
Joined: 16 Apr 2014 23:29
Re: Modstream and silence detection

Post by AladnaFm »

The scheduler was off indeed.
Changed the settings to the one you gave me and it is working!
Thanks!

Greetz Jesper
User avatar
radio42
Site Admin
Posts: 9139
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Modstream and silence detection

Post by radio42 »

The playlist is not started automatically, as I assume your Scheduler is NOT running.
In this case, a manually started program via PROGRAM_STARTSCRIPT is only started automatically (AutoPlay will be turned on) in case you specified set the 'Scheduler Stop Option' to 'DontStopAutoPlay' (see general settings, section Scripts/Scheduler).
If you set the 'Scheduler Stop Option' to 'DontStopAutoPlay', you won't even need the subsequent PLS_CURRENT_AUTOPLAY_ON command!

Your PLS_CURRENT_AUTOPLAY_ON command is failing due to the multi-threading nature of ProppFrexx.
A new Program/Playlist is started asynchronious in a bachground thread. This means, it take a bit to create a new playlist, execute the script, scheduler the initial tracks and load them to the DJ Players.
While all this is done in the background, the application is not blocked, as such, the next control-command (PLS_CURRENT_AUTOPLAY_ON) is already executed, while the playlist is not fully created, as such, it kind of fails unattended.

Here the 2 options you have:

1) Set the 'Scheduler Stop Option' to 'DontStopAutoPlay' and use this command sequence:
PLS_CURRENT_CLOSE
SLEEP 1000
PROGRAM_STARTSCRIPT |Automaat|${now}|true

2) Add another one or two Sleep commands (make sleep time is 2 sec):
PLS_CURRENT_CLOSE
SLEEP 1000
PROGRAM_STARTSCRIPT |Automaat|${now}|true
SLEEP 2000
SLEEP 2000
PLS_CURRENT_AUTOPLAY_ON

Post Reply